/* ==========================================================================
   HospiCore marketing site — design system
   Implements design_handoff_hospicore_site.

   The site runs two palettes and the split is load-bearing:

     .theme-cream   homepage, sign-in                warm, editorial, Fraunces display
     .theme-indigo  platform, demo, pricing, legal   direct, product-forward, Inter display

   Contrast bands invert within each palette. On cream pages `.band-ink`
   reassigns the token block to near-black; on indigo pages `[data-light]`
   reassigns it to white. Both palettes share the accent.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Gutter. One property drives horizontal padding everywhere. */
  --pad: 40px;
  --maxw: 1400px;
  --header-h: 72px;

  /* Shared accent */
  --accent: #6C5CE0;
  --accent-lift: #8C7DEC;   /* the light step, for use on dark grounds */
  --accent-wash: #F1EEFC;
  --accent-wash-2: #EBE6FC;

  /* Type */
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* Easing */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-rise: cubic-bezier(.19, 1, .22, 1);
  --ease-curtain: cubic-bezier(.76, 0, .24, 1);

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

  /* Shadows */
  --sh-card: 0 30px 70px rgba(108, 92, 224, .16), 0 3px 10px rgba(21, 22, 31, .05);
  --sh-figure: 0 20px 46px rgba(108, 92, 224, .14);
  --sh-float: 0 20px 48px rgba(21, 22, 31, .12);
  --sh-pill: 0 1px 2px rgba(21, 22, 31, .2);
  --sh-pill-hover: 0 10px 26px rgba(108, 92, 224, .36);
  --sh-pill-hover-lg: 0 14px 34px rgba(108, 92, 224, .4);
}

@media (max-width: 900px) { :root { --pad: 28px; } }
@media (max-width: 560px) { :root { --pad: 20px; } }

/* --- Cream palette: homepage, sign-in ------------------------------------ */

.theme-cream {
  --bg: #FDFBF7;
  --bg-tint: #F6F3FE;
  --surface: #FFFFFF;
  --surface-2: #FBFAFE;
  --surface-3: #FDFDFF;
  --text: #15161F;
  --text-2: #4A4854;
  --text-3: #5A5768;
  --text-muted: #6E6A78;
  --text-faint: #5A5768;
  --divider: rgba(21, 22, 31, .08);
  --divider-2: rgba(21, 22, 31, .16);
  --success: #17B26A;
  --success-ink: #0F7A4A;
  --accent-on: var(--accent);
  --selection: #E4DEFB;
}

/* Ink bands within cream pages. */
.band-ink {
  --bg: #15161F;
  --bg-tint: #15161F;
  --surface: rgba(242, 240, 247, .045);
  --surface-2: rgba(242, 240, 247, .045);
  --surface-3: rgba(242, 240, 247, .045);
  --text: #FBFAFE;
  --text-2: #ADA9BC;
  --text-3: #ADA9BC;
  --text-muted: #8C87A8;
  --text-faint: #8C87A8;
  --divider: rgba(242, 240, 247, .10);
  --divider-2: rgba(242, 240, 247, .18);
  --accent-on: var(--accent-lift);
  background: #15161F;
  color: #F2F0F7;
}

/* --- Indigo palette: platform, demo, pricing, legal ---------------------- */

.theme-indigo {
  --bg: #251C55;
  --bg-tint: #2B2160;
  --surface: #30256B;
  --surface-2: #30256B;
  --surface-3: #30256B;
  --text: #F5F2FE;
  --text-2: #CFC6F0;
  --text-3: #ADA2D6;
  --text-muted: #ADA2D6;
  --text-faint: #A096C8;
  --divider: rgba(245, 242, 254, .16);
  --divider-2: rgba(245, 242, 254, .26);
  --accent-on: #B9AAF8;
  --accent-100: #EDE8FE;
  --accent-200: #DCD3FC;
  --accent-300: #C7BAF9;
  --accent-400: #A492F4;
  --accent-600: #7A67E2;
  --accent-800: #3E2F8C;
  --selection: #3E2F8C;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .2);
  --sh-2: 0 20px 48px rgba(0, 0, 0, .32);
}

/* White bands within indigo pages. */
.theme-indigo [data-light] {
  --bg: #FFFFFF;
  --bg-tint: #F6F3FF;
  --surface: #F6F3FF;
  --surface-2: #FFFFFF;
  --surface-3: #FFFFFF;
  --text: #1E1650;
  --text-2: #4B4280;
  --text-3: #6A6098;
  --text-muted: #6A6098;
  --text-faint: #7167A0;
  --divider: rgba(30, 22, 80, .14);
  --divider-2: rgba(30, 22, 80, .22);
  --accent-on: #6C5CE0;
  --accent-400: #A492F4;
  --sh-1: 0 1px 2px rgba(30, 22, 80, .05), 0 8px 22px rgba(108, 92, 224, .08);
  --sh-2: 0 2px 6px rgba(30, 22, 80, .06), 0 20px 48px rgba(108, 92, 224, .12);
  background: #FFFFFF;
  color: #1E1650;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

/* Several components below set `display` on elements that are toggled with the
   `hidden` attribute (the demo confirmation, the spinner, field errors). A bare
   `display` declaration outranks the UA sheet's `[hidden] { display: none }`,
   so state it once here and let `hidden` win everywhere. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-on); }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--selection); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent-on);
  outline-offset: 3px;
  border-radius: 6px;
}

.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;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--accent); color: #fff;
  padding: 11px 18px; border-radius: var(--r-sm); font-size: 14.5px; font-weight: 500;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* Layout container. */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: 112px; }
