/* ============================================================
   billWright — Visual User Guide
   Tokens lifted verbatim from app/styles.css. Forest-green brand.
   ============================================================ */
:root {
  --accent: #1F7A3D;
  --accent-deep: #15532A;
  --accent-soft: #E6EFE7;
  --accent-darker: #0F3D1F;

  --ink: #1A1A1A;
  --ink-soft: #2D2D2A;
  --muted: #6B6862;
  --cream: #ECEAE3;
  --cream-deep: #E4E1D7;
  --surface: #FFFFFF;
  --surface-2: #FBFAF5;
  --hair: #DDD8CB;
  --hair-strong: #C7C1B0;

  --red: #B23A2F;     --red-soft: #FCEFEE;
  --amber: #B68B1E;   --amber-soft: #FAF1DC;
  --blue: #2A6FDB;    --blue-soft: #E5EEFB;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow-card: 0 1px 0 rgba(20,20,20,.04), 0 14px 30px -22px rgba(20,20,20,.18);
  --shadow-pop: 0 1px 0 rgba(20,20,20,.05), 0 30px 70px -28px rgba(20,20,20,.4);

  --nav-w: 280px;
  --maxw: 940px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.accent { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ============================================================
   LAYOUT
   ============================================================ */
.layout { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }

/* ---- Section nav ---- */
.sidenav {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  background: var(--ink); color: #ECEAE3;
  padding: 26px 20px 40px;
  scrollbar-width: thin; scrollbar-color: #3a3a37 transparent;
}
.sidenav::-webkit-scrollbar { width: 8px; }
.sidenav::-webkit-scrollbar-thumb { background: #2a2a27; border-radius: 4px; }
.sidenav .wordmark {
  display: flex; align-items: center; gap: 11px;
  font-size: 21px; letter-spacing: -0.02em; margin-bottom: 4px;
}
.sidenav .wordmark .mk {
  width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center;
}
.sidenav .wordmark b { font-weight: 800; color: #fff; }
.sidenav .wordmark i { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.sidenav .brandlogo {
  display: block; padding: 2px 2px 0; margin-bottom: 14px;
}
.sidenav .brandlogo img { width: 174px; max-width: 100%; display: block; }
.sidenav .tagline {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: #8C887E; margin: 0 0 26px 3px;
}
.nav-area { margin-bottom: 18px; }
.nav-area > .area-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .15em;
  text-transform: uppercase; color: #807C72;
  padding: 8px 10px 6px; display: flex; align-items: center; gap: 8px;
}
.nav-area > .area-label .n {
  color: var(--accent); font-weight: 700;
}
.sidenav a.navlink {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px 7px 28px; border-radius: 8px;
  color: #C7C1B0; font-size: 13.5px; font-weight: 500;
  position: relative; transition: background .15s, color .15s;
}
.sidenav a.navlink::before {
  content: ""; position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #4a4a45; transition: all .15s;
}
.sidenav a.navlink:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidenav a.navlink.active { color: #fff; background: rgba(31,122,61,.16); }
.sidenav a.navlink.active::before { background: var(--accent); box-shadow: 0 0 0 3px rgba(31,122,61,.25); }
.sidenav .opbadge {
  margin-left: auto; font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em;
  color: #807C72; border: 1px solid #3a3a37; border-radius: 4px; padding: 1px 5px;
}

/* ---- Mobile top bar (hidden on desktop) ---- */
.topbar { display: none; }

/* ---- Main column ---- */
main { min-width: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 90px 0 60px; position: relative; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--surface); border: 1px solid var(--hair);
  border-radius: 999px; padding: 7px 14px; margin-bottom: 26px;
}
.hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-size: clamp(46px, 7.5vw, 86px); line-height: .98; letter-spacing: -0.035em;
  max-width: 16ch;
}
.hero h1 .accent { font-size: 1.02em; }
.hero .lede {
  margin-top: 26px; max-width: 60ch; font-size: 19px; color: var(--ink-soft); line-height: 1.5;
}
.hero .meta-row {
  margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px;
}
.hero .meta-row .chip {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  background: var(--surface); border: 1px solid var(--hair); border-radius: 999px;
  padding: 8px 14px; color: var(--ink-soft);
}
.hero .meta-row .chip b { color: var(--accent-deep); font-weight: 700; }
.grid-bg {
  position: absolute; inset: 0; z-index: 0; opacity: .5;
  background-image: linear-gradient(var(--hair) 1px, transparent 1px),
    linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 30% 30%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000, transparent 72%);
}

/* ============================================================
   AREA BANDS + SECTIONS
   ============================================================ */
.area { padding: 16px 0 8px; scroll-margin-top: 12px; }
.area-head { padding: 54px 0 8px; }
.area-head .kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-deep); display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.area-head .kicker::before {
  content: ""; width: 28px; height: 2px; background: var(--accent);
}
.area-head h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.area-head .blurb { margin-top: 14px; max-width: 56ch; color: var(--muted); font-size: 16px; }

.section { padding: 40px 0; border-top: 1px solid var(--hair); scroll-margin-top: 12px; }
.section:first-of-type { border-top: 0; }
.sec-head { display: flex; flex-direction: column-reverse; align-items: stretch; gap: 11px; margin-bottom: 12px; }
.sec-head .route-pill { align-self: flex-start; }
.sec-head h3 { font-size: 26px; letter-spacing: -0.025em; width: 100%; }
.route-pill {
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  background: var(--ink); color: #ECEAE3; border-radius: 7px; padding: 5px 11px;
  display: inline-flex; align-items: center; gap: 7px;
}
.route-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.what-it-is { font-size: 17px; color: var(--ink-soft); margin-top: 4px; max-width: 64ch; }

.sec-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 36px; align-items: start; margin-top: 28px; }
.sec-grid.flip { grid-template-columns: 320px minmax(0,1fr); }
.sec-grid.wide { grid-template-columns: minmax(0,1fr); }
.sec-aside { position: sticky; top: 24px; }

