/* CSOL Tech demo: Quote to cash.
   Same chassis as the main site (tokens, pill buttons, tight display type),
   self-contained so it can live at /demos/quote/. */

@font-face {
  font-family: "Inter";
  src: url("../../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --hair: rgba(0, 0, 0, 0.1);
  --hair-soft: rgba(0, 0, 0, 0.06);
  --accent: #0066cc;
  --accent-hover: #0071e3;
  --btn: #0066cc;
  --btn-hover: #0071e3;
  --on-btn: #ffffff;
  --track: rgba(118, 118, 128, 0.12);
  --thumb: #ffffff;
  --thumb-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04);
  --topbar-bg: rgba(245, 245, 247, 0.78);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-doc: 0 1px 2px rgba(0, 0, 0, 0.05), 0 18px 50px rgba(0, 0, 0, 0.08);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.06), 0 18px 44px rgba(0, 0, 0, 0.16);
  --sendbar-bg: rgba(255, 255, 255, 0.8);

  /* data hues: one per destination, grey for everything structural */
  --acct: #0066cc;
  --po: #c25400;
  --sched: #8944c9;
  --ok: #1f8a3b;
  --c-mat: #7fb2e6;
  --c-lab: #0066cc;
  --c-oth: #c7c7cc;
  --c-pro: #34c759;
  --logo: #b8336a;
  --phone-rim: #1d1d1f;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, "Segoe UI", sans-serif;
  --radius-card: 18px;
  --radius-field: 12px;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #101011;
    --card: #1c1c1e;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --hair: rgba(255, 255, 255, 0.14);
    --hair-soft: rgba(255, 255, 255, 0.08);
    --accent: #2997ff;
    --accent-hover: #47a6ff;
    --btn: #0071e3;
    --btn-hover: #0077ed;
    --on-btn: #ffffff;
    --track: rgba(118, 118, 128, 0.24);
    --thumb: #636366;
    --thumb-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    --topbar-bg: rgba(16, 16, 17, 0.78);
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.04);
    --shadow-doc: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 18px 50px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 18px 44px rgba(0, 0, 0, 0.6);
    --sendbar-bg: rgba(44, 44, 46, 0.78);
    --acct: #2997ff;
    --po: #ff9f0a;
    --sched: #bf5af2;
    --ok: #30d158;
    --c-mat: #5e9fe0;
    --c-lab: #2997ff;
    --c-oth: #48484a;
    --c-pro: #30d158;
    --logo: #e0609a;
    --phone-rim: #3a3a3c;
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg-alt);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sprite { position: absolute; }
[hidden] { display: none !important; }
.ico {
  width: 20px; height: 20px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 8px 16px; border-radius: 9999px; background: var(--btn); color: var(--on-btn);
  text-decoration: none; font-size: 15px;
}
.skip:focus { top: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 9999px;
  font-weight: 400; letter-spacing: -0.012em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
              opacity 0.25s var(--ease), transform 0.15s var(--ease);
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn-primary { background: var(--btn); color: var(--on-btn); }
.btn-primary:hover:not(:disabled) { background: var(--btn-hover); }
.btn-ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-ghost:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.btn-quiet { background: var(--track); color: var(--ink); }
.btn-quiet:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.btn-lg { min-height: 48px; padding: 12px 26px; font-size: 17px; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 14px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40; height: 52px;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 var(--hair);
}
.topbar-inner {
  height: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 14px;
}
.brand {
  font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em;
  text-decoration: none; color: inherit; white-space: nowrap;
}
.brand span { margin-left: 4px; font-weight: 400; opacity: 0.62; }
.demo-pill {
  font-size: 13px; line-height: 1; padding: 6px 10px; border-radius: 9999px;
  background: var(--track); color: var(--muted); white-space: nowrap;
}
.back {
  margin-left: auto; display: inline-flex; align-items: center; gap: 2px;
  font-size: 14px; color: var(--accent); text-decoration: none; white-space: nowrap;
  padding: 8px 2px;
}
.back .ico { width: 16px; height: 16px; }
.back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- intro ---------- */
.intro { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(32px, 4vw, 48px); }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: -0.005em; margin-bottom: 10px; }
.intro h1 {
  font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; letter-spacing: -0.03em; max-width: 13em;
}
.intro h1 span { display: block; color: var(--muted); }
.lede { margin-top: 20px; max-width: 40em; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.42; color: var(--muted); }