.theme-indigo .section { padding-block: 108px; }
@media (max-width: 900px) {
  .section, .theme-indigo .section { padding-block: 84px; }
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 144;
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.032em;
  margin: 0;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-variation-settings: 'SOFT' 90, 'WONK' 1, 'opsz' 144;
  color: #3A3550;
}
.band-ink .display em { color: #C9BEF6; }

.h-section {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 96;
  font-weight: 400;
  font-size: clamp(32px, 3.9vw, 56px);
  line-height: 1.05;
  letter-spacing: -.028em;
  color: var(--text);
  /* Long section headings otherwise strand a word or two on the last line. */
  text-wrap: balance;
}
.h-section em {
  font-style: italic;
  font-variation-settings: 'SOFT' 90, 'WONK' 1, 'opsz' 96;
  color: var(--text-2);
}
.band-ink .h-section em { color: #C9BEF6; }

/* Indigo pages set display type in Inter. */
.theme-indigo .display,
.theme-indigo .h-section {
  font-family: var(--font-body);
  font-variation-settings: normal;
  font-weight: 500;
  letter-spacing: -.026em;
  line-height: 1.06;
}
.theme-indigo .display { font-size: clamp(36px, 4.6vw, 58px); }
.theme-indigo .h-section { font-size: clamp(30px, 3.2vw, 44px); }
.theme-indigo .display em,
.theme-indigo .h-section em { font-style: normal; color: var(--accent-on); }

.kicker {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lead {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 47ch;
}

/* --------------------------------------------------------------------------
   4. Buttons, tags, fields
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .22s ease, color .22s ease, border-color .22s ease,
              box-shadow .22s ease, transform .22s ease;
}
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 15.5px; }
.btn-xl { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .22s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--sh-pill);
}
.btn-primary:hover {
  background: var(--accent);
  color: #FDFBF7;
  box-shadow: var(--sh-pill-hover);
  transform: translateY(-1px);
}
.btn-lg.btn-primary:hover, .btn-xl.btn-primary:hover {
  box-shadow: var(--sh-pill-hover-lg);
  transform: translateY(-2px);
}
.theme-indigo .btn-primary { background: var(--accent-on); color: #1E1650; }
.theme-indigo .btn-primary:hover { background: #EDE8FE; color: #1E1650; }
.theme-indigo [data-light] .btn-primary { background: var(--accent); color: #FFFFFF; }
.theme-indigo [data-light] .btn-primary:hover { background: #5A49CC; color: #FFFFFF; }

.btn-secondary {
  background: transparent;
  border-color: var(--divider-2);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--accent-wash);
  border-color: var(--accent);
  color: var(--accent);
}
.theme-indigo .btn-secondary:hover {
  background: rgba(185, 170, 248, .12);
  border-color: var(--accent-on);
  color: var(--accent-on);
}
.band-ink .btn-secondary:hover {
  background: rgba(108, 92, 224, .16);
  border-color: var(--accent-lift);
  color: var(--accent-lift);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  line-height: 1;
}
.tag-outline {
  border: 1px solid var(--divider-2);
  background: rgba(255, 255, 255, .7);
  color: var(--text-3);
}
.theme-indigo .tag-outline { background: transparent; color: var(--accent-on); }
.tag-accent { background: var(--accent); color: #FFFFFF; }
.theme-indigo .tag-accent { background: var(--accent-on); color: #1E1650; }

.dot {
  width: 6px; height: 6px; flex: none;
  border-radius: 50%;
  background: var(--accent-on);
  animation: hc-blink 2.6s ease-in-out infinite;
}

.field { display: grid; gap: 7px; }
.field > label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-2);
}
.input {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input::placeholder { color: var(--text-faint); }
.input:focus {
  outline: none;
  border-color: var(--accent-on);
  box-shadow: 0 0 0 3px rgba(108, 92, 224, .18);
}
.input[aria-invalid="true"] {
  border-color: var(--accent-400, #A492F4);
  animation: hc-shake .42s ease;
}
.field-error { font-size: 12.5px; color: #C0392B; }

/* --------------------------------------------------------------------------
   5. Brand lockup
   -------------------------------------------------------------------------- */

.lockup { display: inline-flex; align-items: center; gap: 11px; }
.lockup:hover { color: inherit; }
.lockup .mark { flex: none; }
.lockup .mark .ring { fill: none; stroke: currentColor; stroke-width: 9; stroke-linecap: round; }
.lockup .mark .pip { fill: var(--accent-on); }
.lockup-text { display: grid; gap: 1px; }
.wordmark {
  font-size: 19px;
  line-height: 1;
  letter-spacing: -.01em;
  font-weight: 400;
}
.wordmark b { font-weight: 600; color: var(--accent-on); }
.descriptor {
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: .2em;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 90;
  background: rgba(253, 251, 247, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(21, 22, 31, .08);
}
.theme-indigo .site-header {
  background: rgba(37, 28, 85, .84);
  border-bottom-color: rgba(245, 242, 254, .14);
}

/* White header, used on the demo page. The whole bar re-inks so the links,
   wordmark, burger and Sign in stay legible against it. */
.theme-indigo .site-header.is-light {
  background: rgba(255, 255, 255, .8);
  border-bottom-color: rgba(30, 22, 80, .12);
}
.site-header.is-light .lockup { color: #1E1650; }
.site-header.is-light .wordmark b { color: var(--accent); }
.site-header.is-light .descriptor { color: #8B82AE; }
.site-header.is-light .lockup .mark .pip { fill: var(--accent); }
.site-header.is-light .nav-link { color: #4B4280; }
.site-header.is-light .nav-link::after { background: var(--accent); }
.site-header.is-light .nav-link[aria-current],
.site-header.is-light .nav-link.is-active { color: #1E1650; }
.site-header.is-light .signin-link { color: #4B4280; }
.site-header.is-light .signin-link:hover { background: var(--accent-wash); color: var(--accent); }
.site-header.is-light .burger { color: #1E1650; border-color: rgba(30, 22, 80, .2); }
.site-header.is-light .burger:hover { border-color: var(--accent); color: var(--accent); }
.theme-indigo .site-header.is-light .btn-primary { background: var(--accent); color: #FFFFFF; }
.theme-indigo .site-header.is-light .btn-primary:hover { background: #5A49CC; color: #FFFFFF; }
.theme-indigo .site-header.is-light .menu-panel { background: rgba(255, 255, 255, .97); }
.site-header.is-light .menu-inner a:not(.btn) { color: #4B4280; border-bottom-color: rgba(30, 22, 80, .12); }
.theme-indigo .site-header.is-light .btn-secondary { color: #1E1650; border-color: rgba(30, 22, 80, .2); }

.header-bar {
  height: var(--header-h);
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.nav-links { display: flex; justify-content: center; gap: 30px; }
.nav-link {
  position: relative;
  padding-bottom: 4px;
  font-size: 14.5px;
  color: var(--text-2);
}
.nav-link::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--accent-on);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .38s var(--ease);
}
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current], .nav-link.is-active { color: var(--text); }
.nav-link[aria-current]::after, .nav-link.is-active::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* --- Language switcher --------------------------------------------------
   Two plain links in a pill, so it works before JavaScript and search
   engines can follow both. The current language is the filled one. */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--divider);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .5);
}
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text-muted);
  transition: background .2s ease, color .2s ease;
}
.lang a:hover { color: var(--accent-on); }
.lang a[aria-current] { background: var(--text); color: var(--bg); }
.theme-indigo .lang { background: rgba(245, 242, 254, .06); }
.theme-indigo .lang a[aria-current] { background: var(--accent-on); color: #1E1650; }
.site-header.is-light .lang { border-color: rgba(30, 22, 80, .16); background: rgba(255, 255, 255, .6); }
.site-header.is-light .lang a { color: #6A6098; }
.theme-indigo .site-header.is-light .lang a[aria-current] { background: var(--accent); color: #FFFFFF; }

/* In the mobile panel it sits with the buttons and spans the row. The menu's
   own `a:not(.btn)` rule matches these links at equal specificity and would
   otherwise win on order, so restate what it clobbers. */
.menu-actions .lang { justify-content: center; margin-top: 4px; }
.menu-actions .lang a {
  flex: 1;
  min-height: 44px;
  font-size: 12.5px;
  justify-content: center;
  border-bottom: 0;
  color: var(--text-muted);
}
.menu-actions .lang a[aria-current] { color: var(--bg); }
.theme-indigo .menu-actions .lang a[aria-current] { color: #1E1650; }

/* The header row is tight below 1080, so the switcher moves into the menu. */
@media (max-width: 1080px) {
  .header-actions > .lang { display: none; }
}

.signin-link {
  padding: 11px 12px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  color: var(--text-2);
  transition: background .2s ease, color .2s ease;
}
.signin-link:hover { background: var(--accent-wash); color: var(--accent); }
.theme-indigo .signin-link:hover { background: rgba(185, 170, 248, .14); color: var(--accent-on); }

.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--divider-2);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.burger:hover { border-color: var(--accent-on); color: var(--accent-on); }
.burger > span { display: grid; gap: 4px; }
.burger i {
  display: block; width: 16px; height: 1.5px;
  background: currentColor;
  transition: transform .32s var(--ease), opacity .2s ease;
}
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Mobile panel */
.menu-panel {
  display: none;
  grid-template-rows: 0fr;
  background: rgba(253, 251, 247, .97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--divider);
  transition: grid-template-rows .38s var(--ease);
}
.theme-indigo .menu-panel { background: rgba(37, 28, 85, .97); }
.menu-panel[data-open="true"] { grid-template-rows: 1fr; }
.menu-panel > div { overflow: hidden; }
.menu-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 6px var(--pad) 22px;
}
.menu-inner a:not(.btn) {
  display: flex;
  align-items: center;
  min-height: 50px;
  font-size: 16.5px;
  color: var(--text-2);
  border-bottom: 1px solid var(--divider);
}
.menu-actions { display: grid; gap: 10px; padding-top: 18px; }
.menu-inner [data-ml] {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .3s ease, transform .3s var(--ease);
}
.menu-panel[data-open="true"] [data-ml] { opacity: 1; transform: none; }
.menu-panel[data-open="true"] [data-ml="1"] { transition-delay: .06s }
.menu-panel[data-open="true"] [data-ml="2"] { transition-delay: .10s }
.menu-panel[data-open="true"] [data-ml="3"] { transition-delay: .14s }
.menu-panel[data-open="true"] [data-ml="4"] { transition-delay: .18s }
.menu-panel[data-open="true"] [data-ml="5"] { transition-delay: .22s }
.menu-panel[data-open="true"] [data-ml="6"] { transition-delay: .26s }
.menu-panel[data-open="true"] [data-ml="7"] { transition-delay: .30s }

@media (max-width: 1080px) {
  .nav-links, .signin-link { display: none; }
  .burger { display: inline-flex; }
  .menu-panel { display: grid; }
  .header-bar { grid-template-columns: auto 1fr; }
}
@media (max-width: 560px) {
  .header-actions > .btn { display: none; }
}

/* --------------------------------------------------------------------------
   7. Page-load curtain
   -------------------------------------------------------------------------- */

.curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #15161F;
  animation: hc-curtain .82s .04s var(--ease-curtain) forwards;
  pointer-events: none;
}
.curtain svg { animation: hc-curtain-mark .82s .04s ease forwards; }
.curtain .ring { fill: none; stroke: #FDFBF7; stroke-width: 9; stroke-linecap: round; }
.curtain .pip { fill: #8C7DEC; }

@keyframes hc-curtain { 0%, 22% { transform: translateY(0) } 100% { transform: translateY(-101%) } }
@keyframes hc-curtain-mark {
  0% { opacity: 0; transform: scale(.9) }
  30% { opacity: 1; transform: scale(1) }
  70%, 100% { opacity: 0; transform: scale(1.04) }
}

/* --------------------------------------------------------------------------
   8. Motion primitives
   -------------------------------------------------------------------------- */

@keyframes hc-rise { from { transform: translateY(112%) } to { transform: translateY(0) } }
@keyframes hc-fade { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@keyframes hc-fade-sm { from { opacity: 0; transform: translateY(7px) } to { opacity: 1; transform: none } }
@keyframes hc-draw { from { transform: scaleX(0) } to { transform: scaleX(1) } }
@keyframes hc-land { from { opacity: 0; transform: translateY(20px) scale(.985) } to { opacity: 1; transform: none } }
@keyframes hc-blink { 0%, 100% { opacity: .3 } 50% { opacity: 1 } }
@keyframes hc-spin { to { transform: rotate(360deg) } }
@keyframes hc-stamp { from { opacity: 0; transform: scale(.96) } to { opacity: 1; transform: none } }
@keyframes hc-shake {
  0% { transform: translateX(-5px) } 30% { transform: translateX(4px) }
  60% { transform: translateX(-3px) } 80% { transform: translateX(2px) }
  100% { transform: none }
}

/* Everything from here to the end of this section hides content and then
   reveals it. All of it is scoped to `html.js`, which boot.js sets before first
   paint — so if boot.js or app.js ever fails to load, every section renders
   plainly visible instead of staying blank. */

/* Headline word rise. */
.word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; }
.js .word > span {
  display: inline-block;
  transform: translateY(112%);
  animation: hc-rise .95s var(--ease-rise) forwards;
}
.word:nth-of-type(1) > span { animation-delay: .40s }
.word:nth-of-type(2) > span { animation-delay: .47s }
.word:nth-of-type(3) > span { animation-delay: .54s }
.word:nth-of-type(4) > span { animation-delay: .61s }
.word:nth-of-type(5) > span { animation-delay: .68s }
.word:nth-of-type(6) > span { animation-delay: .75s }
.word:nth-of-type(7) > span { animation-delay: .82s }
.word:nth-of-type(8) > span { animation-delay: .89s }
.word:nth-of-type(9) > span { animation-delay: .96s }

/* Load-in sequence. */
.js [data-in] { opacity: 0; animation: hc-fade .85s var(--ease) forwards; }
[data-in="1"] { animation-delay: .30s }
[data-in="2"] { animation-delay: .86s }
[data-in="3"] { animation-delay: .96s }
[data-in="4"] { animation-delay: 1.06s }
[data-in="5"] { animation-delay: 1.16s }
[data-in="6"] { animation-delay: 1.26s }
[data-in="7"] { animation-delay: 1.36s }

/* Scroll reveals. */
.js [data-rv] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js [data-rv].is-in { opacity: 1; transform: none; }
[data-line] { display: block; }
.js [data-line] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
}
.js [data-line].is-in { opacity: 1; transform: none; }
[data-d="1"] { transition-delay: .07s } [data-d="2"] { transition-delay: .14s }
[data-d="3"] { transition-delay: .21s } [data-d="4"] { transition-delay: .28s }
[data-d="5"] { transition-delay: .35s } [data-d="6"] { transition-delay: .42s }

/* Dashboard assembly. */
.js [data-asm] { opacity: 0; animation: hc-land .7s var(--ease) forwards; }
[data-asm="1"] { animation-delay: .62s } [data-asm="2"] { animation-delay: .70s }
[data-asm="3"] { animation-delay: .78s } [data-asm="4"] { animation-delay: .86s }
[data-asm="5"] { animation-delay: .94s } [data-asm="6"] { animation-delay: 1.02s }
[data-asm="7"] { animation-delay: 1.10s } [data-asm="8"] { animation-delay: 1.18s }
[data-asm="9"] { animation-delay: 1.26s } [data-asm="10"] { animation-delay: 1.34s }
[data-asm="11"] { animation-delay: 1.42s }

/* Cursor tilt. */
[data-tilt] {
  transform-style: preserve-3d;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .35s ease;
  will-change: transform;
}

/* --------------------------------------------------------------------------
   9. Homepage — hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  container-type: inline-size;
  background: linear-gradient(180deg, #F6F3FE 0%, #FDFBF7 78%);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: 0; left: 0;
  width: 760px; height: 760px;
  margin: -380px 0 0 -380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 92, 224, .16), transparent 65%);
  transition: transform .55s ease;
  pointer-events: none;
}
.hero-rules {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    rgba(21, 22, 31, .035) 0 1px,
    transparent 1px calc(100% / 12)
  );
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 158px var(--pad) 76px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 56px;
  align-items: center;
}

.hero h1 { font-size: clamp(46px, 6.4vw, 104px); margin-bottom: 30px; }
.hero .lead { margin-bottom: 34px; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.mod-index { margin-top: 52px; }
.mod-index > .kicker { margin-bottom: 16px; }
.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 22px; }
.mod-cell { display: grid; gap: 7px; padding: 11px 0 14px; }
.mod-cell i {
  display: block; height: 1px;
  background: rgba(21, 22, 31, .13);
  transition: background .2s ease;
}
.js .mod-cell i {
  transform: scaleX(0); transform-origin: left;
  animation: hc-draw .85s var(--ease) forwards;
}
.mod-cell em {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 24;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: var(--text-faint);
  transition: color .2s ease;
}
.mod-cell > span { font-size: 13.5px; font-weight: 500; color: #4A4854; }
.js .mod-cell em, .js .mod-cell > span {
  opacity: 0;
  animation: hc-fade-sm .7s var(--ease) forwards;
}
.mod-cell:hover i { background: var(--accent); }
.mod-cell:hover em, .mod-cell:hover > span { color: var(--accent); }
.mod-cell:nth-child(1) > * { animation-delay: 1.10s }
.mod-cell:nth-child(2) > * { animation-delay: 1.17s }
.mod-cell:nth-child(3) > * { animation-delay: 1.24s }
.mod-cell:nth-child(4) > * { animation-delay: 1.31s }
.mod-cell:nth-child(5) > * { animation-delay: 1.38s }
.mod-cell:nth-child(6) > * { animation-delay: 1.45s }

/* --- The dashboard mock ------------------------------------------------- */

.stage { position: relative; padding-bottom: 104px; }
@container (min-width: 1180px) { .stage { margin-left: -72px; } }

.app-card {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  background: #FFFFFF;
  border: 1px solid rgba(21, 22, 31, .1);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  overflow: hidden;
}
.app-rail {
  background: #FBFAFE;
  border-right: 1px solid rgba(21, 22, 31, .07);
  padding: 16px 12px;
  display: grid;
  gap: 2px;
  align-content: start;
}
.app-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid rgba(21, 22, 31, .07);
  margin-bottom: 10px;
}
.app-user .avatar {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 11.5px; font-weight: 600;
}
.app-user b { display: block; font-size: 12.5px; font-weight: 600; color: #15161F; }
.app-user small { display: block; font-size: 10.5px; color: var(--text-muted); }
.app-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: #4A4854;
  transition: background .2s ease, color .2s ease;
}
.app-nav-item svg { flex: none; stroke: currentColor; }
.app-nav-item:hover { background: var(--accent-wash); color: var(--accent); }
.app-nav-item[aria-current] { background: var(--accent-wash-2); color: var(--accent); font-weight: 600; }

.app-main { padding: 16px 18px 20px; display: grid; gap: 14px; align-content: start; }
.app-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-head .app-title { font-size: 14.5px; font-weight: 600; color: #15161F; }
.app-head > span:last-child {
  font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); border: 1px solid rgba(21, 22, 31, .1);
  padding: 4px 8px; border-radius: 5px;
}
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  background: #FDFDFF;
  border: 1px solid rgba(21, 22, 31, .08);
  border-radius: var(--r-md);
  padding: 11px 12px;
}
.kpi small { display: block; font-size: 10.5px; color: var(--text-muted); margin-bottom: 4px; }
.kpi b {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 30, 'WONK' 0, 'opsz' 48;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  font-size: 26px;
  line-height: 1;
  color: #15161F;
}

.rec-table { border: 1px solid rgba(21, 22, 31, .08); border-radius: var(--r-md); overflow: hidden; }
.rec-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px 78px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  font-size: 12px;
  color: #4A4854;
  border-top: 1px solid rgba(21, 22, 31, .06);
  transition: background .2s ease;
}
.rec-row:first-child {
  border-top: 0;
  background: #FBFAFE;
  font-size: 9.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint);
}
.rec-row:not(:first-child):hover { background: #FAF8FF; }
.rec-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 9px; font-weight: 600; letter-spacing: .08em;
  background: #F1EEFC; color: var(--accent);
}
.pill-status[data-tone="warn"] { background: #FDF3E4; color: #9A6B1E; }
.pill-status[data-tone="bad"] { background: #FCECEC; color: #B03434; }
.pill-status[data-tone="ok"] { background: #E7F7EF; color: #0F7A4A; }

.audit-strip {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(21, 22, 31, .06);
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 24;
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--text-faint);
}

.float-card {
  position: absolute;
  right: -26px; bottom: 0;
  width: 258px;
  background: #FFFFFF;
  border: 1px solid rgba(21, 22, 31, .1);
  border-radius: 14px;
  box-shadow: var(--sh-float);
  padding: 13px 15px;
}
.float-card > div:first-child {
  display: flex; align-items: center; gap: 7px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 9px;
}
.float-stack { position: relative; min-height: 62px; }
.float-item { transition: opacity .5s ease, transform .5s var(--ease); }
.js .float-item[data-live="off"] {
  opacity: 0; transform: translateY(8px);
  position: absolute; inset: 0; pointer-events: none;
}
.float-item b {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 48;
  font-weight: 400; font-size: 21px; line-height: 1.1;
  color: #15161F; margin-bottom: 4px;
}
.float-item p { font-size: 12.5px; line-height: 1.45; color: #5A5768; }

/* --- Record tape -------------------------------------------------------- */

.tape {
  position: relative;
  height: 58px;
  background: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(21, 22, 31, .08);
  border-bottom: 1px solid rgba(21, 22, 31, .08);
}
.tape-inner {
  height: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: grid;
  grid-template-columns: auto 1px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.tape-label {
  display: flex; align-items: center; gap: 9px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted);
}
.tape-rule { height: 22px; background: rgba(21, 22, 31, .1); }
.tape-stack { position: relative; height: 40px; overflow: hidden; }
.tape-item {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 14px;
  transition: opacity .42s ease, transform .52s var(--ease);
}
.tape-item[data-tp="on"] { opacity: 1; transform: none; }
.tape-item[data-tp="up"] { opacity: 0; transform: translateY(-104%); }
.tape-item[data-tp="down"] { opacity: 0; transform: translateY(104%); }
.tape-item em {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 24;
  font-style: normal; font-variant-numeric: tabular-nums;
  font-size: 13px; color: var(--text-faint); flex: none;
}
.tape-item b { font-size: 14px; font-weight: 500; color: #3A3550; white-space: nowrap; }
.tape-item > span { font-size: 13.5px; color: var(--text-muted); }
.tape-count {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 24;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px; color: var(--text-faint);
}
.tape-progress {
  position: absolute; left: 0; bottom: 0; height: 1px;
  background: var(--accent); opacity: .5;
  transition: width .52s var(--ease);
}
@media (max-width: 560px) {
  .tape-inner { grid-template-columns: auto 1px minmax(0, 1fr); }
  .tape-label span:last-child, .tape-count { display: none; }
  .tape-item > span { display: none; }
}

/* --------------------------------------------------------------------------
   10. "How it works" sticky sequence
   -------------------------------------------------------------------------- */

.seq { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); }
.seq-left {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  display: grid;
  align-content: center;
  padding: 0 48px 0 var(--pad);
}
.seq-left > div { max-width: 460px; margin-left: auto; }
.seq-stack { position: relative; min-height: 320px; margin-top: 26px; }
.seq-slot { transition: opacity .5s var(--ease), transform .5s var(--ease); }
.js .seq-stack { display: grid; }
.js .seq-slot { grid-area: 1 / 1; align-self: start; }
.js .seq-slot[data-qslot="off"] {
  opacity: 0; transform: translateY(16px);
  pointer-events: none;
}
.seq-slot > .seq-num {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 144;
  font-variant-numeric: tabular-nums;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  color: rgba(242, 240, 247, .4);
  margin-bottom: 6px;
}
.seq-slot h2 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 96;
  font-weight: 400;
  font-size: clamp(32px, 3.9vw, 56px);
  line-height: 1.04;
  letter-spacing: -.028em;
  color: #FBFAFE;
  margin-bottom: 14px;
}
.seq-slot p { font-size: 17px; line-height: 1.62; color: #ADA9BC; max-width: 44ch; }
.seq-chip {
  display: inline-block;
  margin-top: 18px;
  padding: 7px 13px;
  border: 1px solid rgba(140, 125, 236, .4);
  border-radius: var(--r-pill);
  background: rgba(108, 92, 224, .12);
  font-size: 12px; font-weight: 500; letter-spacing: .02em;
  color: #C9BEF6;
}
.seq-bars { display: none; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 14px; }
.seq-bars button { background: none; border: 0; padding: 8px 0; cursor: pointer; }
.seq-bars button > span {
  display: block; height: 2px; border-radius: 2px;
  background: rgba(242, 240, 247, .16);
  transition: background .3s ease, height .2s ease;
}
.seq-bars button[aria-current="true"] > span { background: var(--accent-lift); }
.seq-bars button:hover > span { background: var(--accent-lift); height: 3px; }

.seq-right { padding-right: var(--pad); }
.seq-panel-pad { min-height: 84vh; display: grid; align-items: center; }
.seq-panel {
  background: rgba(242, 240, 247, .045);
  border: 1px solid rgba(242, 240, 247, .12);
  border-radius: var(--r-lg);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .4);
  padding: 24px 26px;
  max-width: 560px;
  transition: opacity .5s ease, transform .5s var(--ease);
}
.js .seq-panel[data-panel="off"] { opacity: 0; transform: scale(.97) translateY(14px); pointer-events: none; }
.seq-panel > div:first-child {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px; margin-bottom: 6px;
  border-bottom: 1px solid rgba(242, 240, 247, .12);
}
.seq-panel > div:first-child > span:first-child {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 48;
  font-size: 17px; color: #FBFAFE;
}
.seq-panel > div:first-child > span:last-child {
  font-variant-numeric: tabular-nums;
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em;
  color: #8C87A8;
  border: 1px solid rgba(242, 240, 247, .16);
  padding: 4px 8px; border-radius: 5px;
}
.seq-panel dl > div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(242, 240, 247, .07);
}
.seq-panel dl > div:last-child { border-bottom: 0; }
.seq-panel dt { font-size: 12.5px; color: #8C87A8; }
.seq-panel dd { font-size: 13.5px; color: #E4E1EE; }

@media (max-width: 1080px) {
  .seq { display: block; }
  .seq-left {
    position: sticky; top: calc(var(--header-h) + 2px); height: auto; z-index: 3;
    padding: 16px var(--pad) 14px;
    background: #15161F;
    border-bottom: 1px solid rgba(242, 240, 247, .10);
  }
  .seq-left > div { max-width: none; margin-left: 0; }
  .seq-left > div > .kicker { display: none; }
  .seq-stack { min-height: 0; margin-top: 0; }
  .seq-slot {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    column-gap: 14px; align-items: baseline;
  }
  .seq-slot > .seq-num { grid-row: 1 / 3; font-size: 34px; margin: 0; }
  .seq-slot h2 { grid-column: 2; font-size: 23px; margin: 0; }
  .seq-slot p { grid-column: 2; font-size: 14.5px; line-height: 1.5; margin-top: 5px; max-width: 56ch; }
  .seq-slot .seq-chip { display: none; }
  .seq-bars { display: grid; }
  .seq-right { padding: 0 var(--pad) 72px; }
  .seq-panel-pad { min-height: 60vh; padding: 10px 0; }
  .seq-panel { max-width: none; }
}
@media (max-width: 560px) {
  .seq-panel dl > div { grid-template-columns: 1fr; gap: 3px; }
}

/* --------------------------------------------------------------------------
   11. Origin
   -------------------------------------------------------------------------- */

.origin-band { background: #F6F3FE; }
.origin { display: grid; grid-template-columns: 1fr .9fr; gap: 76px; align-items: center; }
.origin h2 { margin: 14px 0 26px; }
.origin-copy { display: grid; gap: 12px; max-width: 52ch; }
.origin-copy span { font-size: 17px; line-height: 1.66; color: #4A4854; }

.origin-points { display: grid; gap: 2px; margin-top: 42px; }
.origin-point {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(21, 22, 31, .1);
}
.origin-point > span {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 36;
  font-variant-numeric: tabular-nums;
  font-size: 13px; color: var(--text-faint);
}
.origin-point h3 { font-size: 16px; font-weight: 600; color: #15161F; margin-bottom: 5px; }
.origin-point p { font-size: 14.5px; line-height: 1.6; color: #5A5768; }

.origin-figs { display: grid; gap: 22px; }
.fig {
  border-radius: 14px;
  box-shadow: var(--sh-figure);
  border: 1px solid rgba(21, 22, 31, .09);
  overflow: hidden;
}
.fig-before { background: #FFFDF9; transform: rotate(-1.2deg); }
.fig-after { background: #FFFFFF; transform: rotate(.9deg); }
.fig figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 15px;
  border-bottom: 1px solid rgba(21, 22, 31, .08);
  font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-muted);
  font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace;
}
.fig-after figcaption > span:last-child { color: var(--accent); }
.fig-rows { padding: 6px 15px 12px; }
.fig-rows > div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(21, 22, 31, .05);
  font-size: 13px;
  color: #4A4854;
}
.fig-rows > div:last-child { border-bottom: 0; }
.fig-before .fig-rows > div {
  font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace;
  font-size: 12.5px;
  color: #6E6A78;
}
.fig-rows > div > span:first-child { color: var(--text-muted); }
.fig-becomes {
  display: flex; align-items: center; gap: 12px;
  padding-left: 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint);
}
.fig-becomes i { display: block; width: 34px; height: 1px; background: var(--accent); }

@media (max-width: 1080px) { .origin { grid-template-columns: 1fr; gap: 48px; } }

/* --------------------------------------------------------------------------
   12. Module rail
   -------------------------------------------------------------------------- */

.rail-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 40px;
}
.rail-head h2 { margin-top: 12px; }
.rail-nav { display: flex; gap: 10px; flex: none; }
.rail-nav button {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid rgba(242, 240, 247, .18);
  border-radius: 50%;
  color: #ADA9BC;
  cursor: pointer;
  transition: background .22s ease, border-color .22s ease, color .22s ease;
}
.rail-nav button:hover {
  background: rgba(108, 92, 224, .22);
  border-color: var(--accent-lift);
  color: #FFFFFF;
}

.rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Without this the snapport starts at the padding edge, so the first card
     snaps flush to it and the rail scrolls the gutter away — leaving card 01
     out of line with the section heading above it. */
  scroll-padding-inline: var(--pad);
  padding: 4px var(--pad) 30px;
  max-width: var(--maxw);
  margin-inline: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }

.rail-card {
  flex: none;
  width: min(380px, 80vw);
  scroll-snap-align: start;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 24px 22px;
  background: rgba(242, 240, 247, .045);
  border: 1px solid rgba(242, 240, 247, .11);
  border-radius: var(--r-lg);
}
.rail-card:hover {
  border-color: rgba(140, 125, 236, .55);
  background: rgba(108, 92, 224, .11);
  box-shadow: 0 22px 50px rgba(108, 92, 224, .28);
  color: inherit;
}
.rail-card > .rail-num {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 36;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: #8C87A8;
}
.rail-card h3 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 50, 'WONK' 1, 'opsz' 60;
  font-weight: 400;
  font-size: 29px;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #FBFAFE;
}
.rail-card p { font-size: 14.5px; line-height: 1.6; color: #ADA9BC; }
.rail-card > span:last-child {
  padding-top: 14px;
  border-top: 1px solid rgba(242, 240, 247, .1);
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: #8C87A8;
}
.rail-track { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.rail-track > div { height: 2px; background: rgba(242, 240, 247, .12); border-radius: 2px; }
.rail-track i {
  display: block; height: 100%;
  background: var(--accent-lift);
  border-radius: 2px;
  transition: width .25s ease;
}

/* --------------------------------------------------------------------------
   13. Boundary
   -------------------------------------------------------------------------- */

.boundary { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 44px; }
.boundary-col {
  padding: 30px 30px 32px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(242, 240, 247, .1);
}
.boundary-col.is-ours { background: rgba(108, 92, 224, .1); border-color: rgba(140, 125, 236, .34); }
.boundary-col > .kicker { color: #8C87A8; margin-bottom: 12px; }
.boundary-col.is-ours > .kicker { color: var(--accent-lift); }
.boundary-col h3 {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 40, 'WONK' 1, 'opsz' 60;
  font-weight: 400; font-size: 27px; line-height: 1.12;
  color: #FBFAFE;
  margin-bottom: 20px;
}
.boundary-list { display: grid; gap: 2px; }
.boundary-list > span {
  display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px;
  padding: 11px 0;
  border-top: 1px solid rgba(242, 240, 247, .08);
  font-size: 14.5px; line-height: 1.5; color: #ADA9BC;
}
.boundary-list > span > span:first-child { color: #8C87A8; }
.is-ours .boundary-list > span > span:first-child { color: var(--accent-lift); }
.boundary-note { margin-top: 34px; font-size: 15px; line-height: 1.65; color: #8C87A8; max-width: 76ch; }
@media (max-width: 1080px) { .boundary { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   15. Closing CTA
   -------------------------------------------------------------------------- */

.cta-band {
  position: relative;
  background: linear-gradient(180deg, #F6F3FE, #FDFBF7);
  overflow: hidden;
  text-align: center;
}
.cta-glow {
  position: absolute; left: 50%; top: 40%;
  width: 900px; height: 520px; margin: -260px 0 0 -450px;
  background: radial-gradient(ellipse, rgba(108, 92, 224, .18), transparent 68%);
  pointer-events: none;
}
.cta-band .wrap { position: relative; }
.cta-band h2 { font-size: clamp(38px, 6vw, 96px); margin-bottom: 24px; }
.cta-band .lead { margin-inline: auto; margin-bottom: 34px; text-align: center; }
.cta-band .btn-row { justify-content: center; }

/* Indigo CTA */
.theme-indigo .cta-inner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--divider);
  border-radius: 24px;
  background: var(--surface);
  padding: 72px 40px;
  text-align: center;
}
.theme-indigo .cta-inner .lead { margin-inline: auto; text-align: center; }
.theme-indigo .cta-inner h2 { margin-bottom: 18px; }
.theme-indigo .cta-inner .btn-row { justify-content: center; margin-top: 30px; }

/* --------------------------------------------------------------------------
   16. Footer
   -------------------------------------------------------------------------- */

.site-footer { background: #15161F; color: #ADA9BC; padding-block: 72px 34px; }
.theme-indigo .site-footer { background: #1D1544; border-top: 1px solid rgba(245, 242, 254, .12); }
.footer-grid { display: grid; grid-template-columns: 1.5fr .7fr .7fr .7fr; gap: 44px; }
.footer-brand .lockup { color: #F2F0F7; margin-bottom: 16px; }
.footer-brand .lockup .mark .pip { fill: #8C7DEC; }
.footer-brand .descriptor { color: #8C87A8; }
.footer-brand .wordmark b { color: #C9BEF6; }
.footer-brand p { font-size: 14.5px; line-height: 1.62; color: #8C87A8; max-width: 40ch; }
.footer-grid h2 {
  font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: #8C87A8; margin-bottom: 16px;
}
.footer-grid nav a { display: block; padding: 7px 0; font-size: 14.5px; color: #ADA9BC; }
.footer-grid nav a:hover { color: #C9BEF6; }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 52px; padding-top: 24px;
  border-top: 1px solid rgba(242, 240, 247, .1);
  font-size: 13px; color: #8C87A8;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 30px; } }

/* --------------------------------------------------------------------------
   17. Indigo pages — shared
   -------------------------------------------------------------------------- */

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 168px 0 96px;
}
.page-hero .hero-glow { background: radial-gradient(circle, rgba(185, 170, 248, .16), transparent 65%); }
.page-hero .wrap { position: relative; }
.rule-draw {
  height: 2px;
  width: 220px;
  margin: 26px 0;
  background: linear-gradient(90deg, var(--accent-on), transparent);
  transform-origin: left;
  animation: hc-draw 1s .55s var(--ease) both;
}

.jump-label { margin-bottom: 18px; }
.jump-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 26px; }
.jump-cell { display: grid; gap: 7px; padding: 12px 0 15px; }
.jump-cell i { display: block; height: 1px; background: var(--divider-2); transition: background .2s ease; }
.jump-cell em {
  font-style: normal; font-variant-numeric: tabular-nums;
  font-size: 12.5px; font-weight: 500; color: var(--text-faint);
  transition: color .2s ease;
}
.jump-cell > span { font-size: 14px; font-weight: 500; color: var(--text-2); }
.jump-cell:hover i { background: var(--accent-on); }
.jump-cell:hover em, .jump-cell:hover > span { color: var(--accent-on); }

/* The six module bands are a run of dividers, not six separate sections —
   full section padding on each would leave a quarter-screen of dead space
   between them. They carry their own rhythm instead. */
.mod-section { padding-block: 0; }
.mod-section:first-of-type { padding-top: 48px; }
.mod-section:last-of-type { padding-bottom: 96px; }

.mod-band {
  display: grid;
  grid-template-columns: .72fr 1fr;
  gap: 56px;
  padding: 52px 0 60px;
  border-top: 1px solid var(--divider);
}
@media (max-width: 900px) { .mod-band { padding: 40px 0 44px; } }
.mod-band-num {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 500; letter-spacing: .1em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.mod-band h2 { margin-bottom: 14px; }
.mod-band > div:first-child > p { font-size: 16.5px; line-height: 1.66; color: var(--text-2); max-width: 40ch; }
.mod-band-replaces {
  display: inline-block;
  margin-top: 20px;
  padding: 7px 12px;
  border: 1px solid var(--divider-2);
  border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--text-3);
}
.caps { display: grid; gap: 2px; align-content: start; }
.cap {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 15.5px; line-height: 1.55; color: var(--text-2);
}
.cap:first-child { border-top: 1px solid var(--divider); }
.cap > span:first-child { color: var(--accent-on); }
@media (max-width: 1000px) {
  .mod-band { grid-template-columns: 1fr; gap: 30px; }
  .jump-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) { .jump-grid { grid-template-columns: 1fr; } }

.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; }
.col-card {
  padding: 28px 26px 30px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
}
.col-num {
  display: block; font-variant-numeric: tabular-nums;
  font-size: 12.5px; font-weight: 600; letter-spacing: .12em;
  color: var(--accent-on); margin-bottom: 14px;
}
.col-card h3 { font-size: 19px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.col-card p { font-size: 15px; line-height: 1.62; color: var(--text-2); }
@media (max-width: 1000px) { .cols-3 { grid-template-columns: 1fr; } }

/* Section head block used across indigo pages. */
.sec-head { max-width: 62ch; }
.sec-head .kicker { margin-bottom: 14px; }
.sec-head h2 { margin-bottom: 16px; }
.sec-head p { font-size: 16.5px; line-height: 1.66; color: var(--text-2); }

/* --- Accordion ---------------------------------------------------------- */

.acc { display: grid; margin-top: 32px; }
.acc-group {
  margin-top: 34px;
  padding-bottom: 6px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-muted);
}
.acc-group:first-child { margin-top: 0; }
.acc-item { border-bottom: 1px solid var(--divider); }
.acc-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 62px;
  padding: 16px 0;
  background: none; border: 0;
  text-align: left;
  font-size: 17px; font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: color .2s ease;
}
.acc-q:hover { color: var(--accent-on); }
.acc-q i {
  flex: none;
  font-style: normal;
  font-size: 22px; line-height: 1;
  color: var(--accent-on);
  transition: transform .42s var(--ease);
}
.acc-q[aria-expanded="true"] i { transform: rotate(45deg); }
.acc-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .42s var(--ease); }
.acc-a[data-open="true"] { grid-template-rows: 1fr; }
.acc-a > div { overflow: hidden; }
.acc-a p { padding-bottom: 22px; font-size: 15.5px; line-height: 1.68; color: var(--text-2); max-width: 76ch; }

/* --- Row list ----------------------------------------------------------- */

.row-list { display: grid; margin-top: 40px; }
.row-item {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--divider);
}
.row-item:last-child { border-bottom: 1px solid var(--divider); }
.row-item:hover { color: inherit; }
.row-item:hover > span:first-child > span { color: var(--accent-on); }
.row-item > span:first-child { display: flex; align-items: baseline; gap: 14px; }
.row-item em {
  font-style: normal; font-variant-numeric: tabular-nums;
  font-size: 12.5px; font-weight: 500; color: var(--text-faint);
}
.row-item > span:first-child > span { font-size: 18px; font-weight: 500; color: var(--text); transition: color .2s ease; }
.row-item > span:last-child { font-size: 15.5px; line-height: 1.62; color: var(--text-2); }
@media (max-width: 1000px) { .row-item { grid-template-columns: 1fr; gap: 8px; } }

/* --------------------------------------------------------------------------
   18. Request-a-demo
   -------------------------------------------------------------------------- */

.demo-hero { display: grid; grid-template-columns: 1fr .92fr; gap: 60px; align-items: start; }
.assurances { display: grid; margin-top: 36px; }
.assurance {
  display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 15px 0;
  border-top: 1px solid var(--divider);
  font-size: 15.5px; color: var(--text-2);
}
.assurance:last-child { border-bottom: 1px solid var(--divider); }
.assurance i { display: block; width: 14px; height: 2px; background: var(--accent-on); }

.form-card {
  border-radius: 20px;
  border: 1px solid var(--divider);
  box-shadow: var(--sh-2);
  padding: 30px 30px 32px;
  scroll-margin-top: 96px;
}
.form-card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  margin-bottom: 24px;
}
.form-card-head h2 { font-size: 24px; font-weight: 600; color: var(--text); }
.form-card-head span { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
.form-card form { display: grid; gap: 18px; }
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .name-row { grid-template-columns: 1fr; } }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.seg-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 9px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.seg button {
  min-height: 44px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.seg button:hover { border-color: var(--accent-on); color: var(--accent-on); }
.seg button[aria-pressed="true"] {
  background: var(--accent-on);
  border-color: var(--accent-on);
  color: #FFFFFF;
}

.note-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  background: none; border: 0; padding: 0;
  font-size: 14px; color: var(--accent-on); cursor: pointer;
}
.note-toggle > span:first-child {
  display: grid; place-items: center;
  width: 20px; height: 20px;
  border: 1px solid currentColor; border-radius: 6px;
  font-size: 14px; line-height: 1;
  transition: transform .3s var(--ease);
}
.note-toggle[aria-expanded="true"] > span:first-child { transform: rotate(45deg); }
.fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s var(--ease); }
.fold[data-open="true"] { grid-template-rows: 1fr; }
.fold > div { overflow: hidden; }
.fold textarea { margin-top: 12px; resize: vertical; }

.spinner {
  width: 15px; height: 15px; flex: none;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: hc-spin .8s linear infinite;
}
.form-fine { font-size: 12.5px; line-height: 1.6; color: var(--text-muted); }
.form-status { font-size: 14px; line-height: 1.6; color: var(--text-2); }
.form-status[data-tone="bad"] { color: #C0392B; }

.confirm { display: grid; gap: 16px; justify-items: start; animation: hc-stamp .55s var(--ease) both; }
.confirm h2 { font-size: 26px; font-weight: 600; color: var(--text); }
.confirm p { font-size: 15.5px; line-height: 1.66; color: var(--text-2); }

/* --- Timeline ----------------------------------------------------------- */

.timeline { --tl-col: 112px; display: grid; margin-top: 44px; }
.tl-row {
  display: grid;
  grid-template-columns: var(--tl-col) minmax(0, 1fr);
  gap: 30px;
  padding: 26px 0;
  border-top: 1px solid var(--divider);
}
.tl-row:last-child { border-bottom: 1px solid var(--divider); }
.tl-row > span {
  font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600; letter-spacing: .08em;
  color: var(--accent-on);
  padding-top: 3px;
}
.tl-row h3 { font-size: 20px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.tl-row p { font-size: 15.5px; line-height: 1.66; color: var(--text-2); max-width: 68ch; }
@media (max-width: 1000px) { .timeline { --tl-col: 88px; } .tl-row { gap: 20px; } }
@media (max-width: 460px) { .timeline { --tl-col: 64px; } }

/* --------------------------------------------------------------------------
   19. Pricing
   -------------------------------------------------------------------------- */

.quote-card {
  border-radius: 20px;
  border: 1px solid var(--divider);
  box-shadow: var(--sh-2);
  padding: 28px 28px 24px;
}
.quote-card > .kicker { margin-bottom: 18px; }
.quote-card > div > div {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--divider);
  font-size: 15px;
  color: var(--text-2);
}
.quote-card > div > div > span:last-child {
  font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600;
  color: var(--accent-on);
  white-space: nowrap;
}

.incl { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 44px; }
.incl > div > .kicker { margin-bottom: 16px; }
.incl-row {
  padding: 14px 0 14px 26px;
  position: relative;
  border-top: 1px solid var(--divider);
  font-size: 15.5px; line-height: 1.55; color: var(--text-2);
}
.incl-row::before {
  content: '';
  position: absolute; left: 0; top: 22px;
  width: 12px; height: 1px;
  background: var(--accent-on);
}
@media (max-width: 1000px) { .incl { grid-template-columns: 1fr; gap: 34px; } }

/* --------------------------------------------------------------------------
   20. Legal
   -------------------------------------------------------------------------- */

.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; align-items: start; }
.doc-index { position: sticky; top: 104px; display: grid; gap: 2px; }
.doc-index a {
  padding: 10px 0 10px 14px;
  border-left: 2px solid var(--divider);
  font-size: 14.5px;
  color: var(--text-3);
  transition: border-color .2s ease, color .2s ease;
}
.doc-index a:hover, .doc-index a.is-active { border-left-color: var(--accent-on); color: var(--text); }
.doc-body { max-width: 74ch; }
.doc-body section { padding-block: 34px; border-top: 1px solid var(--divider); }
.doc-body section:first-of-type { border-top: 0; padding-top: 0; }
.doc-body h2 { font-size: 26px; font-weight: 600; color: var(--text); margin-bottom: 16px; }
.doc-body p { font-size: 16px; line-height: 1.72; color: var(--text-2); margin-bottom: 16px; }
.doc-body p:last-child { margin-bottom: 0; }
.doc-points { display: grid; margin-top: 10px; }
.doc-points > div {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--divider);
  font-size: 15.5px; line-height: 1.6; color: var(--text-2);
}
.doc-points > div > span:first-child {
  font-variant-numeric: tabular-nums;
  font-size: 12.5px; font-weight: 600; color: var(--accent-on);
}
.doc-fine { margin-top: 40px; font-size: 13.5px; line-height: 1.65; color: var(--text-muted); }
@media (max-width: 1000px) {
  .doc { grid-template-columns: 1fr; gap: 30px; }
  .doc-index { position: static; display: flex; flex-wrap: wrap; gap: 8px; }
  .doc-index a {
    padding: 9px 14px;
    border: 1px solid var(--divider);
    border-left-width: 1px;
    border-radius: var(--r-pill);
    font-size: 13.5px;
  }
  .doc-index a:hover, .doc-index a.is-active { border-color: var(--accent-on); }
}

/* --------------------------------------------------------------------------
   21. Sign in
   -------------------------------------------------------------------------- */

/* One continuous designed screen: the ink ground, the aurora and the grid run
   edge to edge, and the form sits on it as a floating card. The statement sits
   left, the live ledger right, so nothing is a plain half. */
.login-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  background: #14151D;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 468px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  /* Vertical rhythm scales with the viewport so a short laptop screen does not
     tip the card into a scrollbar. */
  gap: clamp(18px, 3vh, 32px) clamp(28px, 4vw, 64px);
  padding: clamp(22px, 4vh, 40px) clamp(24px, 4vw, 64px);
}
.login-shell > .aurora,
.login-shell > .art-grid { z-index: -1; }

.login-topbar { display: none; height: 5px; background: linear-gradient(90deg, var(--accent), #8C7DEC, #C9BEF6); }

.auth-brand { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
.auth-brand .lockup { color: #F2F0F7; }
.auth-brand .wordmark b { color: #C9BEF6; }
.auth-brand .descriptor { color: #8C87A8; }
.auth-brand .lockup .mark .pip { fill: #8C7DEC; }

.auth-statement {
  grid-column: 1; grid-row: 2;
  justify-self: end;
  max-width: 13ch;
  text-align: right;
  text-wrap: balance;
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 60, 'WONK' 1, 'opsz' 144;
  font-weight: 400;
  font-size: clamp(28px, 3.1vw, 52px);
  line-height: 1.1;
  letter-spacing: -.028em;
  color: #FBFAFE;
}

/* The form card. */
.login-col {
  grid-column: 2; grid-row: 2;
  justify-self: center;
  width: 100%;
  padding: clamp(26px, 4.4vh, 38px) clamp(24px, 3vw, 40px) clamp(24px, 4vh, 34px);
  background: rgba(253, 251, 247, .97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(242, 240, 247, .14);
  border-radius: 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .55), 0 2px 10px rgba(0, 0, 0, .35);
}
.js .login-col { animation: hc-card-in .85s .12s var(--ease) both; }
@keyframes hc-card-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.login-col .lockup { color: #15161F; justify-self: start; }

/* The mark's ring carries a gap and the dot sits in it, so turning the whole
   thing reads as one slow orbit. It is the only motion on the form side. */
.js .login-col .lockup .mark { animation: hc-orbit 28s linear infinite; }
@keyframes hc-orbit { to { transform: rotate(360deg); } }
.login-form { max-width: 420px; width: 100%; display: grid; gap: clamp(12px, 2.1vh, 16px); align-content: start; }
.login-fields { display: grid; gap: clamp(12px, 2.1vh, 16px); }
.login-form h1 { font-size: clamp(38px, 4.4vw, 54px); margin-bottom: 4px; }
.login-form > p { font-size: 15px; line-height: 1.62; color: #5A5768; margin-bottom: 8px; }

/* The mode switch. A thumb slides between the two tabs rather than the
   background snapping, so the change reads as one movement. */
.login-seg {
  position: relative;
  display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px;
  background: #F1EEFC;
  border-radius: var(--r-pill);
  margin-bottom: 6px;
  justify-self: start;
}
.seg-thumb {
  position: absolute;
  top: 4px; left: 4px; bottom: 4px;
  width: calc(50% - 6px);
  border-radius: var(--r-pill);
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(21, 22, 31, .14);
  transition: transform .42s var(--ease);
}
.login-seg[data-mode="admin"] .seg-thumb { transform: translateX(calc(100% + 4px)); }
.login-seg button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px;
  background: transparent; border: 0;
  border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 500;
  color: #7B7590;
  cursor: pointer;
  transition: color .28s ease;
}
.login-seg button[aria-selected="true"] { color: #15161F; font-weight: 600; }
.login-seg button svg { transition: transform .42s var(--ease); }
.login-seg button[aria-selected="true"] svg { transform: scale(1.08); }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg {
  position: absolute; left: 13px; color: var(--text-faint); pointer-events: none;
  transition: color .24s ease, transform .24s var(--ease);
}
.input-wrap:focus-within > svg { color: var(--accent); transform: scale(1.06); }
.input-wrap .input { padding-left: 42px; }
.input-wrap[data-shake="true"] { animation: hc-shake .42s ease; }

/* An accent rule draws under the field on focus. */
.input-underline {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .42s var(--ease);
  pointer-events: none;
}
.input-wrap:focus-within .input-underline { transform: scaleX(1); }
.pw-toggle {
  position: absolute; right: 6px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--r-sm);
  color: var(--text-muted); cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.pw-toggle:hover { background: #F1EEFC; color: var(--accent); }

.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.label-row button {
  background: none; border: 0; padding: 0;
  font-size: 12.5px; color: var(--accent); cursor: pointer;
}
.reset-panel {
  padding: 16px 18px;
  background: #F6F3FE;
  border: 1px solid rgba(108, 92, 224, .2);
  border-radius: var(--r-md);
}
.reset-panel > span:first-child {
  display: block;
  font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.reset-panel p { font-size: 13.5px; line-height: 1.6; color: #4A4854; margin-bottom: 12px; }
.reset-done { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: #0F7A4A; }

.login-error {
  display: none;
  align-items: center; gap: 10px;
  padding: 12px 14px;
  background: #FCECEC;
  border: 1px solid rgba(176, 52, 52, .22);
  border-radius: 10px;
  font-size: 13.5px;
  color: #B03434;
}
.login-error[data-on="true"] { display: flex; }

.trust-line { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text-muted); }
.login-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: 12.5px; color: #7E78A0;
}
.login-foot a { color: #ADA9BC; }
.login-foot a:hover { color: #C9BEF6; }
.login-foot a + a { margin-left: 18px; }

/* --- The art panel: a record that writes itself ------------------------- */

/* The live ledger, now a column of the full-screen composition. */
.login-art {
  grid-column: 3; grid-row: 2;
  justify-self: start;
  width: 100%;
  max-width: 400px;
}

/* A slow aurora behind the ledger. Two conic sweeps at different speeds read
   as depth rather than as a gradient. */
.aurora {
  position: absolute;
  inset: -40% -20%;
  background:
    radial-gradient(38% 44% at 28% 30%, rgba(108, 92, 224, .55), transparent 70%),
    radial-gradient(34% 40% at 72% 62%, rgba(140, 125, 236, .40), transparent 72%),
    radial-gradient(30% 34% at 52% 88%, rgba(75, 59, 184, .45), transparent 70%);
  filter: blur(48px);
  animation: hc-aurora 26s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes hc-aurora {
  from { transform: translate3d(-3%, -2%, 0) scale(1) rotate(0deg); opacity: .75; }
  to   { transform: translate3d(4%, 3%, 0) scale(1.16) rotate(8deg); opacity: 1; }
}

/* Hairline grid, faded out toward the edges, so the ledger sits on something. */
.art-grid {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(to right, rgba(242, 240, 247, .05) 0 1px, transparent 1px 68px),
    repeating-linear-gradient(to bottom, rgba(242, 240, 247, .05) 0 1px, transparent 1px 68px);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent 100%);
  mask-image: radial-gradient(70% 60% at 50% 45%, #000, transparent 100%);
  pointer-events: none;
}

.ledger-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(242, 240, 247, .12);
}
.ledger-live {
  display: flex; align-items: center; gap: 9px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: #C9BEF6;
}
.ledger-live .dot { background: #8C7DEC; }
.ledger-clock {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 36;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  color: #8C87A8;
}

/* The ledger itself. Newest entry is stamped in at the top and the stack
   slides down under it; the oldest fades off the bottom. */
.ledger {
  display: grid;
  gap: 0;
  min-height: 268px;
  align-content: start;
}
.led {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(242, 240, 247, .07);
  transform-origin: top;
}
.led-time {
  font-family: var(--font-display);
  font-variation-settings: 'SOFT' 20, 'WONK' 0, 'opsz' 24;
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  color: #7E78A0;
}
.led-body { min-width: 0; }
.led-body b {
  position: relative;   /* anchors the one-off sweep on a freshly stamped row */
  display: block;
  font-size: 14.5px; font-weight: 500; color: #F2F0F7;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.led-body span {
  display: block;
  font-size: 12.5px; color: #8C87A8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.led-who {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: rgba(108, 92, 224, .22);
  border: 1px solid rgba(140, 125, 236, .4);
  font-size: 10px; font-weight: 600; letter-spacing: .04em;
  color: #C9BEF6;
}

/* Stamp-in: the new row lands, and a hairline sweeps across it once. */
.js .led.is-new { animation: hc-stamp-row .62s var(--ease) both; }
@keyframes hc-stamp-row {
  0%   { opacity: 0; transform: translateY(-10px) scale(.985); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
.led.is-out { animation: hc-fade-row .5s ease both; }
@keyframes hc-fade-row {
  to { opacity: 0; transform: translateY(8px); }
}
.js .led.is-new .led-body b::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201, 190, 246, .18), transparent);
  animation: hc-sweep .7s ease both;
}
@keyframes hc-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.login-foot {
  grid-column: 1 / -1; grid-row: 3;
}

/* Below 1240 the statement goes; the card and the ledger keep the screen. */
@media (max-width: 1240px) {
  .login-shell {
    grid-template-columns: minmax(0, 468px) minmax(0, 360px);
    justify-content: center;
  }
  .auth-statement { display: none; }
  .login-col { grid-column: 1; }
  .login-art { grid-column: 2; justify-self: stretch; max-width: none; }
}

/* Below 980 the ledger goes and the card carries the screen on its own. */
@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: minmax(0, 468px);
    grid-template-rows: auto auto auto;
    justify-content: center;
    padding: 28px var(--pad) 32px;
    gap: 28px;
  }
  .login-topbar { display: block; }
  .login-art { display: none; }
  .login-col { grid-column: 1; grid-row: 2; }
  .login-foot { grid-column: 1; }
  .login-form { max-width: none; }
}
@media (max-width: 560px) {
  .login-col { padding: 30px 22px 28px; border-radius: 20px; }
  /* Keep both tab labels on one line so the pill stays even. */
  .login-seg { width: 100%; }
  .login-seg button { padding: 0 10px; font-size: 12.5px; gap: 6px; white-space: nowrap; }
}

/* The panel is decorative, so at reduced motion it holds still and simply
   shows the record it would otherwise have written. */
@media (prefers-reduced-motion: reduce) {
  .aurora { animation: none !important; }
  .js .login-col .lockup .mark { animation: none !important; }
  .js .led.is-new { animation: none !important; }
  .js .led.is-new .led-body b::after { animation: none !important; content: none; }
  .led.is-out { animation: none !important; }
  .seg-thumb, .input-underline { transition: none !important; }
}

/* --------------------------------------------------------------------------
   22. 404
   -------------------------------------------------------------------------- */

.notfound { display: grid; place-items: center; text-align: center; padding: 200px 0 140px; }
.notfound h1 { font-size: clamp(56px, 9vw, 130px); margin-bottom: 18px; }
.notfound p { margin-bottom: 30px; }

/* --------------------------------------------------------------------------
   23. Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  [data-rv], [data-line], [data-in], [data-asm], .word > span, .mod-cell > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .curtain, .rule-draw { display: none !important; }
  /* The sequence still swaps caption and panel — it just stops sliding. */
  .js .seq-slot[data-qslot="off"], .js .seq-panel[data-panel="off"] { transform: none !important; }
  .tape-item, .seq-panel, .seq-slot { transition: none !important; }
  .menu-inner [data-ml] { opacity: 1 !important; transform: none !important; }
  .nav-link::after { transition: none !important; }
  .art-blob, .dot { animation: none !important; }
  html { scroll-behavior: auto !important; }
  * { transition-duration: 80ms !important; }
}

/* --------------------------------------------------------------------------
   24. Hero container queries
   -------------------------------------------------------------------------- */

@container (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .stage { width: 100%; padding-bottom: 0; }
  .float-card { position: static; width: auto; max-width: 340px; margin: 12px 0 0 auto; }
}
@container (max-width: 470px) {
  .hero-grid { padding: 116px var(--pad) 44px; gap: 34px; }
  .hero h1 { font-size: 46px; }
  .hero .lead { font-size: 16.5px; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row > .btn { width: 100%; }
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .app-card { grid-template-columns: 1fr; }
  .app-rail {
    display: flex; flex-direction: row; align-items: center;
    border-right: 0; border-bottom: 1px solid rgba(21, 22, 31, .09);
    padding: 10px 12px;
    overflow-x: auto;
  }
  .app-user, .app-rail .app-nav-item:not([aria-current]) { display: none; }
  .rec-row { grid-template-columns: minmax(0, 1fr) 78px; }
  .rec-row > span:nth-child(2) { display: none; }
  .audit-strip { display: none; }
}

@media (max-width: 1000px) {
  .demo-hero { grid-template-columns: 1fr; gap: 44px; }
  .page-hero { padding: 132px 0 76px; }
}
@media (max-width: 700px) {
  .form-card { padding: 24px 20px 26px; }
  .theme-indigo .cta-inner { padding: 52px 24px; }
}
