:root {
  color-scheme: light;
  --background: #ffffff;
  --surface: #f5f5f7;
  --surface-raised: #ebebef;
  --surface-pressed: #e5e5ea;
  --text: #111111;
  --secondary: #3c3c43;
  --muted: #6e6e73;
  --line: #e5e5ea;
  --line-soft: #f0f0f2;
  --accent: #111111;
  --on-accent: #ffffff;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --max-width: 1180px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-optical-sizing: auto;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--text); }
img { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
::selection { background: var(--text); color: var(--background); }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  border-radius: 12px;
  background: var(--text);
  color: var(--background);
  padding: 12px 16px;
  font-weight: 700;
  text-decoration: none;
  transition: top 180ms ease;
}
.skip-link:focus { top: 16px; }

.shell { width: min(calc(100% - 40px), var(--max-width)); margin-inline: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 10px 30px rgba(17, 17, 17, .045);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-size: 23px; font-weight: 800; letter-spacing: -.055em; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 22px; color: var(--secondary); text-decoration: none; font-size: 14px; font-weight: 600; transition: color 180ms var(--ease-out), background-color 180ms var(--ease-out), transform 180ms var(--ease-out); }
.nav-links a:hover { background: var(--surface); color: var(--text); }
.nav-links .nav-primary { background: var(--accent); color: var(--on-accent); }
.nav-links .nav-primary:hover { background: #2c2c2e; color: var(--on-accent); transform: translateY(-1px); }
.nav-links a:active, .brand:active { transform: scale(.97); transition-duration: 100ms; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
.eyebrow { margin: 0 0 16px; color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.lede { max-width: 620px; margin-bottom: 32px; color: var(--secondary); font-size: clamp(18px, 2vw, 22px); line-height: 1.55; }

.button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 1px solid transparent; border-radius: 25px; padding: 0 22px; text-decoration: none; font-size: 15px; font-weight: 700; transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out), border-color 180ms var(--ease-out); }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--accent); color: var(--on-accent); }
.button-primary:hover { background: #2c2c2e; }
.button:active { transform: scale(.97); transition-duration: 100ms; }
.button-secondary { border-color: var(--line); background: var(--surface); color: var(--text); }

.legal-page main { padding-block: 72px 110px; }
.legal-hero { max-width: 820px; padding: 40px 0 52px; }
.legal-hero h1 { margin-bottom: 20px; font-size: clamp(46px, 7vw, 78px); line-height: .98; letter-spacing: -.06em; }
.updated { color: var(--muted); font-size: 14px; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 760px); gap: clamp(36px, 8vw, 110px); align-items: start; }
.legal-nav { position: sticky; top: 96px; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.legal-nav a { min-height: 40px; display: flex; align-items: center; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 14px; transition: color 160ms ease, background-color 160ms ease; }
.legal-nav a:hover { background: var(--background); color: var(--text); }
.legal-copy section { scroll-margin-top: 105px; margin-bottom: 46px; }
.legal-copy h2 { margin-bottom: 16px; font-size: 28px; letter-spacing: -.035em; }
.legal-copy p, .legal-copy li { color: var(--secondary); font-size: 16px; line-height: 1.75; }
.legal-copy strong { color: var(--text); }
.legal-copy a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.legal-copy ul { padding-left: 22px; }
.notice { border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 14px; padding: 18px 20px; background: var(--surface); color: var(--secondary); line-height: 1.65; }

.site-footer { border-top: 1px solid var(--line-soft); padding-block: 30px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 8px; border-radius: 10px; color: var(--secondary); text-decoration: none; }
.footer-links a:hover { background: var(--surface); color: var(--text); }

.not-found { min-height: 100vh; display: grid; place-content: center; justify-items: center; padding-block: 48px; text-align: center; }
.not-found h1 { max-width: 760px; margin-bottom: 22px; font-size: clamp(46px, 8vw, 78px); line-height: .98; letter-spacing: -.06em; }
.mono-mark { position: relative; width: 82px; height: 82px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 22px; background: var(--accent); }
.mono-mark::before { content: ""; width: 42px; height: 42px; border: 3px solid var(--on-accent); border-radius: 50%; }
.mono-mark span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--on-accent); }

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .shell { width: min(calc(100% - 28px), var(--max-width)); }
  .nav-links a:not(.nav-primary) { display: none; }
  .legal-page main { padding-block: 40px 80px; }
  .legal-hero { padding-top: 20px; }
  .footer-row { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: #ffffff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --line: #8e8e93; --muted: #48484a; }
  .site-header { background: #ffffff; box-shadow: 0 0 0 1px var(--line); }
}
