:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172a3d;
  background: #eef3f5;
  --paper: #fff;
  --ink: #172a3d;
  --muted: #4c5f73;
  --line: #cbd7e0;
  --blue: #174b78;
  --blue-dark: #103958;
  --focus: #005a9c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 30;
  padding: 10px 14px;
  color: #fff;
  background: var(--blue-dark);
  border-radius: 6px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.legal-page { min-height: 100dvh; padding: 24px 16px 48px; }
.legal-wrap { width: min(100%, 900px); margin: 0 auto; }
.legal-header, .legal-card, .legal-footer {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px #172a3d12;
}
.legal-header { padding: 24px clamp(20px, 5vw, 48px); border-radius: 16px 16px 0 0; }
.legal-header .brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--blue); color: #fff; font-family: Georgia, serif; font-size: 25px; }
.brand-mark span { color: #edc774; }
.eyebrow { margin: 0 0 7px; font-size: .75rem; letter-spacing: .12em; font-weight: 750; color: var(--muted); }
.legal-header h1 { margin: 22px 0 10px; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.08; letter-spacing: -.04em; }
.legal-header .lede { max-width: 68ch; margin: 0; color: var(--muted); line-height: 1.65; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 22px; font-size: .9rem; }
.legal-nav a { padding: 6px 0; }
.legal-card { padding: 28px clamp(20px, 5vw, 48px); border-top: 0; border-radius: 0; }
.legal-card h2 { margin: 30px 0 10px; color: var(--blue-dark); font-size: 1.35rem; }
.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.legal-card p, .legal-card li { max-width: 78ch; color: #273e53; line-height: 1.7; }
.legal-card ul, .legal-card ol { padding-left: 24px; }
.legal-card .notice { padding: 16px 18px; border-left: 4px solid #bd7715; background: #fff8e9; }
.legal-card .risk { border-left-color: #a63025; background: #fff3f1; }
.legal-card code { padding: 2px 4px; color: var(--blue-dark); background: #edf3f8; border-radius: 4px; }
.legal-card table { width: 100%; border-collapse: collapse; margin: 14px 0 20px; font-size: .93rem; }
.legal-card th, .legal-card td { padding: 11px 12px; text-align: left; vertical-align: top; border: 1px solid var(--line); line-height: 1.5; }
.legal-card th { color: var(--blue-dark); background: #edf3f8; }
.legal-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 18px clamp(20px, 5vw, 48px); border-top: 0; border-radius: 0 0 16px 16px; color: var(--muted); font-size: .85rem; }
.legal-footer p { margin: 0; }

.privacy-banner { position: fixed; right: 16px; bottom: 16px; left: 16px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 980px; margin: 0 auto; padding: 18px 20px; color: #172a3d; background: #fff; border: 2px solid var(--blue); border-radius: 12px; box-shadow: 0 15px 45px #172a3d35; }
.privacy-banner h2 { margin: 0 0 5px; font-size: 1rem; }
.privacy-banner p { max-width: 68ch; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.privacy-banner-actions, .privacy-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; flex: none; }
.privacy-primary, .privacy-secondary { min-height: 42px; padding: 9px 13px; border: 1px solid var(--blue); border-radius: 7px; font-size: .86rem; font-weight: 650; }
.privacy-primary { color: #fff; background: var(--blue); }
.privacy-secondary { color: var(--blue-dark); background: #fff; }
.privacy-dialog-backdrop { position: fixed; inset: 0; z-index: 21; display: grid; place-items: center; padding: 20px; background: #172a3d99; }
.privacy-dialog { width: min(100%, 500px); padding: 24px; color: var(--ink); background: #fff; border-radius: 12px; box-shadow: 0 20px 55px #0005; }
.privacy-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.privacy-dialog h2 { margin: 0; font-size: 1.35rem; }
.privacy-dialog p { color: var(--muted); line-height: 1.55; }
.privacy-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #fff; font-size: 1.4rem; }
.privacy-choice-row { display: flex; gap: 10px; padding: 13px 0; border-top: 1px solid var(--line); }
.privacy-choice-row input { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.privacy-choice-row span { display: grid; gap: 3px; }
.privacy-choice-row small { color: var(--muted); line-height: 1.45; }

.issue-form { display: grid; gap: 8px; max-width: 680px; }
.issue-form label { margin-top: 10px; color: var(--blue-dark); font-weight: 650; }
.issue-form .hint { margin: -2px 0 2px; color: var(--muted); font-size: .85rem; font-weight: 400; }
.issue-form input, .issue-form select, .issue-form textarea { width: 100%; padding: 11px 12px; color: var(--ink); background: #fff; border: 1px solid #8fa5b7; border-radius: 7px; }
.issue-form textarea { min-height: 150px; resize: vertical; }
.issue-form .consent-label { display: flex; align-items: start; gap: 10px; font-weight: 400; line-height: 1.5; }
.issue-form .consent-label input { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.issue-form button[type=submit] { width: fit-content; min-height: 44px; margin-top: 8px; padding: 10px 16px; color: #fff; background: var(--blue); border: 0; border-radius: 7px; font-weight: 700; }
#issue-status { min-height: 1.5em; color: var(--blue-dark); line-height: 1.5; }
#issue-status[data-error=true] { color: #a63025; }

@media (max-width: 700px) {
  .legal-page { padding: 10px 10px 32px; }
  .legal-header { padding-top: 20px; }
  .legal-card { padding-top: 22px; }
  .legal-card table { display: block; overflow-x: auto; }
  .privacy-banner { display: block; right: 10px; bottom: 10px; left: 10px; padding: 16px; }
  .privacy-banner-actions { justify-content: stretch; margin-top: 12px; }
  .privacy-banner-actions button { flex: 1 1 180px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

