/* Standalone styling for the static legal pages. These are served straight
   from /public and are not part of the Vite bundle, so the Cardemy tokens are
   restated here rather than imported from src/brand.css. */

:root {
  --brand-ink: #0F2A24;
  --brand-green: #1B7A4B;
  --brand-green-dark: #14603A;
  --paper: #FBF7EC;
  --surface: #FFFFFF;
  --text: #14211C;
  --text-muted: #5E6B64;
  --border: #E4E0D0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px 72px;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.7 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.wrap { width: min(100%, 760px); margin-inline: auto; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 32px;
  border-bottom: 1px solid var(--border);
}

/* header a is standalone nav (top-right "Back to Cardemy"): give it a real
   tap target. footer a sits inline inside a running disclaimer sentence -
   WCAG 2.5.8 exempts inline links, and forcing a min-height there would
   break the sentence's line flow. */
header a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 21px 'Fraunces', Georgia, serif;
  color: var(--brand-ink);
  text-decoration: none;
}

h1 {
  margin: 0 0 8px;
  font: 700 clamp(32px, 5vw, 44px)/1.12 'Fraunces', Georgia, serif;
  letter-spacing: -.015em;
  color: var(--brand-ink);
}

h2 {
  margin: 40px 0 12px;
  font: 700 24px/1.25 'Fraunces', Georgia, serif;
  color: var(--brand-ink);
}

.updated { margin: 0 0 8px; color: var(--text-muted); font-size: 15px; }

a { color: var(--brand-green); text-underline-offset: 3px; }
a:hover { color: var(--brand-green-dark); }

ul { padding-left: 22px; }
li { margin-bottom: 8px; }

table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 16px;
}

main { padding-top: 32px; }
main > p:first-of-type { font-size: 18px; color: var(--text-muted); }

th, td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  background: var(--surface);
}

th { background: #F4F0E3; font-weight: 700; }

.note {
  margin: 32px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-green);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 16px;
}

footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 15px;
}

table, thead, tbody, th, td, tr { display: block; }
thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
tr { margin-bottom: 12px; }
td { border-top: 0; }
td:first-child { border-top: 1px solid var(--border); font-weight: 700; }

@media (min-width: 600px) {
  body { padding-inline: 24px; }
  table, thead, tbody, th, td, tr { display: revert; }
  thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  tr { margin-bottom: 0; }
}
