/* ==========================================================================
   Tayeno Design System — Liquid Glass & Editorial Typography
   Tokens and Component System per DESIGN-SPEC.md
   ========================================================================== */

:root {
  /* The ground the glass sits on */
  --bg: #0B0F14;
  --bg-glow-a: #1E3A5F;
  --bg-glow-b: #0F3D33;

  /* Liquid Glass Surface Tokens */
  --glass-fill:    rgba(255, 255, 255, 0.06);
  --glass-fill-hi: rgba(255, 255, 255, 0.10);
  --glass-stroke:  rgba(255, 255, 255, 0.14);
  --glass-spec:    rgba(255, 255, 255, 0.28);   /* lit specular top edge */
  --glass-blur: 12px;
  --glass-sat: 180%;

  /* High-Contrast Accessible Colors (Dark Ground) */
  --ink:        #F4F7F9; /* 16.2:1 against --bg */
  --ink-subtle: #C5D1DC; /* 10.5:1 against --bg */
  --muted:      #9BAAB6; /* 5.8:1 against --bg (passes WCAG AA 4.5:1) */
  --dim:        #738596;
  --accent:     #5FBFA3; /* Teal lit accent */
  --accent-hi:  #78D5BB;
  --accent-glow:rgba(95, 191, 163, 0.22);
  --danger:     #F87171;
  --success:    #34D399;

  /* Chat bubbles, dark ground (BRIEF-56 Part D). These are the values the demo
     chat already used, kept exactly so opting into dark changes nothing. */
  --bubble-bot-bg:     rgba(255, 255, 255, 0.05);
  --bubble-bot-border: var(--glass-stroke);
  --bubble-bot-ink:    var(--ink);
  --bubble-me-bg:      #1E293B;
  --bubble-me-ink:     #F8FAFC;
  --bubble-me-meta:    #94A3B8;
  --bubble-shadow:     0 4px 14px rgba(0, 0, 0, 0.25);

  /* Typography System */
  --font-display: Georgia, "Times New Roman", serif;
  --font-ui:      -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Light is the default ground. This palette used to sit behind
   @media (prefers-color-scheme: light), so anyone whose OS was set to dark got
   the dark site no matter what — which is why Tayeno read as "intimidating".
   Dark is still available to any page that opts in with data-theme="dark". */
:root:not([data-theme="dark"]) {
    --bg: #EEF2F5;
    --bg-glow-a: #CFE0F5;
    --bg-glow-b: #D6EFE7;
    --glass-fill:    rgba(255, 255, 255, 0.65);
    --glass-fill-hi: rgba(255, 255, 255, 0.85);
    --glass-stroke:  rgba(15, 25, 35, 0.12);
    --glass-spec:    rgba(255, 255, 255, 0.95);
    --ink:        #0E161E; /* 16.5:1 against light ground */
    --ink-subtle: #2D3D4D; /* 9.2:1 */
    --muted:      #4D5E6E; /* 5.4:1 (passes WCAG AA 4.5:1) */
    --dim:        #4D5E6E; /* High contrast: 5.4:1 against light ground */
    --accent:     #0D6652; /* 5.1:1 against light ground */
    --accent-hi:  #084A3B;
    --accent-glow:rgba(13, 102, 82, 0.15);
    --danger:     #DC2626;
    --success:    #059669;

    /* ── Chat bubbles (BRIEF-56 Part D) ──────────────────────────────────────
       The homepage demo chat kept dark-theme literals here, so on the light
       ground it rendered as a dark navy slab for the user and a 5%-white bubble
       for the bot — invisible on white. Measured before this change: body
       luminance 241 but .user-msg rgb(30,41,59), luminance 40.

       These are shared by the marketing demo AND the dashboard's Messages pane,
       so the two cannot drift apart — which is the whole point of Part D. */
    --bubble-bot-bg:     #FFFFFF;
    --bubble-bot-border: rgba(15, 25, 35, 0.10);
    --bubble-bot-ink:    #0E161E;
    --bubble-me-bg:      #0D6652;   /* brand green, white text: 5.2:1 */
    --bubble-me-ink:     #FFFFFF;
    --bubble-me-meta:    rgba(255, 255, 255, 0.78);
    --bubble-shadow:     0 1px 2px rgba(16, 32, 44, 0.07);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Light first, so browser-rendered UI (scrollbars, form controls, autofill)
     matches the light ground rather than staying dark on a dark-mode OS. */
  color-scheme: light dark;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Dedicated hardware-accelerated fixed background canvas (avoids repaint lag during scrolling) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(60rem 40rem at 12% -10%, var(--bg-glow-a) 0%, transparent 60%),
    radial-gradient(50rem 35rem at 88% 10%, var(--bg-glow-b) 0%, transparent 55%);
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
  will-change: transform;
}

/* Typography Polish Details */
h1, h2, h3, .font-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em; /* Tighten large type above 32px */
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  line-height: 1.25;
}

p {
  color: var(--ink-subtle);
}

.price, .token-count, time, .num, .code-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Desktop appearance palettes (BRIEF-68 C). These tokens are scoped to the
   dashboard's root data attributes, so the shared public pages keep their palette. */
