/* Kose legal/help pages — shared typography + chrome.
   Brand tokens match marketing/styles.css; body content inherits Inter Tight + Instrument Serif italic. */
:root {
  --ink:        #0B0F0D;
  --ink-2:      #12171A;
  --ink-soft:   #2A302D;
  --emerald:    #0FA958;
  --emerald-2:  #10B981;
  --emerald-soft: rgba(15,169,88,0.10);
  --gold:       #C9A55A;
  --cream:      #F6F2EA;
  --paper:      #FAFAF7;
  --line:       #E5E7EB;
  --line-2:     rgba(11,15,13,0.10);
  --muted:      #6B6963;
  --muted-2:    #4A4945;
  --warning-bg: #FFF8E1;
  --warning-border: #F6C75B;
  --critical-bg: #FFF1F0;
  --critical-border: #F2A6A0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01","cv11";
  background: #fff;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ====== HEADER (matches marketing nav) ====== */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.page-nav.is-scrolled {
  border-bottom-color: rgba(11,15,13,0.06);
  box-shadow: 0 1px 0 rgba(11,15,13,0.04);
}
.page-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
@media (min-width: 900px) { .page-nav-inner { padding: 0 40px; } }
.page-nav-logo { display: flex; align-items: center; }
.page-nav-logo img { height: 34px; width: auto; }
.page-nav-cta {
  display: flex; align-items: center; gap: 12px;
}
.page-nav-cta .btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.page-nav-cta .btn-primary {
  background: var(--emerald);
  color: #fff;
}
.page-nav-cta .btn-primary:hover { background: var(--emerald-2); }
.page-nav-cta .btn-back {
  color: var(--ink);
  border: 1px solid rgba(11,15,13,0.16);
  background: transparent;
}
.page-nav-cta .btn-back:hover { background: rgba(11,15,13,0.04); border-color: rgba(11,15,13,0.32); }
@media (max-width: 520px) {
  .page-nav-cta .btn-back { display: none; }
}

/* ====== HERO ====== */
.page-hero {
  padding: 64px 0 36px;
  border-bottom: 1px solid var(--line-2);
}
@media (min-width: 760px) { .page-hero { padding: 96px 0 48px; } }
.page-hero-inner, .page-content, .page-footer-inner {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (min-width: 900px) { .page-hero-inner, .page-content, .page-footer-inner { padding: 0 40px; } }
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--muted); display: inline-block; }
.page-hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
  margin: 18px 0 0;
  color: var(--ink);
  text-wrap: balance;
}
.page-hero h1 em, .page-hero h1 .serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald);
  letter-spacing: -0.01em;
}
.page-subtitle, .hero-meta {
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted-2);
  max-width: 60ch;
}

/* ====== CONTENT ====== */
.page-main { padding-bottom: 96px; }
.page-content {
  padding-top: 48px;
  padding-bottom: 48px;
}
.content { /* legacy class — preserved for inherited markup */
  max-width: 768px;
  margin: 0 auto;
  padding: 48px 24px;
}
@media (min-width: 900px) { .content { padding: 56px 40px; } }

/* Sections (legacy markup uses .content section) */
.content section, .page-content section {
  margin-bottom: 56px;
  padding-top: 8px;
}
.content section:first-of-type, .page-content section:first-of-type { padding-top: 0; }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
}
.section-num {
  font-family: "Inter Tight", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--emerald);
}
.section-title {
  font-family: "Inter Tight", sans-serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.15;
  margin: 0;
}

.content h2, .page-content h2 {
  font-family: "Inter Tight", sans-serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 48px 0 16px;
  line-height: 1.15;
}
.content h3, .page-content h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--emerald);
  margin: 28px 0 10px;
}
.content h4, .page-content h4 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 20px 0 8px;
}
.content p, .page-content p {
  color: var(--ink-soft);
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.65;
}
.content ul, .content ol, .page-content ul, .page-content ol {
  margin: 8px 0 18px;
  padding-left: 0;
  list-style: none;
}
.content li, .page-content li {
  position: relative;
  padding: 10px 0 10px 24px;
  border-bottom: 1px solid rgba(11,15,13,0.06);
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
}
.content li:last-child, .page-content li:last-child { border-bottom: 0; }
.content li::before, .page-content li::before {
  content: "";
  position: absolute;
  left: 4px; top: 18px;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--emerald);
}
.content a, .page-content a {
  color: var(--emerald);
  font-weight: 500;
  border-bottom: 1px solid currentColor;
}
.content a:hover, .page-content a:hover { color: var(--ink); }
.content strong, .page-content strong { color: var(--ink); font-weight: 600; }

