/* ==========================================================================
   Alpha CRM — site stylesheet
   Tokens, base, and shared components. Loaded by every page.
   Brand: chrome + graphite + steel blue. "Built to Dominate."
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------ */
:root {
  /* Ground */
  --ink:        #08090a;   /* deepest — full-bleed ground */
  --ink-2:      #0e0f10;   /* page background */
  --surface:    #17191a;   /* card */
  --surface-2:  #232425;   /* raised card — brand dark grey */
  --surface-3:  #2c2e30;   /* hover / inset */

  /* Brand */
  --steel:      #636466;   /* brand grey */
  --blue:       #668fab;   /* brand blue */
  --blue-lift:  #8fb8d4;   /* lifted tint — small text + interactive on dark */
  --blue-deep:  #3d5c73;
  --blue-ink:   #24384a;

  /* Light lane */
  --paper:      #f2f3f4;
  --paper-2:    #e5e7e9;
  --on-paper:   #17191a;
  --on-paper-2: #55585b;
  /* Accessible blue for text on light backgrounds — #668fab fails there. */
  --blue-on-paper: #3a5e79;

  /* Text on dark */
  --text:       #edeff0;
  --text-2:     #a7abae;
  --text-3:     #7c8083;

  /* Lines */
  --line:       rgba(255,255,255,.08);
  --line-2:     rgba(255,255,255,.15);
  --line-3:     rgba(255,255,255,.24);

  /* The signature: polished chrome. Bright top, a sharp horizon flip around the
     midline, then a blue-tinted reflection brightening toward the bottom — the
     tint is what keeps it reading as metal instead of flat grey. */
  --chrome: linear-gradient(180deg,
              #ffffff 0%, #fcfdfd 24%, #e2e8ec 43%,
              #8d979e 48.5%, #545e64 51.5%,
              #90a5b4 56%, #cddce6 70%, #f7fafb 88%, #ffffff 100%);
  --chrome-soft: linear-gradient(180deg,
              #ffffff 0%, #e6ebee 40%, #9aa6ae 55%, #d5e0e7 78%, #ffffff 100%);

  /* Type */
  --f-display: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-body:    'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Metrics */
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --chamfer: 13px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.28);
  --shadow:    0 2px 6px rgba(0,0,0,.42), 0 18px 44px rgba(0,0,0,.42);
  --shadow-lg: 0 6px 18px rgba(0,0,0,.5),  0 40px 90px rgba(0,0,0,.55);

  --ease: cubic-bezier(.22,.61,.36,1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink-2);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.06;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.7rem, 6vw, 5rem);   line-height: .98; letter-spacing: -.034em; font-weight: 900; }
/* Below this the clamp floor is wider than the viewport, so both hero
   sentences wrap mid-phrase and the rag falls apart. */
@media (max-width: 480px) { h1 { font-size: 2.3rem; letter-spacing: -.03em; } }
h2 { font-size: clamp(1.95rem, 3.7vw, 3.1rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.4rem); letter-spacing: -.015em; font-weight: 700; }

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--blue); color: #06080a; }

:focus-visible {
  outline: 2px solid var(--blue-lift);
  outline-offset: 3px;
  border-radius: 4px;
}

/* clip-path clips everything an element paints, INCLUDING its outline — so the
   chamfered buttons need a ring that lives inside the polygon instead. */
.btn--primary:focus-visible,
.btn--blue:focus-visible {
  outline: none;
  box-shadow:
    inset 0 0 0 2px #06080a,
    inset 0 0 0 4px var(--blue-lift),
    0 10px 30px rgba(0,0,0,.5);
}

.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: 50%; top: 10px; transform: translate(-50%, -200%);
  background: var(--blue); color: #06080a; padding: 10px 18px;
  border-radius: 999px; font-weight: 700; z-index: 200; transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- Layout ------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--wide { max-width: 1340px; }
.wrap--narrow { max-width: 840px; }

section { position: relative; }
.section { padding-block: clamp(72px, 9vw, 132px); }
.section--tight { padding-block: clamp(52px, 6vw, 84px); }

/* Anchored sections must clear the sticky header when jumped to */
[id] { scroll-margin-top: 100px; }
@media (max-width: 940px) { [id] { scroll-margin-top: 86px; } }

