:root {
  --paper: #ECEFEA;
  --sheet: #F7F8F5;
  --ink: #1C2633;
  --muted: #566170;
  --rule: #C3CBC2;
  --accent: #1E5B47;
  --mark: #A3343F;
  --serif: "Literata", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --measure: 38rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141A1F; --sheet: #1B2228; --ink: #DCE2DD; --muted: #95A2AA;
    --rule: #303B43; --accent: #82C6A8; --mark: #E58A93;
  }
}
:root[data-theme="dark"] {
  --paper: #141A1F; --sheet: #1B2228; --ink: #DCE2DD; --muted: #95A2AA;
  --rule: #303B43; --accent: #82C6A8; --mark: #E58A93;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.7 var(--serif);
  font-optical-sizing: auto;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
i, em { font-style: italic; }
code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; }
pre { background: var(--sheet); border: 1px solid var(--rule); padding: 1rem; overflow-x: auto; line-height: 1.5; white-space: pre-wrap; border-radius: 3px; }
h1, h2, h3 { font-weight: 600; line-height: 1.2; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--sheet); padding: .5rem 1rem; z-index: 9; }

/* ---------- chrome */
header.site, footer.site, main { max-width: 68rem; margin: 0 auto; padding-left: 1rem; padding-right: 1rem; }
header.site {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding-top: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--rule);
  font-family: var(--sans); font-size: 0.9375rem;
}
.mark { color: var(--ink); text-decoration: none; font: italic 500 1.375rem/1 var(--serif); letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: .5rem; }
.mark-glyph { width: 0.9rem; height: 0.9rem; border: 1.5px solid var(--accent); border-radius: 50%; position: relative; }
.mark-glyph::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1.5px; height: 0.35rem; background: var(--accent); transform: translateX(-50%); }
header.site nav { display: flex; gap: 1.25rem; }
header.site nav a { color: var(--ink); text-decoration: none; }
header.site nav a:hover { color: var(--accent); }
footer.site { border-top: 1px solid var(--rule); margin-top: 4rem; padding-top: 1.5rem; padding-bottom: 3rem; font: 0.875rem/1.6 var(--sans); color: var(--muted); }
footer.site p + p a { margin-right: 1rem; }
footer.site p { margin: 0 0 .5rem; }

/* ---------- home */
.hero { padding: 3.5rem 0 2.5rem; max-width: 46rem; }
.headword { margin: 0 0 1rem; }
.hw { font: italic 500 clamp(2.75rem, 8vw, 4.75rem)/1 var(--serif); letter-spacing: -0.025em; }
.pos { font: italic 400 1.25rem var(--serif); color: var(--muted); margin-left: .35rem; }
.senses { margin: 0; padding-left: 1.6rem; font-size: 1.1875rem; line-height: 1.6; max-width: var(--measure); }
.senses li { padding-left: .35rem; margin-bottom: .6rem; }
.senses li::marker { font-weight: 600; color: var(--accent); }
.search { margin-top: 2.25rem; font-family: var(--sans); }
.search label { display: block; font-size: 0.9375rem; font-weight: 600; margin-bottom: .4rem; }
.search input {
  width: 100%; max-width: 30rem; font: 400 1.0625rem var(--sans); color: var(--ink);
  background: var(--sheet); border: 1px solid var(--rule); border-bottom: 2px solid var(--ink);
  padding: .7rem .8rem; border-radius: 3px 3px 0 0;
}
.search input::placeholder { color: var(--muted); }
.count { color: var(--muted); font-size: .875rem; margin: .5rem 0 0; }