/* ====== CALLOUT BOXES ====== */
.box {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 14px;
  margin: 22px 0;
  font-size: 15px;
  line-height: 1.55;
}
.box-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1;
}
.box strong { color: inherit; font-weight: 700; }
.box a { color: inherit; font-weight: 600; }
.box-info {
  background: var(--emerald-soft);
  border: 1px solid rgba(15,169,88,0.20);
  color: #065F46;
}
.box-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #6B4500;
}
.box-critical {
  background: var(--critical-bg);
  border: 1px solid var(--critical-border);
  color: #7B0000;
}

/* ====== CONTACT GRID + CARDS ====== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 22px 0;
}
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }
.contact-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.contact-card:hover { border-color: rgba(15,169,88,0.32); }
.contact-card .label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-card .value, .contact-card .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.contact-card .country {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.contact-card a {
  color: var(--emerald);
  border: 0;
  font-weight: 500;
}
.contact-card p {
  margin: 4px 0 0;
  font-size: 14px;
}

/* Authority list (gov contacts in Privacy/Terms) */
.authority-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 16px 0;
}
@media (min-width: 700px) { .authority-list { grid-template-columns: repeat(2, 1fr); } }
.authority-card {
  background: var(--cream);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 16px 18px;
}

/* ====== TOC (kept light if pages render one) ====== */
.toc {
  position: sticky; top: 88px;
  padding: 24px 0;
  font-size: 13.5px;
}
.toc-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.toc ol { list-style: none; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 0; }
.toc a {
  display: block;
  padding: 7px 10px;
  color: var(--muted-2);
  border-radius: 8px;
  transition: background .15s ease, color .15s ease, padding-left .2s ease;
  border: 0;
}
.toc a::before {
  content: counter(toc, decimal-leading-zero) " · ";
  font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-right: 4px;
}
.toc a:hover { color: var(--ink); background: var(--emerald-soft); padding-left: 14px; }

/* If a page wraps content + toc in a grid, still works */
.page-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
@media (min-width: 980px) {
  .page-shell { grid-template-columns: 220px 1fr; gap: 56px; padding: 40px 40px 120px; }
}

/* Tables (privacy uses a few) */
.content table, .page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14.5px;
}
.content th, .content td, .page-content th, .page-content td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-2);
}
.content th, .page-content th {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--cream);
}

/* ====== FOOTER (matches marketing footer) ====== */
.page-footer {
  background: #050807;
  color: rgba(255,255,255,0.65);
  padding: 56px 0 36px;
  margin-top: 64px;
  font-size: 14.5px;
}
.page-footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 720px) {
  .page-footer-inner { grid-template-columns: 1fr auto; gap: 40px; }
}
.page-footer-brand img { height: 32px; width: auto; margin-bottom: 14px; }
.page-footer-tag {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-size: 20px;
  color: #fff;
  margin: 0 0 8px;
}
.page-footer p { margin: 0 0 6px; max-width: 36ch; line-height: 1.55; }
.page-footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.page-footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  transition: color .15s ease;
  border: 0;
}
.page-footer-links a:hover { color: #fff; }
.page-footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
}

/* ====== Accessibility ====== */
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ====== CONTACT FORM ====== */
.contact-form {
  margin: 24px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 640px) {
  .form-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(11,15,13,0.35); }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(15,169,88,0.14);
}
.form-error {
  font-size: 12.5px;
  color: #B42318;
  margin-top: 2px;
}
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}
.form-note {
  font-size: 13px;
  color: var(--muted);
}
.btn-submit {
  background: var(--emerald);
  color: #fff;
  border: 0;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: -0.005em;
  transition: background .15s ease, transform .12s ease;
}
.btn-submit:hover  { background: var(--emerald-2); }
.btn-submit:active { transform: translateY(1px); }