:root[data-skin="tayeno"][data-theme="light"] {
  color-scheme: light;
  --bg:#F1F7F4; --bg-glow-a:#CDEADD; --bg-glow-b:#E3F1D9;
  --glass-fill:rgba(255,255,255,.72); --glass-fill-hi:rgba(255,255,255,.9);
  --glass-stroke:rgba(16,72,55,.16); --glass-spec:rgba(255,255,255,.96);
  --ink:#10271E; --ink-subtle:#314D40; --muted:#506C5D; --dim:#62796C;
  --accent:#176B4D; --accent-hi:#10543C; --accent-glow:rgba(23,107,77,.17);
  --danger:#B42318; --success:#137547;
  --bubble-bot-bg:#FFFFFF; --bubble-bot-border:rgba(16,72,55,.14); --bubble-bot-ink:#10271E;
  --bubble-me-bg:#176B4D; --bubble-me-ink:#FFFFFF; --bubble-me-meta:rgba(255,255,255,.82);
  --bubble-shadow:0 1px 3px rgba(16,39,30,.1);
  --surface:rgba(255,255,255,.88); --surface-solid:#FFFFFF; --surface-sunken:rgba(16,72,55,.055); --surface-raised:#FFFFFF;
  --on-accent:#FFFFFF; --shadow-sm:0 2px 8px rgba(16,72,55,.1); --shadow-md:0 12px 30px rgba(16,72,55,.14); --shadow-lg:0 18px 48px rgba(16,72,55,.19);

  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:Georgia,"Times New Roman",serif; --font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif; --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --desktop-radius:14px; --desktop-shadow:0 12px 30px rgba(16,39,30,.18);
}
:root[data-skin="tayeno"][data-theme="dark"] {
  color-scheme: dark;
  --bg:#0C1913; --bg-glow-a:#163B2D; --bg-glow-b:#233D24;
  --glass-fill:rgba(255,255,255,.07); --glass-fill-hi:rgba(255,255,255,.12);
  --glass-stroke:rgba(205,240,218,.17); --glass-spec:rgba(255,255,255,.3);
  --ink:#F1FAF4; --ink-subtle:#C7DDCE; --muted:#A3BDAE; --dim:#849F90;
  --accent:#73D2A5; --accent-hi:#9AE8C1; --accent-glow:rgba(115,210,165,.22);
  --danger:#FF8E86; --success:#66D49A;
  --bubble-bot-bg:rgba(255,255,255,.055); --bubble-bot-border:var(--glass-stroke); --bubble-bot-ink:var(--ink);
  --bubble-me-bg:#214735; --bubble-me-ink:#F4FFF8; --bubble-me-meta:#C3E3CF; --bubble-shadow:0 4px 14px rgba(0,0,0,.28);
  --surface:rgba(12,25,19,.88); --surface-solid:#101F17; --surface-sunken:rgba(0,0,0,.22); --surface-raised:#172A20;
  --on-accent:#092015; --shadow-sm:0 2px 8px rgba(0,0,0,.35); --shadow-md:0 16px 42px rgba(0,0,0,.42); --shadow-lg:0 18px 48px rgba(0,0,0,.46);

  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:Georgia,"Times New Roman",serif; --font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif; --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --desktop-radius:14px; --desktop-shadow:0 12px 30px rgba(0,0,0,.3);
}
:root[data-skin="tayeno-glass"][data-theme="light"] {
  color-scheme:light;
  --bg:#EEF2F5; --bg-glow-a:#CFE0F5; --bg-glow-b:#D6EFE7;
  --glass-fill:rgba(255,255,255,.65); --glass-fill-hi:rgba(255,255,255,.85); --glass-stroke:rgba(15,25,35,.12); --glass-spec:rgba(255,255,255,.95);
  --ink:#0E161E; --ink-subtle:#2D3D4D; --muted:#4D5E6E; --dim:#4D5E6E; --accent:#0D6652; --accent-hi:#084A3B; --accent-glow:rgba(13,102,82,.15);
  --danger:#DC2626; --success:#059669;
  --bubble-bot-bg:#FFFFFF; --bubble-bot-border:rgba(15,25,35,.1); --bubble-bot-ink:#0E161E; --bubble-me-bg:#0D6652; --bubble-me-ink:#FFFFFF; --bubble-me-meta:rgba(255,255,255,.78); --bubble-shadow:0 1px 2px rgba(16,32,44,.07);
  --surface:rgba(255,255,255,.86); --surface-solid:#FFFFFF; --surface-sunken:rgba(16,32,44,.045); --surface-raised:#FFFFFF; --on-accent:#FFFFFF;
  --shadow-sm:0 2px 8px rgba(16,32,44,.1); --shadow-md:0 12px 30px rgba(16,32,44,.13); --shadow-lg:0 18px 48px rgba(16,32,44,.18);
  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:Georgia,"Times New Roman",serif; --font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif; --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --desktop-radius:18px; --desktop-shadow:0 12px 30px rgba(16,32,44,.18);
}
:root[data-skin="tayeno-glass"][data-theme="dark"] {
  color-scheme:dark;
  --bg:#0B0F14; --bg-glow-a:#1E3A5F; --bg-glow-b:#0F3D33;
  --glass-fill:rgba(255,255,255,.06); --glass-fill-hi:rgba(255,255,255,.1); --glass-stroke:rgba(255,255,255,.14); --glass-spec:rgba(255,255,255,.28);
  --ink:#F4F7F9; --ink-subtle:#C5D1DC; --muted:#9BAAB6; --dim:#738596; --accent:#5FBFA3; --accent-hi:#78D5BB; --accent-glow:rgba(95,191,163,.22);
  --danger:#F87171; --success:#34D399;
  --bubble-bot-bg:rgba(255,255,255,.05); --bubble-bot-border:var(--glass-stroke); --bubble-bot-ink:var(--ink); --bubble-me-bg:#1E293B; --bubble-me-ink:#F8FAFC; --bubble-me-meta:#94A3B8; --bubble-shadow:0 4px 14px rgba(0,0,0,.25);
  --surface:rgba(11,15,20,.85); --surface-solid:#0B0D12; --surface-sunken:rgba(0,0,0,.2); --surface-raised:#0D1117; --on-accent:#0B0F14;
  --shadow-sm:0 2px 8px rgba(0,0,0,.35); --shadow-md:0 16px 42px rgba(0,0,0,.42); --shadow-lg:0 18px 48px rgba(0,0,0,.45);
  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:Georgia,"Times New Roman",serif; --font-ui:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif; --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --desktop-radius:18px; --desktop-shadow:0 12px 30px rgba(0,0,0,.34);
}
:root[data-skin="classic"][data-theme="light"] {
  color-scheme:light; --bg:#FAF9F5; --bg-glow-a:#FAF9F5; --bg-glow-b:#FAF9F5;
  --glass-fill:#FFFFFF; --glass-fill-hi:#FFFFFF; --glass-stroke:#DED9D1; --glass-spec:transparent;
  --ink:#292724; --ink-subtle:#45413C; --muted:#5B554E; --dim:#6A625A; --accent:#D97757; --accent-hi:#963E25; --accent-glow:rgba(217,119,87,.16);
  --danger:#B42318; --success:#176B45;
  --bubble-bot-bg:#FFFFFF; --bubble-bot-border:#DED9D1; --bubble-bot-ink:#292724; --bubble-me-bg:#A94B30; --bubble-me-ink:#FFFFFF; --bubble-me-meta:#F9E9E2; --bubble-shadow:none;
  --surface:#FFFFFF; --surface-solid:#FFFFFF; --surface-sunken:#F2F0EB; --surface-raised:#FFFFFF; --on-accent:#1F1E1D;
  --shadow-sm:none; --shadow-md:none; --shadow-lg:none;
  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --font-ui:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --font-mono:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --desktop-radius:6px; --desktop-shadow:none;
}
:root[data-skin="classic"][data-theme="dark"] {
  color-scheme:dark; --bg:#1F1E1D; --bg-glow-a:#1F1E1D; --bg-glow-b:#1F1E1D;
  --glass-fill:#292827; --glass-fill-hi:#33312F; --glass-stroke:#4B4845; --glass-spec:transparent;
  --ink:#F7F5F1; --ink-subtle:#E0DDD7; --muted:#C5C0B8; --dim:#B0AAA1; --accent:#D97757; --accent-hi:#F2B097; --accent-glow:rgba(217,119,87,.22);
  --danger:#FF9B91; --success:#72D5A1;
  --bubble-bot-bg:#292827; --bubble-bot-border:#4B4845; --bubble-bot-ink:#F7F5F1; --bubble-me-bg:#774331; --bubble-me-ink:#FFFFFF; --bubble-me-meta:#F3CDBD; --bubble-shadow:none;
  --surface:#292827; --surface-solid:#292827; --surface-sunken:#191817; --surface-raised:#33312F; --on-accent:#1F1E1D;
  --shadow-sm:none; --shadow-md:none; --shadow-lg:none;
  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --font-ui:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; --font-mono:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --desktop-radius:6px; --desktop-shadow:none;
}
:root[data-skin="classic-2"][data-theme="light"] {
  color-scheme:light; --bg:#FFFFFF; --bg-glow-a:#FFFFFF; --bg-glow-b:#FFFFFF;
  --glass-fill:#FFFFFF; --glass-fill-hi:#FFFFFF; --glass-stroke:#D8D8D8; --glass-spec:transparent;
  --ink:#171717; --ink-subtle:#333333; --muted:#555555; --dim:#696969; --accent:#333333; --accent-hi:#171717; --accent-glow:rgba(40,40,40,.12);
  --danger:#B42318; --success:#176B45;
  --bubble-bot-bg:#FFFFFF; --bubble-bot-border:#D8D8D8; --bubble-bot-ink:#171717; --bubble-me-bg:#333333; --bubble-me-ink:#FFFFFF; --bubble-me-meta:#E5E5E5; --bubble-shadow:none;
  --surface:#FFFFFF; --surface-solid:#FFFFFF; --surface-sunken:#F3F3F3; --surface-raised:#FFFFFF; --on-accent:#FFFFFF;
  --shadow-sm:none; --shadow-md:none; --shadow-lg:none;
  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:-apple-system,"Segoe UI",system-ui,sans-serif; --font-ui:-apple-system, "Segoe UI", system-ui, sans-serif; --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --desktop-radius:10px; --desktop-shadow:none;
}
:root[data-skin="classic-2"][data-theme="dark"] {
  color-scheme:dark; --bg:#0D0D0D; --bg-glow-a:#0D0D0D; --bg-glow-b:#0D0D0D;
  --glass-fill:#181818; --glass-fill-hi:#222222; --glass-stroke:#3C3C3C; --glass-spec:transparent;
  --ink:#F5F5F5; --ink-subtle:#DDDDDD; --muted:#BDBDBD; --dim:#AAAAAA; --accent:#D2D2D2; --accent-hi:#FFFFFF; --accent-glow:rgba(230,230,230,.18);
  --danger:#FF9B91; --success:#72D5A1;
  --bubble-bot-bg:#181818; --bubble-bot-border:#3C3C3C; --bubble-bot-ink:#F5F5F5; --bubble-me-bg:#414141; --bubble-me-ink:#FFFFFF; --bubble-me-meta:#D0D0D0; --bubble-shadow:none;
  --surface:#181818; --surface-solid:#181818; --surface-sunken:#080808; --surface-raised:#222222; --on-accent:#141414;
  --shadow-sm:none; --shadow-md:none; --shadow-lg:none;
  --border:var(--glass-stroke); --bg-card:var(--glass-fill);
  --font-display:-apple-system,"Segoe UI",system-ui,sans-serif; --font-ui:-apple-system, "Segoe UI", system-ui, sans-serif; --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --desktop-radius:10px; --desktop-shadow:none;
}

