:root {
  color-scheme: light;
  --paper: #f5f1e7;
  --surface: #fcfaf4;
  --ink: #25362f;
  --muted: #5e6e61;
  --rule: #cfd5c6;
  --accent: #486045;
  --soft: #e7ebdf;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.7 Georgia, "Times New Roman", serif; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img, svg { max-width: 100%; }
code { font-family: ui-monospace, "DejaVu Sans Mono", monospace; font-size: .88em; overflow-wrap: anywhere; }
.container { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 10; background: var(--ink); color: white; padding: 9px 16px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 17px/1.25 var(--sans); }
.brand-mark { width: 68px; height: 34px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.brand small { display: block; font: 11px/1.8 var(--sans); color: var(--muted); letter-spacing: .06em; }
nav { display: flex; flex-wrap: wrap; gap: 24px; font: 13px/1.5 var(--sans); }
nav a { text-decoration: none; padding-block: 6px; }
nav a:hover { text-decoration: underline; }
.hero { padding-block: 82px 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 62px; align-items: center; }
.eyebrow { margin: 0 0 15px; color: var(--muted); font: 11px/1.7 var(--sans); letter-spacing: .15em; text-transform: uppercase; }
h1 { font-size: clamp(47px, 6vw, 76px); line-height: 1.1; font-weight: normal; letter-spacing: -.045em; margin: 0 0 25px; }
h1 span { display: block; font-size: .42em; letter-spacing: -.015em; line-height: 1.5; margin-top: 5px; }
.hero-tagline { font-size: 25px; line-height: 1.4; margin: 0 0 14px; }
.hero-copy { max-width: 53ch; color: var(--muted); margin: 0 0 26px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.button { display: inline-block; padding: 10px 19px; border: 1px solid var(--accent); background: var(--accent); color: white; border-radius: 5px; font: 13px/1.6 var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { background: var(--ink); color: white; }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--rule); }
.button.secondary:hover { background: var(--soft); }
.hero-signs { border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); padding: 36px 22px 28px; }
.sign-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sign-trio figure { margin: 0; text-align: center; }
.sign-trio .glyph { width: 100%; height: auto; aspect-ratio: 1; }
.sign-trio figcaption { font: 13px/1.5 var(--sans); }
.sign-trio figcaption span { display: block; color: var(--muted); font: italic 15px/1.6 Georgia, serif; }
.hero-signs > p { text-align: center; font-size: 14px; color: var(--muted); padding-top: 20px; margin: 20px 0 0; border-top: 1px solid var(--rule); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-block: 1px solid var(--rule); padding-block: 25px; }
.stats div { text-align: center; padding-inline: 10px; border-right: 1px solid var(--rule); }
.stats div:last-child { border: 0; }
.stats dt { font-size: 30px; line-height: 1.3; }
.stats dd { margin: 4px 0 0; color: var(--muted); font: 12px/1.6 var(--sans); }
.section { padding-block: 64px; border-bottom: 1px solid var(--rule); scroll-margin-top: 20px; }
.section-heading { max-width: 760px; margin-bottom: 30px; }
h2 { font-size: 39px; line-height: 1.2; font-weight: normal; letter-spacing: -.025em; margin: 0 0 15px; }
h3 { font-size: 23px; line-height: 1.4; font-weight: normal; margin: 0 0 12px; }
p { margin: 0 0 18px; }
.lede { font-size: 19px; color: var(--muted); }
.small { font-size: 14px; color: var(--muted); }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.principles article { border-top: 2px solid var(--accent); padding-top: 18px; }
.principles p { margin-bottom: 0; }
.example { background: var(--surface); border: 1px solid var(--rule); border-radius: 7px; padding: 17px 21px; margin: 20px 0; }
.example-glyphs { font-size: 20px; line-height: 2.5; margin: 0 0 6px; }
.example-roman { font-size: 13px; color: var(--muted); margin: 0 0 3px; }
.example-translation { font-size: 15px; margin: 0; }
.reading-excerpt { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 26px 32px; margin-block: 24px; font-size: 20px; line-height: 2.75; }
.reading-excerpt p { margin: 0 0 22px; }
.reading-excerpt p:last-child { margin-bottom: 0; }
.word { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; margin: .08em .035em .12em; text-indent: 0; }
.signs { display: inline-flex; align-items: center; gap: 0; line-height: 1; }
.glyph { display: inline-block; flex: 0 0 auto; width: 1.65em; height: 1.65em; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.glyph.sentence-end { width: .5em; }
.sentence-tail { display: inline-block; white-space: nowrap; overflow-wrap: normal; }
.loan { display: inline-flex; align-items: center; gap: .02em; max-width: 100%; vertical-align: middle; }
.english { line-height: 1.4; white-space: nowrap; min-width: 0; }
.roman { display: none; }
.vocab-tools { display: flex; gap: 18px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; font: 13px/1.5 var(--sans); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.search { flex: 1; min-width: 180px; }
input[type="search"], select { width: 100%; padding: 10px 12px; color: var(--ink); border: 1px solid var(--rule); border-radius: 5px; background: var(--surface); font: 15px/1.5 var(--sans); }
select { min-width: 140px; }
.vocab-status { font: 12px/1.5 var(--sans); color: var(--muted); margin-block: 16px; }
.vocabulary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.vocab-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 20px 12px; border: 1px solid var(--rule); background: var(--surface); border-radius: 9px; }
.vocab-symbol .glyph { width: 78px; height: 78px; }
.vocab-card h3 { margin: 8px 0 5px; font: 600 18px/1.5 var(--sans); }
.vocab-card h3 a { text-decoration: none; }
.vocab-card h3 a:hover { text-decoration: underline; }
.vocab-card p { font-size: 14px; line-height: 1.5; margin-bottom: 12px; }
.vocab-card .badge { margin-top: auto; }
.badge { display: inline-block; padding: 3px 8px; background: var(--soft); border-radius: 4px; color: var(--accent); font: 10px/1.5 var(--sans); white-space: nowrap; }
.badge-proposed { background: #ece4ce; color: #67542c; }
.borrowing-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.borrowing-card { display: flex; align-items: center; gap: 20px; padding: 16px; border: 1px solid var(--rule); border-radius: 8px; }
.borrowing-card .glyph { width: 60px; height: 60px; }
.borrowing-card h3, .borrowing-card p { margin: 0; }
.borrowing-card p { font-size: 14px; color: var(--muted); }
#grammar { max-width: 880px; margin-inline: auto; }
.reference-block { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.reference-block:first-of-type { border: 0; padding-top: 0; }
.notice { border-left: 3px solid var(--accent); padding: 13px 18px; background: var(--soft); font-size: 15px; }
.formula { padding: 15px 18px; border: 1px solid var(--rule); background: var(--surface); border-radius: 5px; overflow-wrap: anywhere; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--rule); border-radius: 7px; margin-block: 22px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
caption { padding: 12px 18px; text-align: left; font: 12px/1.6 var(--sans); color: var(--muted); background: var(--soft); }
th, td { padding: 10px 18px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
thead th { font: 600 12px/1.5 var(--sans); background: var(--surface); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.reference-sign { display: block; width: 44px; height: 44px; max-width: none; }
.site-footer { padding-block: 36px 48px; color: var(--muted); font: 12px/1.8 var(--sans); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer p { margin: 0; }
@media (max-width: 850px) {
  .hero { gap: 28px; padding-top: 56px; }
  .vocabulary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  nav { gap: 16px; }
  .brand-mark { width: 52px; }
}
@media (max-width: 650px) {
  html { scroll-padding-top: 148px; }
  .container { width: calc(100% - 40px); }
  .header-inner { display: block; min-height: 0; padding-block: 11px 9px; }
  .brand { gap: 8px; }
  .brand-mark { height: 28px; }
  .brand small { display: inline; padding-left: 7px; font-size: 10px; }
  nav { margin-top: 8px; justify-content: space-between; gap: 5px 14px; font-size: 12px; }
  .hero { display: block; padding-block: 42px 32px; }
  .hero-signs { margin-top: 30px; padding-top: 18px; }
  .sign-trio .glyph { width: 84px; height: 84px; }
  .hero-signs > p { margin-top: 14px; padding-top: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 22px 0; }
  .stats div:nth-child(2) { border-right: 0; }
  .section { padding-block: 40px; }
  h2 { font-size: 33px; }
  .principles { grid-template-columns: 1fr; gap: 24px; }
  .vocabulary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading-excerpt { padding: 18px; font-size: 19px; }
  .english { white-space: normal; }
  .example { padding: 14px; }
  th, td { padding: 10px; }
  .borrowing-cards { grid-template-columns: 1fr; }
  .footer-inner { display: block; }
  .site-footer p + p { margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: white; color: black; font-size: 11pt; }
  .site-header { position: static; }
  nav, .vocab-tools, .vocab-status, .actions, .skip-link { display: none; }
  .container { width: 100%; }
  .hero { padding-top: 20px; }
  .section { padding-block: 24px; }
  .vocab-card, .example, .reference-block h3 { break-inside: avoid; }
  .vocabulary-grid { grid-template-columns: repeat(4, 1fr); }
  .table-wrap { overflow: visible; }
}