/* ====== LEGACY ALIASES — old blade pages use .hero/.hero-tag/.page-wrap/.hero-meta ====== */
/* New chrome uses .page-hero/.page-eyebrow/.page-shell — these aliases keep the old blade pages styled. */

.hero {
  padding: 64px 24px 36px;
  border-bottom: 1px solid var(--line-2);
  max-width: 768px;
  margin: 0 auto;
}
@media (min-width: 760px) { .hero { padding: 96px 40px 48px; } }
.hero h1 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.0;
  margin: 18px 0 0;
  color: var(--ink);
  text-wrap: balance;
}
.hero h1 em, .hero h1 .serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald);
  letter-spacing: -0.01em;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-tag::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--muted);
  display: inline-block;
}
.hero-meta {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  max-width: none;
}
.hero-meta .dot {
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--muted);
  display: inline-block;
  flex-shrink: 0;
}

/* Two-column page layout (TOC + content) for the legacy pages */
.page-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
@media (min-width: 980px) {
  .page-wrap {
    grid-template-columns: 220px 1fr;
    gap: 56px;
    padding: 40px 40px 120px;
  }
}

/* Make sure section-num inside section-header (legacy markup uses div) renders consistently */
.section-header > div.section-num,
.section-header > span.section-num { color: var(--emerald); }

/* ====== CONTACT PAGE — defensive overrides so labels stack regardless of UA quirks ====== */
form.contact-form .form-field {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px;
  width: 100%;
}
form.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  form.contact-form .form-row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   MARKETING SHELL BRIDGE
   Legal/static pages now use the marketing nav + footer (ported
   from React). Marketing styles.css is loaded BEFORE legal.css,
   so these overrides keep the legal-page body white-on-ink-text
   while letting the nav/footer classes pull from styles.css.
   ============================================================ */

/* Restore white body for legal pages (styles.css sets body to ink/dark). */
body { background: #fff !important; color: var(--ink) !important; }

/* Hide the old in-page chrome wherever the new shell is also present, so
   any blade that still has the legacy markup doesn't double up. */
.page-nav { display: none; }

/* Page hero + content stay narrow for legibility, but sit inside the
   marketing-width body. Keep the existing typography. */
.page-hero-inner,
.page-content,
.page-footer-inner {
  max-width: 768px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 900px) {
  .page-hero-inner,
  .page-content { padding-left: 40px; padding-right: 40px; }
}

/* The marketing footer ships its own black background. Hide the legacy
   .page-footer when both happen to be present in the DOM. */
.page-footer { display: none; }

/* Marketing's body font color is white (#F4F5F3). On the white legal-page
   body, the section content needs to be ink-coloured. styles.css colors
   are reset by legal.css's content rules below, but headings on
   .page-content sometimes inherit white — force ink. */
.page-content,
.page-content p,
.page-content li,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content .section-title { color: inherit; }
.page-content { color: var(--ink); }
.page-content p, .page-content li { color: var(--ink-soft); }

/* ============================================================
   REFINEMENT PASS — homepage-parity for static pages
   Pulls page hero, body type, section rhythm in line with /releases.
   ============================================================ */

/* Dark hero strip — same pattern as /releases */
.page-hero {
  background: var(--ink);
  color: #fff;
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
@media (min-width: 900px) { .page-hero { padding: 128px 0 80px; } }
.page-hero .container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 900px) { .page-hero .container { padding: 0 40px; } }
.page-hero .page-hero-inner { max-width: none; padding: 0; }
.page-hero h1 {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 18px 0 0;
  color: #fff;
  text-wrap: balance;
  max-width: 18ch;
}
.page-hero h1 em,
.page-hero h1 .serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald-2, #10B981);
  letter-spacing: -0.01em;
}
.page-hero .page-eyebrow,
.page-hero .eyebrow {
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: none;
  padding: 0;
}
.page-hero .page-eyebrow::before { display: none; }
.page-hero .page-subtitle,
.page-hero .hero-meta {
  color: rgba(255,255,255,0.65);
  margin-top: 22px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  max-width: 56ch;
}
.page-hero .hero-meta .dot { background: rgba(255,255,255,0.4); }

