/* HouseBee website styles
   Layout: a warm household ledger. Cream ground and espresso type taken from the app's own tokens
   (artifacts/homeapp/constants/colors.ts), the app's dark screens as the evidence, sage only for status.
   Fonts are self-hosted (SIL Open Font License, see assets/fonts). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* App palette, light (matches the app's light tokens) */
  --bg: #F5F0E8;
  --surface: #FFFCF7;
  --surface-2: #EAE1D5;
  --surface-3: #EEE7DE;
  --fg: #35261D;
  --fg-strong: #3D2B1F;
  --muted: #6F6359;
  --line: #E4DBD0;
  --input: #D8CEC2;
  --primary: #3D2B1F;
  --on-primary: #FFFDF8;
  --sage: #D7E3D3;
  --on-sage: #334D38;
  --alert: #A84D3F;
  --band: #3D2B1F;
  --on-band: #F5F0E8;
  --band-muted: #CDBFAF;
  --band-line: rgba(245, 240, 232, 0.16);
  --band-pill: rgba(245, 240, 232, 0.10);
  --bezel: #17120F;
  --shadow: 0 30px 60px -28px rgba(61, 43, 31, 0.45), 0 12px 24px -16px rgba(61, 43, 31, 0.30);
  --header-bg: rgba(245, 240, 232, 0.86);

  --font-display: "Bricolage Grotesque", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 20px;
  --radius-lg: 32px;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #211B17;
    --surface: #2C241E;
    --surface-2: #40352D;
    --surface-3: #39312B;
    --fg: #F6EFE6;
    --fg-strong: #F6EFE6;
    --muted: #B9AA9B;
    --line: #4A3E35;
    --input: #55473D;
    --primary: #E8D4BE;
    --on-primary: #30241C;
    --sage: #39483A;
    --on-sage: #DDE8D9;
    --alert: #D27A6A;
    --band: #2C241E;
    --on-band: #F6EFE6;
    --band-muted: #B9AA9B;
    --band-line: rgba(246, 239, 230, 0.14);
    --band-pill: rgba(246, 239, 230, 0.08);
    --bezel: #0E0B09;
    --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7), 0 12px 24px -16px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(33, 27, 23, 0.86);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #211B17;
  --surface: #2C241E;
  --surface-2: #40352D;
  --surface-3: #39312B;
  --fg: #F6EFE6;
  --fg-strong: #F6EFE6;
  --muted: #B9AA9B;
  --line: #4A3E35;
  --input: #55473D;
  --primary: #E8D4BE;
  --on-primary: #30241C;
  --sage: #39483A;
  --on-sage: #DDE8D9;
  --alert: #D27A6A;
  --band: #2C241E;
  --on-band: #F6EFE6;
  --band-muted: #B9AA9B;
  --band-line: rgba(246, 239, 230, 0.14);
  --band-pill: rgba(246, 239, 230, 0.08);
  --bezel: #0E0B09;
  --shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.7), 0 12px 24px -16px rgba(0, 0, 0, 0.5);
  --header-bg: rgba(33, 27, 23, 0.86);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); color: var(--fg-strong); margin: 0; text-wrap: balance; font-optical-sizing: auto; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--primary); color: var(--on-primary); padding: 10px 14px; border-radius: 10px; z-index: 50; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede { color: var(--muted); font-size: 1.125rem; max-width: 60ch; }

