/* Shared styling for the Alan legal pages. Mirrors the app's Academic theme:
   off-white ground, deep blue accent, generous measure. System fonts only —
   the app's Lora/Rubik are bundled assets, and pulling webfonts here would add
   a network dependency to a page Apple must always be able to reach. */

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --primary: #1e3a8a;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111a2e;
    --primary: #93b4fb;
    --text: #e8edf7;
    --muted: #94a3b8;
    --border: #243049;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 72px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 19px;
  margin: 34px 0 10px;
  letter-spacing: -0.01em;
}

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

p, li { color: var(--text); }
ul { padding-left: 22px; }
li { margin: 6px 0; }

a { color: var(--primary); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
}

.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}

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

th { color: var(--muted); font-weight: 600; }

/* Language switch. Both languages ship in the page; JS only toggles which one
   is visible, so the content is still there if scripting is blocked. */
.langs { display: flex; gap: 6px; }

.langs button {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.langs button[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

footer a { margin-right: 14px; }
