/* =========================================================
   Process Pros of the Lowcountry, LLC — demo site
   Brand system lifted straight from processpros-llc.com:
   the RCKN chevron mark, the blue/green signal palette, and
   the system-font + monospace-label voice of the main site.
   ========================================================= */

:root {
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;

  --bg: #ffffff;
  --surface: #f4f7fb;
  --surface-2: #e7edf4;
  --ink: #1c2430;
  --muted: #5a6472;
  --faint: #8a95a3;
  --line: rgba(28, 36, 48, 0.08);
  --line-strong: rgba(28, 36, 48, 0.14);
  --signal: #3a9a30;
  --signal-soft: #e6f6e3;
  --deep: #3d66c4;
  --deep-ink: #ffffff;
  --screw: rgba(61, 102, 196, 0.14);

  --mark-1: #bfdce9;
  --mark-2: #3d66c4;
  --mark-3: #5cc050;

  --ok: #3a9a30;      --ok-soft: #e6f6e3;
  --wait: #3d66c4;    --wait-soft: #edf3ff;
  --stop: #b64737;    --stop-soft: #fae7e4;
  --idle: #7d8da3;    --idle-soft: #eef3f8;

  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
  --shadow: 0 1px 2px rgba(28,36,48,.05), 0 8px 24px -12px rgba(28,36,48,.18);
  --shadow-lg: 0 24px 60px -20px rgba(28,36,48,.28);
  --maxw: 1240px;
  --topbar-h: 58px;
  --pad: 28px;
}

[data-theme="dark"] {
  --bg: #0d1726;
  --surface: #101d2f;
  --surface-2: #14273d;
  --ink: #edf3ff;
  --muted: #a8b8d1;
  --faint: #7488a6;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.12);
  --signal: #5cc050;
  --signal-soft: #17331d;
  --deep: #2c4c99;
  --deep-ink: #edf3ff;
  --screw: rgba(190, 214, 255, 0.12);

  --mark-1: #395979;
  --mark-2: #5b85e0;
  --mark-3: #5cc050;

  --ok: #5cc050;      --ok-soft: #17331d;
  --wait: #80a6ff;    --wait-soft: #142540;
  --stop: #e27968;    --stop-soft: #2d1f1d;
  --idle: #9aaec7;    --idle-soft: #162536;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.9);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s ease, color .25s ease;
}
body.is-locked { overflow: hidden; }

a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: var(--r-sm); }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--bg); padding: 10px 16px;
  border-radius: var(--r-md); text-decoration: none; transition: top .18s ease;
}
.skip-link:focus { top: 8px; }

.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.struck { text-decoration: line-through; opacity: .6; }
.is-late { color: var(--stop); }
.big { font-size: 17px; font-weight: 600; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin: 0; }

.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--signal); flex: none; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__inner {
  height: 100%; display: flex; align-items: center; gap: 18px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand__mark { width: 30px; height: 17px; flex: none; display: block; }
.brand__name {
  font-family: var(--font-display); font-weight: 700; font-size: 15.5px;
  display: flex; flex-direction: column; line-height: 1.12; min-width: 0;
}
.brand__sub {
  font-family: var(--font-mono); font-weight: 400; font-size: 9.5px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin-top: 2px; white-space: nowrap;
}

.topnav { display: flex; align-items: center; gap: 2px; }
.topnav a { text-decoration: none; font-size: 13.5px; color: var(--muted); padding: 8px 12px; border-radius: var(--r-sm); }
.topnav a:hover { color: var(--ink); background: var(--surface-2); }

.theme-toggle {
  width: 38px; height: 34px; display: grid; place-items: center; flex: none;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--line-strong); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; min-height: 42px; border-radius: var(--r-md);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: transform .12s ease, background-color .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--deep); color: var(--deep-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--deep) 86%, #000); }