.classification { columns: 2 22rem; column-gap: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.branch { break-inside: avoid; padding: 1.75rem 0 1rem; }
.branch h2 { font-size: 1.375rem; margin: 0 0 .35rem; }
.branch h2 a { color: var(--ink); text-decoration: none; }
.branch h2 a:hover { color: var(--accent); }
.branch-desc { margin: 0 0 .9rem; color: var(--muted); font-size: .9375rem; line-height: 1.55; max-width: 32rem; }
.branch.empty { display: none; }

/* the classification tree: hairline branches like a cladogram */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: .55rem; padding-left: 1.1rem; border-left: 1px solid var(--rule); }
.tree li { position: relative; }
.tree ul > li::before { content: ""; position: absolute; left: -1.1rem; top: .95em; width: .8rem; border-top: 1px solid var(--rule); }
.tree ul > li:last-child { }
.node { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; padding: .18rem 0; }
.node a { text-decoration: none; font-size: 1.0625rem; }
.node a:hover { text-decoration: underline; }
.code { font: 400 .75rem var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; flex: none; }
.tree li.hidden { display: none; }
.tree li.match > .node a { background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ---------- entry */
.crumbs { font: .875rem var(--sans); color: var(--muted); padding: 2rem 0 0; }
.crumbs a { color: var(--muted); }
.entry-grid { display: grid; grid-template-columns: minmax(0, 1fr) 17.5rem; gap: 3.5rem; align-items: start; }
.entry-main { max-width: var(--measure); }
.entry h1 { font: italic 500 clamp(2.25rem, 6vw, 3.5rem)/1.05 var(--serif); letter-spacing: -0.02em; margin: .75rem 0 .5rem; }
.aka { color: var(--muted); margin: 0 0 1.75rem; font-size: 1rem; }
.definition { margin: 0 0 2.25rem; padding: 0 0 0 1.25rem; border-left: 3px solid var(--accent); }
.definition p { margin: 0; font-size: 1.3125rem; line-height: 1.55; }
.entry h2, .prose h2, .listing h2 { font: 600 1rem var(--sans); margin: 2.25rem 0 .6rem; }
.entry section p { margin: 0 0 1rem; }
.sources { padding-left: 1.4rem; margin: 0; }
.sources li { margin-bottom: .6rem; line-height: 1.55; }
.cite { margin-top: 2.5rem; padding-top: .25rem; border-top: 1px solid var(--rule); }
.cite-text { font-size: .9375rem; background: var(--sheet); border: 1px solid var(--rule); padding: .85rem 1rem; border-radius: 3px; line-height: 1.55; }
.cite details { margin: .75rem 0; font-family: var(--sans); font-size: .9rem; }
.cite summary { cursor: pointer; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; font: .9rem var(--sans); }
.actions button {
  font: 500 .875rem var(--sans); color: var(--ink); background: var(--sheet);
  border: 1px solid var(--ink); border-radius: 3px; padding: .45rem .8rem; cursor: pointer;
}
.actions button:hover { background: var(--ink); color: var(--paper); }

/* the specimen label */
.label {
  position: sticky; top: 1.5rem; margin-top: 1.25rem;
  background: var(--sheet); border: 1px solid var(--ink); padding: 1.1rem 1.2rem 1.2rem;
  font: .875rem/1.5 var(--sans); box-shadow: 4px 4px 0 var(--rule);
}
.label dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; }
.label dt { color: var(--muted); }
.label dd { margin: 0; font-variant-numeric: tabular-nums; }
.label dd:first-of-type { color: var(--mark); font-weight: 600; }
.rel { border-top: 1px solid var(--rule); margin-top: 1rem; padding-top: .8rem; }
.rel h3 { font: 600 .8125rem var(--sans); margin: 0 0 .35rem; color: var(--muted); }
.rel ul { list-style: none; margin: 0; padding: 0; }
.rel li { font: 1rem/1.45 var(--serif); padding: .1rem 0; }

/* ---------- listings & prose */
.listing, .prose { max-width: 46rem; }
.listing h1, .prose h1 { font: 500 clamp(2rem, 5vw, 2.75rem)/1.1 var(--serif); letter-spacing: -0.015em; margin: 1rem 0 .75rem; }
.prose h1 { margin-top: 2.5rem; }
.lede { font-size: 1.1875rem; color: var(--muted); margin: 0 0 2rem; max-width: var(--measure); }
.prose p { max-width: var(--measure); }
.glossary { margin: 0; }
.dt-row { padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.glossary dt { font-size: 1.125rem; margin-bottom: .2rem; }
.glossary dt a { text-decoration: none; }
.glossary dd { margin: 0; max-width: var(--measure); }
.letters { font: 500 1rem var(--sans); display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-bottom: 1rem; }
.listing section h2 { font: italic 500 1.75rem var(--serif); margin: 2rem 0 .25rem; color: var(--accent); }
.files { width: 100%; border-collapse: collapse; font: .9375rem/1.5 var(--sans); margin: 1.5rem 0; }
.files th, .files td { text-align: left; padding: .6rem .75rem .6rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.files th { font-weight: 600; color: var(--muted); }

@media (max-width: 52rem) {
  .entry-grid { grid-template-columns: 1fr; gap: 1rem; }
  .label { position: static; margin-top: 1rem; }
}
@media (max-width: 30rem) {
  header.site nav { gap: .9rem; }
  .senses { font-size: 1.0625rem; }
  .files th:nth-child(3), .files td:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
