/* ============================================================
   LINAsystems — marketing site
   Fresh B2B-SaaS identity: warm-white paper, emerald "signal"
   accent, mint-teal secondary. Space Grotesk (display) / Inter
   (body) / JetBrains Mono (labels). Light-first. Distinct from
   the campaign demo's navy/red/gold.
   ============================================================ */

:root {
  /* committed palette */
  --ground:    #F7F5F1; /* warm-white paper */
  --paper:     #FEFDFB; /* lifted surface */
  --text:      #16161D; /* near-black ink */
  --accent:    #059669; /* emerald signal */
  --accent-2:  #0D9488; /* mint-teal */

  /* derived */
  --ink-soft:  #5A5A66; /* secondary text */
  --ink-faint: #6D6D7A; /* quiet text — 4.7:1 on --ground, AA at micro sizes */
  --line:      #E4E1DA; /* warm hairline */
  --wash-emerald: #E8F6EF;
  --wash-teal:   #E4F2F0;
  --accent-deep: #047857; /* emerald hover / dark block */
  --accent-ink:  #064E3B; /* darkest emerald, for demo block */
  --teal-deep:   #0B776D;

  --shadow-sm: 0 1px 2px rgba(22, 22, 29, .05), 0 1px 1px rgba(22, 22, 29, .04);
  --shadow-md: 0 12px 28px -16px rgba(6, 78, 59, .28), 0 2px 6px rgba(22, 22, 29, .04);
  --shadow-lg: 0 28px 64px -24px rgba(6, 78, 59, .35);

  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1120px;

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* no horizontal body scroll */
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
/* links use the deep emerald: 5.0:1 on --ground (raw --accent is 3.5:1) */
a { color: var(--accent-deep); text-decoration: none; }

img, canvas { max-width: 100%; display: block; }

/* ---- focus + skip link ---- */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent-deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  font: 600 14px/1 var(--font-body);
}
.skip-link:focus { left: 0; }

/* ---- shared atoms ---- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep); /* AA at this size; raw --accent is reserved for large type */
  margin-bottom: 1rem;
}

/* spacing utilities — the token replacements for one-off inline margins */
.mt-flow  { margin-top: 1.4rem; }  /* follow-on note under a grid/section body */
.mt-group { margin-top: 2rem; }    /* new labelled group inside a long section */

/* visually-hidden live region / SR-only text */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.72em 1.25em;
  border: 1.5px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.lg { padding: 0.95em 1.6em; font-size: 1.02rem; }

.btn.primary {
  /* deep emerald resting state — white label reads at 5.5:1 (raw --accent is 3.8:1) */
  --btn-bg: var(--accent-deep);
  --btn-fg: #fff;
  --btn-bd: var(--accent-deep);
  box-shadow: var(--shadow-sm);
}
.btn.primary:hover {
  --btn-bg: var(--accent-ink);
  --btn-bd: var(--accent-ink);
  box-shadow: var(--shadow-md);
}

.btn.ghost {
  --btn-bg: var(--paper);
  --btn-fg: var(--text);
  --btn-bd: var(--line);
}
.btn.ghost:hover {
  --btn-bd: var(--accent);
  --btn-fg: var(--accent-deep);
}

/* honeypot — visually hidden, kept in the a11y/layout flow off-screen */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(247,245,241,0.86);
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
  color: var(--text);
}
.nav nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}
.nav nav a {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav nav a:hover { color: var(--text); border-color: var(--accent-2); }
/* CTA buttons inside the nav panel keep their button identity — the generic
   nav-link rules above (mono face, muted color, underline border) must not
   bleed into them. (0,3,2) outranks both the base and ≤720px link rules. */
.nav nav .nav-panel-cta a.btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0;
  color: var(--btn-fg);
  padding: 0.72em 1.25em;
  border-bottom: 1.5px solid var(--btn-bd);
  width: auto;
}
.nav-cta { display: flex; gap: 0.6rem; align-items: center; }