.hide-sm { display: inline; }
@media (max-width: 680px) { .hide-sm { display: none; } }

/* Light lane */
.lane-light {
  background: var(--paper);
  color: var(--on-paper);
}
.lane-light h1, .lane-light h2, .lane-light h3 { color: var(--on-paper); }

/* ---------- Type helpers ------------------------------------------------ */
.chrome-text {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* Keeps the metal from disappearing on very light rendering paths */
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.55)) drop-shadow(0 8px 26px rgba(143,184,212,.18));
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .chrome-text { color: #e8ebed; -webkit-text-fill-color: #e8ebed; }
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-body);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .17em; text-transform: uppercase;
  color: var(--blue-lift);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--blue-lift);
  box-shadow: 0 0 0 4px rgba(143,184,212,.16);
}
.lane-light .eyebrow { color: var(--blue-on-paper); }
.lane-light .eyebrow .dot { background: var(--blue-on-paper); box-shadow: 0 0 0 4px rgba(58,94,121,.14); }

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(8px);
  font-size: .76rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-2);
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--blue-lift);
  box-shadow: 0 0 12px 2px rgba(143,184,212,.6);
}

.lead {
  font-size: clamp(1.03rem, 1.25vw, 1.2rem);
  line-height: 1.66;
  color: var(--text-2);
  max-width: 60ch;
}
.lane-light .lead { color: var(--on-paper-2); }

