:root {
  color-scheme: light;
  --ink: #0E1116;
  --text: #3A4150;
  --muted: #5B6472;
  --line: #E3E6EA;
  --line-strong: #CBD0D6;
  --surface: #F5F7F8;
  --paper: #FFFFFF;
  --accent: #0B7A4B;
  --accent-text: #0B6A41;
  --tint: #E6F4EC;
  --tint-soft: #F0F7F3;
  --warn: #9A4A00;
  --warn-bg: #FDF0E3;
  --display: 'Inter Tight', Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); line-height: 1.5; }
a { color: var(--ink); }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { max-width: 100%; }
button { font: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-mark { width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav-links a { padding: 12px; font-size: 15px; text-decoration: none; color: var(--text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { color: var(--ink); background: var(--surface); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #096A41; color: #fff; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn-text { border: 0; background: none; padding: 10px 4px; color: var(--accent-text); font-weight: 600; cursor: pointer; }
.btn-text:hover { text-decoration: underline; }

/* Type */
.kicker { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.h1 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(52px, 7vw, 104px); line-height: 0.98; letter-spacing: -0.035em; }
.h2 { margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(36px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -0.03em; }
.h3 { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.lede { margin: 0; font-size: 20px; line-height: 1.55; color: var(--text); max-width: 580px; }
.body { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--tint); color: var(--accent-text); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-ink { background: var(--ink); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.site-footer a { padding: 12px; color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field .label { font-size: 14px; font-weight: 600; }
.input, .select { height: 48px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); width: 100%; }
.select { height: 44px; font-size: 14px; padding: 0 10px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 8px 8px 8px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 16px 40px -16px rgba(14,17,22,0.5); }
.toast button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #fff; font-weight: 600; cursor: pointer; }
.toast a { color: #fff; font-weight: 600; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(14,17,22,0.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.modal { width: 100%; max-width: 460px; background: var(--paper); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 30px 80px -30px rgba(14,17,22,0.6); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.icon-btn { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 8px; background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 64px 24px 96px; }
.legal h1 { font-family: var(--display); font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 8px; }
.legal h2 { font-family: var(--display); font-size: 22px; margin: 40px 0 8px; letter-spacing: -0.01em; }
.legal p, .legal li { font-size: 16px; line-height: 1.65; color: var(--text); }
.legal .fill { background: #FFF4C2; color: var(--ink); padding: 0 4px; border-radius: 3px; }
.draft-note { margin: 24px 0; padding: 14px 16px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 14px; font-weight: 600; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

[hidden] { display: none !important; }
