/* =========================================================
   DEFT — design tokens (see docs/STYLE_GUIDE.md)
   Light-first, white-dominant, one brand blue + one teal signal.
   ========================================================= */
:root {
  /* Primary — deep scientific blue-indigo */
  --primary-900: #0B1F3A;
  --primary-700: #12386B;
  --primary-600: #1E5BCB;
  --primary-500: #2F6BE0;
  --primary-100: #E7EEFB;

  /* Accent — biotech teal "signal" */
  --accent-500: #0FB5BA;
  --accent-400: #36C5C9;
  --accent-100: #E0F6F6;
  --violet-500: #6E56CF;

  /* Neutrals (~90% of the page) */
  --white:      #FFFFFF;
  --bg-subtle:  #F7F9FC;
  --border:     #E3E8EF;
  --text-muted: #5B6675;
  --text-body:  #2B3440;
  --ink:        #0E1726;

  /* Semantic */
  --success: #1F9D55;
  --warning: #C77700;
  --error:   #D33A3A;

  /* Radius */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   18px;
  --r-pill: 999px;

  /* Elevation */
  --shadow-card:  0 1px 2px rgba(16,23,38,.06), 0 4px 12px rgba(16,23,38,.08);
  --shadow-float: 0 12px 40px rgba(16,23,38,.12);

  --maxw: 1200px;
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-body);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -.02em; }
h1 { line-height: 1.05; }
h2 { line-height: 1.15; letter-spacing: -.015em; }
p  { margin: 0; }
a  { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.eyebrow {
  color: var(--primary-600); font-weight: 600; font-size: .8125rem;
  text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .85rem;
}
.tnum { font-variant-numeric: tabular-nums; }

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--primary-500); color: #fff; font-weight: 600; font-size: .95rem;
  padding: .75rem 1.5rem; border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { background: var(--primary-600); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn:active { transform: translateY(0); }
.btn--lg { padding: .9rem 1.7rem; font-size: 1rem; }
.btn--sm { padding: .55rem 1rem; font-size: .9rem; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-subtle); border-color: var(--text-muted); }
.btn--onDark { background: #fff; color: var(--primary-700); }
.btn--onDark:hover { background: var(--primary-100); }
.btn--ghostDark { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--ghostDark:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }

.tlink { color: var(--primary-600); font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.tlink:hover { gap: .55rem; transition: gap .15s ease; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,0);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav.is-scrolled {
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(16,23,38,.02);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 1.5rem; }
.nav__brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--ink); font-size: 1.2rem; letter-spacing: -.02em; }
.nav__logo { width: 26px; height: 26px; }
.nav__links { display: flex; align-items: center; gap: .35rem; font-weight: 500; }
.nav__links > a, .nav__item > a { color: var(--text-body); padding: .5rem .8rem; border-radius: var(--r-sm); }
.nav__links > a:hover, .nav__item > a:hover { color: var(--ink); background: var(--bg-subtle); }
.nav__right { display: flex; align-items: center; gap: .5rem; }
.nav__login { font-weight: 600; color: var(--text-body); padding: .5rem .8rem; }
.nav__login:hover { color: var(--ink); }

/* dropdown */
.nav__item { position: relative; }
.nav__item > a::after { content: "▾"; font-size: .7em; margin-left: .35rem; color: var(--text-muted); }
.nav__menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-float); padding: .5rem; display: grid; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
}
.nav__item:hover .nav__menu, .nav__item:focus-within .nav__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__menu a { display: block; padding: .6rem .75rem; border-radius: var(--r-sm); font-weight: 500; color: var(--text-body); }
.nav__menu a:hover { background: var(--bg-subtle); color: var(--primary-600); }
.nav__menu small { display: block; color: var(--text-muted); font-weight: 400; font-size: .8rem; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 10vw, 120px);
  background:
    radial-gradient(60% 70% at 88% -10%, var(--accent-100) 0%, transparent 60%),
    radial-gradient(55% 65% at -5% 0%, var(--primary-100) 0%, transparent 55%);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero__title { font-size: clamp(2.3rem, 5vw, 3.85rem); font-weight: 700; }
.hero__sub { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--text-muted); margin: 1.4rem 0 2.25rem; max-width: 540px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; }
.hero__note { margin-top: 1.25rem; font-size: .9rem; color: var(--text-muted); }

/* =========================================================
   PRODUCT MOCKUP — polished in-page product "screenshots"
   Faux Deft UI rendered in pure CSS, locked to the design system.
   ========================================================= */