.section-head { max-width: 760px; margin-bottom: clamp(38px, 4.5vw, 62px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 { margin-bottom: 18px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lead { margin-inline: auto; }

/* ---------- Buttons ----------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px;
  font-family: var(--f-body);
  font-size: .95rem; font-weight: 700; letter-spacing: -.005em;
  border: 0; cursor: pointer;
  position: relative;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease),
              background-color .22s var(--ease), color .22s var(--ease),
              border-color .22s var(--ease);
  white-space: nowrap;
}
.btn .arrow { transition: transform .22s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: translateY(1px); }

/* Chamfered corners echo the angular "A" — clip-path, so no border on this one */
.btn--primary {
  color: #06080a;
  background:
    linear-gradient(180deg, #dfe5e9 0%, #b8c0c6 40%, #97a0a6 62%, #cdd4d8 100%);
  clip-path: polygon(
    var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
  box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.75);
}
.btn--primary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #d6dde1 40%, #aab2b8 62%, #e6eaec 100%);
  box-shadow: 0 14px 40px rgba(143,184,212,.28), inset 0 1px 0 rgba(255,255,255,.9);
  transform: translateY(-2px);
}

.btn--blue {
  color: #05080b;
  background: linear-gradient(180deg, #a3c8e0 0%, #7ba6c4 46%, #5d87a4 100%);
  clip-path: polygon(
    var(--chamfer) 0, 100% 0, 100% calc(100% - var(--chamfer)),
    calc(100% - var(--chamfer)) 100%, 0 100%, 0 var(--chamfer));
  box-shadow: 0 10px 30px rgba(102,143,171,.3), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn--blue:hover {
  background: linear-gradient(180deg, #bcdaee 0%, #8fb8d4 46%, #6b93b0 100%);
  box-shadow: 0 14px 42px rgba(143,184,212,.42), inset 0 1px 0 rgba(255,255,255,.65);
  transform: translateY(-2px);
}

/* Radius, not a pill. A 999px pill next to a 13px chamfer is the maximum
   possible shape delta and reads as two design systems in one row. */
.btn--ghost {
  color: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: var(--line-3);
  transform: translateY(-2px);
}

.btn--sm { padding: 10px 18px; font-size: .875rem; --chamfer: 10px; }
.btn--lg { padding: 18px 34px; font-size: 1.02rem; --chamfer: 15px; }
.btn--block { width: 100%; }

.lane-light .btn--ghost {
  color: var(--on-paper);
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.16);
}
.lane-light .btn--ghost:hover { background: rgba(0,0,0,.06); border-color: rgba(0,0,0,.28); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ---------- Cards ------------------------------------------------------- */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: border-color .28s var(--ease), transform .28s var(--ease),
              background .28s var(--ease), box-shadow .28s var(--ease);
}
.card:hover {
  border-color: var(--line-2);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  margin-bottom: 20px;
  background: linear-gradient(160deg, rgba(143,184,212,.22), rgba(102,143,171,.06));
  border: 1px solid rgba(143,184,212,.24);
  color: var(--blue-lift);
}
.card__icon svg { width: 21px; height: 21px; }
.card h3 { margin-bottom: 9px; }
.card p { color: var(--text-2); font-size: .95rem; line-height: 1.6; }

/* ---------- Panel: the crafted product surface -------------------------- */
.panel {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(180deg, #1c1e20, #131516);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.panel__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border-bottom: 1px solid var(--line);
}
.panel__dots { display: flex; gap: 6px; }
.panel__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.16); }
.panel__title {
  font-size: .72rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--text-3); margin-left: 6px;
}
/* Marks a panel whose contents are a designed illustration, not real data */
.panel__note {
  margin-left: auto;
  font-size: .62rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 8px;
  white-space: nowrap;
}
.panel__body { padding: 20px; }

/* ---------- Utility ----------------------------------------------------- */
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }
.glow {
  position: absolute; pointer-events: none; z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
}

/* ---------- Header ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  /* Archivo 900 at 3rem reads straight through anything lighter than this */
  background: rgba(9,10,11,.94);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-bottom-color: var(--line-2);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 84px;
}
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 54px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  padding: 9px 14px; border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--text-2);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions .login {
  font-size: .92rem; font-weight: 600; color: var(--text-2);
  padding: 9px 14px; border-radius: 999px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.header-actions .login:hover { color: var(--text); background: rgba(255,255,255,.06); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-2);
  border-radius: 12px; cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 940px) {
  .site-nav, .header-actions .login { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header__inner { height: 72px; }
  .brand img { height: 44px; }
  .header-actions { gap: 8px; }
  .header-actions .btn--sm { padding: 10px 14px; }
}
@media (max-width: 420px) {
  .brand img { height: 38px; }
  .header-actions .btn--sm { padding: 9px 12px; font-size: .82rem; }
  .header-actions .btn--sm .arrow { display: none; }
}

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(8,9,10,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  padding: 20px var(--gutter) 40px;
  opacity: 0; visibility: hidden;
  transition: opacity .28s var(--ease), visibility .28s var(--ease);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav__top { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.mobile-nav__top img { height: 36px; width: auto; }
.mobile-nav__links { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.mobile-nav__links a {
  font-family: var(--f-display);
  font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.mobile-nav__cta { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-top: 32px; }

/* ---------- Footer ------------------------------------------------------ */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--line);
  padding-block: clamp(52px, 6vw, 76px) 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 44px 32px;
  padding-bottom: 44px;
}
.footer-brand img { height: 54px; width: auto; margin-bottom: 18px; }
.footer-brand p { color: var(--text-3); font-size: .9rem; max-width: 34ch; }
.footer-col h4 {
  font-family: var(--f-body);
  font-size: .72rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: .92rem; color: var(--text-2); transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--blue-lift); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding-top: 26px; border-top: 1px solid var(--line);
  font-size: .84rem; color: var(--text-3);
}
/* On the legal pages the footer is only this bar, so the rule would float in
   empty space above the copyright line. */
.footer-bottom:first-child { padding-top: 0; border-top: 0; }
.footer-bottom nav { display: flex; gap: 22px; }
.footer-bottom a:hover { color: var(--blue-lift); }

@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Legal pages (terms / privacy) ------------------------------- */
.legal-hero { padding-block: clamp(56px, 7vw, 96px) clamp(28px, 3vw, 40px); }
.legal-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); margin-bottom: 14px; }
.legal-hero .meta { color: var(--text-3); font-size: .92rem; }

.legal-body { padding-bottom: clamp(72px, 9vw, 120px); }
.legal-body h2 {
  font-size: clamp(1.25rem, 1.9vw, 1.6rem);
  margin: 52px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body h3 { font-size: 1.06rem; margin: 30px 0 10px; color: var(--text); }
.legal-body p, .legal-body li { color: var(--text-2); font-size: 1rem; line-height: 1.72; }
.legal-body ul { padding-left: 22px; margin: 0 0 1.05em; }
.legal-body li { margin-bottom: 8px; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-body a { color: var(--blue-lift); text-decoration: underline; text-underline-offset: 3px; }

.legal-callout {
  border: 1px solid rgba(143,184,212,.3);
  background: linear-gradient(160deg, rgba(102,143,171,.14), rgba(102,143,171,.04));
  border-radius: var(--r);
  padding: 20px 22px;
  margin: 0 0 32px;
}
.legal-callout p { color: var(--text); font-size: .95rem; margin: 0; }

.legal-table-wrap { overflow-x: auto; margin: 0 0 28px; -webkit-overflow-scrolling: touch; }
.legal-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .93rem; }
.legal-table th, .legal-table td {
  text-align: left; vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2); line-height: 1.6;
}
.legal-table th {
  color: var(--text); font-weight: 700;
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255,255,255,.035);
  border-bottom-color: var(--line-2);
}
.legal-table td:first-child { color: var(--text); font-weight: 600; width: 32%; }