/* ---------- Brand mark ---------- */
.mark {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--primary); color: var(--on-primary);
  flex: none;
}
.mark .icon { width: 19px; height: 19px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--fg-strong); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--muted); }
.nav a:hover { color: var(--fg-strong); }
@media (max-width: 820px) { .nav .nav-link { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 14px;
  font: 600 0.95rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-quiet { background: transparent; color: var(--fg-strong); border-color: var(--input); }
.nav .btn { color: var(--on-primary); }

/* Store buttons: brand-coloured, generic icon. Official store badges can replace these (see README). */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  position: relative;
  display: inline-flex; align-items: center; gap: 12px;
  min-width: 212px; min-height: 60px; padding: 10px 18px 10px 14px;
  border-radius: 16px; text-decoration: none;
  background: var(--primary); color: var(--on-primary);
  border: 1px solid var(--primary);
  transition: transform .15s ease, box-shadow .15s ease;
}
.store .icon { width: 28px; height: 28px; stroke-width: 1.6; }
.store-text { display: grid; line-height: 1.15; }
.store-text small { font-size: 0.75rem; font-weight: 500; opacity: .82; }
.store-text strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
.store.is-alt { background: transparent; color: var(--fg-strong); border-color: var(--input); }
.store:not(.is-soon):hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.store.is-soon { cursor: default; }
.store-note { margin-top: 14px; font-size: 0.875rem; color: var(--muted); }
.store-note .match { font-weight: 600; color: var(--fg); }

/* ---------- Phone frame ---------- */
.phone {
  background: var(--bezel);
  padding: clamp(5px, 1.3vw, 9px);
  border-radius: clamp(26px, 6vw, 46px);
  box-shadow: var(--shadow);
}
.phone picture { display: block; }
.phone img { width: 100%; height: auto; border-radius: clamp(21px, 5vw, 38px); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
  padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 104px);
}
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.hero .lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }
.hero-visual {
  position: relative;
  width: 100%; max-width: 520px; margin-inline: auto;
  aspect-ratio: 10 / 11.4;
}
.hero-tile {
  position: absolute; left: 0; right: 7%; top: 15%; bottom: 0;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  overflow: hidden;
}
.hero-tile::after {
  /* honeycomb hint: a faint hex grid, only in the tile */
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0l28 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='%23000' stroke-opacity='.06' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: 56px 97px;
}
.hero-visual .phone { position: absolute; }
.hero-visual .phone.back { width: 43%; left: 5%; top: 9%; transform: rotate(-3.5deg); }
.hero-visual .phone.front { width: 48%; left: 44%; top: 1%; }
.hero-chip {
  position: absolute; left: 30%; bottom: 7%;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px 10px 10px; border-radius: 16px;
  background: var(--surface); color: var(--fg);
  box-shadow: var(--shadow); border: 1px solid var(--line);
  font-size: 0.875rem; line-height: 1.25;
  max-width: 64%;
}
.hero-chip .dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--sage); color: var(--on-sage); flex: none; }
.hero-chip .dot .icon { width: 17px; height: 17px; }
.hero-chip strong { display: block; font-weight: 600; color: var(--fg-strong); }
.hero-chip span { color: var(--muted); font-size: 0.8125rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-visual .phone.front { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero-visual .phone.back { animation: rise-tilt 1s .08s cubic-bezier(.2,.7,.2,1) both; }
  .hero-chip { animation: rise .9s .25s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
  @keyframes rise-tilt { from { transform: translateY(24px) rotate(-3.5deg); } to { transform: rotate(-3.5deg); } }
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-visual { max-width: 460px; }
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.section-head h2 { font-size: clamp(1.95rem, 3.8vw, 3rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 680; }
.section-head-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head-row .section-head { margin-bottom: 0; }

/* Roles */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.role {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start;
  padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.role-icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--fg-strong); }
.role-icon .icon { width: 21px; height: 21px; }
.role h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.3; padding-top: 2px; }
.role p { color: var(--muted); font-size: 0.97rem; line-height: 1.55; }
.role-tag { display: inline-block; margin-left: 6px; font-family: var(--font-body); font-size: 0.6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); vertical-align: 2px; }
@media (max-width: 960px) { .roles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .roles { grid-template-columns: 1fr; } }

/* Flow band */
.band { background: var(--band); color: var(--on-band); }
.band h2, .band h3 { color: var(--on-band); }
.band .eyebrow, .band .lede { color: var(--band-muted); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: step; }
.flow li { position: relative; display: grid; gap: 12px; align-content: start; padding: 0 22px 0 0; }
.flow li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  font: 700 1rem/1 var(--font-display);
  background: var(--on-band); color: var(--band);
  position: relative; z-index: 1;
}
.flow li::after { content: ""; position: absolute; left: 40px; right: 0; top: 20px; height: 1px; background: var(--band-line); }
.flow li:last-child::after { display: none; }
.flow h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; margin-top: 8px; }
.flow p { color: var(--band-muted); font-size: 0.95rem; line-height: 1.55; }
.pill { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.band .pill { background: var(--band-pill); color: var(--on-band); border: 1px solid var(--band-line); }
.band .pill.ok { background: var(--sage); color: var(--on-sage); border-color: transparent; }
.flow-note { margin-top: clamp(36px, 5vw, 56px); padding-top: 20px; border-top: 1px solid var(--band-line); color: var(--band-muted); font-size: 0.95rem; max-width: 72ch; }
.flow-note strong { color: var(--on-band); font-weight: 600; }
@media (max-width: 980px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow li { grid-template-columns: 40px 1fr; column-gap: 18px; padding: 0; }
  .flow li > * { grid-column: 2; }
  .flow li::before { grid-row: 1 / span 3; grid-column: 1; }
  .flow li::after { left: 20px; right: auto; top: 46px; bottom: -24px; width: 1px; height: auto; }
  .flow h3 { margin-top: 0; }
}

/* Features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 4vw, 48px); row-gap: 40px; }
.feature { display: grid; gap: 10px; align-content: start; padding-top: 22px; border-top: 1px solid var(--input); min-width: 0; }
.feature .icon { width: 24px; height: 24px; color: var(--fg-strong); stroke-width: 1.8; }
.feature h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }
.feature p { color: var(--muted); font-size: 0.97rem; line-height: 1.6; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; row-gap: 28px; } }

/* Screens carousel */
.screens-section { background: var(--surface-3); }
.carousel-controls { display: flex; gap: 10px; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); color: var(--fg-strong); border: 1px solid var(--line); cursor: pointer;
}
.icon-btn:hover { border-color: var(--input); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.screens {
  list-style: none; margin: 0; padding: 4px 4px 24px;
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(208px, 22vw, 252px);
  gap: clamp(18px, 2.4vw, 28px);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--input) transparent;
}
.screens li { scroll-snap-align: start; display: grid; gap: 16px; align-content: start; min-width: 0; }
.screens .phone { border-radius: 36px; padding: 7px; box-shadow: 0 22px 40px -26px rgba(0,0,0,.5); }
.screens .phone img { border-radius: 30px; }
.screens h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.screens p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin-top: 4px; }
.screens-foot { font-size: 0.8125rem; color: var(--muted); margin-top: 6px; }

