/* Shared look for the static legal pages. The calculator inlines its own CSS into one file, so these pages cannot
   load src/style.css; the tokens below are copied from it, and test/legal.test.ts fails if they drift. */
:root {
  --brand: #0e6ab3;
  --brand-strong: #0a548f;
  --navy: #0b2b4c;
  --ink: #1f2629;
  --muted: #4e585e;
  --line: #d5dbde;
  --surface: #ffffff;
  --surface-2: #f4f6f7;
  --white: #ffffff;
  --focus: #1f8fe5;

  --font: "Figtree", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-3: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
}

a {
  color: var(--brand);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-strong);
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Top bar, matching the calculator's */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 3px;
  border-radius: 2px;
  background: var(--white);
}

.brand-mark::before {
  top: 10.5px;
}

.brand-mark::after {
  bottom: 10.5px;
}

.back {
  font-weight: 600;
}

/* The policy text */
.legal {
  max-width: 46rem;
  padding-block: 40px 56px;
}

.legal h1 {
  margin: 0;
  color: var(--navy);
  font-size: var(--step-3);
  line-height: 1.2;
}

.legal-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--step--1);
}

.legal h2 {
  margin: 36px 0 8px;
  color: var(--navy);
  font-size: var(--step-1);
  line-height: 1.3;
}

.legal p,
.legal ul {
  margin: 0 0 12px;
}

.legal ul {
  padding-left: 1.25rem;
}

.legal li + li {
  margin-top: 4px;
}

.summary-box {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.summary-box h2 {
  margin-top: 0;
}

/* Footer, matching the calculator's */
.footer {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  gap: 12px;
  padding-block: 28px 36px;
  color: var(--muted);
  font-size: var(--step--1);
}

.footer p {
  margin: 0;
  max-width: 52rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-weight: 600;
}