/* Status pill in hero — used on /support, /contact */
.page-hero .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16,185,129,0.14);
  color: var(--emerald-2, #10B981);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid rgba(16,185,129,0.30);
}
.page-hero .status-pill::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--emerald-2, #10B981);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.18);
  animation: kose-pulse 1.8s ease-in-out infinite;
}
@keyframes kose-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16,185,129,0.20); }
  50%      { box-shadow: 0 0 0 7px rgba(16,185,129,0.04); }
}

/* Body type — sync with homepage tone */
.content p, .page-content p,
.content li, .page-content li {
  color: #4A4945;
}

/* Section rhythm — bump padding to match marketing sections */
.content section, .page-content section {
  margin-bottom: 80px;
}
@media (min-width: 900px) {
  .content section, .page-content section { margin-bottom: 96px; }
}
.section-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
}

/* AppCTA pattern — for download CTAs on /support, /releases closer block, /refer */
.btn-app-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
  border: 1px solid var(--ink);
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
  text-decoration: none;
}
.btn-app-cta:hover { background: #1A2024; transform: translateY(-1px); }
.btn-app-cta .icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.10);
}
.btn-app-cta .icons svg { display: block; }
.btn-app-cta.outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(11,15,13,0.18);
}
.btn-app-cta.outline:hover { background: rgba(11,15,13,0.04); border-color: rgba(11,15,13,0.32); }
.btn-app-cta.outline .icons { background: rgba(11,15,13,0.06); color: var(--ink); }

/* Sticky table-of-contents — used on /terms, /privacy-policy */
.page-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 96px;
}
@media (min-width: 980px) {
  .page-shell { grid-template-columns: 240px 1fr; gap: 56px; padding: 48px 40px 128px; }
}
.page-shell .toc {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 13.5px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding: 4px 0;
}
.page-shell .toc-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.page-shell .toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.page-shell .toc li { counter-increment: toc; }
.page-shell .toc a {
  display: block;
  padding: 7px 10px;
  color: #4A4945;
  border-radius: 8px;
  border: 0;
  transition: background .15s ease, color .15s ease, padding-left .2s ease;
  text-decoration: none;
}
.page-shell .toc a::before {
  content: counter(toc, decimal-leading-zero) " · ";
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-right: 4px;
  font-weight: 500;
}
.page-shell .toc a:hover {
  color: var(--ink);
  background: rgba(16,185,129,0.08);
  padding-left: 14px;
}
.page-shell .toc a.is-active {
  color: var(--ink);
  background: rgba(16,185,129,0.10);
}
.page-shell .page-content {
  padding-top: 8px;
  padding-bottom: 0;
  max-width: 720px;
}