/* ==========================================================================
   Liquid Glass Surface Component
   ========================================================================== */

.glass {
  position: relative;
  background: var(--glass-fill);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-stroke);
  border-radius: 18px;
  box-shadow:
    0 1px 0 0 var(--glass-spec) inset,           /* lit specular top edge */
    0 0 0 1px rgba(255, 255, 255, 0.02) inset,
    0 20px 50px -20px rgba(0, 0, 0, 0.45);
  transform: translateZ(0);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* Specular sweep highlight across top third */
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(160deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.03) 32%,
    transparent 58%);
  pointer-events: none;
  z-index: 1;
}

.glass > * {
  position: relative;
  z-index: 2;
}

.glass-interactive:hover {
  background: var(--glass-fill-hi);
  transform: translateY(-2px) translateZ(0);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 1px 0 0 var(--glass-spec) inset,
    0 24px 60px -20px rgba(0, 0, 0, 0.55);
}

/* Mandatory @supports fallback for ~5% browsers without backdrop-filter */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(16, 22, 29, 0.94);
  }
  :root:not([data-theme="dark"]) .glass {
    background: rgba(255, 255, 255, 0.96);
  }
}

/* Layout Utilities */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
  font-family: var(--font-ui);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px auto;
}

.section-header h2 {
  margin-bottom: 14px;
}