/* hamburger — hidden on desktop, the disclosure trigger ≤720px */
.nav-burger {
  appearance: none;
  -webkit-appearance: none;
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.nav-burger:hover { border-color: var(--accent-2); }
.nav-burger-bars { position: relative; display: block; width: 16px; height: 2px; }
.nav-burger-bars,
.nav-burger-bars::before,
.nav-burger-bars::after {
  border-radius: 2px;
  background: var(--text);
  transition: transform .2s ease, background .2s ease;
}
.nav-burger-bars::before,
.nav-burger-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
}
.nav-burger-bars::before { top: -5px; }
.nav-burger-bars::after { top: 5px; }
html.nav-open .nav-burger-bars { background: transparent; }
html.nav-open .nav-burger-bars::before { transform: translateY(5px) rotate(45deg); }
html.nav-open .nav-burger-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* panel-only CTA pair (real hrefs, JS retargets the demo link) */
.nav-panel-cta { display: none; }

/* ============================================================
   PRODUCT MEGA-MENU DROPDOWN
   A real <button aria-expanded> disclosure. marketing.js drives
   open/close (click, Escape, focus-out; hover kept on precise
   pointers with a close delay); the :hover rule below is only the
   no-JS fallback (html.js is stamped by marketing.js).
   ============================================================ */
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-item:hover .nav-link,
.nav-item.open .nav-link { color: var(--text); border-color: var(--accent-2); }
.nav-caret { font-size: 0.6rem; transition: transform .2s; line-height: 1; opacity: 0.7; }
.nav-item.open .nav-caret,
html:not(.js) .nav-item:hover .nav-caret { transform: rotate(180deg); }

.product-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  max-width: calc(100vw - 2rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 1.25rem 1.25rem 1rem;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
  z-index: 100;
}
/* invisible bridge over the 10px gap so the pointer never "leaves" mid-crossing */
.product-dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}
.nav-item.open .product-dropdown { display: grid; }
html:not(.js) .nav-item:hover .product-dropdown { display: grid; }
/* between ~720–1000px the nav sits close to the left edge: anchor the panel to
   the header instead of the item so the centered 560px sheet can't overflow */
@media (max-width: 1000px) {
  .nav-item { position: static; }
}

.drop-head {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.55rem;
}
.product-dropdown a {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  padding: 0.42rem 0.55rem;
  border-radius: 7px;
  color: var(--text);
  border-bottom: none;
  transition: background .15s;
  margin-bottom: 0.12rem;
  text-decoration: none;
}
.product-dropdown a:hover { background: var(--wash-emerald); }
.product-dropdown a strong { font-weight: 600; font-size: 0.82rem; font-family: var(--font-body); }
.product-dropdown a span { color: var(--ink-soft); font-size: 0.72rem; font-family: var(--font-body); line-height: 1.3; }
.drop-footer {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
  margin-top: 0.35rem;
}
.drop-all {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--accent-deep); /* AA at this size; raw --accent is 3.5:1 */
  letter-spacing: 0.03em;
  border-bottom: none;
  text-decoration: none;
}
.drop-all:hover { color: var(--accent-ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 11vw, 8rem) clamp(1rem, 5vw, 2.5rem) clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(900px 520px at 78% -8%, var(--wash-emerald), transparent 70%),
    radial-gradient(640px 440px at 8% 16%, var(--wash-teal), transparent 72%);
}
.hero-mesh {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  font-weight: 600;
  max-width: 18ch;
  margin-bottom: 1.4rem;
}
.hero .lede {
  font-size: clamp(1.05rem, 2.1vw, 1.4rem);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 2.2rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.hero-price,
.hero-note {
  margin-top: 1.35rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}
.hero-price strong { color: var(--accent-deep); font-weight: 700; }

/* ============================================================
   PROOF BAR
   ============================================================ */
.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 2.2rem;
  justify-content: center;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.1rem clamp(1rem, 5vw, 2.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.proof span { display: inline-flex; align-items: center; }
.proof span::before {
  content: "▸";
  color: var(--accent-2);
  margin-right: 0.55em;
  font-size: 0.85em;
}

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.pillars, .how, .editions, .pricing, .request, .faq {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 5vw, 2.5rem);
}
.pillars h2, .how h2, .pricing h2, .request h2, .faq h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  margin-bottom: 0.6rem;
}