/* Privacy */
.privacy-panel {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 64px);
  padding: clamp(28px, 5vw, 56px); border-radius: var(--radius-lg);
  background: var(--sage); color: var(--on-sage);
}
.privacy-panel h2 { color: var(--on-sage); font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.06; letter-spacing: -0.03em; font-weight: 680; }
.privacy-panel .eyebrow { color: var(--on-sage); opacity: .8; }
.privacy-intro { display: grid; gap: 16px; align-content: start; }
.privacy-intro a { font-weight: 600; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 6px; }
.privacy-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.privacy-points li { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.privacy-points .icon { grid-row: span 2; width: 22px; height: 22px; margin-top: 3px; }
.privacy-points strong { font-weight: 650; font-size: 1.05rem; }
.privacy-points p { font-size: 0.97rem; line-height: 1.55; opacity: .92; }
@media (max-width: 820px) { .privacy-panel { grid-template-columns: 1fr; } }

/* Download CTA */
.cta {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px 28px; align-items: start;
  padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--line);
}
.cta .mark { width: 72px; height: 72px; border-radius: 20px; }
.cta .mark .icon { width: 36px; height: 36px; }
.cta h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 680; }
.cta p { color: var(--muted); margin-top: 8px; }
.cta-body { display: grid; gap: 22px; min-width: 0; }
@media (max-width: 640px) { .cta { grid-template-columns: 1fr; } }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 18px; min-width: 0; }
.email-card {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.email-card .icon { color: var(--fg-strong); }
.email-card a { font-weight: 600; color: var(--fg-strong); text-underline-offset: 3px; overflow-wrap: anywhere; }
.copy-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--input); background: transparent; color: var(--fg); font: 500 0.8125rem/1 var(--font-body); cursor: pointer; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--muted); font-size: 0.97rem; }
.contact-list li { display: flex; gap: 10px; }
.contact-list .icon { width: 18px; height: 18px; margin-top: 4px; color: var(--fg-strong); }
.contact-list a { color: var(--fg-strong); font-weight: 600; text-underline-offset: 3px; }