.mockup {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-float); overflow: hidden;
  font-size: .875rem; -webkit-font-smoothing: antialiased;
}
/* window chrome */
.mockup__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--bg-subtle), #fff); }
.mockup__bar i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.mockup__bar i:nth-child(1) { background: #F2A7A2; }
.mockup__bar i:nth-child(2) { background: #F4D08A; }
.mockup__bar i:nth-child(3) { background: #A8D8A0; }
.mockup__bar span { margin-left: 8px; font-size: .76rem; color: var(--text-muted); font-weight: 600; }
.mockup__body { padding: 16px; }

/* in-app toolbar (title + chips) */
.ui-head { display: flex; align-items: center; gap: .55rem; margin-bottom: 14px; }
.ui-head h5 { font-size: .92rem; color: var(--ink); margin: 0; font-weight: 700; letter-spacing: -.01em; }
.ui-chip { font-size: .68rem; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); background: var(--primary-100); color: var(--primary-600); white-space: nowrap; }
.ui-chip--soft { background: var(--bg-subtle); color: var(--text-muted); }
.ui-chip--ok { background: rgba(31,157,85,.12); color: var(--success); }
.ui-head .ui-spacer { margin-left: auto; }

/* training-matrix table */
.ui-table { display: grid; }
.ui-row { display: grid; grid-template-columns: 1.7fr 1.2fr .85fr .95fr; gap: 10px; align-items: center; padding: 10px 10px; }
.ui-row--head { color: var(--text-muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; padding-block: 5px; }
.ui-row--data { border-top: 1px solid var(--border); }
.ui-cell-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ui-cell-name b { font-weight: 600; color: var(--ink); font-size: .82rem; line-height: 1.25; display: block; }
.ui-cell-name small { color: var(--text-muted); font-size: .71rem; display: block; }
.ui-ava { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .69rem; font-weight: 700; flex: none; }
.ui-ava--b { background: var(--primary-100); color: var(--primary-600); }
.ui-ava--t { background: var(--accent-100); color: #0A8E92; }
.ui-ava--v { background: #ECE8FB; color: var(--violet-500); }
.ui-ava--g { background: #EAEFF5; color: var(--text-muted); }
.ui-cell { font-size: .8rem; color: var(--text-body); }
.ui-due { font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ui-due.is-late { color: var(--error); font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .71rem; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--done { background: rgba(31,157,85,.12); color: var(--success); }
.pill--pend { background: var(--primary-100); color: var(--primary-600); }
.pill--late { background: rgba(211,58,58,.10); color: var(--error); }

/* e-signature dialog */
.ui-sign { max-width: 340px; margin: 2px auto; }
.ui-sign__head { display: flex; align-items: center; gap: .65rem; margin-bottom: 16px; }
.ui-lock { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--primary-100); color: var(--primary-600); display: grid; place-items: center; flex: none; }
.ui-lock svg { width: 19px; height: 19px; }
.ui-sign__head h5 { font-size: .95rem; margin: 0; color: var(--ink); }
.ui-sign__head small { font-size: .73rem; color: var(--text-muted); }
.ui-field { margin-bottom: 12px; }
.ui-field > label { display: block; font-size: .67rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; margin-bottom: 6px; }
.ui-select { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 11px; font-size: .8rem; color: var(--ink); background: #fff; }
.ui-select::after { content: "▾"; color: var(--text-muted); font-size: .8em; }
.ui-pin { display: flex; gap: 8px; }
.ui-pin i { flex: 1; height: 42px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--bg-subtle); display: grid; place-items: center; font-weight: 800; color: var(--ink); font-size: 1.2rem; line-height: 1; }
.ui-pin i.filled { border-color: var(--primary-500); background: #fff; color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-100); }
.ui-signed { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding: 9px 11px; background: var(--bg-subtle); border-radius: var(--r-sm); }
.ui-signed .ui-ava { width: 26px; height: 26px; }
.ui-signed b { font-size: .78rem; color: var(--ink); font-weight: 600; line-height: 1.25; display: block; }
.ui-signed small { font-size: .7rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.ui-stamp { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 13px; font-size: .71rem; color: var(--success); font-weight: 600; }
.ui-stamp::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }

/* TMF / SOP document tree */
.ui-tree { font-size: .8rem; }
.ui-tree__row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--text-body); }
.ui-tree__row + .ui-tree__row { margin-top: 1px; }
.ui-tree__row.sel { background: var(--primary-100); color: var(--primary-700); font-weight: 600; }
.ui-tree__row.lvl1 { margin-left: 22px; }
.ui-tree__row.lvl2 { margin-left: 44px; }
.ui-tree__row .ico { width: 16px; height: 16px; flex: none; color: var(--text-muted); }
.ui-tree__row.sel .ico { color: var(--primary-600); }
.ui-ver { margin-left: auto; font-size: .67rem; color: var(--text-muted); font-weight: 600; background: var(--bg-subtle); padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.ui-ver--ok { color: var(--success); background: rgba(31,157,85,.10); }
.ui-ver--warn { color: var(--warning); background: rgba(199,119,0,.10); }

/* SOP lifecycle stepper */
.ui-steps { display: flex; align-items: flex-start; margin: 8px 2px 18px; }
.ui-step { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; position: relative; font-size: .67rem; color: var(--text-muted); text-align: center; }
.ui-step .dot { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--border); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--text-muted); position: relative; z-index: 1; }
.ui-step.done .dot { background: var(--success); border-color: var(--success); color: #fff; }
.ui-step.cur .dot { background: var(--primary-500); border-color: var(--primary-500); color: #fff; box-shadow: 0 0 0 4px var(--primary-100); }
.ui-step.cur { color: var(--primary-700); font-weight: 700; }
.ui-step:not(:last-child)::after { content: ""; position: absolute; top: 11px; left: 50%; width: 100%; height: 2px; background: var(--border); }
.ui-step.done::after { background: var(--success); }
.ui-meta { display: grid; gap: 8px; }
.ui-meta__row { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--text-muted); }
.ui-meta__row b { color: var(--ink); font-weight: 600; }
.ui-meta__row .ui-spacer { margin-left: auto; }

/* compliance dashboard: tiles + donut + per-site bars */
.ui-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.ui-tile { background: var(--bg-subtle); border-radius: var(--r-sm); padding: 11px 12px; }
.ui-tile b { display: block; font-size: 1.25rem; color: var(--ink); font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ui-tile span { font-size: .68rem; color: var(--text-muted); }
.ui-dash { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ui-donut {
  width: 96px; height: 96px; border-radius: 50%;
  background: conic-gradient(var(--success) 0 72%, var(--primary-500) 72% 88%, var(--error) 88% 100%);
  display: grid; place-items: center; position: relative; flex: none;
}
.ui-donut::after { content: "72%"; position: absolute; width: 64px; height: 64px; background: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--ink); font-size: .98rem; }
.ui-legend { display: grid; gap: 9px; font-size: .8rem; }
.ui-legend span { display: flex; align-items: center; gap: 8px; color: var(--text-body); }
.ui-legend i { width: 10px; height: 10px; border-radius: 3px; display: block; flex: none; }
.ui-bars { display: grid; gap: 10px; margin-top: 4px; }
.ui-bar { display: grid; grid-template-columns: 62px 1fr 34px; align-items: center; gap: 10px; font-size: .72rem; color: var(--text-muted); }
.ui-bar .track { height: 7px; background: var(--bg-subtle); border-radius: var(--r-pill); overflow: hidden; }
.ui-bar .fill { height: 100%; border-radius: var(--r-pill); background: var(--success); }
.ui-bar .fill.is-mid { background: var(--primary-500); }
.ui-bar .fill.is-low { background: var(--warning); }
.ui-bar b { color: var(--ink); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding: clamp(60px, 9vw, 118px) 0; }
.section--alt { background: var(--bg-subtle); }
.section__head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section__head .eyebrow { margin-inline: auto; }
.section__title { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 600; }
.section__lead { margin-top: 1rem; font-size: 1.15rem; color: var(--text-muted); }

/* =========================================================
   STAT STRIP
   ========================================================= */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat__num { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; color: var(--primary-600); letter-spacing: -.03em; line-height: 1; }
.stat__num.is-accent { color: var(--accent-500); }
.stat__label { margin-top: .6rem; color: var(--text-muted); font-size: .95rem; }

/* =========================================================
   PROBLEM → OUTCOME (compare)
   ========================================================= */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; max-width: 980px; margin: 0 auto; }
.compare__col { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem; background: #fff; }
.compare__col--old { background: var(--bg-subtle); }
.compare__col--new { border-color: var(--primary-500); box-shadow: var(--shadow-card); }
.compare__tag { font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1.25rem; }
.compare__col--old .compare__tag { color: var(--text-muted); }
.compare__col--new .compare__tag { color: var(--primary-600); }
.compare__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.compare__list li { position: relative; padding-left: 2rem; color: var(--text-body); }
.compare__col--old li::before { content: "✕"; position: absolute; left: 0; top: 0; color: var(--text-muted); font-weight: 700; }
.compare__col--new li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--success); font-weight: 700; }

/* =========================================================
   CARDS (value pillars)
   ========================================================= */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 2rem 1.85rem; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card__icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 1.2rem;
  background: var(--primary-100); color: var(--primary-600); border-radius: var(--r-sm);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.card p { color: var(--text-muted); }

/* =========================================================
   PRODUCT EXPLORER (tabs)
   ========================================================= */
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2.5rem; }
.tab {
  font: inherit; font-weight: 600; font-size: .92rem; color: var(--text-muted);
  background: transparent; border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: .55rem 1.1rem; cursor: pointer; transition: .15s ease;
}
.tab:hover { color: var(--ink); border-color: var(--text-muted); }
.tab.is-active { background: var(--primary-500); color: #fff; border-color: var(--primary-500); }
.explorer__stage { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.panel { display: none; }
.panel.is-active { display: block; animation: fade-up .35s ease; }
.panel__copy h3 { font-size: 1.6rem; margin-bottom: .85rem; }
.panel__copy p { color: var(--text-muted); font-size: 1.05rem; }

/* =========================================================
   DEEP-DIVE FEATURES (alternating)
   ========================================================= */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
.feature--rev .feature__media { order: -1; }
.feature__body h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 1rem; font-weight: 600; }
.feature__body > p { color: var(--text-muted); font-size: 1.08rem; }
.feature__list { list-style: none; padding: 0; margin: 1.5rem 0 1.75rem; display: grid; gap: .8rem; }
.feature__list li { position: relative; padding-left: 1.9rem; color: var(--text-body); }
.feature__list li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 1.25rem; height: 1.25rem;
  color: var(--accent-500); font-weight: 700;
}

/* =========================================================
   COMPLIANCE BAND
   ========================================================= */
.band {
  background: var(--primary-900); color: #fff; border-radius: var(--r-lg);
  padding: clamp(2.5rem, 5vw, 3.5rem); text-align: center;
}
.band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600; }
.band p { color: rgba(255,255,255,.78); max-width: 620px; margin: 1rem auto 1.75rem; font-size: 1.08rem; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem;
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18);
  padding: .55rem 1.1rem; border-radius: var(--r-pill);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-400); }
.band__link { display: inline-block; margin-top: 1.75rem; color: #fff; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 2px; }
.band__link:hover { border-color: #fff; }

/* =========================================================
   FINAL CTA BAND
   ========================================================= */
.cta {
  background: linear-gradient(120deg, var(--primary-700), var(--primary-900));
  border-radius: var(--r-lg); padding: clamp(3rem, 6vw, 4.5rem); text-align: center; color: #fff;
}
.cta h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; max-width: 640px; margin: 0 auto; }
.cta p { color: rgba(255,255,255,.82); margin: 1rem auto 2rem; max-width: 540px; font-size: 1.1rem; }
.cta__btns { display: flex; flex-wrap: wrap; gap: .85rem; justify-content: center; }

/* =========================================================
   CONTACT FORM
   ========================================================= */
.contact { max-width: 680px; }
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: grid; gap: .4rem; }
.field label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field__opt { color: var(--text-muted); font-weight: 400; }
.field input, .field textarea, .field select {
  font: inherit; color: var(--ink); background: #fff;
  padding: .75rem .9rem; border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease; width: 100%; resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-100);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--error); }