.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Navigation */
.navbar, header.header {
  position: sticky;
  top: 16px;
  z-index: 100;
  margin: 0 16px 24px 16px;
  padding: 12px 24px;
  transform: translateZ(0);
  will-change: transform;
}

.nav-container, .header-container {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
  border-radius: 7px;
  object-fit: cover;
  filter: drop-shadow(0 2px 8px rgba(95, 191, 163, 0.35));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand-logo:hover .brand-icon {
  transform: scale(1.06);
  filter: drop-shadow(0 4px 14px rgba(95, 191, 163, 0.6));
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-subtle);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* Small-screen navigation drawer (replaces .nav-links below 768px) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-fill);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.nav-drawer {
  display: none;
}

@media (max-width: 768px) {
  .navbar:has(.nav-toggle) .nav-actions {
    display: none;
  }
  .navbar:not(:has(.nav-toggle)) .nav-actions {
    display: flex;
    gap: 6px;
  }
  .navbar:not(:has(.nav-toggle)) .nav-actions .btn-sm {
    padding: 7px 9px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-drawer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-stroke);
  }
  .nav-drawer[hidden] {
    display: none;
  }
  .nav-drawer a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--ink-subtle);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
  }
  .nav-drawer a:hover,
  .nav-drawer a:focus-visible {
    background: var(--glass-fill);
    color: var(--ink);
  }
  .nav-drawer .nav-drawer-cta {
    margin-top: 6px;
    justify-content: center;
    background: var(--accent);
    color: #FFFFFF;
  }
  .nav-drawer .nav-drawer-cta:hover {
    background: var(--accent-hi);
    color: #FFFFFF;
  }
}

/* Below 768px the primary marketing CTA lives in the drawer, so give the brand room. */
@media (max-width: 420px) {
  .navbar,
  header.header {
    padding: 10px 14px;
    margin: 0 8px 18px 8px;
  }
  .brand-name {
    font-size: 1.15rem;
  }
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 22px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1.05rem;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 700;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px var(--accent-glow), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
}

:root[data-theme="dark"] .btn-primary {
  color: #061A14;
}

.btn-primary:hover {
  background: var(--accent-hi);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px var(--accent-glow);
}

.btn-secondary {
  background: var(--glass-fill);
  color: var(--ink);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--glass-fill-hi);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Hero Section */
.hero {
  padding: 70px 0 90px 0;
  text-align: center;
}

.hero-content {
  max-width: 820px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 28px;
}

.pulse-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.hero-title {
  margin-bottom: 22px;
}

.hero-subtitle {
  font-size: 1.18rem;
  line-height: 1.65;
  color: var(--ink-subtle);
  margin-bottom: 36px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

.hero-proof {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.88rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-proof svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Interactive Preview / Phone Frame */
.demo-section {
  padding: 40px 0 80px 0;
  scroll-margin-top: 100px;
}

.chat-frame-wrapper {
  max-width: 580px;
  margin: 0 auto;
}

.demo-sample-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto 16px;
}

.demo-sample-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1 1 165px;
  min-height: 48px;
  padding: 8px 14px;
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  background: var(--glass-fill);
  color: var(--ink-subtle);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.demo-sample-tab img {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.demo-sample-tab:hover,
.demo-sample-tab.is-active {
  color: var(--ink);
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.13);
}

.demo-sample-tab:focus-visible,
.demo-approval-actions button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

html.no-js .demo-sample-tabs {
  display: none;
}

.telegram-phone {
  overflow: hidden;
  padding: 0;
  border: none !important;
}

.telegram-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-stroke);
  background: rgba(255, 255, 255, 0.03);
}

.bot-avatar-thumb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
}

.bot-info {
  flex: 1;
}

.bot-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink);
}

.bot-status {
  font-size: 0.78rem;
  color: var(--accent);
}

.telegram-header .bot-status {
  font-size: 0.8rem;
  color: #A7F3D0;
}

.demo-live-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ECFDF5;
  background: rgba(95, 191, 163, 0.12);
  border: 1px solid rgba(95, 191, 163, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDotAnim 1.8s infinite;
}

@keyframes pulseDotAnim {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.telegram-messages {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 480px;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

#chatStream {
  gap: 14px;
  padding: 22px 18px;
  height: 480px;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  overflow-y: hidden;
  overscroll-behavior: auto;
  touch-action: pan-y;
  scrollbar-width: none;
}

#chatStream::-webkit-scrollbar {
  display: none;
}

html.no-js #chatStream {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.demo-sample-disclaimer {
  max-width: 620px;
  margin: 12px auto 0;
  color: var(--ink-subtle);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
}

.demo-approval-card {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid var(--glass-stroke);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.34);
}

.demo-approval-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
  font-size: 0.83rem;
}

.demo-approval-heading span,
.demo-source-note {
  color: var(--ink-subtle);
  font-size: 0.78rem;
}

.demo-approval-copy {
  margin-top: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.demo-approval-status {
  margin-top: 8px;
  color: #A7F3D0;
  font-size: 0.78rem;
  font-weight: 600;
}

.demo-approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.demo-approval-actions button {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--glass-stroke);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.demo-approval-actions button:first-child {
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.15);
}