/* ---------- demo chrome ---------- */
.demo { padding-bottom: clamp(48px, 7vw, 96px); scroll-margin-top: 64px; }
.demo:focus { outline: none; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; transition: color 0.3s var(--ease); }
.step + .step::before {
  content: ""; width: clamp(12px, 3vw, 36px); height: 1px; background: var(--hair); margin-right: 0;
}
.step-dot {
  position: relative; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--track); color: var(--muted);
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), transform 0.35s var(--spring);
}
.step-dot .ico { position: absolute; width: 16px; height: 16px; stroke-width: 2; opacity: 0; transform: scale(0.5); transition: opacity 0.25s, transform 0.4s var(--spring); }
.step-dot .n { transition: opacity 0.2s; }
.step.is-current { color: var(--ink); font-weight: 600; }
.step.is-current .step-dot { background: var(--btn); color: #fff; transform: scale(1.06); }
.step.is-done .step-dot { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.step.is-done .step-dot .n { opacity: 0; }
.step.is-done .step-dot .ico { opacity: 1; transform: none; }

.view[hidden] { display: none !important; }
.view.is-entering { animation: view-in 0.6s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(14px); } }

.panel-card { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }

/* ---------- 1. build ---------- */
.build-grid { display: grid; gap: 24px; align-items: start; }
@media (min-width: 980px) {
  .build-grid { grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); gap: 32px; }
}
.controls { padding: 28px clamp(20px, 3vw, 28px); display: grid; gap: 26px; }
.field { display: grid; gap: 10px; }
.field legend, .field-head label, .numbers h2 {
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink);
}
.field legend { margin: 0; float: left; width: 100%; }
.field legend + * { clear: both; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; }
.field-head output { font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { font-size: 14px; color: var(--muted); margin-top: 0; min-height: 1.4em; }

/* segmented control */
.seg {
  --i: 0; --n: 3;
  position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  padding: 2px; border-radius: var(--radius-field); background: var(--track);
}
.seg-thumb {
  position: absolute; top: 2px; bottom: 2px; left: 2px;
  width: calc((100% - 4px) / var(--n)); border-radius: 10px;
  background: var(--thumb); box-shadow: var(--thumb-shadow);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform 0.45s var(--spring);
}
.seg.no-anim .seg-thumb { transition: none; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label {
  position: relative; z-index: 1; min-height: 36px; padding: 6px 6px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 14px; line-height: 1.2; color: var(--muted); border-radius: 10px; cursor: pointer;
  transition: color 0.25s var(--ease);
  user-select: none; -webkit-user-select: none;
}
.seg label:hover { color: var(--ink); }
.seg input:checked + label { color: var(--ink); font-weight: 600; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg-lg label { min-height: 44px; font-size: 15px; }

/* range */
.range {
  --p: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0;
  background: transparent; cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--btn) var(--p), var(--track) var(--p));
}
.range::-moz-range-track { height: 4px; border-radius: 4px; background: var(--track); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--btn); }
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -12px; border-radius: 50%;
  background: #fff; border: 0; box-shadow: 0 0.5px 4px rgba(0, 0, 0, 0.12), 0 6px 13px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s var(--spring);
}
.range::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0;
  box-shadow: 0 0.5px 4px rgba(0, 0, 0, 0.12), 0 6px 13px rgba(0, 0, 0, 0.12);
}
.range:active::-webkit-slider-thumb { transform: scale(1.1); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.range:focus-visible::-moz-range-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

/* add-on switches */
.addons { display: grid; border-radius: var(--radius-field); border: 1px solid var(--hair); overflow: hidden; }
.addon {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 11px 14px; cursor: pointer; transition: background-color 0.2s;
}
.addon + .addon { border-top: 1px solid var(--hair-soft); }
.addon:hover { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.addon-text { display: grid; min-width: 0; }
.addon-name { font-size: 15px; line-height: 1.3; }
.addon-sub { font-size: 13px; color: var(--muted); line-height: 1.35; }
.addon-price { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.25s; }
.addon:has(.switch:checked) .addon-price { color: var(--ink); }
.switch {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none;
  position: relative; width: 46px; height: 28px; border-radius: 9999px;
  background: var(--track); cursor: pointer;
  transition: background-color 0.25s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18), 0 0 1px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s var(--spring);
}
.switch:checked { background: var(--btn); }
.switch:checked::after { transform: translateX(18px); }
.switch:active::after { width: 28px; }
.switch:checked:active::after { transform: translateX(14px); }
.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* your numbers */
.numbers {
  margin-top: 2px; padding: 20px; border-radius: 14px; background: var(--bg-alt);
  display: grid; gap: 16px;
}
.numbers-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.private { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.private .ico { width: 14px; height: 14px; }
.mix { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; }
.mix span { height: 100%; border-radius: 2px; transition: flex-basis 0.6s var(--ease); flex: 0 0 25%; }
.mix-mat { background: var(--c-mat); }
.mix-lab { background: var(--c-lab); }
.mix-oth { background: var(--c-oth); }
.mix-pro { background: var(--c-pro); }
.nums { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.nums div { display: flex; flex-direction: column; gap: 1px; }
.nums dt { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.nums dd { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.sw-mat { background: var(--c-mat); } .sw-lab { background: var(--c-lab); }
.sw-oth { background: var(--c-oth); } .sw-pro { background: var(--c-pro); }
.field-tight { gap: 4px; }

/* quote document */
.doc {
  position: relative; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-doc);
  padding: clamp(24px, 4vw, 44px); display: grid; gap: 22px;
  container-type: inline-size;
}
.doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.co { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center; background: var(--logo); color: #fff;
}
.logo .ico { width: 24px; height: 24px; stroke-width: 1.6; }
.logo-sm { width: 30px; height: 30px; border-radius: 8px; }
.logo-sm .ico { width: 18px; height: 18px; }
.co-text { display: grid; line-height: 1.25; min-width: 0; }
.co-text strong { font-size: 17px; letter-spacing: -0.015em; }
.co-text span { font-size: 13px; color: var(--muted); }
.doc-id { text-align: right; display: grid; line-height: 1.2; }
.doc-kind { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.025em; }
.doc-no { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.doc-parties {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 16px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.doc-parties div { display: grid; line-height: 1.35; }
.k { font-size: 13px; color: var(--muted); }
.doc-parties .v { font-size: 15px; font-weight: 600; }
.doc-parties .m { font-size: 14px; color: var(--muted); }
.doc-summary { font-size: 15px; line-height: 1.5; color: var(--ink); min-height: 3em; }
.doc-th {
  display: flex; justify-content: space-between; padding-bottom: 8px;
  font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--hair);
}
.li {
  display: grid; grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.35s var(--ease);
}
.li.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
.li-in { overflow: hidden; min-height: 0; }
.li-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline;
  padding: 12px 0; border-bottom: 1px solid var(--hair-soft);
}
.li-title { display: block; font-size: 15px; line-height: 1.35; }
.li-sub { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.li-price { font-size: 15px; font-variant-numeric: tabular-nums; transition: color 0.6s; }
.li-price.flash { color: var(--accent); transition: none; }
.doc-totals { display: grid; gap: 6px; margin-top: -6px; }
.doc-total { display: flex; justify-content: space-between; align-items: baseline; }
.doc-total span { font-size: 15px; font-weight: 600; }
.doc-total strong { font-family: var(--font-display); font-size: clamp(28px, 3vw, 34px); font-weight: 600; letter-spacing: -0.03em; }
.doc-deposit { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.doc-terms { font-size: 13px; line-height: 1.5; color: var(--muted); }
.doc-terms strong { color: var(--ink); font-weight: 600; }
.doc-sign { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; padding-top: 8px; }
.sigline { display: grid; gap: 4px; }
.sig-slot {
  height: 48px; border-bottom: 1px solid var(--ink); display: flex; align-items: flex-end;
  font-size: 15px; padding-bottom: 4px;
}
.sig-slot img { height: 52px; width: auto; max-width: 100%; margin-bottom: -6px; }

/* send bar */
.sendbar {
  position: sticky; bottom: 16px; z-index: 20;
  margin: 24px auto 0; max-width: 620px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 10px 10px 24px; border-radius: 9999px;
  background: var(--sendbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--shadow-lift);
}
.sendbar-total { display: grid; line-height: 1.15; min-width: 0; }
.sendbar-total span { font-size: 13px; color: var(--muted); }
.sendbar-total strong { font-family: var(--font-display); font-size: 24px; letter-spacing: -0.025em; }
.sendbar .ico { width: 18px; height: 18px; }

/* ---------- 2. sign ---------- */
.sign-grid {
  display: grid; gap: 32px; align-items: center; justify-items: center;
  background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 64px) clamp(16px, 4vw, 64px);
}
@media (min-width: 860px) {
  .sign-grid { grid-template-columns: minmax(0, 420px) auto; justify-content: center; justify-items: start; gap: clamp(48px, 8vw, 120px); }
}
.sign-copy { max-width: 440px; display: grid; gap: 14px; justify-items: start; }
.sign-copy .eyebrow { margin: 0; }
.sign-copy h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.06; letter-spacing: -0.03em; }
.sign-copy p:not(.eyebrow) { color: var(--muted); font-size: 17px; }
.sign-copy p b { color: var(--ink); font-weight: 600; }
.sign-copy .btn { margin-top: 6px; }

.phone-wrap { perspective: 1400px; }
.phone {
  width: 300px; height: 640px; border-radius: 50px; padding: 11px;
  background: var(--phone-rim);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.08), 0 30px 80px rgba(0, 0, 0, 0.22), 0 6px 18px rgba(0, 0, 0, 0.12);
}
.view.is-entering .phone { animation: phone-in 0.8s var(--ease) both; }
@keyframes phone-in { from { opacity: 0; transform: translateY(28px) scale(0.96); } }
.phone-screen {
  position: relative; height: 100%; border-radius: 40px; overflow: hidden;
  background: var(--bg); display: flex; flex-direction: column;
}
.phone-screen.is-arriving .ph-body, .phone-screen.is-arriving .ph-cta { opacity: 0; }
.ph-body, .ph-cta { transition: opacity 0.45s var(--ease); }
.ph-status {
  flex: none; height: 46px; padding: 14px 24px 0 30px;
  display: flex; align-items: flex-start; justify-content: space-between;
  font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
}
.island { position: absolute; left: 50%; top: 10px; width: 92px; height: 26px; margin-left: -46px; border-radius: 9999px; background: #000; }
.ph-sys { display: flex; align-items: center; gap: 3px; padding-top: 3px; }
.ph-sys i { width: 3px; border-radius: 1px; background: currentColor; }
.ph-sys i:nth-child(1) { height: 5px; } .ph-sys i:nth-child(2) { height: 7px; } .ph-sys i:nth-child(3) { height: 9px; }
.ph-sys b { margin-left: 5px; width: 22px; height: 11px; border-radius: 3px; border: 1px solid currentColor; opacity: 0.9; position: relative; }
.ph-sys b::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; border-radius: 1px; background: currentColor; }
.ph-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px); mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
  padding: 4px 20px 12px; display: flex; flex-direction: column; gap: 8px;
}
.ph-body::-webkit-scrollbar { display: none; }
.ph-url {
  align-self: center; font-size: 13px; color: var(--muted);
  background: var(--track); border-radius: 9999px; padding: 3px 12px; margin-bottom: 4px;
}
.ph-co { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.ph-kicker { font-size: 13px; color: var(--muted); margin-top: 4px; }
.ph-total { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.ph-summary { font-size: 14px; line-height: 1.4; color: var(--muted); }
.ph-lines { list-style: none; margin: 2px 0 0; padding: 0; border-top: 1px solid var(--hair); }
.ph-lines li {
  display: flex; justify-content: space-between; gap: 10px; padding: 6px 0;
  font-size: 13px; border-bottom: 1px solid var(--hair-soft);
}
.ph-lines li span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); }
.ph-dep { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.ph-dep .num { color: var(--ink); font-weight: 600; }
.ph-sign { margin-top: 8px; display: grid; gap: 8px; scroll-margin-bottom: 12px; }
.ph-sign-head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; font-size: 14px; font-weight: 600; }
.ph-sign-head.is-signed { color: var(--ok); }
.ph-link { border: 0; background: none; padding: 4px 2px; color: var(--accent); font-size: 14px; font-weight: 400; cursor: pointer; }
.ph-pill {
  display: inline-flex; align-items: center; gap: 5px; border: 0; cursor: pointer;
  padding: 5px 11px 5px 9px; border-radius: 9999px; font-size: 13px; font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
  transition: background-color 0.2s, transform 0.15s var(--ease);
}
.ph-pill:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.ph-pill:active { transform: scale(0.97); }
.ph-pill .ico { width: 15px; height: 15px; }
.pad {
  position: relative; height: 104px; border-radius: 14px; flex: none;
  background: var(--bg-alt); border: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent);
  transition: border-color 0.3s, background-color 0.3s;
}
.pad.is-signed { border-style: solid; border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; color: var(--ink); border-radius: 14px; }
.pad-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; color: var(--muted); pointer-events: none; transition: opacity 0.3s;
}
.pad-hint .ico { width: 16px; height: 16px; }
.pad.has-ink .pad-hint { opacity: 0; }
.pad-x { position: absolute; left: 14px; bottom: 16px; font-size: 16px; color: var(--muted); pointer-events: none; }
.pad::after { content: ""; position: absolute; left: 32px; right: 16px; bottom: 22px; height: 1px; background: var(--hair); pointer-events: none; }
.ph-cta {
  flex: none; padding: 10px 16px 22px;
  background: linear-gradient(to bottom, transparent, var(--bg) 30%);
}
.ph-approve { width: 100%; min-height: 48px; font-size: 17px; font-weight: 600; }
.ph-approve.is-ready { animation: ready 0.5s var(--spring); }
@keyframes ready { 50% { transform: scale(1.04); } }