.field__error { color: var(--error); font-size: .82rem; min-height: 1em; }

.form__submit { position: relative; justify-self: start; min-width: 160px; }
.form__spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; display: none;
}
.form.is-sending .form__spinner { display: inline-block; }
.form.is-sending .form__submit { pointer-events: none; opacity: .8; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__status { font-size: .95rem; min-height: 1.4em; margin-top: .25rem; }
.form__status.is-ok { color: var(--success); }
.form__status.is-err { color: var(--error); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; }
.footer__brand { max-width: 260px; }
.footer__brand .nav__brand { margin-bottom: .9rem; }
.footer__brand p { color: var(--text-muted); font-size: .92rem; }
.footer__col h4 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 1rem; font-weight: 600; }
.footer__col a { display: block; color: var(--text-body); padding: .3rem 0; font-size: .95rem; }
.footer__col a:hover { color: var(--primary-600); }
.footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: .88rem;
}
.footer__bottom .badges { justify-content: flex-end; }
.footer__bottom .badge { background: #fff; color: var(--text-body); border-color: var(--border); font-size: .8rem; padding: .35rem .8rem; }
.footer__bottom .badge::before { background: var(--accent-500); }

/* =========================================================
   REVEAL MOTION
   ========================================================= */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__sub { max-width: none; }
  .explorer__stage { grid-template-columns: 1fr; }
  .feature, .feature--rev { grid-template-columns: 1fr; }
  .feature--rev .feature__media { order: 0; }
}
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
  .compare { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav__links, .nav__login { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border); padding: .75rem 24px 1.25rem;
  }
  .nav.is-open .nav__menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 .5rem 1rem; }
  .nav.is-open .nav__item > a::after { display: none; }
  .form__row { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   PRICING PAGE
   ========================================================= */
.price-hero { padding: clamp(48px, 7vw, 88px) 0 clamp(8px, 3vw, 24px); text-align: center; }
.price-hero .eyebrow { margin-inline: auto; }
.price-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); font-weight: 700; max-width: 14ch; margin: 0 auto; }
.price-hero p { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); max-width: 620px; margin: 1.25rem auto 0; }
.price-hero__note { margin-top: 1.1rem; font-size: .9rem; color: var(--text-muted); }

/* unlimited-people band */
.unlim { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 820px; margin: 0 auto; }
.unlim__item { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.25rem 1rem; text-align: center; }
.unlim__item b { display: block; color: var(--primary-600); font-size: .95rem; font-weight: 700; }
.unlim__item span { font-size: .82rem; color: var(--text-muted); }
.unlim__item .lbl { display: block; margin-top: .35rem; color: var(--ink); font-weight: 600; font-size: .9rem; }