.demo-approval-actions button:disabled {
  cursor: default;
  opacity: 0.55;
}

.demo-approval-note {
  margin: 10px 0 0;
  color: var(--ink-subtle);
  font-size: 0.76rem;
  line-height: 1.45;
}

.demo-talking-points {
  margin: 6px 0 0;
  padding-left: 20px;
}

.demo-talking-points li + li {
  margin-top: 5px;
}

.telegram-messages::-webkit-scrollbar {
  width: 6px;
}

.telegram-messages::-webkit-scrollbar-track {
  background: transparent;
}

.telegram-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.msg {
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 95%;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.msg.show {
  opacity: 1;
  transform: translateY(0);
}

.msg.demo-message-static {
  opacity: 1;
  transform: none;
  transition: none;
  will-change: auto;
}

.bot-msg {
  background: var(--bubble-bot-bg);
  color: var(--bubble-bot-ink);
  border: 1px solid var(--bubble-bot-border);
  border-bottom-left-radius: 4px;
}

.user-msg {
  background: var(--bubble-me-bg);
  color: var(--bubble-me-ink);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  margin-left: auto;
  max-width: 85%;
  border: 1px solid var(--bubble-bot-border);
  box-shadow: var(--bubble-shadow);
}

.user-msg .msg-author {
  color: var(--bubble-me-meta);
  justify-content: flex-end;
}

.user-msg .msg-time {
  color: var(--bubble-me-meta);
  text-align: right;
}

.msg-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-ai {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: var(--glass-fill-hi);
  border: 1px solid var(--glass-stroke);
  border-radius: 4px;
  color: var(--muted);
}

/* Live Demo Typing Indicator */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-stroke);
  max-width: fit-content;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.typing-indicator.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.typing-indicator .typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing-indicator .typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.4;
  animation: typingDotPulse 1.4s infinite ease-in-out;
}

.typing-indicator .typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator .typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDotPulse {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.35;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
    background: var(--accent);
  }
}

.typing-indicator .typing-label {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .msg {
    transition: none !important;
    transform: none !important;
  }
  .demo-section #chatStream {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }
  .typing-indicator {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
  .typing-indicator .typing-dot {
    animation: none !important;
  }
}

/* Live Demo Polish & Attachment Cards */
.read-receipt {
  color: #34D399;
  font-weight: 700;
  margin-left: 4px;
  letter-spacing: -1px;
}

.attachment-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
}

.attachment-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.attachment-icon.receipt-icon {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.attachment-details {
  flex: 1;
  min-width: 0;
}

.attachment-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 2px;
}

.attachment-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-subtle);
  border: 1px solid rgba(15, 23, 42, 0.12);
  white-space: nowrap;
}

.attachment-badge.filed-badge {
  background: rgba(5, 150, 105, 0.12);
  color: #065F46;
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.insight-pill {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(13, 102, 82, 0.08);
  border: 1px solid rgba(13, 102, 82, 0.22);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink);
  line-height: 1.5;
}

.insight-pill strong {
  color: #064E3B;
  font-weight: 700;
}

.msg-time {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  margin-top: 10px;
  font-family: var(--font-mono);
}

[data-theme="dark"] .attachment-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .attachment-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
}

[data-theme="dark"] .attachment-icon.receipt-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
}

[data-theme="dark"] .attachment-title {
  color: #F1F5F9;
}

[data-theme="dark"] .attachment-badge {
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .attachment-badge.filed-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

[data-theme="dark"] .insight-pill {
  background: rgba(95, 191, 163, 0.15);
  border: 1px solid rgba(95, 191, 163, 0.3);
  color: #F8FAFC;
}

[data-theme="dark"] .insight-pill strong {
  color: #FFFFFF;
}

.brief-greeting {
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 12px;
}

.brief-block {
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 10px 0;
}

.brief-block-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brief-item {
  font-size: 0.88rem;
  color: var(--ink-subtle);
  line-height: 1.45;
  margin-bottom: 6px;
}

.brief-item:last-child {
  margin-bottom: 0;
}

.brief-action-prompt {
  font-size: 0.88rem;
  color: var(--ink);
  margin-top: 12px;
  line-height: 1.45;
}

.action-card {
  border-color: rgba(95, 191, 163, 0.3);
  background: rgba(95, 191, 163, 0.04);
}

.draft-preview {
  padding: 14px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
  margin-bottom: 12px;
}

.draft-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 6px;
}

.telegram-inline-keyboard {
  display: flex;
  gap: 8px;
  position: relative;
}

.tg-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-fill);
  color: var(--ink);
  cursor: default;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tg-btn-primary {
  background: var(--accent);
  color: #061A14;
  font-weight: 700;
  border-color: var(--accent);
}

.tg-btn-primary.auto-pulse {
  transform: scale(1.04);
  box-shadow: 0 0 18px var(--accent), 0 0 30px rgba(95, 191, 163, 0.5);
  background: #7ef5d2;
}

.tg-btn-danger {
  color: var(--danger);
}

.typing-bubble {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-stroke);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  max-width: 320px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.typing-bubble.show {
  opacity: 1;
  transform: translateY(0);
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1.1); opacity: 1; }
}

