/* hornbook.study. System fonts only, no external resource, no script, no image.
   Values mirror the app tokens in app/src/theme/tokens.ts (C-37): colors, space steps, radii and the type scale. */
:root {
  --surface: #ffffff;
  --surface-subtle: #f5f6f8;
  --surface-selected: #e3e8ef;
  --border: #c9ccd4;
  --text: #111111;
  --text-muted: #555555;
  --accent: #1f3a5f;
  --on-accent: #ffffff;
  --warn: #8a5a00;
  --danger: #a93228;
  --sp-xs: 4px;
  --sp-sm: 8px;
  --sp-md: 12px;
  --sp-lg: 16px;
  --sp-xl: 24px;
  --sp-xxl: 32px;
  --r-md: 8px;
  --r-lg: 12px;
}
* { box-sizing: border-box; }
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.375;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 var(--sp-lg); }

header.site { border-bottom: 1px solid var(--border); padding: var(--sp-md) 0; background: var(--surface); }
header.site .wrap { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-lg); flex-wrap: wrap; }
.wordmark {
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
}
.wordmark:hover, .wordmark:focus { text-decoration: none; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-xs) var(--sp-lg); flex-wrap: wrap; }
nav li { margin: 0; }
nav a { display: inline-block; padding: var(--sp-sm) 0; font-size: 0.875rem; }
nav a.lang { font-weight: 600; }

.hero { padding: var(--sp-xxl) 0 var(--sp-xl); background: var(--surface-subtle); border-bottom: 1px solid var(--border); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 var(--sp-md); color: var(--accent); }
h2 { font-size: 1.25rem; line-height: 1.3; margin: var(--sp-xxl) 0 var(--sp-sm); color: var(--accent); }
h3 { font-size: 1rem; line-height: 1.375; margin: var(--sp-xl) 0 var(--sp-xs); }
.tagline { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--sp-sm); }
.lede { font-size: 1.125rem; line-height: 1.45; margin: 0 0 var(--sp-lg); }
p { margin: 0 0 var(--sp-md); }

.notice {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  margin: var(--sp-xl) 0;
}
.notice p { margin: var(--sp-xs) 0; }
.coming-soon { font-weight: 600; color: var(--accent); }

ul, ol { padding-left: 1.25rem; margin: 0 0 var(--sp-md); }
li { margin: var(--sp-xs) 0; }
main section { padding-bottom: var(--sp-md); }

.table-scroll { overflow-x: auto; margin: var(--sp-lg) 0; }
table { border-collapse: collapse; width: 100%; min-width: 28rem; }
th, td { text-align: left; padding: var(--sp-sm); border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-selected); font-size: 0.875rem; }
tbody th { font-weight: 600; }
.small { color: var(--text-muted); font-size: 0.875rem; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9em; background: var(--surface-subtle); padding: 0 var(--sp-xs); }

footer.site { border-top: 1px solid var(--border); margin-top: var(--sp-xxl); padding: var(--sp-xl) 0 var(--sp-xxl); color: var(--text-muted); font-size: 0.875rem; background: var(--surface-subtle); }
footer.site ul { list-style: none; padding: 0; display: flex; gap: var(--sp-xs) var(--sp-xl); flex-wrap: wrap; }
footer.site a { display: inline-block; padding: var(--sp-xs) 0; }

.legal h2 { margin-top: var(--sp-xl); }
.legal p, .legal li { overflow-wrap: anywhere; }

@media (min-width: 40rem) {
  h1 { font-size: 2.5rem; line-height: 1.15; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .lede { font-size: 1.25rem; }
}
