:root {
  color-scheme: light dark;
  --background: #f4f1ea;
  --surface: #fffdf9;
  --text: #181715;
  --muted: #68645c;
  --border: #d9d4ca;
  --accent: #c89400;
  --soft-accent: #f5edcf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; color: var(--text); background: var(--background); }
a { color: inherit; text-underline-offset: 3px; }

.legal-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.legal-header { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); }
.legal-header img { display: block; width: 168px; height: auto; }
.back-link { font-size: 0.82rem; font-weight: 750; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.legal-hero { max-width: 820px; padding: 76px 0 54px; }
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 0.74rem; font-weight: 850; letter-spacing: 0.09em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(3.5rem, 8vw, 6.6rem); letter-spacing: -0.055em; line-height: 0.95; }
.legal-summary { max-width: 720px; margin: 28px 0 0; color: var(--muted); font-size: 1.12rem; line-height: 1.7; }
.updated { display: inline-block; margin-top: 24px; padding: 8px 12px; border-radius: 999px; background: var(--soft-accent); color: var(--text); font-size: 0.75rem; font-weight: 750; }

.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: clamp(42px, 8vw, 104px); padding-bottom: 80px; }
.legal-nav { position: sticky; top: 24px; display: grid; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.legal-nav strong { margin: 2px 8px 10px; font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; }
.legal-nav a { padding: 9px 10px; border-radius: 8px; color: var(--muted); font-size: 0.8rem; font-weight: 650; text-decoration: none; }
.legal-nav a:hover { color: var(--text); background: var(--soft-accent); }

.legal-content { min-width: 0; }
.legal-section { padding: 0 0 44px; margin: 0 0 44px; border-bottom: 1px solid var(--border); scroll-margin-top: 28px; }
.legal-section:last-child { border-bottom: 0; }
.legal-section h2 { margin: 0 0 18px; font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -0.035em; }
.legal-section h3 { margin: 26px 0 10px; font-size: 1rem; }
.legal-section p, .legal-section li { color: var(--muted); font-size: 0.96rem; line-height: 1.75; }
.legal-section p { margin: 0 0 16px; }
.legal-section ul { margin: 0; padding-left: 22px; }
.legal-section li + li { margin-top: 8px; }
.legal-section strong { color: var(--text); }
.notice { padding: 20px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--surface); }

.legal-footer { min-height: 100px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.78rem; }
.legal-footer nav { display: flex; gap: 22px; }

@media (prefers-color-scheme: dark) {
  :root { --background: #0b0b0c; --surface: #171719; --text: #f5f3ee; --muted: #aaa69d; --border: #343337; --accent: #f0bd26; --soft-accent: #2b281d; }
}

@media (max-width: 780px) {
  .legal-shell { width: min(100% - 32px, 660px); }
  .legal-header { min-height: 82px; }
  .legal-header img { width: 145px; }
  .legal-hero { padding: 48px 0 40px; }
  h1 { font-size: clamp(3.3rem, 17vw, 5.3rem); }
  .legal-layout { grid-template-columns: 1fr; gap: 36px; padding-bottom: 48px; }
  .legal-nav { position: static; grid-template-columns: repeat(2, 1fr); }
  .legal-nav strong { grid-column: 1 / -1; }
  .legal-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
  .legal-footer nav { flex-wrap: wrap; }
}