.typing-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.demo-slide {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.demo-carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.demo-nav {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 40px;
  padding: 6px 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.demo-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.demo-nav-btn:hover {
  background: rgba(95, 191, 163, 0.25);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.1);
}

.demo-nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.demo-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.demo-dot {
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-dot:hover {
  background: rgba(255, 255, 255, 0.75);
  border-color: #ffffff;
  transform: scale(1.15);
}

.demo-dot.active {
  width: 32px;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(95, 191, 163, 0.7);
}

.demo-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Rendering optimisations.
 *
 * BRIEF-48 Part 4: `content-visibility: auto` was here, on the six numbered sections
 * below. It skips rendering off-screen content, which is fast — and which also means
 * anything that does not scroll the page sees NOTHING. Measured with no scrolling:
 * .personas-section, .security-section and .pricing-section each rendered zero text and
 * reported a 760px placeholder instead of their real height, so a full-page capture, a
 * link preview or a crawler screenshot showed blank areas where the product's pricing
 * and security story should be.
 *
 * `contain-intrinsic-size: 600px` was the second half of the problem: it hardcodes a
 * fake height, so the page reserves the wrong space for a section that never renders.
 *
 * Removed rather than conditioned, because there is no version of "crawlers see blank
 * sections" that is acceptable for the page that sells the product. The layout cost is
 * a few hundred milliseconds on first paint; being invisible to a search engine is not
 * a trade worth making for it.
 */

/* Skills Grid */
.skills-section {
  padding: 80px 0;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.skill-card {
  padding: 32px;
}

.skill-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
  border: 1px solid rgba(95, 191, 163, 0.3);
  color: var(--accent);
}

.skill-card h3 {
  margin-bottom: 10px;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.skill-card ul {
  list-style: none;
  font-size: 0.88rem;
  color: var(--ink-subtle);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Personas Section & Portraits */
.personas-section {
  padding: 80px 0;
}

.personas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 265px), 1fr));
  justify-content: center;
  justify-items: center;
  gap: 24px;
}

.js #personasGrid:not(.is-expanded) .persona-card:nth-child(n + 5) {
  display: none;
}

.personas-toggle-wrap {
  margin: 24px auto 0;
  text-align: center;
}

.personas-toggle {
  min-height: 44px;
}

.personas-toggle[hidden],
.annual-saving[hidden] {
  display: none !important;
}

.persona-card {
  width: 100%;
  max-width: 290px;
  align-self: start;
  padding: 28px 22px;
  border-radius: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.persona-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--glass-fill-hi);
  border: 2px solid rgba(95, 191, 163, 0.4);
  box-shadow: 0 0 16px rgba(95, 191, 163, 0.2), 0 8px 24px -6px rgba(0, 0, 0, 0.5);
  margin-bottom: 16px;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.persona-card:hover .persona-avatar {
  transform: scale(1.05);
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(95, 191, 163, 0.45);
}

.persona-card h4 {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--ink);
}