/* Hero constellation backdrop — used on /support + /contact */
.page-hero { position: relative; overflow: hidden; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, rgba(0,0,0,0.25) 75%, transparent 100%);
          mask-image: radial-gradient(ellipse at center, #000 30%, rgba(0,0,0,0.25) 75%, transparent 100%);
}
.page-hero-bg circle.city { fill: rgba(15,169,88,0.50); }
.page-hero-bg circle.city.live { fill: #10B981; }
.page-hero-bg line.route { stroke: rgba(15,169,88,0.15); stroke-width: 1; }
.page-hero-bg line.route.active {
  stroke: rgba(16,185,129,0.55); stroke-width: 1.4;
  stroke-dasharray: 10 1200;
  stroke-dashoffset: 1200;
  animation: kose-route-draw 7s ease-in-out infinite;
}
@keyframes kose-route-draw {
  0%   { stroke-dashoffset: 1200; opacity: 0; }
  10%  { opacity: 1; }
  60%  { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: -1200; opacity: 0; }
}

/* Scroll-reveal — for /releases sections + /refer cards */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   UNIFY HERO — both .page-hero (newer blades) and .hero (legacy
   terms/privacy/delete blades) get the same dark, wide treatment.
   This overrides the earlier rules that were only targeting one
   selector, and fixes the inner-container padding bug on
   /contact and /support where content was full-bleeding.
   ============================================================ */
.hero,
.page-hero {
  background: var(--ink);
  color: #fff;
  padding: 96px 24px 64px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  max-width: none;
}
@media (min-width: 900px) {
  .hero,
  .page-hero { padding: 128px 40px 80px; }
}

/* If the blade wraps content in an inner container (page-hero-inner
   on new blades, or no inner on legacy .hero blades) — center and
   cap the width. Strip the inner's own padding since the parent has it. */
.hero .container,
.page-hero .container,
.page-hero .page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  position: relative;
  z-index: 1;
}
.hero { /* legacy: h1 sits directly inside */
  /* keep content inside an implicit 1280px column */
}
.hero > * { max-width: 1280px; margin-left: auto; margin-right: auto; }

/* h1 — same scale and weight everywhere */
.hero h1,
.page-hero h1 {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 18px 0 0;
  color: #fff;
  text-wrap: balance;
  max-width: 18ch;
}
.hero h1 em,
.hero h1 .serif,
.page-hero h1 em,
.page-hero h1 .serif {
  font-family: "Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--emerald-2, #10B981);
  letter-spacing: -0.01em;
}

/* Eyebrows — same look whether the blade uses .eyebrow, .page-eyebrow, or .hero-tag */
.hero .eyebrow,
.hero .page-eyebrow,
.hero .hero-tag,
.page-hero .eyebrow,
.page-hero .page-eyebrow,
.page-hero .hero-tag {
  color: rgba(255,255,255,0.62);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: none;
  padding: 0;
  display: inline-block;
}
.hero .page-eyebrow::before,
.hero .hero-tag::before,
.page-hero .page-eyebrow::before,
.page-hero .hero-tag::before { display: none; }

/* Subtitles — including .hero-meta on legacy long-form pages */
.hero .page-subtitle,
.hero .hero-meta,
.page-hero .page-subtitle,
.page-hero .hero-meta {
  color: rgba(255,255,255,0.65);
  margin-top: 22px;
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.55;
  max-width: 56ch;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.hero .hero-meta .dot,
.page-hero .hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.40);
  display: inline-block;
  flex-shrink: 0;
}

/* Status pill — sits above the eyebrow on /contact + /support */
.hero .status-pill,
.page-hero .status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(16,185,129,0.14);
  color: var(--emerald-2, #10B981);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin-bottom: 14px;
  border: 1px solid rgba(16,185,129,0.30);
}
.hero .status-pill::before,
.page-hero .status-pill::before {
  content: "";
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--emerald-2, #10B981);
  box-shadow: 0 0 0 4px rgba(16,185,129,0.18);
  animation: kose-pulse 1.8s ease-in-out infinite;
}

/* Constellation background — only used on /contact + /support but the
   selector works on either .hero or .page-hero now */
.hero .page-hero-bg,
.page-hero .page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, rgba(0,0,0,0.25) 75%, transparent 100%);
          mask-image: radial-gradient(ellipse at center, #000 30%, rgba(0,0,0,0.25) 75%, transparent 100%);
}

/* Below the dark hero, ALL legal pages have white body content. Make sure
   .page-wrap (sticky TOC + content for terms/privacy) gets proper top padding
   so it doesn't collide with the hero's bottom border. */
.page-wrap {
  padding-top: 56px;
}
@media (min-width: 900px) { .page-wrap { padding-top: 72px; } }

/* The legacy .content sits directly inside <body> on delete-account/data — its
   top-padding got swallowed when the hero went dark. Restore. */
body > .content,
main > .content {
  padding-top: 48px;
}
@media (min-width: 900px) { body > .content, main > .content { padding-top: 64px; } }