/* ---- PILLARS ---- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
  margin-top: 2.2rem;
}
.pillar-grid article {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pillar-grid article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #B6DDCD;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.pillar-grid .idx {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--teal-deep); /* AA at this size on --paper; raw --accent-2 is 3.7:1 */
  letter-spacing: 0.05em;
}
.pillar-grid h3 {
  font-size: 1.18rem;
  margin: 0.6rem 0 0.55rem;
}
.pillar-grid p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---- HOW IT WORKS (genuine sequence → numbered) ----
   Works as a wrapped list (.how > ol) and as the list itself (ol.how). */
.how ol, ol.how {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.how li {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.4rem;
}
.how .step-no {
  flex: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  width: 1.6em;
}
.how .step-body { color: var(--text); }

/* ---- EDITIONS ---- */
.edition-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.edition {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.9rem 2.1rem;
  background: var(--wash-teal);
}
.edition.lead { background: var(--wash-emerald); }
.edition-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3em 0.7em;
  border-radius: 999px;
  margin-bottom: 1rem;
  color: var(--teal-deep);
  background: #DEF3F1;
  background: color-mix(in srgb, var(--accent-2) 16%, #fff);
}
.edition.lead .edition-tag {
  color: var(--accent-deep); /* AA at 0.72rem; raw --accent is 3.3:1 on the wash */
  background: #E4F3EC;
  background: color-mix(in srgb, var(--accent) 14%, #fff);
}
.edition h3 { font-size: 1.5rem; margin-bottom: 0.7rem; }
.edition p { color: var(--ink-soft); max-width: 52ch; }

/* ---- PRICING ---- */
.pricing-note {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0.4rem 0 0;
  font-size: 1.02rem;
}
.tier-scroll {
  margin-top: 2.4rem;
  /* wide block scrolls inside its own container, never the body */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 1.1rem;
}
.tier {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.tier-fam {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-deep); /* AA at this size; raw --accent-2 is 3.7:1 */
  margin-bottom: 0.3rem;
}
.tier h4 {
  font-size: 1.3rem;
  margin-bottom: 0.15rem;
}
.tier .seats {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}
.tier ul {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  flex: 1;
}
.tier li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}
.tier li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.tier .btn { width: 100%; margin-top: auto; }

/* ---- DEMO CALLOUT (the one saturated moment) ---- */
.demo-callout {
  max-width: var(--maxw);
  margin: clamp(2rem, 5vw, 3.5rem) auto;
  width: calc(100% - clamp(2rem, 10vw, 5rem));
  border-radius: clamp(18px, 3vw, 28px);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 3.5rem);
  text-align: center;
  color: #fff;
  background-color: #064E3B;
  background:
    radial-gradient(700px 420px at 80% 0%, color-mix(in srgb, var(--accent-2) 50%, transparent), transparent 70%),
    linear-gradient(150deg, var(--accent-ink), var(--accent-deep) 70%);
  box-shadow: var(--shadow-lg);
}
.demo-callout .eyebrow { color: #7FD4C8; } /* 5.6:1 on the emerald-ink field */
.demo-callout h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  margin-bottom: 0.8rem;
  max-width: 22ch;
  margin-inline: auto;
}
.demo-callout p {
  color: rgba(255, 255, 255, .82);
  max-width: 46ch;
  margin: 0 auto 2rem;
}
.demo-callout .btn.primary {
  --btn-bg: #fff;
  --btn-fg: var(--accent-ink);
  --btn-bd: #fff;
}
.demo-callout .btn.primary:hover {
  --btn-bg: var(--wash-emerald);
  --btn-bd: var(--wash-emerald);
}
.demo-callout :focus-visible { outline-color: #fff; }

/* ---- REQUEST FORM ---- */
.request { max-width: 680px; }
.request-lede { color: var(--ink-soft); margin: 0.4rem 0 2rem; }
#demo-form {
  display: grid;
  gap: 1.1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-sm);
}
#demo-form label {
  display: grid;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
#demo-form input,
#demo-form select,
#demo-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  background: var(--ground);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
#demo-form textarea { resize: vertical; min-height: 3.4rem; }
#demo-form input:focus,
#demo-form select:focus,
#demo-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--wash-emerald);
}
#demo-form button { justify-self: start; }
#demo-form-status {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  min-height: 1.2em;
  margin: 0;
}
#demo-form-status:empty { display: none; }