[data-theme="dark"] .btn--primary { background: var(--signal); color: #10201C; }
[data-theme="dark"] .btn--primary:hover { background: color-mix(in srgb, var(--signal) 86%, #fff); }
.btn--ghost { border-color: var(--line-strong); background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--ok { background: var(--ok); color: #fff; }
.btn--ok:hover { filter: brightness(1.08); }
.btn--danger { background: var(--stop); color: #fff; }
.btn--danger:hover { filter: brightness(1.08); }
.btn--danger-ghost { border-color: var(--stop); color: var(--stop); background: transparent; }
.btn--danger-ghost:hover { background: var(--stop-soft); }
.btn--sm { padding: 8px 14px; min-height: 38px; font-size: 13.5px; }
.btn--xs { padding: 5px 11px; min-height: 32px; font-size: 12.5px; }
.btn--block { width: 100%; }

.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-size: inherit;
}

.iconbtn {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer; color: var(--muted);
}
.iconbtn:hover { border-color: var(--stop); color: var(--stop); }
.iconbtn svg { width: 14px; height: 14px; }

/* =========================================================
   LANDING
   ========================================================= */
.hero { padding: 72px 0 24px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 54px; align-items: center; }
.hero h1 {
  font-size: clamp(29px, 4.5vw, 53px);
  font-stretch: 110%; text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: var(--muted); display: block; }
.hero__lead { font-size: 17.5px; color: var(--muted); max-width: 46ch; margin: 0 0 26px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__note { margin-top: 22px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }

/* signature: equipment nameplates, one per product */
.plates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plate {
  position: relative; display: block; text-decoration: none;
  background-color: var(--deep); color: var(--deep-ink);
  border: 1px solid color-mix(in srgb, var(--deep-ink) 16%, transparent);
  border-radius: var(--r-md); padding: 20px 18px 18px;
  background-image:
    radial-gradient(circle, var(--screw) 1.6px, transparent 1.8px),
    radial-gradient(circle, var(--screw) 1.6px, transparent 1.8px),
    radial-gradient(circle, var(--screw) 1.6px, transparent 1.8px),
    radial-gradient(circle, var(--screw) 1.6px, transparent 1.8px);
  background-position: 9px 9px, calc(100% - 9px) 9px, 9px calc(100% - 9px), calc(100% - 9px) calc(100% - 9px);
  background-repeat: no-repeat;
  background-size: 7px 7px;
  transition: transform .18s ease, border-color .18s ease;
}
.plate:hover, .plate:focus-visible { transform: translateY(-3px); border-color: var(--signal); }
.plate__id {
  display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--mark-3); margin-bottom: 12px; font-weight: 600;
}
.plate__name { display: block; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.01em; margin-bottom: 6px; }
.plate__spec { display: block; font-size: 12.5px; color: color-mix(in srgb, var(--deep-ink) 62%, transparent); line-height: 1.45; }
.plate__go { display: block; margin-top: 14px; font-size: 12.5px; font-weight: 600; color: var(--mark-3); }

/* sections */
.section { padding: 78px 0; }
.section__head { max-width: 62ch; margin-bottom: 38px; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 38px); font-stretch: 108%; margin-bottom: 14px; }
.section__head p { color: var(--muted); margin: 0; font-size: 16.5px; }

.appgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.appcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; display: flex; flex-direction: column;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.appcard:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow); }
.appcard__id {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 16px; display: flex; align-items: center; gap: 8px;
}
.appcard__id::before { content: ''; width: 6px; height: 6px; background: var(--signal); border-radius: 1px; }
.appcard h3 { font-size: 21px; margin-bottom: 10px; }
.appcard > p { color: var(--muted); font-size: 14.5px; margin: 0 0 18px; }
.appcard__list { list-style: none; padding: 0; margin: 0 0 22px; }
.appcard__list li {
  font-size: 13.5px; padding: 9px 0; border-top: 1px dashed var(--line);
  display: flex; gap: 10px; color: var(--muted);
}
.appcard__list li::before { content: '→'; color: var(--signal); flex: none; }
.appcard .btn { margin-top: auto; }

/* try-it band */
.tryband {
  background: var(--deep); color: var(--deep-ink); border-radius: var(--r-lg);
  padding: 48px 44px; border: 1px solid transparent;
}
[data-theme="dark"] .tryband { border-color: var(--line-strong); }
.tryband h2 { font-size: clamp(25px, 3.2vw, 36px); font-stretch: 108%; margin-bottom: 14px; }
.tryband > p { color: color-mix(in srgb, var(--deep-ink) 70%, transparent); max-width: 58ch; margin: 0 0 32px; font-size: 16.5px; }
.tryband .eyebrow { color: color-mix(in srgb, var(--deep-ink) 64%, transparent); }
.trylist { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.trylist li {
  border: 1px solid color-mix(in srgb, var(--deep-ink) 18%, transparent);
  border-radius: var(--r-md); padding: 16px 18px; font-size: 14px;
}
.trylist strong { display: block; margin-bottom: 4px; font-weight: 600; }
.trylist span { color: color-mix(in srgb, var(--deep-ink) 66%, transparent); font-size: 13px; }
.tryband .btn--ghost { border-color: color-mix(in srgb, var(--deep-ink) 34%, transparent); color: var(--deep-ink); }
.tryband .btn--ghost:hover { background: color-mix(in srgb, var(--deep-ink) 10%, transparent); }

/* build notes */
.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.note { border-top: 2px solid var(--signal); padding-top: 18px; }
.note h4 { font-size: 16px; margin-bottom: 8px; }
.note p { margin: 0; color: var(--muted); font-size: 14px; }

.footer { border-top: 1px solid var(--line); padding: 40px 0 60px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.footer p { margin: 0; font-size: 13px; color: var(--muted); max-width: 48ch; }
.footer p + p { margin-top: 6px; }
.footer__brand { display: flex; align-items: flex-start; gap: 12px; }
.footer__mark { width: 34px; height: 19px; flex: none; margin-top: 2px; }

/* =========================================================
   APP SHELL
   ========================================================= */
.appbar { border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: var(--topbar-h); z-index: 50; }
.appbar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 10px var(--pad);
  display: flex; align-items: center; gap: 14px;
}
.appbar__brand { display: flex; align-items: center; flex: none; }
.appbar__mark { width: 24px; height: 14px; display: block; }
.appbar__back {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: 13px; color: var(--muted); text-decoration: none;
  padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
}
.appbar__back:hover { color: var(--ink); border-color: var(--line-strong); }
.appswitch { display: flex; gap: 2px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.appswitch::-webkit-scrollbar { display: none; }
.appswitch a {
  font-size: 13px; text-decoration: none; color: var(--muted); white-space: nowrap;
  padding: 8px 13px; border-radius: var(--r-sm);
}
.appswitch a:hover { background: var(--surface-2); color: var(--ink); }
.appswitch a.is-current { background: var(--deep); color: var(--deep-ink); }
[data-theme="dark"] .appswitch a.is-current { background: var(--signal); color: #10201C; }

.demobar {
  background: var(--signal-soft); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--wait);
}
.demobar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 8px var(--pad);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.demobar strong { font-weight: 600; }
.demobar button {
  margin-left: auto; background: transparent; border: 1px solid currentColor;
  color: inherit; font-size: 12px; padding: 6px 12px; min-height: 34px;
  border-radius: var(--r-sm); cursor: pointer;
}
.demobar button:hover { background: color-mix(in srgb, var(--wait) 12%, transparent); }

.workspace { max-width: var(--maxw); margin: 0 auto; padding: 26px var(--pad) 90px; }
.wshead { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.wshead h2 { font-size: 26px; margin-bottom: 6px; }
.wshead p { margin: 0; color: var(--muted); font-size: 14px; max-width: 62ch; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 15px 17px; }
.stat__label { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.stat__value { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.stat__meta { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.panel + .panel, .split + .panel, .panel + .split { margin-top: 18px; }
.panel__head {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.panel__head h3 { font-size: 15px; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.panel__tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel__body { padding: 18px; }

.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.detailcol > .panel + .panel { margin-top: 18px; }

/* chips + pills */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-sm); font-weight: 500; white-space: nowrap;
  background: var(--idle-soft); color: var(--idle);
}
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--wait { background: var(--wait-soft); color: var(--wait); }
.chip--stop { background: var(--stop-soft); color: var(--stop); }
.chip--signal { background: var(--signal-soft); color: var(--wait); }
.chip__dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }

.chipbar {
  display: flex; gap: 6px; padding: 12px 18px; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.chipbar::-webkit-scrollbar { display: none; }
.chipbar--inline { padding: 0; border: 0; }
.pill {
  background: transparent; border: 1px solid var(--line); cursor: pointer; white-space: nowrap;
  font-size: 12.5px; padding: 6px 12px; min-height: 34px; border-radius: var(--r-sm); color: var(--muted);
}
.pill:hover { border-color: var(--line-strong); color: var(--ink); }
.pill.is-on { background: var(--deep); border-color: var(--deep); color: var(--deep-ink); }
[data-theme="dark"] .pill.is-on { background: var(--signal); border-color: var(--signal); color: #10201C; }

/* tables — reflow to labelled cards on small screens */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
table.data td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background-color .12s ease; }
table.data tbody tr[data-act] { cursor: pointer; }
table.data tbody tr[data-act]:hover { background: var(--surface-2); }
table.data tbody tr.is-selected { background: var(--signal-soft); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
th.num { text-align: right; }
.rid { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cellbtns { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }

/* record bits */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.subhead {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 24px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.subhead h4 { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

.rowitem {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px;
}
.rowitem:last-of-type { border-bottom: 0; }
.rowitem--tap { cursor: pointer; }
.rowitem--tap:hover strong { color: var(--signal); }
.rowitem__sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.notebox {
  margin: 18px 0 0; font-size: 13.5px; color: var(--muted);
  padding: 10px 14px; border-left: 2px solid var(--signal); background: var(--surface-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.muted-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

.policy { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.policy li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); color: var(--muted); }
.policy li:last-child { border-bottom: 0; }
.policy strong { color: var(--ink); font-weight: 600; }

/* approval chain */
.chain { list-style: none; padding: 0; margin: 0; }
.chain li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding-bottom: 20px; position: relative; }
.chain li:last-child { padding-bottom: 0; }
.chain li:not(:last-child)::before { content: ''; position: absolute; left: 14px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.chain li.is-done:not(:last-child)::before { background: var(--ok); }
.chain__badge {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--line); background: var(--surface); position: relative; z-index: 1;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--muted);
}
.chain li.is-done .chain__badge { border-color: var(--ok); background: var(--ok); color: #fff; }
.chain li.is-rejected .chain__badge { border-color: var(--stop); background: var(--stop); color: #fff; }
.chain li.is-current .chain__badge { border-color: var(--signal); background: var(--signal-soft); color: var(--wait); }
.chain__role { font-size: 13.5px; font-weight: 600; }
.chain__who { font-size: 12.5px; color: var(--muted); }
.chain__time { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.chain__note { font-size: 12.5px; color: var(--muted); margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--line); font-style: italic; }

/* quote line items */
table.lines-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.lines-table th { text-align: left; font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 8px 0; border-bottom: 1px solid var(--line); }
table.lines-table td { padding: 9px 0; border-bottom: 1px dashed var(--line); }
table.lines-table tfoot td { border-bottom: 0; padding-top: 12px; font-weight: 600; border-top: 1px solid var(--line-strong); }

/* itsm bits */
.assetcard {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface-2);
}
.assetcard:hover { border-color: var(--signal); }
.assetcard__tag {
  flex: none; font-size: 11px; letter-spacing: .06em; padding: 5px 8px;
  background: var(--deep); color: var(--signal); border-radius: var(--r-sm);
}
.assetcard__body { flex: 1; min-width: 0; font-size: 13.5px; }

.worklog { list-style: none; padding: 0; margin: 0; }
.worklog li { padding: 11px 0; border-bottom: 1px dashed var(--line); }
.worklog li:last-child { border-bottom: 0; }
.worklog__meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.worklog__meta strong { color: var(--ink); font-weight: 600; }
.worklog p { margin: 0; font-size: 13.5px; }

.empty { padding: 44px 22px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: 17px; margin-bottom: 6px; }
.empty p { margin: 0 0 16px; font-size: 14px; }

/* =========================================================
   SHEETS + FORMS
   ========================================================= */
.sheetwrap { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; padding: 24px; }
.sheetwrap__scrim { position: absolute; inset: 0; background: rgba(6, 18, 16, .55); backdrop-filter: blur(2px); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }

.sheet {
  position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.sheet__grip { display: none; }
.sheet__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sheet__head h3 { font-size: 17px; flex: 1; min-width: 0; }
.sheet__x {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; color: var(--muted);
}
.sheet__x:hover { color: var(--ink); border-color: var(--line-strong); }
.sheet__x svg { width: 15px; height: 15px; }
.sheet__body { padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.sheet__body > .panel__body { padding: 0; }
.sheet__foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }

.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; display: flex; align-items: baseline; gap: 8px; }
.req { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }

/* 16px keeps iOS from zooming the viewport on focus */
.input {
  width: 100%; font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; min-height: 44px;
}
textarea.input { min-height: 84px; resize: vertical; line-height: 1.5; }
select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.input:focus { outline: 2px solid var(--signal); outline-offset: -1px; border-color: var(--signal); }
.input::placeholder { color: var(--muted); opacity: .7; }
.input--search { min-height: 38px; padding: 7px 11px; font-size: 14px; min-width: 150px; }

.field__hint { margin: 0; font-size: 11.5px; color: var(--muted); }
.field__err { margin: 0; font-size: 11.5px; color: var(--stop); }
.field.is-invalid .input { border-color: var(--stop); background: var(--stop-soft); }

.formnote {
  grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--muted);
  padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); border-left: 2px solid var(--signal);
}
.confirmtext { margin: 0; font-size: 14.5px; color: var(--muted); }

.liveout {
  grid-column: 1 / -1; font-size: 13px; padding: 12px 14px;
  background: var(--signal-soft); border-radius: var(--r-sm); color: var(--ink);
}
.routelist { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 5px; font-size: 12.5px; }
.routelist li { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.routelist__lv {
  font-family: var(--font-mono); font-size: 10px; background: var(--deep); color: var(--signal);
  padding: 2px 6px; border-radius: 2px; flex: none;
}

/* repeatable line items */
.lines { display: grid; gap: 10px; }
.lines__rows { display: grid; gap: 8px; }
.lines__row { display: grid; grid-template-columns: 1fr 76px 96px 38px; gap: 6px; align-items: center; }
.lines__x {
  width: 38px; height: 44px; display: grid; place-items: center; color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.lines__x:hover { color: var(--stop); border-color: var(--stop); }
.lines__x svg { width: 13px; height: 13px; }
.lines__total { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line); }
.lines__total strong { font-family: var(--font-mono); color: var(--ink); font-size: 15px; }

/* toast */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 10px; }
.toast {
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: var(--r-md);
  font-size: 13.5px; box-shadow: var(--shadow-lg); max-width: 340px;
  animation: toast-in .26s cubic-bezier(.2,.8,.3,1); transition: opacity .3s ease, transform .3s ease;
}
.toast__sub { display: block; font-family: var(--font-mono); font-size: 11.5px; opacity: .75; margin-top: 3px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 38px; }
  .notes { grid-template-columns: 1fr; gap: 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  /* on phones the record opens in a sheet, so the side column would duplicate it */
  .detailcol { display: none; }
  .topnav { display: none; }
}

/* tables become labelled cards */
@media (max-width: 780px) {
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data thead { display: none; }
  .table-wrap { overflow-x: visible; padding: 12px; }
  table.data tbody tr {
    border: 1px solid var(--line); border-radius: var(--r-md);
    padding: 12px 14px; margin-bottom: 10px; background: var(--surface);
  }
  table.data tbody tr:last-child { margin-bottom: 0; }
  table.data tbody tr.is-selected { border-color: var(--signal); }
  table.data td {
    border: 0; padding: 5px 0;
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    text-align: right;
  }
  table.data td::before {
    content: attr(data-label);
    font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted); flex: none; text-align: left;
  }
  table.data td.cell-primary {
    display: block; text-align: left; padding: 0 0 8px;
    margin-bottom: 6px; border-bottom: 1px dashed var(--line);
  }
  table.data td.cell-primary::before { display: none; }
  table.data td.num { text-align: right; }
  .cellbtns { justify-content: flex-end; }
}

@media (max-width: 720px) {
  :root { --pad: 16px; }
  .hero { padding: 40px 0 16px; }
  .section { padding: 52px 0; }
  .appgrid, .trylist { grid-template-columns: 1fr; }
  .plates { grid-template-columns: 1fr; }
  .tryband { padding: 32px 22px; }
  .wshead { align-items: stretch; }
  .wshead .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat__value { font-size: 22px; }
  .panel__head { padding: 13px 15px; }
  .panel__body { padding: 15px; }
  .chipbar { padding: 10px 15px; }
  .footer__inner { flex-direction: column; gap: 12px; }

  /* modals become bottom sheets */
  .sheetwrap { padding: 0; align-items: flex-end; }
  .sheet {
    max-width: none; max-height: 92vh; border-radius: var(--r-lg) var(--r-lg) 0 0;
    border-bottom: 0; animation: slideup .26s cubic-bezier(.2,.8,.3,1);
  }
  @keyframes slideup { from { transform: translateY(100%); } }
  .sheet__grip {
    display: block; width: 38px; height: 4px; border-radius: 2px;
    background: var(--line-strong); margin: 8px auto 0; flex: none;
  }
  .sheet__head { padding: 12px 18px 14px; }
  .sheet__body { padding: 18px; }
  .sheet__foot { padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
  .sheet__foot .btn { flex: 1; }

  .formgrid { grid-template-columns: 1fr; gap: 14px; }
  /* 16px everywhere on mobile, including the compact search box, so iOS
     never zooms the viewport when a field takes focus */
  .input--search { font-size: 16px; min-height: 44px; width: 100%; }
  .panel__tools { width: 100%; }
  .lines__row { grid-template-columns: 1fr 1fr 38px; grid-template-areas: 'desc desc x' 'qty unit x'; }
  .lines__row [data-line="desc"] { grid-area: desc; }
  .lines__row [data-line="qty"] { grid-area: qty; }
  .lines__row [data-line="unit"] { grid-area: unit; }
  .lines__x { grid-area: x; height: 100%; }

  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: 26px; }
  .stats { grid-template-columns: 1fr; }
  .brand__name { font-size: 13.5px; }
  .brand__sub { font-size: 8.5px; letter-spacing: .06em; }
  .appbar__inner { flex-wrap: wrap; }
  .appswitch { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