/* ---- How-to ---- */
.howto { }
.howto .label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.howto ol { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.howto ol li {
  counter-increment: step; position: relative; padding-left: 38px;
  font-size: 14.5px; color: var(--ink-soft); line-height: 1.5;
}
.howto ol li::before {
  content: counter(step); position: absolute; left: 0; top: -1px;
  width: 25px; height: 25px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent-deep);
  border: 1px solid rgba(31,122,61,.25);
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}
.howto ol li b { color: var(--ink); font-weight: 700; }
.howto .who { font-weight: 700; color: var(--accent-deep); }

/* ---- Callouts ---- */
.callout {
  border-radius: var(--radius); padding: 14px 16px 14px 44px; position: relative;
  font-size: 13.5px; line-height: 1.5; margin-top: 18px;
}
.callout .ct {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  display: block; margin-bottom: 3px; font-weight: 700;
}
.callout::before {
  content: ""; position: absolute; left: 16px; top: 16px;
  width: 16px; height: 16px; border-radius: 50%; flex: 0 0 16px;
}
.callout.tip { background: var(--accent-soft); color: #234e31; }
.callout.tip .ct { color: var(--accent-deep); }
.callout.tip::before { background: var(--accent); }
.callout.heads { background: var(--amber-soft); color: #5e4a16; }
.callout.heads .ct { color: #6E5314; }
.callout.heads::before { background: var(--amber); }
.callout.honest { background: var(--blue-soft); color: #244a86; }
.callout.honest .ct { color: #1D4F9A; }
.callout.honest::before { background: var(--blue); }
.callout.note { background: var(--surface); border: 1px solid var(--hair); color: var(--ink-soft); padding-left: 16px; }
.callout.note::before { display: none; }
.callout.note .ct { color: var(--muted); }

/* ============================================================
   MOCKUP PRIMITIVES — faithful billWright component recreations
   ============================================================ */
.mock {
  background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  overflow: hidden; position: relative;
}
.mock-cap {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted);
  margin-top: 12px; display: flex; align-items: center; gap: 8px;
}
.mock-cap::before { content: ""; width: 14px; height: 1px; background: var(--hair-strong); }

/* App window chrome (sidebar rail + topbar + body) */
.win { display: grid; grid-template-columns: 168px minmax(0,1fr); background: var(--cream); }
.win.solo { grid-template-columns: minmax(0,1fr); }
.win-rail { background: var(--ink); padding: 14px 12px; min-height: 100%; }
.win-rail .brand { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.win-rail .brand .sq { width: 22px; height: 22px; border-radius: 5px; background: var(--accent); display: grid; place-items: center; color: #fff; font-family: var(--serif); font-style: italic; font-size: 13px; }
.win-rail .brand .bz { min-width: 0; }
.win-rail .brand .bz b { color: #fff; font-size: 11.5px; font-weight: 700; display: block; line-height: 1.1; }
.win-rail .brand .bz span { font-family: var(--mono); font-size: 7.5px; letter-spacing: .1em; color: #807C72; text-transform: uppercase; }
.win-rail .grp { font-family: var(--mono); font-size: 8px; letter-spacing: .14em; color: #6B6862; text-transform: uppercase; padding: 10px 8px 4px; }
.win-rail .rl { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: #C7C1B0; font-size: 11px; font-weight: 500; }
.win-rail .rl .ic { width: 13px; height: 13px; opacity: .85; }
.win-rail .rl.on { background: rgba(31,122,61,.16); color: #fff; }
.win-rail .rl .bdg { margin-left: auto; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 8px; min-width: 14px; height: 14px; border-radius: 7px; display: grid; place-items: center; padding: 0 3px; }
.win-top { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--cream); border-bottom: 1px solid var(--hair); }
.win-top .crumbs { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--muted); }
.win-top .crumbs b { color: var(--ink); }
.win-top .crumbs .sep { margin: 0 6px; color: var(--hair-strong); }
.win-top .spacer { flex: 1; }
.win-top .srch { font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--hair); border-radius: 999px; padding: 6px 14px; }
.win-top .acct { display: flex; align-items: center; gap: 7px; }
.win-top .acct .av { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 9px; display: grid; place-items: center; font-weight: 700; }
.win-top .acct .nm { font-size: 11.5px; font-weight: 600; }
.win-body { padding: 22px; min-width: 0; }
.win-body .h {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 3px;
}
.win-body .h .accent { font-size: 1.05em; }
.win-body .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 16px 16px 15px; position: relative; overflow: hidden; }
.kpi .bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.kpi.warn .bar { background: var(--amber); }
.kpi.red .bar { background: var(--red); }
.kpi .lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; margin-top: 7px; font-family: var(--mono); }
.kpi .val small { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .sub2 { margin-top: 5px; font-size: 11px; color: var(--muted); font-family: var(--mono); }

/* Card */
.c { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden; }
.c-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--hair); background: var(--surface-2); min-width: 0; }
.c-head h4 { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.c-head .meta { font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .06em; white-space: nowrap; }
.c-body { padding: 16px; }

/* Pills */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.pill.ok { background: var(--accent-soft); color: var(--accent-deep); border-color: rgba(31,122,61,.3); }
.pill.ok::before { background: var(--accent); }
.pill.warn { background: var(--amber-soft); color: #6E5314; border-color: rgba(182,139,30,.35); }
.pill.warn::before { background: var(--amber); }
.pill.bad { background: var(--red-soft); color: #7B2920; border-color: rgba(178,58,47,.35); }
.pill.bad::before { background: var(--red); }
.pill.info { background: var(--blue-soft); color: #1D4F9A; border-color: rgba(42,111,219,.3); }
.pill.info::before { background: var(--blue); }
.pill.draft { background: var(--cream); color: var(--muted); }
.pill.draft::before { background: var(--muted); }

/* Buttons (mock scale) */
.b { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.b.primary { background: var(--accent); color: #fff; }
.b.ghost { color: var(--ink); border-color: var(--hair-strong); background: var(--surface); }
.b.sm { padding: 5px 10px; font-size: 11px; }

/* Table */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.tbl thead th { text-align: left; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
.tbl tbody td { padding: 10px 12px; border-bottom: 1px solid var(--hair); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.num, .tbl th.num { text-align: right; font-family: var(--mono); }
.tbl td.mono, .tbl td.num, .tbl th.num { white-space: nowrap; }

/* Segmented tabs */
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--hair); border-radius: 9px; gap: 2px; }
.seg button { background: transparent; border: 0; padding: 5px 11px; border-radius: 6px; color: var(--muted); font-size: 11.5px; font-weight: 600; font-family: var(--sans); white-space: nowrap; }
.seg button.on { background: var(--ink); color: #fff; }

/* Underline tabs */
.utabs { display: flex; gap: 22px; border-bottom: 1px solid var(--hair); }
.utabs button { background: 0; border: 0; padding: 9px 1px; font-size: 12.5px; font-weight: 600; color: var(--muted); position: relative; font-family: var(--sans); white-space: nowrap; }
.utabs button.on { color: var(--accent-deep); }
.utabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }

/* field */
.fld { display: grid; gap: 5px; }
.fld label { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fld .inp { background: var(--surface); border: 1px solid var(--hair-strong); border-radius: 8px; padding: 8px 11px; font-size: 12.5px; color: var(--ink); }
.fld .inp.ph { color: var(--muted); }

/* phone frame for punch app */
.phone { width: 268px; border-radius: 30px; background: #0c0c0c; padding: 9px; box-shadow: var(--shadow-pop); }
.phone .screen { border-radius: 23px; overflow: hidden; background: var(--cream); }
.phone .phead { background: var(--accent-deep); color: #fff; padding: 14px 16px 12px; display: flex; align-items: center; gap: 8px; }
.phone .phead .lg { font-size: 14px; font-weight: 800; }
.phone .phead .lg i { font-family: var(--serif); font-style: italic; font-weight: 400; }
.phone .phead .tl { font-family: var(--mono); font-size: 7px; letter-spacing: .14em; color: rgba(255,255,255,.6); text-transform: uppercase; display: block; margin-top: 1px; }
.phone .pbody { padding: 16px; }
.phone .ptitle { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.phone .ptab { display: flex; border-top: 1px solid var(--hair); background: var(--surface-2); }
.phone .ptab div { flex: 1; text-align: center; padding: 11px 6px 13px; font-size: 10px; font-weight: 600; color: var(--muted); }
.phone .ptab div.on { color: var(--accent-deep); background: var(--accent-soft); }

/* flow diagram bits */
.flow { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.flow .node {
  flex: 1 1 0; min-width: 94px; background: var(--surface); border: 1px solid var(--hair);
  border-radius: var(--radius); padding: 13px 11px; text-align: center; position: relative; z-index: 1;
}
.flow .node .ni { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.flow .node .nv { font-size: 14px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }
.flow .arrow { align-self: center; color: var(--hair-strong); padding: 0 2px; font-size: 16px; }

/* utility */
.row { display: flex; align-items: center; gap: 10px; }
.col { display: grid; gap: 12px; }
.between { justify-content: space-between; }
.wrap-g { flex-wrap: wrap; }
.muted { color: var(--muted); }
.dim { color: var(--muted); font-size: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.money { font-family: var(--mono); font-weight: 700; letter-spacing: -0.01em; }
.gridtwo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============================================================
   OPERATOR AREA — distinct band
   ============================================================ */
.area.ops { background: var(--ink); color: #D8D4C8; margin-top: 60px; border-radius: 0; }
.area.ops .area-head .kicker { color: #8Fcaa3; }
.area.ops .area-head .kicker::before { background: var(--accent); }
.area.ops .area-head h2 { color: #fff; }
.area.ops .area-head .blurb { color: #9d988c; }
.area.ops .section { border-top-color: #2e2e2a; }
.area.ops .sec-head h3 { color: #fff; }
.area.ops .what-it-is { color: #b8b3a6; }
.area.ops .route-pill { background: #000; border: 1px solid #34342f; }
.area.ops .howto .label { color: #807c72; }
.area.ops .howto ol li { color: #c4bfb2; }
.area.ops .howto ol li b { color: #fff; }
.area.ops .mock-cap { color: #807c72; }
.ops-tag {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #fff;
  background: rgba(255,255,255,.06); border: 1px solid #34342f; border-radius: 999px;
  padding: 7px 14px; margin-bottom: 18px;
}
.ops-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* operator fleet rows */
.fleet { display: grid; gap: 8px; }
.fleet .frow { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 11px 14px; }
.fleet .frow .led { width: 9px; height: 9px; border-radius: 50%; }
.fleet .frow .led.ok { background: var(--accent); box-shadow: 0 0 0 3px rgba(31,122,61,.18); }
.fleet .frow .led.warn { background: var(--amber); box-shadow: 0 0 0 3px rgba(182,139,30,.18); }
.fleet .frow .led.bad { background: var(--red); box-shadow: 0 0 0 3px rgba(178,58,47,.18); }
.fleet .frow .host { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.fleet .frow .role { font-size: 10.5px; color: var(--muted); }
.fleet .frow .age { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

/* footer */
.foot { border-top: 1px solid var(--hair); margin-top: 70px; padding: 40px 0 70px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.foot .fm { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.foot .fm b { color: var(--ink); }

/* ============================================================
   MICRO-LOOPS (3–6s, pausable, reduced-motion safe)
   ============================================================ */
/* travelling pulse along a flow track */
.track { position: relative; height: 3px; background: var(--hair); border-radius: 2px; margin: 14px 6px; overflow: visible; }
.track .pulse { position: absolute; top: 50%; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); transform: translate(-50%,-50%); animation: trackMove 5s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes trackMove { 0% { left: 0%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; opacity: 0; } }

/* cross-fading status flip (two stacked children) */
.flip { display: inline-grid; justify-items: start; align-items: center; }
.flip > * { grid-area: 1 / 1; }
.flip .s1 { animation: flipOff 5s ease-in-out infinite; }
.flip .s2 { animation: flipOn 5s ease-in-out infinite; }
@keyframes flipOff { 0%,42% { opacity: 1; transform: none; } 52%,100% { opacity: 0; transform: translateY(-3px); } }
@keyframes flipOn  { 0%,42% { opacity: 0; transform: translateY(3px); } 52%,100% { opacity: 1; transform: none; } }

/* receipt sliding into the verify queue */
.scanq { position: relative; }
.scanq .rcpt { animation: rcptDrop 6s ease-in-out infinite; }
@keyframes rcptDrop { 0% { transform: translateX(-26px); opacity: 0; } 12%,100% { transform: none; opacity: 1; } }
.scanq .shimmer { position: relative; overflow: hidden; }
.scanq .shimmer::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(31,122,61,.10) 50%, transparent 70%); animation: shim 6s ease-in-out infinite; }
@keyframes shim { 0%,18% { transform: translateX(-100%); } 40%,100% { transform: translateX(100%); } }
.scanq .resolve { animation: resolveIn 6s ease-in-out infinite; }
@keyframes resolveIn { 0%,46% { opacity: 0; transform: translateY(4px); } 58%,100% { opacity: 1; transform: none; } }
.scanq .pendrow { animation: pendOut 6s ease-in-out infinite; }
@keyframes pendOut { 0%,46% { opacity: 1; } 58%,100% { opacity: .25; } }

/* gentle pulse for a "needs review" badge */
.beat { animation: beat 2.4s ease-in-out infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }

/* ============================================================
   ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.stagger > * { opacity: 0; transform: translateY(14px); }
.stagger.in > * { opacity: 1; transform: none; transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.stagger.in > *:nth-child(1) { transition-delay: .04s; }
.stagger.in > *:nth-child(2) { transition-delay: .12s; }
.stagger.in > *:nth-child(3) { transition-delay: .20s; }
.stagger.in > *:nth-child(4) { transition-delay: .28s; }
.stagger.in > *:nth-child(5) { transition-delay: .36s; }
.stagger.in > *:nth-child(6) { transition-delay: .44s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .loop, .loop * { animation: none !important; }
  .flip .s1, .synctag .syncw .a, .freshrow .topill .a { visibility: hidden; }
  .pendrow { opacity: 1 !important; }
}

/* ============================================================
   TWEAK-DRIVEN STATES (set on <html> by the Tweaks panel)
   ============================================================ */
/* Motion: calm = loops off, reveals keep; off = nothing animates */
[data-motion="calm"] .loop, [data-motion="calm"] .loop *,
[data-motion="off"]  .loop, [data-motion="off"]  .loop * { animation: none !important; }
[data-motion="calm"] .flip .s1, [data-motion="off"] .flip .s1,
[data-motion="calm"] .synctag .syncw .a, [data-motion="off"] .synctag .syncw .a,
[data-motion="calm"] .freshrow .topill .a, [data-motion="off"] .freshrow .topill .a { visibility: hidden; }
[data-motion="calm"] .pendrow, [data-motion="off"] .pendrow { opacity: 1 !important; }
[data-motion="off"] .reveal, [data-motion="off"] .stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }

/* Route pills toggle */
[data-pills="off"] .route-pill { display: none; }

/* Backdrop toggle */
[data-backdrop="plain"] .grid-bg { display: none; }

/* ============================================================
   BANK CONNECTION / SYNC MICRO-LOOP (B3)
   ============================================================ */
.synctag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--accent-deep); text-transform: uppercase; }
.synctag .syncdot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.loop .synctag .syncdot { animation: syncPulse 5s ease-in-out infinite; }
@keyframes syncPulse {
  0%      { box-shadow: 0 0 0 0 rgba(31,122,61,.45); }
  12%     { box-shadow: 0 0 0 6px rgba(31,122,61,0); }
  24%,100%{ box-shadow: 0 0 0 0 rgba(31,122,61,0); }
}
.synctag .syncw { position: relative; display: inline-grid; }
.synctag .syncw > span { grid-area: 1 / 1; white-space: nowrap; }
.loop .synctag .syncw .a { animation: synLabA 5s ease-in-out infinite; }
.loop .synctag .syncw .b { animation: synLabB 5s ease-in-out infinite; }
@keyframes synLabA { 0%,4% { opacity: 1; } 12%,100% { opacity: 0; } }     /* "Syncing…" */
@keyframes synLabB { 0%,4% { opacity: 0; } 14%,100% { opacity: 1; } }     /* "Synced" */
/* a freshly-pulled transaction landing at the top of the feed */
.loop .freshrow td { animation: freshCell 5s ease-in-out infinite; }
@keyframes freshCell { 0% { background: var(--accent-soft); } 18% { background: var(--accent-soft); } 42%,100% { background: transparent; } }
.loop .freshrow .landing { display: inline-block; animation: landIn 5s ease-in-out infinite; }
@keyframes landIn { 0% { transform: translateX(10px); opacity: 0; } 12%,100% { transform: none; opacity: 1; } }
.freshrow .topill { position: relative; display: inline-grid; }
.freshrow .topill > span { grid-area: 1 / 1; }
.loop .freshrow .topill .a { animation: synLabA 5s ease-in-out infinite; }   /* "New" */
.loop .freshrow .topill .b { animation: synLabB 5s ease-in-out infinite; }   /* "To verify" */

/* ============================================================
   TUTORIAL MODE — stepper nav, step blocks, control callouts
   ============================================================ */
/* top reading-progress bar */
.topprog { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; background: transparent; }
.topprog > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s linear; }

/* nav progress block */
.np { background: rgba(255,255,255,.04); border: 1px solid #2c2c28; border-radius: 11px; padding: 12px 13px; margin: 0 0 20px; }
.np .np-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.np .np-lbl { font-family: var(--mono); font-size: 9px; letter-spacing: .15em; text-transform: uppercase; color: #807C72; }
.np .np-count { font-family: var(--mono); font-size: 11px; color: #ECEAE3; }
.np .np-count b { color: var(--accent); font-weight: 700; }
.np .np-bar { height: 5px; background: #2a2a27; border-radius: 3px; overflow: hidden; margin-top: 9px; }
.np .np-bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .45s cubic-bezier(.4,0,.2,1); }

/* part heading in nav */
.np-part { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #807C72; padding: 14px 8px 5px; display: flex; align-items: center; gap: 8px; }
.np-part .pn { color: var(--accent); font-weight: 700; }

/* step links in nav */
.sidenav a.steplink {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px 6px 8px; border-radius: 8px;
  color: #C7C1B0; font-size: 12.5px; font-weight: 500; transition: background .15s, color .15s;
}
.sidenav a.steplink .sdot {
  width: 17px; height: 17px; flex: 0 0 17px; border-radius: 50%;
  border: 1.5px solid #4a4a45; display: grid; place-items: center; transition: all .2s;
}
.sidenav a.steplink .sdot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: transparent; transition: all .2s; }
.sidenav a.steplink .snum { font-family: var(--mono); font-size: 10px; color: #807C72; width: 16px; flex: 0 0 16px; }
.sidenav a.steplink:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidenav a.steplink.active { background: rgba(31,122,61,.16); color: #fff; }
.sidenav a.steplink.active .sdot { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31,122,61,.22); }
.sidenav a.steplink.active .sdot::after { background: var(--accent); }
.sidenav a.steplink.active .snum { color: var(--accent); }
.sidenav a.steplink.done .sdot { border-color: var(--accent); background: var(--accent); }
.sidenav a.steplink.done .sdot::after { width: 9px; height: 9px; background: none;
  -webkit-mask: var(--check) center/9px no-repeat; mask: var(--check) center/9px no-repeat; background-color: #fff; }
.sidenav a.steplink.done .snum { color: #6f8f79; }
:root { --check: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2 6.4 4.6 9 10 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }

/* ---- HERO journey map ---- */
.journey { margin-top: 36px; }
.jcard {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow-card);
}
.jcard .jtag { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); }
.jcard .jname { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; margin-top: 3px; }
.jcard .jmeta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.jcard .jclient { margin-left: auto; text-align: right; }
.jcard .jclient .k { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.jcard .jclient .v { font-size: 15px; font-weight: 700; margin-top: 2px; }
.jpath { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 14px; }
.jstep { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); padding: 12px 13px; position: relative; }
.jstep .jp { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.jstep .jt { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; margin-top: 4px; }
.jstep .jc { font-family: var(--mono); font-size: 9.5px; color: var(--muted); margin-top: 5px; }

/* ---- PART band ---- */
.partband { padding: 56px 0 6px; scroll-margin-top: 10px; }
.partband .pk { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-deep); display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.partband .pk::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.partband .pk .steps { color: var(--muted); letter-spacing: .08em; }
.partband h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -0.03em; }
.partband .pblurb { margin-top: 14px; max-width: 60ch; color: var(--muted); font-size: 16px; }

/* ---- STEP block ---- */
.step { padding: 40px 0; border-top: 1px solid var(--hair); scroll-margin-top: 12px; }
.step-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; flex-wrap: wrap; }
.step-num { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; color: #fff; background: var(--accent); border-radius: 7px; padding: 5px 10px; }
.step-part { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.step h3 { font-size: 30px; letter-spacing: -0.03em; line-height: 1.05; max-width: 18ch; }
.step .route-pill { margin-top: 12px; }
.story { margin-top: 14px; font-size: 17px; line-height: 1.55; color: var(--ink-soft); max-width: 64ch; }
.story b { color: var(--ink); font-weight: 700; }
.story .lead { color: var(--accent-deep); font-weight: 600; font-style: italic; font-family: var(--serif); font-size: 1.12em; }

.step-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,360px); gap: 38px; align-items: start; margin-top: 26px; }
.step-grid.flip { grid-template-columns: minmax(300px,360px) minmax(0,1fr); }

/* ---- the shot (mockup + callouts) ---- */
.shot { position: relative; }
.shot .mock { position: relative; }

/* a highlighted target control */
.hot { position: relative; outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; z-index: 2; }
.hot.amber { outline-color: var(--amber); }
.hot.red { outline-color: var(--red); }

/* numbered anchor badge */
.anchor {
  display: inline-grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px;
  border-radius: 50%; background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 1;
}
.anchor.amber { background: var(--amber); }
.anchor.red { background: var(--red); }
.anchor.pin { position: absolute; top: -11px; right: -11px; z-index: 4; box-shadow: 0 0 0 3px var(--surface), var(--shadow-card); }
.anchor.pin.tl { right: auto; left: -11px; }
.anchor.pin.bl { top: auto; bottom: -11px; right: auto; left: -11px; }
.anchor.pin.br { top: auto; bottom: -11px; }

/* ---- the walkthrough list ---- */
.walk { counter-reset: w; margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.walk .wlabel { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.walk > li { counter-increment: w; position: relative; padding-left: 34px; }
.walk > li::before {
  content: counter(w); position: absolute; left: 0; top: -2px;
  width: 23px; height: 23px; border-radius: 50%; background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 11px; font-weight: 700; display: grid; place-items: center;
}
.walk > li .do { font-size: 14.5px; line-height: 1.5; color: var(--ink); }
.walk > li .do b { font-weight: 700; }
.walk > li .see { display: block; margin-top: 6px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.walk > li .see .tag { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-deep); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }
.walk > li .why { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.45; color: var(--muted); font-style: italic; }

/* ---- checkpoint ---- */
.checkpoint {
  display: flex; align-items: flex-start; gap: 13px; margin-top: 26px;
  background: var(--accent-soft); border: 1px solid rgba(31,122,61,.28);
  border-radius: var(--radius); padding: 15px 17px;
}
.checkpoint .ck {
  width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: var(--accent);
  display: grid; place-items: center; margin-top: 1px;
}
.checkpoint .ck svg { width: 13px; height: 13px; }
.checkpoint .ct { font-family: var(--mono); font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--accent-deep); display: block; margin-bottom: 3px; font-weight: 700; }
.checkpoint .cb { font-size: 14px; color: #234e31; line-height: 1.5; }
.checkpoint .cb b { color: var(--accent-darker); font-weight: 700; }

/* a slim story connector between steps */
.thread { display: flex; align-items: center; gap: 12px; padding: 8px 0 0; color: var(--muted); font-size: 13.5px; font-style: italic; font-family: var(--serif); }
.thread::before { content: ""; width: 22px; height: 1px; background: var(--hair-strong); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .layout { grid-template-columns: 1fr; }
  .sidenav {
    position: fixed; inset: 0 0 auto 0; height: auto; z-index: 50;
    transform: translateY(-100%); transition: transform .3s ease;
    padding: 16px 20px 22px; max-height: 86vh; overflow-y: auto;
  }
  body.nav-open .sidenav { transform: none; box-shadow: var(--shadow-pop); }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 40;
    background: var(--ink); color: #fff; padding: 12px 18px;
  }
  .topbar .wm { font-size: 17px; font-weight: 800; }
  .topbar .wm i { font-family: var(--serif); font-style: italic; font-weight: 400; color: #6bbd86; }
  .topbar .brandlogo.sm { display: inline-block; line-height: 0; }
  .topbar .brandlogo.sm img { height: 22px; width: auto; display: block; }
  .topbar .spacer { flex: 1; }
  .topbar .menu-btn { background: rgba(255,255,255,.08); border: 1px solid #34342f; color: #fff; border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 600; display: flex; gap: 7px; align-items: center; }
  .wrap { padding: 0 22px; }
  .sec-grid, .sec-grid.flip { grid-template-columns: 1fr; gap: 24px; }
  .sec-aside { position: static; }
  .step-grid, .step-grid.flip { grid-template-columns: 1fr; gap: 26px; }
  .jpath { grid-template-columns: 1fr 1fr; }
  .jcard .jclient { margin-left: 0; text-align: left; }
  .step h3 { font-size: 25px; }
  .hero { padding: 40px 0 30px; }
  .win { grid-template-columns: 1fr; }
  .win-rail { display: none; }
  .gridtwo { grid-template-columns: 1fr; }
}