/* ---- FAQ ---- */
.faq h2 { margin-bottom: 1.6rem; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.3rem 0;
}
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  padding: 1rem 2rem 1rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p {
  color: var(--ink-soft);
  padding: 0 0 1.2rem;
  max-width: 64ch;
}

/* ---- FOOTER ---- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding: 2.4rem clamp(1rem, 5vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.site-footer a { color: var(--accent-deep); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .tier-grid { grid-template-columns: repeat(3, minmax(230px, 1fr)); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  /* tier grid keeps 3 cols but scrolls horizontally inside .tier-scroll */

  /* ---- mobile nav: slide-down disclosure (html.nav-open, driven by the
     hamburger via marketing.js — Escape / link-follow / resize all close) ---- */
  .nav-burger { display: inline-flex; }
  .nav-cta { margin-left: auto; }
  .nav-cta .btn.ghost { display: none; } /* the panel carries the demo CTA */
  .nav nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0.4rem 1.25rem 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
  }
  html.nav-open .nav nav { display: flex; }
  html.nav-open, html.nav-open body { overflow: hidden; } /* scroll-lock behind the panel */
  .nav nav a {
    font-size: 0.92rem;
    padding: 0.85rem 0.15rem;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
  .nav nav a:hover { border-color: var(--line); }
  .nav-item { flex-direction: column; align-items: stretch; }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    font-size: 0.92rem;
    padding: 0.85rem 0.15rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-item:hover .nav-link { border-color: var(--line); }
  /* the mega-menu becomes an in-flow accordion inside the panel */
  .product-dropdown {
    position: static;
    transform: none;
    width: 100%;
    max-width: none;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 0.4rem 0 0.9rem;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .product-dropdown::before { content: none; }
  .drop-col + .drop-col { margin-top: 0.4rem; }
  .nav-panel-cta {
    display: flex;
    gap: 0.6rem;
    padding-top: 1.1rem;
  }
  .nav-panel-cta .btn { flex: 1 1 auto; }
}
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  html.nav-open .nav nav { animation: nav-drop .22s ease; }
}
@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-8px); }
}
@media (max-width: 600px) {
  /* the panel carries both CTAs; keep the header to brand + toggle + burger */
  .nav-cta .btn.primary { display: none; }
}
@media (max-width: 480px) {
  .nav { gap: 0.8rem; }
  .hero-cta .btn { flex: 1 1 auto; }
}

/* ============================================================
   MOTION
   ============================================================ */
/* Scroll reveal — styled ONLY under html.reveal-armed, which marketing.js
   stamps when JS + IntersectionObserver are live and motion is allowed, so
   content can never be stranded hidden (no-JS and reduced-motion see it all). */
html.reveal-armed .reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
html.reveal-armed .reveal.in { opacity: 1; transform: none; }

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

/* --- pricing page additions --- */
/* 2-up tier grid (pricing Core row + homepage pricing teaser) — overrides the
   default 3-col so two cards don't leave an empty third column. */