/* tier cards */
.ptiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; align-items: stretch; }
.tier { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.75rem 1.5rem; }
.tier--featured { border-color: var(--primary-500); box-shadow: var(--shadow-float); }
.tier__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary-500); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 12px; border-radius: var(--r-pill); white-space: nowrap; }
.tier__name { font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.tier__cap { margin-top: .25rem; font-size: .85rem; color: var(--text-muted); }
.tier__price { margin: 1.1rem 0 .15rem; font-size: 2.1rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tier__price span { font-size: .95rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.tier__unit { font-size: .82rem; color: var(--accent-500); font-weight: 600; min-height: 1.2em; }
.tier .btn { width: 100%; margin: 1.25rem 0 1.35rem; }
.tier__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.tier__list li { position: relative; padding-left: 1.7rem; font-size: .9rem; color: var(--text-body); }
.tier__list li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--success); font-weight: 700; }
.tier__list li.muted { color: var(--text-muted); }
.tier__list li.muted::before { content: "—"; color: var(--text-muted); }

/* site-study definition callout */
.unit-def { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; background: var(--primary-900); color: #fff; border-radius: var(--r-lg); padding: clamp(2rem, 4vw, 3rem); }
.unit-def h2 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 600; }
.unit-def p { color: rgba(255,255,255,.8); margin-top: .9rem; font-size: 1.02rem; }
.unit-def__eq { display: flex; align-items: center; justify-content: center; gap: .85rem; flex-wrap: wrap; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md); padding: 1.5rem; }
.unit-def__chip { background: rgba(255,255,255,.1); border-radius: var(--r-sm); padding: .65rem 1rem; font-weight: 600; font-size: .92rem; text-align: center; }
.unit-def__op { font-size: 1.4rem; font-weight: 700; color: var(--accent-400); }
.unit-def__chip.is-unit { background: var(--accent-500); color: var(--primary-900); }