.form { display: grid; gap: 16px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 0.8125rem; font-weight: 600; color: var(--fg); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--input); background: var(--bg); color: var(--fg);
  font: 400 1rem/1.4 var(--font-body);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
.field .error { font-size: 0.8125rem; color: var(--alert); }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-hint { font-size: 0.8125rem; color: var(--muted); flex: 1 1 220px; }
.form-status { font-size: 0.875rem; color: var(--on-sage); background: var(--sage); padding: 10px 14px; border-radius: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 48px; }
.footer-row { display: flex; justify-content: space-between; align-items: start; gap: 28px; flex-wrap: wrap; }
.footer-tag { color: var(--muted); font-size: 0.95rem; margin-top: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; margin: 0; padding: 0; }
.footer-links a { text-decoration: none; color: var(--fg); font-size: 0.95rem; font-weight: 500; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer-meta { margin-top: 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 0.8125rem; }

/* ---------- Legal pages ---------- */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding-block: clamp(40px, 6vw, 80px) clamp(64px, 8vw, 112px); align-items: start; }
.legal-head { grid-column: 1 / -1; display: grid; gap: 14px; max-width: 760px; }
.legal-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.035em; font-weight: 700; }
.legal-meta { color: var(--muted); font-size: 0.9rem; }
.toc { position: sticky; top: 92px; display: grid; gap: 4px; font-size: 0.9rem; }
.toc p { font-size: 0.75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.toc a { text-decoration: none; color: var(--muted); padding: 5px 0 5px 12px; border-left: 2px solid var(--line); line-height: 1.35; }
.toc a:hover { color: var(--fg-strong); border-left-color: var(--fg-strong); }
.prose { max-width: 70ch; min-width: 0; }
.prose h2 { font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 660; margin: 48px 0 14px; scroll-margin-top: 92px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; font-weight: 650; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--fg); }
.prose p + p, .prose ol + p, .prose ul + p { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 12px 0 0; display: grid; gap: 8px; }
.prose a { color: var(--fg-strong); font-weight: 600; text-underline-offset: 3px; }
.prose strong { font-weight: 650; color: var(--fg-strong); }
.summary {
  padding: 22px 24px; border-radius: var(--radius); background: var(--sage); color: var(--on-sage); margin-bottom: 40px;
}
.summary h2 { color: var(--on-sage); margin: 0 0 10px; font-size: 1.15rem; }
.summary ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.summary li { color: var(--on-sage); }
.table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; }
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--surface-2); font-weight: 600; color: var(--fg-strong); }
.table-wrap tr:last-child td { border-bottom: 0; }
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li { position: relative; padding-left: 44px; min-height: 30px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); font: 700 0.9rem/1 var(--font-display); }
.callout { margin-top: 18px; padding: 16px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
@media (max-width: 900px) {
  .legal { grid-template-columns: 1fr; }
  .toc { position: static; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface); }
}

/* 404 */
.notfound { padding-block: clamp(64px, 12vw, 160px); display: grid; gap: 18px; max-width: 640px; }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.035em; line-height: 1; }