.tier-grid.cols-2 { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
.tier .price { font: 700 30px/1 var(--font-display); color: var(--text); margin: 6px 0 2px; }
.tier .price span { font: 600 14px/1 var(--font-body); color: var(--ink-soft); }
.tier .setup { font: 500 13px/1.3 var(--font-body); color: var(--ink-soft); margin: 0 0 8px; }
.tier.feature { border-color: var(--accent); box-shadow: var(--shadow-md); }
.addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; max-width: var(--maxw); margin: 0 auto; }
.addon { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow-sm); }
.addon h4 { font: 600 15px/1.2 var(--font-display); margin: 0 0 4px; color: var(--text); }
.addon p { font: 500 14px/1.4 var(--font-body); color: var(--ink-soft); margin: 0; }
/* --- edition comparison table (homepage) --- */
.compare { max-width: var(--maxw); margin: 0 auto; overflow-x: auto; }
.compare table { width: 100%; border-collapse: collapse; font: 500 14px/1.4 var(--font-body); }
.compare th, .compare td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.compare thead th { font: 600 14px/1.2 var(--font-display); color: var(--text); }
.compare td.yes { color: var(--teal-deep); font-weight: 700; }
/* --- trust strip --- */
.trust { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.trust article { background: var(--wash-emerald); border-radius: var(--radius-sm); padding: 18px; }
.trust h3 { font: 600 16px/1.2 var(--font-display); margin: 0 0 6px; }
.trust p { font: 500 14px/1.5 var(--font-body); color: var(--ink-soft); margin: 0; }

/* ============================================================
   MULTI-PAGE ADDITIONS (2026-06-23 rebuild)
   Deep-page primitives composed from the SAME tokens — no new
   fonts, no new colors, --maxw centered. Used by /product,
   /chatbot, /phone, /mind, /knowledge, /command-center,
   /editions, /security, /how-it-works, /faq, /about, /contact.
   ============================================================ */

/* generic centered section scaffold (same rhythm as .pillars/.how) */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 5vw, 2.5rem); }
.section.tight { padding-top: clamp(1.6rem, 4vw, 2.6rem); padding-bottom: clamp(1.6rem, 4vw, 2.6rem); }
.section.alt { max-width: none; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section.alt > * { max-width: var(--maxw); margin-inline: auto; }
.section h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 0.6rem; }
.section h3 { font-size: 1.2rem; margin-bottom: 0.4rem; }
.section > p { color: var(--ink-soft); max-width: 68ch; }

/* sub-page hero variant (no canvas mesh, lighter wash) */
.page-hero { padding-bottom: clamp(2rem, 5vw, 3rem); }
.page-hero .lede { max-width: 56ch; }
.back-to { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 0.9rem; display: inline-block; }
.back-to a { color: var(--accent); }

/* readable long-form column */
.prose { max-width: 68ch; }
.prose p { color: var(--ink-soft); margin-bottom: 1.1rem; }
.prose p strong, .prose li strong { color: var(--text); }
.prose h3 { margin: 2rem 0 0.6rem; font-size: 1.25rem; }

/* two-column feature layout (text + supporting list/aside) */
.feature-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1.2rem, 4vw, 2.6rem); align-items: start; margin-top: 2rem; }
.feature-split > div { min-width: 0; }
.feature-split p { color: var(--ink-soft); }

/* reusable check list (standalone version of .tier li) */
.checklist { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.checklist li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0.05em; color: var(--accent); font-weight: 700; }
.checklist li strong { color: var(--text); }

/* inset callout card — a key statement / note */
.callout { background: var(--wash-emerald); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; margin: 1.6rem 0 0; }
.callout.teal { background: var(--wash-teal); border-left-color: var(--accent-2); }
.callout p { color: var(--ink-soft); margin: 0; }
.callout strong { color: var(--text); }

/* KPI / proof numbers */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-top: 2rem; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); }
.stat .num { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--accent); letter-spacing: -0.02em; line-height: 1.15; }
.stat .lbl { display: block; font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-soft); margin-top: 0.45rem; line-height: 1.6; }

/* "one engine" system diagram (/product, /how-it-works) — inline SVG only:
   emerald module nodes on teal connectors orbiting the engine mark, rhyming
   with the home hero mesh. Attribute/class styling keeps the deep pages
   inline-style-free (CSP test contract). */