/* ---------- 3. automation ---------- */
.auto-grid { display: grid; gap: 20px; align-items: start; }
@media (min-width: 1020px) {
  .auto-grid { grid-template-columns: 300px minmax(0, 1fr); gap: 24px; }
}
.auto-left { display: grid; gap: 20px; }
.signed {
  position: relative; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-doc);
  padding: 20px 22px; display: grid; gap: 6px;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--spring), box-shadow 0.5s var(--ease);
}
.signed.is-arriving { opacity: 0; }
.signed.is-splitting { transform: scale(1.03); box-shadow: var(--shadow-lift), 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.signed-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.signed-id { display: grid; line-height: 1.25; min-width: 0; flex: 1; }
.signed-id strong { font-size: 15px; }
.signed-id span { font-size: 13px; color: var(--muted); }
.stamp {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px 4px 7px; border-radius: 9999px;
  font-size: 13px; font-weight: 600; color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, transparent);
}
.stamp .ico { width: 15px; height: 15px; stroke-width: 2; }
.signed-total { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.signed-sum { font-size: 14px; color: var(--muted); line-height: 1.4; }
.signed-sig { height: 64px; border-bottom: 1px solid var(--hair); display: flex; align-items: flex-end; }
.signed-sig img { height: 66px; width: auto; max-width: 100%; margin-bottom: -6px; }
.signed-meta { font-size: 13px; color: var(--muted); }

.log-card { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); padding: 18px 20px 20px; }
.log-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; min-height: 140px; }
.log li {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 5px 0; font-size: 13px; line-height: 1.45;
  animation: log-in 0.5s var(--ease) both;
}
@keyframes log-in { from { opacity: 0; transform: translateY(6px); } }
.log time { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.log .msg { position: relative; padding-left: 14px; }
.log .msg::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.log [data-hue="acct"]::before { background: var(--acct); }
.log [data-hue="po"]::before { background: var(--po); }
.log [data-hue="sched"]::before { background: var(--sched); }
.log [data-hue="ok"]::before { background: var(--ok); }
.log b { font-weight: 600; }

.office { background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.office-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  border-bottom: 1px solid var(--hair); background: color-mix(in srgb, var(--bg-alt) 60%, var(--card));
}
.office-dots { display: flex; gap: 6px; }
.office-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--track); }
.office-title { font-size: 14px; font-weight: 600; }
.office-sub { font-size: 13px; color: var(--muted); margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office-grid { display: grid; gap: 1px; background: var(--hair-soft); }
@media (min-width: 700px) {
  .office-grid { grid-template-columns: 1fr 1fr; }
  .opanel-wide { grid-column: 1 / -1; }
}
.opanel { background: var(--card); padding: 18px 18px 20px; position: relative; transition: background-color 0.6s var(--ease); }
.opanel[data-hue="acct"] { --hue: var(--acct); }
.opanel[data-hue="po"] { --hue: var(--po); }
.opanel[data-hue="sched"] { --hue: var(--sched); }
.opanel.is-hit { background: color-mix(in srgb, var(--hue) 5%, var(--card)); transition-duration: 0.15s; }
.opanel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.opanel-head h3 { font-size: 15px; letter-spacing: -0.01em; }
.hue-ico {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  color: var(--hue); background: color-mix(in srgb, var(--hue) 13%, transparent);
}
.hue-ico .ico { width: 18px; height: 18px; }
.metric { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }
.metric .num { color: var(--ink); font-weight: 600; font-size: 14px; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 9px 10px; margin: 0 -10px; border-radius: 10px; max-height: 90px;
  transition: opacity 0.45s var(--ease) 0.1s, transform 0.55s var(--spring), max-height 0.5s var(--ease),
              padding 0.5s var(--ease), background-color 1.6s var(--ease);
}
.row + .row { box-shadow: 0 -1px 0 var(--hair-soft); }
.row-main { display: grid; min-width: 0; line-height: 1.35; }
.row-id { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.row-desc { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-side { display: grid; justify-items: end; line-height: 1.35; }
.row-amt { font-size: 14px; font-variant-numeric: tabular-nums; }
.row-status { font-size: 13px; color: var(--muted); }
.row.is-pending { opacity: 0; transform: scale(0.94); max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.row.is-new { background: color-mix(in srgb, var(--hue) 9%, transparent); }
.row.is-new .row-status { color: var(--hue); font-weight: 600; }
.tag {
  font-size: 13px; font-weight: 500; line-height: 1; padding: 3px 7px; border-radius: 9999px;
  color: var(--hue); background: color-mix(in srgb, var(--hue) 13%, transparent); white-space: nowrap;
}

/* schedule gantt */
.gantt { --cols: 15; display: grid; gap: 6px; }
.g-head, .g-row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 10px; }
.g-weeks { display: grid; grid-template-columns: repeat(3, 1fr); }
.g-weeks span { font-size: 13px; color: var(--muted); padding-left: 6px; border-left: 1px solid var(--hair); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-name { font-size: 13px; color: var(--muted); white-space: nowrap; }
.g-name b { display: block; color: var(--ink); font-weight: 600; font-size: 14px; }
.g-track {
  position: relative; height: 40px; border-radius: 10px; background-color: var(--bg-alt);
  background-image:
    linear-gradient(to right, var(--hair) 1px, transparent 1px),
    linear-gradient(to right, var(--hair-soft) 1px, transparent 1px);
  background-size: calc(100% / 3) 100%, calc(100% / var(--cols)) 100%;
}
.bar {
  position: absolute; top: 5px; bottom: 5px; border-radius: 8px; padding: 0 8px;
  display: flex; align-items: center; min-width: 0; overflow: hidden;
  font-size: 13px; white-space: nowrap; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--muted) 18%, var(--card)); color: var(--muted);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--spring);
  transform-origin: left center;
}
.bar span { overflow: hidden; text-overflow: ellipsis; }
.bar .b-short { display: none; }
.bar-new { background: var(--sched); color: #fff; font-weight: 600; box-shadow: 0 4px 14px color-mix(in srgb, var(--sched) 35%, transparent); }
.bar.is-pending { opacity: 0; transform: scaleX(0.6); }
.g-note { font-size: 13px; color: var(--muted); padding-left: 74px; min-height: 1.4em; }
.g-note b { color: var(--ink); font-weight: 600; }

/* flying pieces */
.chip {
  position: absolute; left: 0; top: 0; z-index: 60; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px;
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow-lift);
  white-space: nowrap; will-change: transform, opacity;
}
.chip[data-hue="acct"] { --hue: var(--acct); }
.chip[data-hue="po"] { --hue: var(--po); }
.chip[data-hue="sched"] { --hue: var(--sched); }
.chip-text { display: grid; line-height: 1.25; }
.chip-text b { font-size: 14px; }
.chip-text span { font-size: 13px; color: var(--muted); }
.fly-clone { position: fixed; z-index: 60; margin: 0; pointer-events: none; transform-origin: 0 0; will-change: transform, opacity, clip-path; }

.done {
  margin-top: 8px; padding: clamp(28px, 4vw, 40px) 24px; text-align: center;
  display: grid; justify-items: center; gap: 10px;
}
.done:not([hidden]) { animation: view-in 0.7s var(--ease) both; }
.done-title { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; }
.done-sub { color: var(--muted); max-width: 34em; }
.done .btn { margin-top: 12px; }

/* ---------- CTA + footer ---------- */
.cta {
  text-align: center; padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px);
  display: grid; justify-items: center; gap: 14px; border-top: 1px solid var(--hair);
}
.cta h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; letter-spacing: -0.03em; }
.cta p { color: var(--muted); max-width: 32em; }
.cta .btn { margin-top: 10px; }
.cta .ico { width: 18px; height: 18px; }
.cta .more-demos { margin-top: 0; }
.more-demos { display: block; width: fit-content; margin: 18px auto 0; padding: 10px 4px; font-size: 15px; color: var(--accent); text-decoration: none; }
.more-demos:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot { padding-bottom: 40px; }
.foot p { font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- small screens ---------- */
@media (max-width: 520px) {
  .pill-more { display: none; }
  .step-label { display: none; }
  .step.is-current .step-label { display: inline; }
  .doc-parties { grid-template-columns: 1fr 1fr; gap: 12px; }
  .doc-sign { grid-template-columns: 1fr 1fr; gap: 16px; }
  .sendbar { padding-left: 20px; gap: 10px; }
  .sendbar .btn-lg { padding: 12px 20px; }
  .sendbar-total strong { font-size: 22px; }
  .nums dd { font-size: 17px; }
  .rows .row:nth-child(n + 4) { display: none; }
  .g-head, .g-row { grid-template-columns: 52px minmax(0, 1fr); gap: 8px; }
  .g-note { padding-left: 60px; }
  .bar { padding: 0 6px; }
  .bar:not(.bar-new) span { display: none; }
  .bar .b-long, .wk { display: none; }
  .bar .b-short { display: inline; }
  #restart { width: 36px; padding: 0; }
  .restart-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .signed-sum { display: none; }
  .signed-sig { height: 48px; }
  .signed-sig img { height: 50px; }
}
@media (max-width: 1019px) {
  .auto-left { display: contents; }
  .signed { order: 1; }
  .office { order: 2; }
  .log-card { order: 3; }
}
@media (max-width: 400px) {
  .back-more { display: none; }
}

/* ---------- reduced motion: state changes stay, travel goes ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .li, .row, .bar, .ph-body, .ph-cta, .signed { transition: opacity 0.2s linear !important; }
  .row.is-pending, .bar.is-pending { transform: none; }
  .row { transition: opacity 0.2s linear !important; }
}

/* ---------- call to action in the top bar ---------- */
.btn.top-cta { min-height: 34px; padding: 6px 16px; font-size: 14px; flex: none; }
.cta-narrow { display: none; }
@media (max-width: 640px) {
  .cta-wide { display: none; }
  .cta-narrow { display: inline; }
  .btn.top-cta { padding: 6px 13px; }
}
/* on a phone the way back stays and the "Demo" pill gives up its place: the page itself says it is sample data */
@media (max-width: 400px) { .demo-pill { display: none; } }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 12px; }
.done .done-actions .btn { margin-top: 0; }
@media (max-width: 560px) { .done-actions .btn { white-space: normal; text-align: center; } }
