:root {
  --ground:      #0a0e17;
  --ground-2:    #0e131e;
  --surface:     #131824;
  --surface-2:   #1a2030;

  --border:      #1e2534;
  --border-hi:   #2a334a;

  --text:        #e8ecf3;
  --text-muted:  #7a8299;
  --text-dim:    #4d566d;

  --accent:      #f6c445;
  --accent-hi:   #ffd960;
  --accent-dim:  rgba(246,196,69,0.12);

  --bull:        #22c55e;
  --bear:        #ef4444;
  --neutral:     #4d566d;

  --btn-ink:     #14110a;

  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shadow-1:    0 1px 0 0 rgba(255,255,255,0.03) inset, 0 20px 40px -20px rgba(0,0,0,0.8);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { color-scheme: dark; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hi); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.legal-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.72);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.legal-header-inner {
  display: flex;
  align-items: center;
  padding: 18px 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand:hover { color: var(--text); }

.brand-mark {
  width: 22px;
  height: 22px;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
  clip-path: polygon(0 30%, 40% 30%, 40% 0, 60% 0, 60% 60%, 100% 60%, 100% 100%, 20% 100%, 20% 70%, 0 70%);
}

.legal-main {
  flex: 1;
  width: 100%;
  max-width: 68ch;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.legal-main.form-page {
  max-width: 480px;
}

.legal-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.effective {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin: 0 0 36px;
}

.lede {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 8px;
}

.legal-sec {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  column-gap: 0.85rem;
  margin: 2.1rem 0 0;
}

.legal-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.7;
  padding-top: 0.15em;
  font-variant-numeric: tabular-nums;
}

.legal-sec h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
  margin: 0 0 10px;
}

.legal-sec p,
.legal-sec li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  margin: 0 0 12px;
}

.legal-sec ul {
  margin: 0 0 12px;
  padding-left: 1.2rem;
}

.legal-sec li { margin-bottom: 6px; }

.legal-footer {
  border-top: 1px solid var(--border);
  padding: 28px 32px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.legal-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.legal-footer a {
  color: var(--text-muted);
  margin-left: 16px;
}

.legal-footer a:first-child { margin-left: 0; }

.legal-footer a:hover { color: var(--text); }

.legal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.field .hint {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.field .req {
  color: var(--text-muted);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-dim);
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

.turnstile-slot {
  min-height: 65px;
}

.form-error {
  font-size: 13px;
  color: var(--bear);
  min-height: 1.2em;
}

.form-error:empty { display: none; }

.btn-primary {
  background: var(--accent);
  color: var(--btn-ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 22px;
  border: 0;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s ease;
}

.btn-primary::after {
  content: "→";
  font-family: var(--font-mono);
  font-weight: 400;
}

.btn-primary:hover { background: var(--accent-hi); }

a.btn-primary,
a.btn-primary:hover {
  color: var(--btn-ink);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.legal-form .btn-primary { width: 100%; }

.confirm {
  margin-top: 28px;
}

.confirm p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0;
}

.expired-copy {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 28px;
}

.expired-copy + .btn-primary {
  text-decoration: none;
}

.expired-copy + .btn-primary:hover {
  color: var(--btn-ink);
}

@media (max-width: 640px) {
  .legal-header-inner,
  .legal-main { padding-left: 20px; padding-right: 20px; }
  .legal-footer { padding-left: 20px; padding-right: 20px; }

  .legal-main { padding-top: 32px; padding-bottom: 48px; }

  .legal-sec {
    grid-template-columns: 1.8rem minmax(0, 1fr);
    column-gap: 0.5rem;
  }

  .legal-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .legal-footer a { margin: 0 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary { transition: none; }
}