.engine-figure {
  margin: 2.2rem 0 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3vw, 2rem) clamp(1.1rem, 3vw, 2rem) 1.2rem;
  box-shadow: var(--shadow-sm);
}
.engine-svg { display: block; width: 100%; height: auto; }
.engine-svg .link { stroke: var(--accent-2); stroke-width: 1.5; opacity: 0.38; }
.engine-svg .node { fill: var(--accent); stroke: var(--paper); stroke-width: 2; }
.engine-svg .lbl {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  fill: #45454F;
  /* paper halo keeps labels legible where a connector passes underneath */
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
}
.engine-svg .core-lbl {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--accent-ink);
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 4px;
}
.engine-figure figcaption {
  margin-top: 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
/* the same sheet inverts cleanly if it ever sits on the dark demo callout */
.demo-callout .engine-figure { background: transparent; border-color: rgba(255, 255, 255, 0.25); box-shadow: none; }
.demo-callout .engine-svg .node { stroke: var(--accent-ink); }
.demo-callout .engine-svg .lbl { fill: rgba(255, 255, 255, 0.85); stroke: none; }
.demo-callout .engine-svg .core-lbl { fill: #7FD4C8; stroke: none; }
@media (max-width: 620px) {
  /* labels shrink below legibility once the sheet scales down — the geometry
     stays decorative and the figcaption carries the story */
  .engine-svg .lbl { display: none; }
}

/* labeled spec rows (term + definition) for /security & deep pages */
.spec { display: grid; gap: 0; margin-top: 1.6rem; }
.spec .row { display: grid; grid-template-columns: minmax(150px, 0.8fr) 2fr; gap: 0.5rem 1.4rem; padding: 0.95rem 0; border-bottom: 1px solid var(--line); }
.spec .row:first-child { border-top: 1px solid var(--line); }
.spec .term { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.spec .def { margin: 0; color: var(--ink-soft); }
@media (max-width: 620px) { .spec .row { grid-template-columns: 1fr; gap: 0.25rem; } }

/* cross-link cards ("explore each module", related pages) */
.linkcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 2rem; }
.linkcard { display: block; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.linkcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.linkcard h3 { font-size: 1.08rem; margin-bottom: 0.3rem; }
.linkcard p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }
.linkcard .arrow { font-family: var(--font-mono); color: var(--accent-deep); font-weight: 700; }

/* footer nav links (enriched multi-page footer) */
.site-footer .foot-link { color: var(--ink-soft); }
.site-footer .foot-link:hover { color: var(--accent); }

/* center the CTA buttons inside the saturated demo block (deep-page closer) */
.demo-callout .hero-cta { justify-content: center; }

/* inline "learn more →" link under a section */
.more-link { margin-top: 1.6rem; }
.more-link a { font-family: var(--font-mono); font-size: 0.84rem; font-weight: 600; letter-spacing: 0.02em; }

/* ============================================================
   READING MODE — "Plain English Version" toggle + header logo
   ============================================================ */
/* Default / standard (attr absent or "standard"): hide the plain twins.
   Plain mode: hide the standard twins. We only ever set display:none on the
   INACTIVE twin and never force a display on the active one, so a twin that is
   itself a grid/flex container keeps its author display when shown. */
html:not([data-reading="plain"]) .reading-plain { display: none; }
html[data-reading="plain"] .reading-std { display: none; }

/* Subtle readability lift in plain mode — must not shift layout. */
html[data-reading="plain"] .prose,
html[data-reading="plain"] .lede,
html[data-reading="plain"] p.reading-plain { line-height: 1.72; }

/* Header logo mark (replaces the removed dot pseudo-element). */
.brand { display: inline-flex; align-items: center; gap: 0.55rem; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; flex: none; display: block; }
.brand-word { display: inline-block; }

/* Plain English toggle (a real role=switch button, styled as a pill switch). */
.reading-toggle {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink-soft); font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 0.34rem 0.62rem; border-radius: 999px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.reading-toggle:hover { color: var(--text); border-color: var(--accent-2); }
.reading-toggle:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.reading-toggle-track {
  width: 30px; height: 17px; border-radius: 999px; flex: none;
  background: var(--line); position: relative; transition: background .2s;
}
.reading-toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--paper); box-shadow: var(--shadow-sm); transition: transform .2s;
}
/* Switch visual state is driven by the root attribute (set by the head script
   BEFORE paint), not by aria-checked (synced only at DOMContentLoaded) — so the
   thumb renders in the correct position on a plain-mode reload with no flicker.
   aria-checked stays the source of truth for assistive tech. */
html[data-reading="plain"] .reading-toggle { color: var(--accent-deep); border-color: var(--accent); }
html[data-reading="plain"] .reading-toggle .reading-toggle-track { background: var(--accent); }
html[data-reading="plain"] .reading-toggle .reading-toggle-thumb { transform: translateX(13px); }
@media (max-width: 640px) { .reading-toggle-label { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .reading-toggle, .reading-toggle-track, .reading-toggle-thumb { transition: none; }
}
