:root {
  --ink: #253433;
  --muted: #5c6764;
  --link: #165e69;
  --accent: #9c4732;
  --rule: #c9c5b9;
  --paper: #fffdf7;
  --wash: #f2f0e6;
  font-family: Verdana, Geneva, sans-serif;
  color: var(--ink);
  background: #e8e5dc;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  max-width: 1020px;
  margin: 26px auto;
  background: var(--paper);
  border: 1px solid #c7c2b4;
  box-shadow: 0 3px 15px #403b3017;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
a[aria-disabled="true"] { pointer-events: none; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p { line-height: 1.65; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: normal; line-height: 1.15; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(42px, 5.3vw, 62px); letter-spacing: -.025em; }
h2 { font-size: 31px; letter-spacing: -.015em; }
h3 { font-size: 23px; }
img { max-width: 100%; height: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 20px; top: 12px; z-index: 20; background: white; padding: 8px 12px; }
.site-header .masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding: 31px 43px 24px; }
.wordmark { font: bold 40px Georgia, 'Times New Roman', serif; letter-spacing: -.055em; text-decoration: none; color: var(--ink); }
.wordmark span { font-size: 25px; font-weight: normal; letter-spacing: -.045em; color: var(--accent); }
.masthead p { margin: 0; font: italic 15px Georgia, serif; color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 0; padding: 0 31px; background: #ede9de; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
nav a { display: inline-block; padding: 12px 13px; color: var(--ink); font: 12px Verdana, sans-serif; text-decoration: none; border-right: 1px solid #d6d0c2; }
nav a:first-child { border-left: 1px solid #d6d0c2; }
nav a:hover { background: #f8f5ec; color: var(--link); text-decoration: underline; }
main { min-height: 460px; }
.section-label, .eyebrow { color: var(--accent); font: bold 11px Verdana, sans-serif; letter-spacing: .015em; margin-bottom: 13px; }
.lead, .intro { color: #40514e; font: 19px/1.6 Georgia, serif; max-width: 700px; }
.fine { font-size: 11px; line-height: 1.55; color: var(--muted); }
.button { display: inline-block; min-height: 37px; padding: 10px 14px; background: #2c5352; border: 1px solid #234846; color: white; text-decoration: none; text-align: center; font-size: 12px; font-weight: bold; }
.button:hover { background: #1e4240; color: white; }
.button.secondary { color: var(--link); background: transparent; border-color: #98a9a2; }
.button.secondary:hover { color: var(--ink); background: #e9eee8; }
.text-button { padding: 0; border: 0; background: transparent; color: var(--link); text-decoration: underline; font-size: 11px; }
.front { padding: 57px 43px 52px; }
.front h1 { max-width: 700px; margin-bottom: 23px; }
.front .lead { margin-bottom: 28px; }
.front-links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 42px; font-size: 13px; }
.example-note { display: flex; align-items: center; justify-content: space-between; max-width: 685px; gap: 24px; padding: 17px 20px; background: var(--wash); border-left: 3px solid var(--accent); }
.example-note .section-label { margin-bottom: 7px; }
.example-note p:not(.section-label) { margin-bottom: 7px; font-size: 12px; }
.example-note a { font: 14px Georgia, serif; }
.example-note img { width: 72px; flex: none; border: 4px solid white; }
.builder { padding: 43px; border-top: 3px double var(--rule); scroll-margin-top: 12px; }
.section-intro { max-width: 690px; margin-bottom: 34px; }
.section-intro h2 { margin-bottom: 14px; }
.section-intro p:not(.section-label) { color: var(--muted); font-size: 13px; }
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 37px; align-items: start; }
.presets { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 15px; margin-bottom: 23px; font-size: 11px; }
.presets span { color: var(--muted); }
.presets button { padding: 0; border: 0; background: none; color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.presets button:hover { color: var(--accent); }
.search-label, .size-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: bold; }
input[type="search"], #lookup-code { width: 100%; padding: 10px 11px; border: 1px solid #aab4ad; background: white; color: var(--ink); font-size: 13px; }
#search-count { margin: 7px 0 20px; }
.group { border-top: 1px solid var(--rule); }
.group:last-child { border-bottom: 1px solid var(--rule); }
summary { display: flex; gap: 10px; align-items: center; padding: 13px 3px; list-style: none; cursor: pointer; font-size: 13px; font-weight: bold; }
summary::-webkit-details-marker { display: none; }
summary::before { content: '▸'; color: var(--accent); font-size: 12px; }
.group[open] summary::before { content: '▾'; }
.group-count { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: normal; }
.option { display: flex; align-items: flex-start; gap: 9px; padding: 11px 3px 11px 18px; border-top: 1px dotted #d8d4c8; cursor: pointer; }
.option:hover { background: #f7f5ec; }
.option input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #346563; }
.option-copy { display: flex; flex-direction: column; gap: 3px; }
.option-copy strong { font-size: 12px; }
.option-copy > span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.id { color: #77766c; font: 10px 'Courier New', monospace; }
.option > .id { margin-left: auto; padding-top: 3px; }
.output, .explore-result { position: sticky; top: 18px; padding: 20px; background: var(--wash); border: 1px solid var(--rule); border-top: 3px double #928c7e; }
.output-head { display: flex; justify-content: space-between; align-items: baseline; }
.output-head .section-label { margin-bottom: 9px; }
.output h2, .explore-result h2 { margin-bottom: 10px; font-size: 26px; }
#selection-count { font-size: 11px; color: var(--muted); }
.selected-list { display: flex; flex-wrap: wrap; gap: 5px; max-height: 145px; margin: 0 0 14px; padding: 0; overflow: auto; list-style: none; }
.selected-list button { padding: 4px 6px; border: 1px solid #ccc9bd; background: white; color: var(--ink); font-size: 10px; }
.link-box, .explore-link { display: flex; flex-wrap: wrap; padding: 11px; background: white; border: 1px solid #b8bcb5; font: 17px Georgia, serif; overflow-wrap: anywhere; }
.link-box span, .explore-link span { color: var(--muted); }
.link-box strong, .explore-link strong { font-weight: normal; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.actions .button { flex: 1; white-space: nowrap; font-size: 11px; padding: 9px; }
.format-actions { display: flex; flex-wrap: wrap; gap: 15px; margin: 16px 0; }
.format-actions button { padding: 0; border: 0; background: transparent; color: var(--link); text-decoration: underline; font-size: 11px; }
.notice { margin: 14px 0; padding: 10px 12px; border-left: 3px solid #a35b35; background: #f8ebdb; color: #653c2f; font-size: 12px; line-height: 1.55; }
.notice p { margin-bottom: 5px; }
.qr-panel { display: grid; grid-template-columns: 1fr 82px; gap: 10px; margin-top: 20px; padding-top: 19px; border-top: 1px solid var(--rule); }
.qr-panel .eyebrow { margin-bottom: 8px; }
.qr-panel h3 { margin-bottom: 8px; font-size: 18px; }
.qr-panel p:not(.eyebrow) { font-size: 11px; }
.qr-panel select { max-width: 100%; margin-bottom: 9px; padding: 5px; border: 1px solid #aab4ad; background: white; font-size: 11px; }
.qr-panel .button { min-height: 29px; padding: 7px 9px; font-size: 10px; }
.qr-preview { display: flex; align-items: center; justify-content: center; width: 82px; min-height: 82px; align-self: center; background: white; border: 1px solid var(--rule); }
.qr-preview img { width: 100%; image-rendering: pixelated; }
.qr-preview span { color: var(--muted); font-size: 10px; text-align: center; }
.qr-note { grid-column: 1 / -1; margin: 0; }
.lookup { display: flex; align-items: start; justify-content: space-between; gap: 32px; padding: 35px 43px 46px; border-top: 1px solid var(--rule); }
.lookup h2 { margin-bottom: 0; }
.lookup form { width: min(100%, 390px); }
.lookup form label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: bold; }
.lookup-entry { display: flex; gap: 7px; }
.lookup-entry .button { flex: none; }
.lookup form .fine { margin: 7px 0 0; }
.site-footer { padding: 23px 43px 27px; background: #ede9de; border-top: 1px solid var(--rule); }
.site-footer p { margin: 0 0 9px; font-size: 11px; line-height: 1.55; }
.site-footer p:last-child { margin-bottom: 0; }
.citation-page { padding: 48px 43px 60px; }
.citation-heading { max-width: 700px; }
.citation-heading h1 { margin-bottom: 16px; }
.citation-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 38px; margin-top: 32px; }
.declaration-card { min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 3px double var(--rule); }
.pill { color: var(--muted); font-size: 10px; font-weight: bold; }
.card-head code { overflow-wrap: anywhere; }
.declarations { margin: 0; padding: 0; list-style: none; }
.declarations li { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.declarations li > .id { margin-top: 3px; }
.declarations .eyebrow { margin-bottom: 5px; }
.declarations h2 { margin-bottom: 6px; font-size: 21px; }
.declarations p:not(.eyebrow) { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.scope-note { padding: 22px 0; font-size: 12px; }
.scope-note p { color: var(--muted); }
.citation-tools { min-width: 0; padding-top: 2px; }
.citation-tools h2 { font-size: 23px; }
.canonical-link { font: 17px Georgia, serif; overflow-wrap: anywhere; }
.citation-tools .search-label { margin-top: 25px; }
textarea { width: 100%; padding: 10px; border: 1px solid var(--rule); background: white; color: var(--muted); font-size: 11px; line-height: 1.5; resize: vertical; }
.citation-tools .qr-panel { grid-template-columns: 1fr 82px; }
.reading { max-width: 780px; padding: 49px 43px 60px; }
.reading h1 { margin-bottom: 23px; }
.reading h2 { margin: 33px 0 11px; font-size: 27px; }
.reading p, .reading dd { font-size: 13px; }
.reading .intro { font-size: 18px; }
.reading pre { padding: 14px; overflow-wrap: anywhere; white-space: pre-wrap; border: 1px solid var(--rule); background: var(--wash); font-size: 11px; line-height: 1.6; }
.vocabulary-group { margin-top: 33px; border-top: 3px double var(--rule); }
.vocabulary-group dl > div { padding: 13px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 12px; }
.vocabulary-group dt { font-size: 12px; font-weight: bold; }
.vocabulary-group .id { margin-right: 9px; }
.vocabulary-group dd { margin: 5px 0 0 28px; color: var(--muted); }
.hash { overflow-wrap: anywhere; }
.explore-page { padding: 47px 43px 58px; }
.explore-hero { max-width: 720px; margin-bottom: 29px; }
.explore-hero h1 { font-size: 50px; }
.explore-hero h1 { margin-bottom: 15px; }
.explore-layout { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 35px; align-items: start; }
.explore-layout > div > p { color: var(--muted); font-size: 12px; }
.explore-selected { max-height: 120px; margin: 0 0 14px; padding-left: 18px; overflow: auto; font-size: 11px; line-height: 1.7; }
.calculation { margin: 14px 0; border-top: 1px solid var(--rule); }
.calculation > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.calculation span { color: var(--muted); font-size: 10px; }
.calculation strong { font: 11px 'Courier New', monospace; text-align: right; overflow-wrap: anywhere; }
.calculation-total strong { font-weight: bold; }
.explore-result .actions { margin-top: 13px; }
.return-link { display: none; }
.blog-post p { font: 17px/1.65 Georgia, serif; }
.blog-post .eyebrow { font: bold 11px Verdana, sans-serif; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
#toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: 90vw; padding: 9px 13px; background: var(--ink); color: white; font-size: 12px; }
#toast:empty { display: none; }
[hidden] { display: none !important; }
@media (max-width: 740px) {
  body { margin: 0; border: 0; box-shadow: none; }
  .site-header .masthead { display: block; padding: 23px 23px 16px; }
  .masthead p { margin-top: 5px; }
  nav { padding: 0 12px; }
  nav a { padding: 10px 9px; font-size: 11px; }
  .front, .builder, .citation-page, .reading, .explore-page { padding-left: 23px; padding-right: 23px; }
  .front { padding-top: 42px; }
  .builder-grid, .citation-grid, .explore-layout { grid-template-columns: 1fr; }
  .output, .explore-result { position: static; }
  .output, .explore-result { grid-row: 1; }
  .picker, .explore-layout > div { grid-row: 2; }
  .return-link { display: block; margin: 18px 0 0; font-size: 12px; }
  .lookup { display: block; padding: 30px 23px; }
  .lookup form { margin-top: 20px; }
  .site-footer { padding: 22px 23px; }
}
@media (max-width: 420px) {
  .wordmark { font-size: 34px; }
  .wordmark span { font-size: 21px; }
  .example-note img { display: none; }
  .front-links { align-items: flex-start; flex-direction: column; gap: 13px; }
  .actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  :root { background: white; }
  body { margin: 0; border: 0; box-shadow: none; }
  .site-header, .site-footer, .citation-tools, .skip, #toast { display: none; }
  .citation-grid { display: block; }
  .citation-page { padding: 0; }
  .declarations li { break-inside: avoid; }
}