.persona-style {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.sample-quote {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 6px;
  flex: 1;
}

.btn-hire {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 22px;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 24px;
  background: linear-gradient(135deg, #5FBFA3 0%, #10B981 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #061A14;
  box-shadow: 0 4px 16px rgba(95, 191, 163, 0.4), 0 1px 0 rgba(255, 255, 255, 0.3) inset;
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn-hire:hover,
.persona-card:hover .btn-hire {
  background: linear-gradient(135deg, #7EF5D2 0%, #10B981 100%);
  color: #04120D;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 24px rgba(95, 191, 163, 0.65), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  border-color: #A7F3D0;
}

.persona-card.selected {
  border-color: var(--accent);
  background: var(--glass-fill-hi);
  box-shadow: 0 0 24px var(--accent-glow), 0 1px 0 var(--glass-spec) inset;
  transform: translateY(-4px);
}

.persona-card.selected .btn-hire {
  background: linear-gradient(135deg, #A7F3D0 0%, #10B981 100%);
  box-shadow: 0 0 20px rgba(95, 191, 163, 0.8);
  color: #04120D;
}

.badge-coming-soon {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 6px;
}

.btn-coming-soon {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}

.persona-card.persona-card-coming-soon {
  opacity: 0.72;
}

.persona-card.persona-card-coming-soon:hover {
  opacity: 0.9;
  transform: none;
}

/* Security Architecture Section */
.security-section {
  padding: 80px 0;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.security-card {
  padding: 28px;
}

.sec-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.security-card h3 {
  margin-bottom: 10px;
}

.security-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Verified infrastructure credentials (inside #security) */
.trust-strip {
  margin-top: 40px;
  padding: 28px 32px;
}

.trust-strip-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.trust-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.trust-item span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.trust-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--glass-stroke);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
  padding: 80px 0;
}

.founding-banner {
  padding: 32px 36px;
  margin-bottom: 40px;
  border-color: rgba(95, 191, 163, 0.4);
  background: linear-gradient(135deg, rgba(95, 191, 163, 0.08) 0%, rgba(30, 58, 95, 0.12) 100%);
}

.founding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.badge-founding {
  padding: 4px 12px;
  background: var(--accent);
  color: #061A14;
  font-weight: 800;
  font-size: 0.78rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.founding-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
}

.founding-price s {
  color: var(--dim);
  font-size: 1.2rem;
  margin-right: 8px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.pricing-card {
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pricing-card.featured-tier {
  border-color: rgba(95, 191, 163, 0.5);
  background: var(--glass-fill-hi);
  box-shadow:
    0 1px 0 0 var(--glass-spec) inset,
    0 0 30px -10px var(--accent-glow),
    0 20px 50px -20px rgba(0, 0, 0, 0.45);
}

.popular-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

/* BRIEF-45C: only the Business card has a badge, which pushed its price ~70px below Solo
   and Team. The spacer reserves the same height everywhere so the three prices line up. */
.popular-badge-spacer {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid transparent;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  margin-bottom: 16px;
  text-transform: uppercase;
  visibility: hidden;
}



.popular-badge {
  margin-top: 0;
}

/* The card descriptions differ in length, and "For high-leverage solo practices and growing
   businesses." wraps to two lines where the others fit on one — which put the Business
   price 23px lower no matter how the badge was placed. Reserving two lines of height on all
   three is what actually aligns them. */
.tier-header p {
  min-height: 2.7em;
}

/* BRIEF-45C: a "coming soon" item must not read as a ticked, shipping feature. */
.feature-soon {
  color: var(--muted);
  flex-shrink: 0;
  margin-top: 0.35em;
}

.feature-soon-text {
  color: var(--muted);
}

.tier-header h3 {
  margin-bottom: 6px;
}

.tier-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

.tier-price {
  margin: 24px 0;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tier-price .currency {
  font-size: 1.6rem;
  font-weight: 600;
}

.tier-price .freq {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.annual-saving-slot {
  min-height: 1.3rem;
  margin: -20px 0 20px;
  text-align: center;
}

.annual-saving {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3rem;
  white-space: nowrap;
}

.tier-features {
  list-style: none;
  font-size: 0.92rem;
  color: var(--ink-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
  flex-grow: 1;
}

.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tier-features li > svg {
  flex-shrink: 0;
  margin-top: 0.35em;
}

.feature-check {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

/* Pricing Toggle & Guarantee Badge (BRIEF-45) */
.pricing-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 36px;
}

.pricing-toggle-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.pricing-toggle-label.active {
  color: var(--ink);
}

.pricing-toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.pricing-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pricing-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--glass-fill-hi);
  border: 1px solid var(--glass-stroke);
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}

.pricing-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: var(--accent);
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.pricing-toggle-switch input:checked + .pricing-toggle-slider {
  background-color: rgba(95, 191, 163, 0.25);
  border-color: var(--accent);
}

.pricing-toggle-switch input:checked + .pricing-toggle-slider:before {
  transform: translateX(24px);
  background-color: var(--accent);
}

.pricing-toggle-discount {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(95, 191, 163, 0.18);
  border: 1px solid rgba(95, 191, 163, 0.45);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

.pricing-guarantee-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 28px auto 0;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
}

/* BRIEF-57 Part D: the student line. Deliberately quieter than the pricing cards — it is a
   gated price, not a fourth tier, so it sits beneath them as a note rather than competing
   for the eye with the plans anyone can buy. */
.student-plan-note {
  margin: 20px auto 0;
  max-width: 640px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-subtle);
}
.student-plan-note strong { color: var(--ink); }

.pricing-guarantee-badge svg {
  color: var(--accent);
}

/* Newsletter / Waitlist Box */
.newsletter-section {
  padding: 40px 0 80px 0;
}

.newsletter-box {
  padding: 44px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.newsletter-box h3 {
  margin-bottom: 10px;
}

.newsletter-box p {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  justify-content: center;
}

.input-field {
  flex: 1;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-fill);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-success {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid var(--success);
  color: var(--success);
  font-size: 0.92rem;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#checkoutModal {
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px 28px;
  position: relative;
  scrollbar-width: thin;
  background: #FFFFFF;
  margin: auto;
}

#checkoutModal .modal-card {
  max-height: min(90vh, 760px);
  max-height: min(90dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

:root[data-theme="dark"] .modal-card {
  background: #0F172A;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--ink);
}

/* Enforced Consent Gate (UK GDPR & EU AI Act) */
.consent-gate-group {
  margin: 16px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.consent-gate-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.consent-gate-header span:first-child {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.consent-gate-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

.consent-doc-block {
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  border-radius: 10px;
  padding: 10px 12px;
}

.consent-doc-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.consent-doc-name {
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-version-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(15, 25, 35, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

:root[data-theme="dark"] .doc-version-tag {
  background: rgba(255, 255, 255, 0.08);
}

.scroll-status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #92400E; /* Extra high contrast amber on light ground */
  background: rgba(217, 119, 6, 0.12);
  padding: 2px 7px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

:root[data-theme="dark"] .scroll-status-badge {
  color: #FBBF24;
}

.scroll-status-badge.badge-read {
  color: #047857; /* High contrast green: 4.6:1 on light ground */
  background: rgba(5, 150, 105, 0.12);
}

:root[data-theme="dark"] .scroll-status-badge.badge-read {
  color: #34D399;
}

.consent-scroll-box {
  max-height: 86px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--glass-stroke);
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-subtle);
  margin-bottom: 8px;
  scrollbar-width: thin;
}

:root[data-theme="dark"] .consent-scroll-box {
  background: rgba(0, 0, 0, 0.25);
}

.consent-scroll-box p {
  margin-bottom: 6px;
}

.consent-scroll-box p:last-child {
  margin-bottom: 0;
}

.consent-scroll-box a.legal-link {
  color: var(--accent);
  text-decoration: underline;
  font-size: 0.76rem;
}

.consent-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ink);
  cursor: pointer;
}

.consent-checkbox-label input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.consent-checkbox-label input[type="checkbox"]:disabled + span {
  color: var(--muted);
  cursor: not-allowed;
}

#checkoutSubmitBtn {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 16px;
}

#checkoutSubmitBtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: auto;
  background: #64748B;
  border-color: #64748B;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-status-badge {
    transition: none !important;
  }
}

@media (max-width: 480px), (max-height: 700px) {
  .modal-overlay {
    padding: 8px;
  }
  .modal-card,
  #checkoutModal .modal-card {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    padding: 20px 16px;
  }
  .consent-gate-group {
    gap: 8px;
    margin: 12px 0 16px 0;
  }
  .consent-scroll-box {
    max-height: 72px;
  }
}

.skill-card li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ink-subtle);
}

/* ==========================================================================
   Executive Calibration Console
   ========================================================================== */

.calibration-console {
  max-width: 960px;
  margin: 0 auto;
  padding: 36px 32px;
  border-radius: 24px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6), 0 1px 0 0 var(--glass-spec) inset;
}

.calibration-module {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calibration-module-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.calibration-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(95, 191, 163, 0.12);
  border: 1px solid rgba(95, 191, 163, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(95, 191, 163, 0.15);
}

.calibration-module-header h4 {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.calibration-module-header p {
  font-size: 0.88rem;
  color: var(--muted);
}

.calibration-status-badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(95, 191, 163, 0.12);
  border: 1px solid rgba(95, 191, 163, 0.25);
  color: var(--accent);
  white-space: nowrap;
}

.calibration-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.calibration-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-ui);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-stroke);
  color: var(--ink-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.calibration-pill svg {
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.calibration-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--ink);
}

.calibration-pill.active {
  background: rgba(95, 191, 163, 0.16);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(95, 191, 163, 0.25), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.calibration-pill.active svg {
  opacity: 1;
  color: var(--accent);
}

.calibration-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--glass-stroke) 20%, var(--glass-stroke) 80%, transparent 100%);
  margin: 28px 0;
}

