:root {
  color-scheme: light;
  --paper: #f6f3ea;
  --surface: #fffdf7;
  --ink: #18352b;
  --muted: #526259;
  --line: #d9ddd1;
  --sun: #ffc56f;
  --green: #173b31;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); }
[hidden] { display: none !important; }
a { color: #245843; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #a34d00; outline-offset: 4px; }
main:focus { outline: none; }
.skip { position: absolute; left: 1rem; top: -5rem; padding: .6rem 1rem; background: white; z-index: 2; }
.skip:focus { top: 1rem; }
.wrap { width: min(calc(100% - 3rem), 70rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.07rem; white-space: nowrap; }
.brand span { font-weight: 550; margin-left: -.25rem; }
nav { display: flex; flex-wrap: wrap; gap: .35rem 1.3rem; }
nav a { color: var(--ink); font-size: .9rem; text-decoration: none; }
nav a:hover, nav a[aria-current] { text-decoration: underline; }
.hero { padding-block: clamp(2.9rem, 8vw, 7rem); background: var(--paper); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.24fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.subhero { padding-block: clamp(2.65rem, 6vw, 4.4rem); }
.eyebrow { display: flex; align-items: center; gap: .6rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 750; margin: 0 0 1rem; }
.eyebrow span { width: .65rem; height: .65rem; border-radius: 50%; background: #e89830; flex: none; }
h1, h2, h3 { line-height: 1.13; margin: 0 0 .65em; text-wrap: balance; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: -.034em; }
h1 { font-size: clamp(2.6rem, 6.9vw, 5.4rem); margin-bottom: .3em; }
.subhero h1 { font-size: clamp(2.4rem, 6.6vw, 4.8rem); max-width: 19ch; }
h2 { font-size: clamp(1.95rem, 4vw, 3rem); }
h3 { font-size: 1.13rem; }
p { margin: 0 0 1rem; }
.lede { font-size: clamp(1.1rem, 2.15vw, 1.31rem); max-width: 53ch; color: var(--muted); }
.quiet { color: var(--muted); }
.small { font-size: .9rem; margin-top: .8rem; }
.actions { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: 1.15rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: .65rem 1rem; border: 1px solid var(--green); border-radius: .48rem; background: var(--green); color: white; font-weight: 700; text-decoration: none; }
.button:hover { background: #265645; }
.secondary { background: transparent; color: var(--ink); }
.secondary:hover { background: #eaece0; }
.example { background: var(--green); color: white; padding: clamp(1.4rem, 4vw, 2.4rem); border-radius: 1rem; }
.example h2 { font-size: clamp(1.65rem, 3.4vw, 2.35rem); }
.example .small, .example .eyebrow { color: #e1ebdf; }
.example-rows, .figures { margin: 1rem 0; }
.example-rows div, .figures div { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.example-rows div { border-color: #628075; }
dd { margin: 0; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.example-total { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .8rem; padding: .75rem 0 0; }
.example-total strong { color: var(--sun); font: 600 clamp(1.9rem, 5vw, 3.2rem)/1 Georgia, serif; white-space: nowrap; }
.example-total strong span { font: 700 .8rem/1 system-ui; }
.example-total > span { font-size: .86rem; }
.section { padding-block: clamp(2.2rem, 6vw, 4.2rem); }
.feature-grid, .quote-grid { display: grid; gap: 1rem; }
.feature-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 1.3rem; }
.feature-grid article, .quote-fields, .result-card, .lookup section { border: 1px solid var(--line); border-radius: .7rem; padding: 1.15rem; background: var(--surface); }
.feature-grid p, .lookup p { margin-bottom: 0; }
.index { display: block; color: #526259; font-weight: 750; font-size: .78rem; margin-bottom: .7rem; }
.text-link { font-weight: 750; }
.article { max-width: 52rem; }
.article h2:not(:first-child) { margin-top: 1.3em; }
.lookup { display: grid; gap: .7rem; }
.note, blockquote { margin: 1.2rem 0; padding: 1rem 1.2rem; background: var(--paper); border-left: 4px solid #da9239; }
.source-list { padding-left: 1.4rem; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; flex-wrap: wrap; }
.section-heading h2 { margin-bottom: .2em; }
.section-heading .text-link { margin-bottom: .5rem; }
.quote-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 25rem), 1fr)); }
.quote-fields { margin: 0; min-width: 0; }
legend { font-weight: 800; padding-inline: .35rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
label { display: block; font-size: .93rem; font-weight: 650; }
input:not([type="checkbox"]), select, textarea { width: 100%; min-height: 44px; margin-top: .23rem; color: var(--ink); border: 1px solid #84938a; background: white; border-radius: .37rem; padding: .48rem .65rem; }
.check { display: flex; align-items: start; gap: .5rem; }
.check input { margin: .32rem .1rem 0 0; }
.extra { margin-top: .85rem; }
.extra summary { cursor: pointer; font-weight: 700; }
.extra[open] summary { margin-bottom: .75rem; }
.result { padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid #99a99e; border-radius: .75rem; background: #eef2e8; margin-top: 1.5rem; }
.result label { margin-top: 1rem; }
.result-card ul { padding-left: 1.2rem; margin-bottom: 0; }
.site-footer { background: var(--paper); border-top: 1px solid var(--line); font-size: .9rem; }
.site-footer p { margin: 0; }
@media (max-width: 720px) {
  .wrap { width: min(calc(100% - 2rem), 70rem); }
  .hero-grid, .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 450px) {
  .header-inner, .footer-inner { align-items: flex-start; flex-direction: column; gap: .45rem; }
  .field-grid { grid-template-columns: 1fr; }
}
@media print {
  body { background: white; }
  .site-header, .site-footer, .hero, .reading, #checker > :not(#result), #result .actions { display: none !important; }
  #checker, #result { margin: 0; padding: 0; border: 0; background: white; }
  .quote-grid { display: block; }
  .result-card { break-inside: avoid; margin-bottom: .6rem; }
}