/* ============================================================
   COLLISION FIX — .hero on the homepage takes the full viewport
   (min-height: calc(100vh - 68px)). Legal pages use the same
   .hero class for a compact dark hero strip — kill the inherited
   100vh so the body content actually shows.
   ============================================================ */
.hero,
.page-hero {
  min-height: 0 !important;
}

/* The homepage .hero also has padding: 48px 0 0 inherited from
   styles.css. Re-assert the dark-hero padding so it doesn't lose
   its bottom space and crash into the body. */
.hero,
.page-hero {
  padding: 96px 24px 64px !important;
}
@media (min-width: 900px) {
  .hero,
  .page-hero { padding: 128px 40px 80px !important; }
}

/* Reset homepage h1 rules that bleed in via styles.css */
.hero h1,
.page-hero h1 {
  font-size: clamp(40px, 5.5vw, 72px) !important;
  font-weight: 600 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.05 !important;
  margin: 18px 0 0 !important;
  max-width: 18ch;
  color: #fff !important;
}

/* The styles.css .hero > .container rule sets position+z-index — harmless,
   but the .hero > * rule I added (max-width:1280px; margin:0 auto) was over-eager
   and centred the inline SVG instead of letting it fill the .hero. Scope it
   so it only applies to NON-absolute children. */
.hero > *:not(.page-hero-bg):not(svg) {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}
.hero .page-hero-bg,
.page-hero .page-hero-bg {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

/* ============================================================
   CONTAINER UNIFICATION — both .hero and .page-hero now have
   <div class="container"> as their inner wrapper. The container
   provides the 1280px max-width + 24/40px side padding. Children
   inside flow naturally, left-aligned.
   ============================================================ */

/* Reset .hero / .page-hero outer padding to vertical-only — the .container does horizontal */
.hero,
.page-hero {
  padding: 96px 0 64px !important;
}
@media (min-width: 900px) {
  .hero,
  .page-hero { padding: 128px 0 80px !important; }
}

/* The inner .container provides the 1280px column and horizontal padding */
.hero > .container,
.page-hero > .container,
.page-hero > .page-hero-inner {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .hero > .container,
  .page-hero > .container,
  .page-hero > .page-hero-inner {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* Inside the container, children flow left — drop any inherited margin: auto */
.hero > .container > *,
.page-hero > .container > *,
.page-hero > .page-hero-inner > * {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* H1 keeps its 18ch cap for readability but stays left-aligned in the column */
.hero > .container > h1,
.page-hero > .container > h1,
.page-hero > .page-hero-inner > h1 {
  max-width: 18ch;
}

/* Subtitle / meta gets a wider line-length but still left-aligned */
.hero > .container > .hero-meta,
.hero > .container > .page-subtitle,
.page-hero > .container > .hero-meta,
.page-hero > .container > .page-subtitle,
.page-hero > .page-hero-inner > .hero-meta,
.page-hero > .page-hero-inner > .page-subtitle {
  max-width: 56ch;
  margin-top: 22px;
}

/* The constellation SVG is a sibling of .container (not inside it) so it still fills the .hero */

/* ============================================================
   FOOTER PIXEL-PARITY — ensure the marketing footer renders
   identically on legal pages by re-asserting the text colours
   that styles.css already sets, so legal.css's body { color
   !important } can't accidentally cascade in.
   ============================================================ */
.footer { color: var(--muted-2) !important; }
.footer-brand p { color: var(--muted-2) !important; }
.footer-brand .tagline { color: #fff !important; }
.footer-col h5 { color: #fff !important; }
.footer-col a { color: var(--muted-2) !important; }
.footer-col a:hover { color: #fff !important; }
.footer-bottom { color: var(--muted) !important; }
.footer-bottom .legal a { color: var(--muted-2) !important; }
.footer-bottom .legal a:hover { color: #fff !important; }
.footer-bottom .socials a { color: var(--muted-2); }
.footer-bottom .socials a:hover { color: var(--emerald-2) !important; }
.footer-address { color: var(--muted-2) !important; }
.footer-address a { color: #fff !important; }

/* Lock the wordmark behaviour — match React's inline style exactly */
.footer-brand .wordmark { display: block !important; height: 32px !important; }