/* On a phone a 560px-wide table means clipped text and sideways scrolling for
   every row. Restack each row as a labelled card instead. */
@media (max-width: 760px) {
  /* Scoped: a wrapper holding some other table still needs its scroller */
  .legal-table-wrap:has(> .legal-table) { overflow-x: visible; }
  .legal-table { min-width: 0; display: block; }
  .legal-table thead { display: none; }
  .legal-table tbody, .legal-table tr, .legal-table td { display: block; width: 100%; }
  .legal-table tr {
    border: 1px solid var(--line); border-radius: var(--r);
    background: rgba(255,255,255,.025);
    padding: 6px 2px; margin-bottom: 12px;
  }
  .legal-table td { border-bottom: 0; padding: 8px 16px; }
  .legal-table td:first-child {
    width: auto; padding-bottom: 2px;
    font-size: .74rem; letter-spacing: .1em; text-transform: uppercase;
    color: var(--blue-lift);
  }
}

/* ---------- Legal page layout + section index --------------------------- */
.legal-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.legal-layout > .legal-main { min-width: 0; max-width: 74ch; }

.legal-toc { position: sticky; top: 104px; }
.legal-toc__label {
  font-size: .68rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 14px; padding-left: 13px;
}
.legal-toc ol { list-style: none; margin: 0; padding: 0; max-height: calc(100vh - 190px); overflow-y: auto; }
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: block; padding: 7px 13px; text-decoration: none;
  font-size: .84rem; line-height: 1.4; color: var(--text-3);
  border-left: 2px solid var(--line);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.legal-toc a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.legal-toc a.is-current {
  color: var(--blue-lift); border-left-color: var(--blue-lift);
  background: rgba(143,184,212,.07);
}

/* Mobile: a collapsed "jump to" instead of a sidebar */
.legal-toc--mobile { display: none; margin-bottom: 34px; }
.legal-toc--mobile summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: rgba(255,255,255,.035);
  font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text);
}
.legal-toc--mobile summary::-webkit-details-marker { display: none; }
.legal-toc--mobile summary svg { width: 16px; height: 16px; color: var(--blue-lift); transition: transform .25s var(--ease); }
.legal-toc--mobile[open] summary svg { transform: rotate(180deg); }
.legal-toc--mobile ol {
  list-style: none; margin: 8px 0 0; padding: 8px 0;
  border: 1px solid var(--line); border-radius: var(--r);
  background: rgba(255,255,255,.02);
}
.legal-toc--mobile a { display: block; padding: 10px 18px; font-size: .9rem; color: var(--text-2); text-decoration: none; }
.legal-toc--mobile a:hover { color: var(--blue-lift); }

@media (max-width: 1040px) {
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .legal-toc--desktop { display: none; }
  .legal-toc--mobile { display: block; }
  .legal-layout > .legal-main { max-width: none; }
}

/* Back to top — only earns its place on a very long document */
.to-top {
  position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(23,25,26,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); color: var(--text);
  cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s var(--ease), visibility .25s var(--ease),
              transform .25s var(--ease), border-color .2s var(--ease);
}
.to-top.is-on { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--blue-lift); color: var(--blue-lift); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- Motion ------------------------------------------------------
   Reveals are CSS-owned on purpose. Content must never depend on a JS
   animation frame to become visible — a throttled tab, a blocked script or a
   dead CDN would otherwise leave the page blank. JS only adds `.is-in`.
   ------------------------------------------------------------------------ */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity .72s var(--ease), transform .72s var(--ease);
}
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(22px); }
.js .reveal.is-in { transition-delay: var(--d, 0ms); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