/* expansion cards */
.expand { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; max-width: 860px; margin: 0 auto; }
.xcard { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.75rem; }
.xcard h4 { font-size: 1.05rem; color: var(--ink); }
.xcard .xprice { margin: .65rem 0 .1rem; font-size: 1.7rem; font-weight: 700; color: var(--primary-600); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.xcard .xprice span { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.xcard p { font-size: .9rem; color: var(--text-muted); margin-top: .5rem; }

/* billing-model points */
.bill { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.bill__pt { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.5rem; }
.bill__pt .ico { width: 38px; height: 38px; border-radius: var(--r-sm); background: var(--accent-100); color: var(--accent-500); display: grid; place-items: center; margin-bottom: .9rem; }
.bill__pt .ico svg { width: 20px; height: 20px; }
.bill__pt h4 { font-size: 1rem; color: var(--ink); }
.bill__pt p { font-size: .88rem; color: var(--text-muted); margin-top: .45rem; }

/* worked examples */
.examples { display: grid; gap: .75rem; max-width: 860px; margin: 0 auto; }
.exrow { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 1rem 1.25rem; }
.exrow__calc { color: var(--text-body); font-size: .92rem; }
.exrow__calc b { color: var(--ink); }
.exrow__units { font-size: .82rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.exrow__tier { font-weight: 700; font-size: .82rem; color: var(--primary-600); background: var(--primary-100); padding: .35rem .8rem; border-radius: var(--r-pill); white-space: nowrap; }

/* comparison table */
.ptable-wrap { overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; min-width: 720px; }
.ptable th, .ptable td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.ptable thead th { font-size: .8rem; color: var(--ink); font-weight: 700; }
.ptable thead th:first-child { color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
.ptable tbody th { font-weight: 600; color: var(--text-body); }
.ptable td { color: var(--text-body); }
.ptable td.is-feat { background: var(--primary-100); color: var(--primary-700); font-weight: 600; }
.ptable th.is-feat { color: var(--primary-700); }

/* pricing FAQ */
.faq { max-width: 800px; margin: 0 auto; display: grid; gap: 1rem; }
.faq__item { background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.35rem 1.5rem; }
.faq__item h4 { font-size: 1rem; color: var(--ink); margin-bottom: .5rem; }
.faq__item p { font-size: .92rem; color: var(--text-muted); }

@media (max-width: 1024px) {
  .ptiers { grid-template-columns: repeat(2, 1fr); }
  .unit-def { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .unlim, .bill { grid-template-columns: 1fr; }
  .expand { grid-template-columns: 1fr; }
  .exrow { grid-template-columns: 1fr; gap: .5rem; }
}
@media (max-width: 560px) {
  .ptiers { grid-template-columns: 1fr; }
}

/* =========================================================
   COMPANY / ABOUT
   ========================================================= */
.prose { max-width: 720px; margin: 0 auto; }
.prose p { color: var(--text-body); font-size: 1.08rem; line-height: 1.7; }
.prose p + p { margin-top: 1.1rem; }
.prose strong { color: var(--ink); font-weight: 600; }

/* =========================================================
   BLOG — listing + article
   ========================================================= */
/* listing */
.post-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.post-card__thumb { aspect-ratio: 16 / 9; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--primary-700), var(--primary-500)); }
.post-card__thumb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 90% -10%, rgba(54,197,201,.55), transparent 55%); }
.post-card__thumb--b { background: linear-gradient(135deg, #0E7C80, var(--accent-500)); }
.post-card__thumb--b::after { background: radial-gradient(120% 120% at 90% -10%, rgba(47,107,224,.45), transparent 55%); }
.post-card__thumb--c { background: linear-gradient(135deg, var(--primary-900), #2A3F6B); }
.post-card__thumb--c::after { background: radial-gradient(120% 120% at 90% -10%, rgba(110,86,207,.5), transparent 55%); }
.post-card__thumb span { position: absolute; left: 16px; bottom: 14px; z-index: 1; color: #fff; font-weight: 700; font-size: .95rem; letter-spacing: -.01em; }
.post-card__body { padding: 1.2rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.post-card__cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-600); }
.post-card__title { font-size: 1.12rem; font-weight: 700; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.post-card__excerpt { color: var(--text-muted); font-size: .9rem; flex: 1; }
.post-card__meta { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

/* article */
.article { max-width: 740px; margin: 0 auto; }
.article__head { margin-bottom: 2rem; }
.article__cat { display: inline-block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--primary-600); margin-bottom: .9rem; }
.article__title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 700; line-height: 1.12; }
.article__meta { margin-top: 1rem; font-size: .9rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.article__meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); display: inline-block; }
.article__lead { font-size: 1.2rem; line-height: 1.6; color: var(--text-muted); margin: 1.5rem 0 0; }
.article__hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.article__body { color: var(--text-body); }
.article__body > * + * { margin-top: 1.25rem; }
.article__body h2 { font-size: 1.55rem; font-weight: 700; color: var(--ink); margin-top: 2.5rem; letter-spacing: -.01em; }
.article__body h3 { font-size: 1.2rem; font-weight: 600; color: var(--ink); margin-top: 1.75rem; }
.article__body p { font-size: 1.08rem; line-height: 1.78; }
.article__body a { color: var(--primary-600); text-decoration: underline; text-underline-offset: 2px; }
.article__body ul, .article__body ol { padding-left: 1.3rem; display: grid; gap: .55rem; }
.article__body li { font-size: 1.05rem; line-height: 1.6; padding-left: .2rem; }
.article__body blockquote { margin: 0; border-left: 3px solid var(--primary-500); background: var(--bg-subtle); padding: 1rem 1.25rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-body); }
.article__body blockquote p { font-size: 1.08rem; }
.article__body code { background: var(--bg-subtle); border: 1px solid var(--border); padding: .12em .4em; border-radius: 6px; font-size: .9em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.article__body strong { color: var(--ink); font-weight: 600; }
.article__body img { border-radius: var(--r-md); border: 1px solid var(--border); }

/* article figure (CSS illustration + caption) */
.article__figure { margin: 2rem 0; }
.article__figure figcaption { text-align: center; color: var(--text-muted); font-size: .85rem; margin-top: .7rem; }

/* end-of-article CTA */
.article__cta { margin: 3rem auto 0; max-width: 740px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.75rem 2rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.article__cta p { font-weight: 600; color: var(--ink); }
.article__cta span { display: block; font-weight: 400; color: var(--text-muted); font-size: .9rem; margin-top: .2rem; }

.backlink { display: inline-flex; align-items: center; gap: .35rem; color: var(--text-muted); font-weight: 600; font-size: .9rem; margin-bottom: 1.5rem; }
.backlink:hover { color: var(--primary-600); }

@media (max-width: 900px) { .post-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .post-list { grid-template-columns: 1fr; } }

/* =========================================================
   PRICING — per-site-study rate table + calculator
   ========================================================= */
.rate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; max-width: 980px; margin: 0 auto; }
.rate-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.75rem; }
.rate-card h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 1rem; }
.rate-table { width: 100%; border-collapse: collapse; }
.rate-table th, .rate-table td { padding: .8rem .2rem; border-bottom: 1px solid var(--border); font-size: 1rem; text-align: left; }
.rate-table tbody tr:last-child th, .rate-table tbody tr:last-child td { border-bottom: 0; }
.rate-table thead th { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 700; }
.rate-table tbody th { font-weight: 600; color: var(--ink); }
.rate-table tbody td { color: var(--primary-600); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.rate-card__note { margin-top: 1rem; font-size: .82rem; color: var(--text-muted); }

.calc { background: var(--primary-900); color: #fff; border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.25rem); }
.calc__label { font-weight: 600; font-size: .95rem; display: block; margin-bottom: 1rem; }
.calc__row { display: flex; align-items: center; gap: 1rem; }
.calc__row input[type="range"] { flex: 1; accent-color: var(--accent-400); }
.calc__num { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: rgba(255,255,255,.7); }
.calc__num input { width: 76px; padding: .5rem; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; border-radius: var(--r-sm); font: inherit; text-align: center; font-variant-numeric: tabular-nums; }
.calc__out { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.15); }
.calc__total { font-size: 2.2rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.calc__total span { font-size: .95rem; font-weight: 500; color: rgba(255,255,255,.65); letter-spacing: 0; }
.calc__eff { margin-top: .5rem; font-size: .9rem; color: var(--accent-400); font-weight: 600; }
.calc__note { margin-top: 1.1rem; font-size: .78rem; color: rgba(255,255,255,.6); }
.calc__note a { color: rgba(255,255,255,.85); text-decoration: underline; }

@media (max-width: 860px) { .rate-grid { grid-template-columns: 1fr; } }

/* ============================================================
   HERO CAROUSEL — auto-rotating product shots in the hero visual
   ============================================================ */
.hero__carousel { position: relative; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transform: translateY(10px) scale(.99); pointer-events: none; transition: opacity .6s ease, transform .6s cubic-bezier(.4,0,.2,1); }
.hero__slide.is-active { position: relative; opacity: 1; transform: none; pointer-events: auto; }
.hero__dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.hero__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); border: 0; padding: 0; cursor: pointer; transition: background .25s, width .25s; }
.hero__dot.is-active { width: 20px; border-radius: 999px; background: var(--primary-600); }
/* compact static dashboard/audit snapshots reused inside the hero carousel */
.hero__carousel .dash { padding: 14px 16px; }
.hero__carousel .dash__top { margin-bottom: 14px; }
.hero__carousel .lg-row { grid-template-columns: 84px 1.3fr 1.1fr 72px; }

/* ============================================================
   TRAINING LOOP — self-playing product walkthrough
   ============================================================ */
.loop { padding: 64px 0 72px; }
.loop__head { text-align: center; max-width: 640px; margin: 0 auto 40px; }

/* --- step rail --- */
.loop__rail { display: flex; align-items: stretch; gap: 8px; max-width: 1140px; margin: 0 auto 14px; }
.loop__step {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color .3s, box-shadow .3s, transform .2s;
}
.loop__step:hover { transform: translateY(-1px); }
.loop__step .n {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: .8125rem; font-weight: 700; background: var(--bg-subtle); color: var(--text-muted);
  border: 1px solid var(--border); transition: background .3s, color .3s, border-color .3s;
}
.loop__step .lab { line-height: 1.2; }
.loop__step .lab b { display: block; font-size: .8125rem; color: var(--ink); font-weight: 600; }
.loop__step .lab small { font-size: .6875rem; color: var(--text-muted); }
.loop__step.is-active { border-color: var(--primary-600); box-shadow: 0 0 0 4px var(--primary-100); }
.loop__step.is-active .n { background: var(--primary-600); color: #fff; border-color: var(--primary-600); }
.loop__step.is-done .n { background: var(--success); color: #fff; border-color: var(--success); }

.loop__track { max-width: 1140px; margin: 0 auto 32px; height: 3px; background: var(--border); border-radius: 999px; overflow: hidden; }
.loop__fill { height: 100%; background: linear-gradient(90deg, var(--primary-600), var(--accent-500)); border-radius: 999px; transition: width .55s cubic-bezier(.4,0,.2,1); width: 25%; }

/* --- stage: scenes cross-fade; height animates between them --- */
.loop__stage { position: relative; max-width: var(--maxw); margin: 0 auto; min-height: 520px; transition: height .55s cubic-bezier(.4,0,.2,1); }
.scene {
  position: absolute; inset: 0; display: grid; grid-template-columns: 1.45fr .8fr; gap: 44px; align-items: center;
  opacity: 0; transform: translateY(16px) scale(.985); pointer-events: none;
  transition: opacity .5s ease, transform .55s cubic-bezier(.4,0,.2,1);
}
.scene.is-active { opacity: 1; transform: none; pointer-events: auto; }
/* product window: a consistently TALL app viewport whose body fills the height */
.scene .mockup { min-height: 480px; display: flex; flex-direction: column; }
.scene .mockup__body { flex: 1 1 auto; display: flex; flex-direction: column; }
.scene .ed-grid { flex: 1 1 auto; }                               /* editor: doc area fills */
.scene .asg { flex: 1 1 auto; grid-template-rows: 1fr auto; }     /* assign: content fills, save bar pinned bottom */
.scene .lg { flex: 1 1 auto; }                                    /* audit: table fills */
.scene[data-scene="3"] .mockup__body { justify-content: center; } /* e-sign card sits centered in the taller window */
.loop__caption .eyebrow { margin-bottom: 8px; }
.loop__caption h3 { font-size: 1.6rem; margin-bottom: 12px; }
.loop__caption p { color: var(--text-muted); line-height: 1.6; }
.loop__caption .tlink { display: inline-block; margin-top: 14px; color: var(--primary-600); font-weight: 600; text-decoration: none; }
.loop__loopback { text-align: center; max-width: 760px; margin: 36px auto 0; color: var(--text-muted); font-size: .875rem; }
.loop__loopback b { color: var(--primary-600); }

/* --- simulated cursor --- */
.loop__cursor {
  position: absolute; left: 0; top: 0; width: 24px; height: 24px; z-index: 30; pointer-events: none; opacity: 0;
  transition: transform .72s cubic-bezier(.22,.61,.36,1), opacity .25s ease; will-change: transform;
  filter: drop-shadow(0 2px 4px rgba(16,23,38,.28));
}
.loop__cursor.no-anim { transition: opacity .25s ease; }
.loop__cursor.is-click { transform: scale(.82) translate(var(--cx), var(--cy)); }

/* press feedback on the control a click lands on */
.is-press { transform: scale(.96) !important; filter: brightness(.94); }
.ed-act, .asg__save, .sg-act, .lg-export { transition: transform .14s ease, filter .14s ease, background .2s; }

@media (max-width: 860px) {
  .scene { grid-template-columns: 1fr; }
  .loop__rail { flex-wrap: wrap; }
  .loop__step { flex: 1 1 45%; }
}

/* ================= FAUX-UI PRIMITIVES (loop) ================= */
.scene .mockup__body, .asg, .lg, .dash, .src { font-size: .8125rem; }

/* --- Editor --- */
.ed-bar { display: flex; align-items: center; gap: 18px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.ed-steps { display: flex; gap: 16px; }
.ed-step { display: flex; flex-direction: column; line-height: 1.15; }
.ed-step b { font-size: .75rem; color: var(--text-muted); font-weight: 600; transition: color .3s; }
.ed-step small { font-size: .625rem; color: var(--text-muted); opacity: .8; }
.ed-step.done b { color: var(--success); }
.ed-step.cur b { color: var(--primary-600); }
.ed-save { margin-left: auto; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.ed-save .s-ing { color: var(--primary-600); }
.ed-save .s-ed { color: var(--success); display: none; }
.ed-save.saved .s-ing { display: none; }
.ed-save.saved .s-ed { display: inline; }
.ed-act { font-size: .75rem; font-weight: 600; color: #fff; background: var(--primary-600); padding: 6px 12px; border-radius: var(--r-sm); white-space: nowrap; }
.ed-grid { display: grid; grid-template-columns: 1fr 188px; }
.ed-doc { padding: 16px 18px; }
.ed-doc h6 { font-size: 1rem; color: var(--ink); margin: 0 0 4px; letter-spacing: -.01em; }
.ed-doc .ed-meta { font-size: .6875rem; color: var(--text-muted); margin-bottom: 12px; }
.ed-doc p { font-size: .8125rem; color: var(--text-body); line-height: 1.65; margin: 0 0 10px; }
.ed-doc mark { background: var(--accent-100); color: var(--text-body); border-bottom: 2px solid var(--accent-500); padding: 0 1px; }
.ed-rail { border-left: 1px solid var(--border); background: #fff; padding: 14px; }
.ed-rail h6 { display: flex; align-items: center; gap: 8px; font-size: .625rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 12px; }
.ed-rail h6 .c { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 999px; padding: 0 7px; font-size: .625rem; letter-spacing: 0; }
.ed-cmt { font-size: .75rem; }
.ed-cmt .q { border-left: 3px solid var(--accent-500); background: var(--accent-100); padding: 5px 8px; border-radius: 0 6px 6px 0; color: var(--text-muted); font-style: italic; margin-bottom: 8px; }
.ed-cmt .who { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }
.ed-cmt .who b { font-size: .75rem; color: var(--ink); }
.ed-cmt .who small { font-size: .625rem; color: var(--text-muted); }
.ed-cmt .txt { color: var(--text-body); line-height: 1.5; }
.ed-cmt__act { margin-top: 9px; }
.ed-resolve { display: inline-block; font-size: .6875rem; font-weight: 600; color: var(--primary-600); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 5px 11px; transition: background .2s, border-color .2s; }
.ed-cmt__done { display: none; margin-top: 9px; font-size: .6875rem; font-weight: 600; color: var(--success); }
.ed-cmt.resolved .q, .ed-cmt.resolved .txt, .ed-cmt.resolved .ed-cmt__act { display: none; }
.ed-cmt.resolved .ed-cmt__done { display: block; }
.ed-cmt.resolved .who { opacity: .6; }
.ed-doc mark[data-mark] { transition: background .3s ease, border-color .3s ease; }
.ed-doc mark.edited { background: #E6F4EC; border-bottom-color: var(--success); }
.ed-doc [data-temp] { transition: color .3s ease; }
.ed-doc mark.edited [data-temp] { color: var(--success); font-weight: 600; }

/* --- Assign --- */
.asg { display: grid; grid-template-columns: 1fr .92fr; }
.asg__form { padding: 15px 16px; }
.asg__form h6 { font-size: .9375rem; color: var(--ink); margin: 0 0 12px; }
.asg__field + .asg__field { margin-top: 13px; }
.asg__lab { font-size: .625rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 7px; }
.chk { flex: none; width: 16px; height: 16px; border: 1.5px solid var(--border); border-radius: 4px; display: grid; place-items: center; font-size: .625rem; color: transparent; transition: background .2s, border-color .2s, color .2s; }
.chk.on { background: var(--primary-600); border-color: var(--primary-600); color: #fff; }
/* study dropdown */
.asg__dd { position: relative; }
.asg__dd-cur { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 9px 11px; font-size: .8125rem; color: var(--ink); background: var(--white); transition: border-color .2s, box-shadow .2s; }
.asg__dd-cur .asg__dd-ph { color: var(--text-muted); }
.asg__dd-cur small { color: var(--text-muted); font-weight: 500; }
.asg__dd-cur::after { content: "▾"; margin-left: auto; color: var(--text-muted); font-size: .7rem; transition: transform .2s; }
.asg__dd.open .asg__dd-cur { border-color: var(--primary-600); box-shadow: 0 0 0 3px var(--primary-100); }
.asg__dd.open .asg__dd-cur::after { transform: rotate(180deg); }
.asg__dd-menu { position: absolute; top: calc(100% + 5px); left: 0; right: 0; z-index: 6; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-sm); box-shadow: var(--shadow-float); padding: 4px; opacity: 0; transform: translateY(-5px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.asg__dd.open .asg__dd-menu { opacity: 1; transform: none; pointer-events: auto; }
.asg__dd-opt { display: flex; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 6px; font-size: .8125rem; color: var(--text-body); transition: background .15s; }
.asg__dd-opt small { margin-left: auto; color: var(--text-muted); }
.asg__dd-opt.sel { background: var(--primary-100); color: var(--primary-700); }
.asg__dd-opt.is-press { background: var(--bg-subtle); }
/* site cards */
.asg__sites { display: grid; gap: 6px; }
.site-card { display: flex; align-items: center; gap: 9px; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; transition: border-color .2s, background .2s, opacity .2s; }
.site-card.is-off { opacity: .45; }
.site-card.on { border-color: var(--primary-600); background: var(--primary-100); }
.site-card__main { display: flex; flex-direction: column; line-height: 1.25; }
.site-card__id { font-size: .8125rem; font-weight: 600; color: var(--ink); }
.site-card__meta { font-size: .625rem; color: var(--text-muted); }
/* role chips */
.asg__roles { display: flex; flex-wrap: wrap; gap: 6px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--border); border-radius: var(--r-pill); padding: 5px 11px; font-size: .75rem; color: var(--text-body); transition: border-color .2s, background .2s, color .2s; }
.role-chip small { color: var(--text-muted); font-weight: 600; }
.role-chip.on { border-color: var(--primary-600); background: var(--primary-600); color: var(--white); }
.role-chip.on small { color: rgba(255,255,255,.75); }
/* live people panel */
.asg__people { background: var(--bg-subtle); border-left: 1px solid var(--border); padding: 15px 15px 14px; display: flex; flex-direction: column; }
.asg__people-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 11px; }
.asg__people-head span:first-child { font-size: .625rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.asg__count { margin-left: auto; font-size: 1.05rem; font-weight: 700; color: var(--primary-600); font-variant-numeric: tabular-nums; }
.asg__count small { font-size: .625rem; font-weight: 600; color: var(--text-muted); margin-left: 3px; }
.asg__list { display: flex; flex-direction: column; gap: 2px; min-height: 132px; }
.asg__empty { font-size: .75rem; color: var(--text-muted); padding: 10px 2px; }
.asg__row { display: flex; align-items: center; gap: 8px; padding: 5px 4px; opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease; }
.asg__row.in { opacity: 1; transform: none; }
.asg__row b { font-size: .78125rem; color: var(--ink); font-weight: 600; }
.asg__row small { font-size: .625rem; color: var(--text-muted); }
.asg__row .asg__row-main { display: flex; flex-direction: column; line-height: 1.2; }
.asg__tag { margin-left: auto; font-size: .5625rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--accent-500); background: var(--accent-100); padding: 2px 6px; border-radius: var(--r-pill); }
.asg__more { font-size: .6875rem; color: var(--text-muted); padding: 3px 4px; opacity: 0; transition: opacity .3s; }
.asg__more.in { opacity: 1; }
.asg__add { margin-top: 10px; font-size: .75rem; font-weight: 600; color: var(--primary-600); border: 1.5px dashed var(--border); border-radius: var(--r-sm); padding: 8px; text-align: center; transition: border-color .2s, background .2s; }
.asg__add.is-press { border-color: var(--primary-600); background: var(--primary-100); }
.asg__bar { grid-column: 1 / -1; border-top: 1px solid var(--border); padding: 12px 16px; display: flex; }
.asg__save { margin-left: auto; font-size: .75rem; font-weight: 600; color: #fff; background: var(--primary-600); padding: 8px 16px; border-radius: var(--r-sm); }

/* --- Sign --- */
.ui-sign .ui-signed, .ui-sign .ui-stamp { opacity: 0; transform: translateY(5px); transition: opacity .4s ease, transform .4s ease; }
.ui-sign.is-signed .ui-signed, .ui-sign.is-signed .ui-stamp { opacity: 1; transform: none; }
.ui-stamp { font-size: .7rem; color: var(--text-muted); text-align: center; margin-top: 10px; }
.sg-act { margin-top: 4px; display: block; text-align: center; font-size: .8125rem; font-weight: 600; color: #fff; background: var(--primary-600); padding: 9px 16px; border-radius: var(--r-sm); }
.sg-act.done { background: var(--success); }

/* --- Audit --- */
.lg { display: flex; flex-direction: column; }
.lg-row { display: grid; grid-template-columns: 96px 1.3fr 1.1fr 86px; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.lg-row--head { font-size: .625rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.lg-row[data-row] { opacity: 0; transform: translateY(7px); transition: opacity .35s ease, transform .35s ease; }
.lg-row.in { opacity: 1; transform: none; }
.lg-ts { font-size: .6875rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lg-user b { font-size: .75rem; color: var(--ink); display: block; }
.lg-user small { font-size: .625rem; color: var(--text-muted); }
.lg-ip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .6875rem; color: var(--text-muted); }
.act { font-size: .6875rem; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.act--ok { background: #E6F4EC; color: var(--success); }
.act--info { background: var(--primary-100); color: var(--primary-700); }
.act--mut { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); }
.lg-export { font-size: .6875rem; }
.lg-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .75rem; color: var(--text-muted); position: relative; }
.lg-foot b { color: var(--ink); }
.lg-foot .ok { color: var(--success); font-weight: 700; }
.lg-toast { position: absolute; right: 0; top: -4px; background: var(--ink); color: #fff; font-size: .6875rem; font-weight: 600; padding: 5px 10px; border-radius: var(--r-sm); opacity: 0; transform: translateY(4px); transition: opacity .3s ease, transform .3s ease; }
.lg-toast.in { opacity: 1; transform: none; }

/* --- Create / source chooser --- */
.src { padding: 20px 22px; display: flex; flex-direction: column; height: 100%; }
.src h6 { font-size: .9375rem; color: var(--ink); margin: 0 0 3px; }
.src__lead { font-size: .75rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; max-width: 460px; }
.src__opts { display: flex; flex-direction: column; gap: 10px; }
.src-card { display: flex; align-items: flex-start; gap: 13px; border: 1.5px solid var(--border); border-radius: var(--r-md); padding: 14px 15px; transition: border-color .2s, background .2s, box-shadow .2s; }
.src-card.on { border-color: var(--primary-600); background: var(--primary-100); box-shadow: 0 0 0 3px var(--primary-100); }
.src-ico { flex: none; width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--bg-subtle); color: var(--primary-600); }
.src-card.on .src-ico { background: var(--white); }
.src-ico svg { width: 20px; height: 20px; }
.src-card__main { display: flex; flex-direction: column; gap: 2px; }
.src-card__t { font-size: .875rem; font-weight: 600; color: var(--ink); }
.src-card__d { font-size: .6875rem; color: var(--text-muted); }
.src-sync { margin-top: 8px; font-size: .6875rem; font-weight: 600; color: var(--success); opacity: 0; transform: translateY(3px); transition: opacity .3s ease, transform .3s ease; }
.src-sync.in { opacity: 1; transform: none; }
.src__next { margin-top: auto; align-self: flex-start; font-size: .8125rem; font-weight: 600; color: #fff; background: var(--primary-600); padding: 9px 18px; border-radius: var(--r-sm); opacity: .4; pointer-events: none; transition: opacity .25s ease; }
.src__next.ready { opacity: 1; pointer-events: auto; }

/* --- Assign: due date --- */
.asg__due { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.due-opt { font-size: .75rem; color: var(--text-body); border: 1.5px solid var(--border); border-radius: var(--r-pill); padding: 5px 12px; transition: border-color .2s, background .2s, color .2s; }
.due-opt.on { border-color: var(--primary-600); background: var(--primary-600); color: #fff; }
.due-date { font-size: .75rem; font-weight: 600; color: var(--primary-700); margin-left: 2px; opacity: 0; transition: opacity .3s ease; }
.due-date.in { opacity: 1; }

/* --- Readiness dashboard --- */
@property --p { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.dash { padding: 18px 20px; display: flex; flex-direction: column; height: 100%; }
.dash__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dash__head h6 { font-size: .9375rem; color: var(--ink); margin: 0 0 2px; }
.dash__head small { font-size: .6875rem; color: var(--text-muted); }
.dash__chip { margin-left: auto; font-size: .6875rem; font-weight: 600; color: var(--primary-700); background: var(--primary-100); border-radius: var(--r-pill); padding: 5px 11px; white-space: nowrap; }
.dash__top { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.dash__donut { flex: none; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; position: relative; background: conic-gradient(var(--primary-600) 0, var(--primary-600) var(--p, 0%), var(--bg-subtle) var(--p, 0%)); transition: --p 1s cubic-bezier(.4,0,.2,1); }
.dash__donut::after { content: ""; position: absolute; inset: 13px; background: var(--white); border-radius: 50%; }
.dash__donut span { position: relative; z-index: 1; font-size: 1.375rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.dash__stats { display: flex; flex-direction: column; gap: 10px; }
.dash__stat { display: flex; align-items: baseline; gap: 8px; }
.dash__stat b { font-size: 1.0625rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 52px; }
.dash__stat small { font-size: .75rem; color: var(--text-muted); }
.dash__stat.warn b { color: #C2710C; }
.dash__bars { display: flex; flex-direction: column; gap: 11px; }
.dbar { display: grid; grid-template-columns: 150px 1fr 40px 72px; align-items: center; gap: 12px; padding: 2px 6px; margin: 0 -6px; border-radius: var(--r-sm); transition: background .2s; }
.dbar__lab { font-size: .75rem; color: var(--ink); font-weight: 500; }
.dbar__track { height: 8px; border-radius: 999px; background: var(--bg-subtle); overflow: hidden; }
.dbar__fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--primary-600); transition: width 1s cubic-bezier(.4,0,.2,1); }
.dbar.warn .dbar__fill { background: #E0900E; }
.dbar__val { font-size: .75rem; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.dbar__status { font-size: .625rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-align: center; padding: 3px 0; border-radius: var(--r-pill); }
.dbar__status.ok { color: var(--success); background: #E6F4EC; }
.dbar__status.warn { color: #C2710C; background: #FBEFDD; }
.dbar.is-risk { animation: riskPulse 1.1s ease-in-out 2; }
@keyframes riskPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.dbar.is-sel { background: var(--primary-100); }
.dbar.is-sel .dbar__lab { font-weight: 700; color: var(--primary-700); }
.dash__foot { margin-top: auto; padding-top: 16px; display: flex; }
.dash__act { margin-left: auto; font-size: .75rem; font-weight: 600; color: #fff; background: var(--primary-600); padding: 9px 16px; border-radius: var(--r-sm); }
/* drill-down */
.drill { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; display: none; }
.drill.in { display: block; animation: drillIn .4s ease both; }
@keyframes drillIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.drill__head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.drill__title { font-size: .8125rem; color: var(--text-body); }
.drill__title b { color: #C2710C; font-weight: 700; }
.drill__hint { margin-left: auto; font-size: .625rem; color: var(--text-muted); }
.drill__row { display: grid; grid-template-columns: 1.5fr 1.2fr 48px 92px; align-items: center; gap: 12px; padding: 7px 2px; border-bottom: 1px solid var(--border); }
.drill__row--head { font-size: .5625rem; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); }
.drill__who { display: flex; align-items: center; gap: 8px; }
.drill__who b { font-size: .75rem; color: var(--ink); display: block; line-height: 1.2; }
.drill__who small { font-size: .625rem; color: var(--text-muted); }
.drill__trn { font-size: .6875rem; color: var(--text-body); }
.drill__late { font-size: .6875rem; font-weight: 700; color: #C2710C; font-variant-numeric: tabular-nums; }
.remind { font-size: .6875rem; font-weight: 600; color: var(--primary-600); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 5px 0; text-align: center; transition: background .2s, border-color .2s, color .2s; }
.remind.done { color: var(--success); border-color: transparent; background: #E6F4EC; }
.drill__foot { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.drill__act { font-size: .75rem; font-weight: 600; padding: 8px 15px; border-radius: var(--r-sm); }
.drill__act--ghost { color: var(--primary-600); border: 1.5px solid var(--border); }
.drill__act--primary { margin-left: auto; color: #fff; background: var(--primary-600); }