.calibration-preview-card {
  margin-top: 4px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-stroke);
}

.preview-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.preview-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.preview-text {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink);
  line-height: 1.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (max-width: 768px) {
  .calibration-console {
    padding: 24px 18px;
  }
  .calibration-module-header {
    flex-wrap: wrap;
  }
  .calibration-status-badge {
    margin-left: 0;
    width: 100%;
    text-align: center;
    margin-top: 4px;
  }
}

@media (max-width: 640px) {
  .telegram-messages {
    height: 400px;
  }

  #chatStream {
    height: 400px;
  }

  .demo-section .demo-live-badge {
    display: none;
  }

  #demoBotNameText {
    white-space: nowrap;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.modal-desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 18px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--glass-stroke);
  padding: 48px 0;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--glass-fill);
}

.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Plain High-Contrast Surface for Legal Pages (DESIGN-SPEC.md)
   privacy.html, terms.html, dpa.html stay clean, non-glass, and readable.
   ========================================================================== */

body.legal-page {
  background: #0B0F14;
  background-image: none;
  color: #E2E8F0;
  line-height: 1.7;
}

body.legal-page .legal-container {
  max-width: 780px;
  margin: 40px auto 80px auto;
  padding: 0 24px;
}

body.legal-page h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  color: #FFFFFF;
}

body.legal-page h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 12px;
  color: #FFFFFF;
}

body.legal-page h3 {
  font-size: 1.2rem;
  margin-top: 24px;
  margin-bottom: 8px;
  color: #E2E8F0;
}

body.legal-page p, body.legal-page li {
  color: #CBD5E1;
  margin-bottom: 14px;
}

body.legal-page a {
  color: var(--accent);
  text-decoration: underline;
}

/* ==========================================================================
   Accessibility: Reduced Motion Preference
   ========================================================================== */

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

/* ==========================================================================
   Comparison Table: Tayeno vs Human 24/7 Assistant
   ========================================================================== */

/* Base table accessibility rules */
table {
  border-collapse: collapse;
  color: var(--ink);
}
th {
  color: var(--ink);
  font-weight: 700;
}
td {
  color: var(--ink-subtle);
}

.comparison-section {
  margin-top: 56px;
}

.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--glass-stroke);
  background: var(--glass-fill);
  box-shadow: var(--shadow-glass);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--glass-stroke);
  vertical-align: top;
  line-height: 1.55;
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

.comparison-table th:first-child {
  width: 24%;
}

.comparison-table th.col-highlight {
  width: 40%;
  background: rgba(37, 99, 235, 0.12);
  border-left: 1px solid rgba(37, 99, 235, 0.3);
  border-right: 1px solid rgba(37, 99, 235, 0.3);
  color: #1D4ED8;
}

:root[data-theme="dark"] .comparison-table th.col-highlight {
  color: #60A5FA;
}

.comparison-price-highlight {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1D4ED8;
}

:root[data-theme="dark"] .comparison-price-highlight {
  color: #60A5FA;
}

.comparison-table td.col-highlight {
  background: rgba(37, 99, 235, 0.04);
  border-left: 1px solid rgba(37, 99, 235, 0.2);
  border-right: 1px solid rgba(37, 99, 235, 0.2);
}

.comparison-table th:last-child {
  width: 36%;
  color: var(--muted);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.comparison-table tr:hover td.col-highlight {
  background: rgba(37, 99, 235, 0.08);
}

.table-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #047857;
  font-weight: 600;
}

:root[data-theme="dark"] .table-check {
  color: #34D399;
}

.table-cross {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #B91C1C;
  font-weight: 600;
}

@media (max-width: 640px) {
  .comparison-table-wrapper {
    overflow: visible;
  }

  .comparison-table {
    display: block;
    border-collapse: separate;
    border-spacing: 0;
  }

  .comparison-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .comparison-table tbody {
    display: block;
    width: 100%;
  }

  .comparison-table tbody tr {
    display: block;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--glass-stroke);
    border-radius: 12px;
    background: var(--glass-fill);
    box-shadow: var(--shadow-glass);
  }

  .comparison-table tbody tr + tr {
    margin-top: 12px;
  }

  .comparison-table td {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--glass-stroke);
  }

  .comparison-table td.col-highlight {
    border: 0;
    border-bottom: 1px solid var(--glass-stroke);
  }

  .comparison-table td:last-child {
    border-bottom: 0;
  }

  .comparison-table td::before {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .comparison-table .table-check svg,
  .comparison-table .table-cross svg {
    width: 14px;
    min-width: 14px;
    height: 14px;
    min-height: 14px;
    flex: 0 0 14px;
  }
}

:root[data-theme="dark"] .table-cross {
  color: #F87171;
}

/* Official "Sign in with Google" button (Google branding guidelines).
   White filled pill, #3c4043 label, #dadce0 border, Google Sans/Roboto 500 14px,
   the four-colour Google "G" logomark, and clear space around the glyph. */
.gsi-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 14px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-family: Roboto, 'Google Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .25px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 64, 67, .12), 0 0 2px rgba(60, 64, 67, .12);
  transition: background-color .2s, box-shadow .2s;
}
.gsi-button:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(60, 64, 67, .18), 0 1px 2px rgba(60, 64, 67, .18);
}
.gsi-button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, .15);
}
.gsi-button svg { flex-shrink: 0; }
