/* ==========================================================================
   AL1 Tutor — legal pages stylesheet
   Cream / terracotta design system. Matches the landing, /pricing, /signup,
   /waitlist and /settings surfaces.

   Tokens (keep in sync with the React surfaces):
     bg #FAF9F5 · surface #FFFFFF · ink #2B2622 · ink2 #5A5147 · ink3 #8A8175
     rule #E8E3D8 · accent #9F4B33 · accent-ink #8F4026 · accent-soft #F3E3D9
   Fonts: Source Serif 4 (display) · Geist (body) · Geist Mono (meta)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300..700;1,8..60,300..700&family=Geist:wght@300..700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --bg: #FAF9F5;
  --surface: #FFFFFF;
  --ink: #2B2622;
  --ink2: #5A5147;
  --ink3: #8A8175;
  --rule: #E8E3D8;
  --rule2: #EFEADD;
  --accent: #9F4B33;
  --accent-ink: #8F4026;
  --accent-soft: #F3E3D9;
  --ok: #6B8E5A;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ----- Layout ----- */
.legal-container {
  max-width: 768px;
  margin: 0 auto;
  padding: 0 32px 96px;
}

/* ----- Header ----- */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  padding: 24px 0 20px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.legal-nav a {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink2);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.legal-nav a:hover {
  color: var(--ink);
}

.legal-nav a.current {
  color: var(--accent-ink);
  font-weight: 500;
  border-bottom-color: var(--accent);
}

/* The Pricing link reads as a product link, not a legal page */
.legal-nav a.nav-product {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid var(--accent-soft);
  background-color: var(--accent-soft);
  border-radius: 9999px;
  padding: 5px 14px;
}

.legal-nav a.nav-product:hover {
  background-color: #ecd5c8;
}

/* ----- Headings ----- */
h1 {
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 380;
  color: var(--ink);
  margin: 8px 0 12px;
}

.updated {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink3);
  margin: 0 0 32px;
}

.lede {
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 21px);
  line-height: 1.55;
  color: var(--ink2);
  margin: 0 0 32px;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 440;
  color: var(--ink);
  margin: 56px 0 18px;
  padding-top: 8px;
}

h2 .section-no {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.55em;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-right: 10px;
  vertical-align: baseline;
}

h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 30px 0 12px;
}

/* ----- Body copy ----- */
p { margin: 0 0 16px; }

a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover { color: var(--accent); }

strong { color: var(--ink); font-weight: 600; }

em { color: var(--accent); font-style: italic; }

ul, ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

li {
  margin: 0 0 9px;
  line-height: 1.65;
}

ul li::marker { color: var(--accent); }
ol li::marker { color: var(--ink3); font-family: var(--mono); font-size: 0.9em; }

/* Definition lists (used for tier / curriculum-change breakdowns) */
dl { margin: 0 0 20px; }

dt {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  margin-top: 18px;
}

dd {
  margin: 6px 0 0;
  padding-left: 16px;
  border-left: 2px solid var(--rule);
  color: var(--ink2);
}

/* ----- Tables ----- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink3);
  font-weight: 500;
  background-color: var(--rule2);
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background-color: var(--rule2);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink);
}

/* ----- Callouts ----- */
.callout {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 14px;
  padding: 22px 24px;
  margin: 0 0 36px;
}

.callout > strong:first-child {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 8px;
  font-weight: 500;
}

.callout p { margin: 0; color: var(--ink2); }

.callout-warn {
  background-color: var(--accent-soft);
  border-color: var(--accent-soft);
  border-left-color: var(--accent);
}

.callout-warn p { color: var(--ink); }

/* ----- Table of contents ----- */
.toc {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 24px 28px;
  margin: 0 0 48px;
}

.toc h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink3);
  font-weight: 500;
  margin: 0 0 14px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 32px;
}

@media (max-width: 560px) {
  .toc ol { columns: 1; }
}

.toc li { margin-bottom: 8px; }

.toc a { text-decoration: none; color: var(--ink2); }
.toc a:hover { color: var(--accent); }

/* ----- Entity / contact blocks ----- */
.entity-block {
  background-color: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 20px 24px;
  margin: 0 0 28px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink2);
}

.entity-block strong { color: var(--ink); }

/* ----- Footer ----- */
.legal-footer {
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: var(--ink3);
}

.legal-footer p { margin: 0 0 8px; }

.legal-footer a { color: var(--ink3); text-decoration: none; }
.legal-footer a:hover { color: var(--accent); }

/* ----- Small screens ----- */
@media (max-width: 600px) {
  .legal-container { padding: 0 20px 64px; }
  .legal-header { padding-top: 20px; }
}