/* Public Dashboard (/dashboard). Loaded IN ADDITION to public.css on that
   page only; it reuses the site's palette and type stack verbatim (parchment
   ground, brown/near-black ink, Charis SIL for figures and headings, the
   system sans for labels) and adds nothing to any other page.

   Everything here is scoped under .dashboard (or body.page-dashboard for the
   two rules that widen the page frame), so it cannot leak into other pages.

   Progressive enhancement: every chart is plain HTML/CSS and is complete
   without JavaScript. dashboard.js adds the html.js-gated entrance motion,
   tooltips, the count-up and the zoomable sunburst. */

/* --- page frame: a little wider than the 1000px reading pages ------- */
body.page-dashboard #public-main,
body.page-dashboard #public-site-header nav { max-width: 1180px; }

.dashboard {
  --ink: #1c1a17;
  --ink-soft: #4a4436;
  --brown: #6b5c3f;
  --brown-dark: #4a4030;
  --gold: #b89b5e;
  --gold-soft: #e6d8b6;
  --line: #ddd4c4;
  --line-soft: #eee6d5;
  --card: #fffefb;
  --wash: #f6f1e4;
  --c-headword: #7a3b12;
  --c-cognate: #2b6a3f;
  --c-citation: #2b5c8a;
  --c-plum: #7d5a78;
  --c-noun: #7a3b12;
  --c-verb: #2b6a3f;
  --c-adj: #2b5c8a;
  --c-propn: #b89b5e;
  --c-suffix: #7d5a78;
  --c-other: #8c7e5f;
  --sans: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Charis SIL", Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  font-family: var(--sans);
  color: var(--ink);
}
.dashboard h1, .dashboard h2, .dashboard h3 { font-weight: 700; }
.dashboard a { color: var(--c-headword); }
.dashboard a:hover { color: #4d2508; }

/* --- hero ----------------------------------------------------------- */
.dash-hero { padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.dash-runes {
  margin: 0 0 6px;
  font-family: "Segoe UI Historic", "Noto Sans Runic", "Segoe UI Symbol", serif;
  font-size: 1.05rem;
  letter-spacing: 0.55em;
  white-space: nowrap;
  overflow: hidden;
  color: var(--gold);
  opacity: 0.9;
  user-select: none;
}
.dash-hero h1 { font-size: 2.7rem; letter-spacing: -0.01em; margin: 0 0 8px; }
.dash-lede { max-width: 46em; margin: 0 0 12px; font-family: var(--serif); font-size: 1.08rem; color: var(--ink-soft); }
.dash-updated { margin: 0; font-size: 0.8rem; color: var(--brown); }
.dash-updated a { color: var(--brown); }

/* --- sticky on-page navigation --------------------------------------- */
.dash-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 2px;
  padding: 8px 0;
  margin: 0 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(253, 251, 247, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-soft);
}
.dash-nav::-webkit-scrollbar { display: none; }
.dash-nav a {
  flex: 0 0 auto;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--brown);
  white-space: nowrap;
}
.dash-nav a:hover { background: var(--wash); color: var(--ink); }
.dash-nav a[aria-current="true"] { background: var(--brown); color: #fffefb; }

/* --- sections --------------------------------------------------------- */
.dash-section { margin: 44px 0 0; scroll-margin-top: 54px; }
html { scroll-behavior: smooth; }
.dash-section-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.dash-rune {
  flex: 0 0 auto;
  width: 1.3em;
  font-family: "Segoe UI Historic", "Noto Sans Runic", "Segoe UI Symbol", serif;
  font-size: 2.1rem;
  line-height: 1.05;
  text-align: center;
  color: var(--gold);
}
.dashboard .dash-section-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.7rem;
  line-height: 1.15;
}
.dash-section-sub { margin: 3px 0 0; font-size: 0.93rem; color: var(--brown); }
.section-aside { margin: 4px 0 0; font-size: 0.88rem; color: var(--brown); font-family: var(--serif); }

/* --- KPI tiles ------------------------------------------------------- */
.kpi-group-label {
  margin: 20px 0 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brown);
}
.kpi-group-label:first-of-type { margin-top: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.kpi {
  --accent: var(--gold);
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 13px 16px 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(74, 64, 48, 0.1); }
.kpi--headword { --accent: var(--c-headword); }
.kpi--cognate { --accent: var(--c-cognate); }
.kpi--citation { --accent: var(--c-citation); }
.kpi--plum { --accent: var(--c-plum); }
.kpi--brown { --accent: var(--brown); }
.kpi-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--brown); }
.kpi-value {
  margin: 2px 0 1px;
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1.12;
  font-variant-numeric: lining-nums tabular-nums;
}
.kpi-sub { font-size: 0.8rem; color: var(--brown); }

/* --- cards and column layouts ---------------------------------------- */
.dash-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 16px 18px 14px;
  margin: 0 0 14px;
}
.dash-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 14px;
  align-items: start;
  margin: 0 0 14px;
}
.dash-cols > .dash-card, .dash-cols > div > .dash-card:last-child { margin-bottom: 0; }
.dash-cols--gauge { grid-template-columns: minmax(250px, 330px) minmax(0, 1fr); }
.dash-cols--sunburst { grid-template-columns: minmax(320px, 580px) minmax(0, 1fr); }
.dash-cols--tree { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.dash-cols--curio { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
@media (max-width: 880px) {
  .dash-cols--gauge, .dash-cols--sunburst, .dash-cols--tree, .dash-cols--curio { grid-template-columns: minmax(0, 1fr); }
}
.dashboard .card-title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.dashboard .card-title--spaced { margin-top: 20px; }
.card-title-note { font-weight: 400; font-size: 0.8rem; color: var(--brown); }
.card-note { margin: 10px 0 0; font-size: 0.78rem; color: var(--brown); }
.card-note--top { margin: -4px 0 10px; }
.dash-card:last-child .card-note:last-child { margin-bottom: 0; }

/* --- fact strip ------------------------------------------------------- */
.fact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  margin: 0 0 14px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.fact { background: var(--card); padding: 12px 16px; }
.fact-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-headword);
  font-variant-numeric: lining-nums tabular-nums;
}
.fact-cap { display: block; margin-top: 1px; font-size: 0.8rem; color: var(--brown); }

/* --- horizontal bar lists --------------------------------------------- */
.bar-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
ol.bar-list { counter-reset: none; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 12.5em) minmax(40px, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
  margin: 0 -6px;
  border-radius: 3px;
  font-size: 0.88rem;
  color: var(--ink);
  text-decoration: none;
}
.bar-list--ranked .bar-row { grid-template-columns: 1.4em minmax(0, 12.5em) minmax(40px, 1fr) auto; }
.bar-list--wide .bar-row { grid-template-columns: minmax(0, 16em) minmax(40px, 1fr) auto; }
.bar-list--wide.bar-list--ranked .bar-row { grid-template-columns: 1.4em minmax(0, 16em) minmax(40px, 1fr) auto; }
.bar-list--compact { gap: 1px; }
a.bar-row:hover, a.bar-row:focus-visible { background: var(--wash); color: var(--ink); }
a.bar-row:hover .bar-fill { filter: brightness(0.92); }
.bar-rank { font-size: 0.78rem; color: var(--gold); font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.bar-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label:first-child { font-weight: 500; }
.bar-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.72rem; color: var(--brown); }
.bar-track { display: block; height: 12px; background: var(--wash); border-radius: 2px; overflow: hidden; }
.bar-fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  background: var(--bar, var(--brown));
  border-radius: 2px;
  transition: width 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bar-val { min-width: 3.3em; text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-val.bar-val--text { min-width: 6.2em; }
.tone-citation { --bar: var(--c-citation); }
.tone-cognate { --bar: var(--c-cognate); }
.tone-headword { --bar: var(--c-headword); }
.tone-gold { --bar: var(--gold); }
.tone-brown { --bar: var(--brown); }
.tone-plum { --bar: var(--c-plum); }
.tone-noun { --bar: var(--c-noun); }
.tone-verb { --bar: var(--c-verb); }
.tone-adj { --bar: var(--c-adj); }
.tone-propn { --bar: var(--c-propn); }
.tone-suffix { --bar: var(--c-suffix); }
.tone-other { --bar: var(--c-other); }
.tone-root { --bar: var(--brown); }
@media (max-width: 520px) {
  .bar-row { grid-template-columns: minmax(0, 8em) minmax(30px, 1fr) auto; gap: 8px; }
  .bar-list--ranked .bar-row, .bar-list--wide.bar-list--ranked .bar-row { grid-template-columns: 1.2em minmax(0, 8em) minmax(30px, 1fr) auto; }
  .bar-list--wide .bar-row { grid-template-columns: minmax(0, 9em) minmax(30px, 1fr) auto; }
}

.show-all { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.show-all > summary { cursor: pointer; font-size: 0.83rem; color: var(--brown); }
.show-all > summary:hover { color: var(--ink); }
.show-all[open] > summary { margin-bottom: 10px; }
.lang-cloud { list-style: none; margin: 0; padding: 0; columns: 3 170px; column-gap: 18px; font-size: 0.8rem; }
.lang-cloud li { break-inside: avoid; padding: 1px 0; color: var(--ink-soft); }
.lang-cloud li span { color: var(--brown); font-variant-numeric: tabular-nums; }

/* --- coverage meters ---------------------------------------------------- */
.meter-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.meter { display: grid; grid-template-columns: minmax(0, 15em) minmax(40px, 1fr) 3em; gap: 12px; align-items: center; font-size: 0.87rem; }
.meter-track { display: block; height: 10px; background: var(--wash); border-radius: 5px; overflow: hidden; }
.meter-track .bar-fill { --bar: var(--gold); border-radius: 5px; }
.meter-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
@media (max-width: 520px) { .meter { grid-template-columns: minmax(0, 9em) minmax(30px, 1fr) 2.6em; gap: 8px; } }

/* --- progress gauge ------------------------------------------------------ */
.gauge-card { text-align: center; }
.gauge { display: block; width: 168px; height: 168px; margin: 0 auto 6px; }
.gauge-track { fill: none; stroke: var(--line-soft); stroke-width: 12; }
.gauge-fill {
  fill: none;
  stroke: var(--c-headword);
  stroke-width: 12;
  stroke-linecap: round;
  stroke-dasharray: var(--dash, 0) 351.86;
  transition: stroke-dasharray 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gauge-num { font-family: var(--serif); font-size: 30px; font-weight: 700; fill: var(--ink); }
.gauge-cap { font-family: var(--sans); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; fill: var(--brown); }
.gauge-text { margin: 4px 0 6px; font-size: 0.93rem; }
.gauge-sub { margin: 0; font-size: 0.8rem; color: var(--brown); }

/* --- column charts --------------------------------------------------------- */
.cols-wrap { padding: 8px 0 26px; }
.cols-wrap--tall { padding-top: 12px; }
.cols { display: flex; align-items: stretch; gap: 3px; height: 150px; border-bottom: 1px solid var(--line); }
.cols--alpha { height: 190px; gap: 4px; }
.cols--fat { height: 170px; gap: 12px; }
.col {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 2px 2px 0 0;
}
.col:hover { background: rgba(184, 155, 94, 0.12); }
.col-bar {
  display: block;
  position: relative;
  height: var(--h, 0%);
  background: var(--brown);
  border-radius: 2px 2px 0 0;
  transition: height 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cols--fat .col-bar { height: calc(var(--h, 0%) * 0.84); }
.col-bar--alt { background: var(--c-headword); }
.col-bar--total { background: var(--gold-soft); }
.col-bar--done { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c-headword); border-radius: 2px 2px 0 0; }
.col-stack { display: flex; flex-direction: column-reverse; height: var(--h, 0%); transition: height 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.col-val { padding-bottom: 3px; text-align: center; font-size: 0.74rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.col-label {
  position: absolute;
  top: 100%;
  left: -6px;
  right: -6px;
  margin-top: 5px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--brown);
  white-space: nowrap;
}
.col:hover .col-bar:not(.col-bar--total), .col:hover .col-stack { filter: brightness(1.12); }
.seg { display: block; }
.seg-0 { background: #7a3b12; }
.seg-1 { background: #2b5c8a; }
.seg-2 { background: #2b6a3f; }
.seg-3 { background: #b89b5e; }
.seg-4 { background: #a89f8a; }
.key { display: inline-block; width: 10px; height: 10px; margin: 0 4px 0 12px; border-radius: 2px; vertical-align: -1px; }
.key:first-child { margin-left: 0; }
.key--done { background: var(--c-headword); margin-left: 6px; }
.key--total { background: var(--gold-soft); }
.legend { line-height: 1.9; }

/* --- expandable trees ---------------------------------------------------------- */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 0.55em; padding-left: 0.95em; border-left: 1px solid var(--line-soft); }
.tree-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(48px, 30%) 3.8em;
  gap: 10px;
  align-items: center;
  padding: 3px 0;
  font-size: 0.88rem;
}
summary.tree-row { cursor: pointer; list-style: none; }
summary.tree-row::-webkit-details-marker { display: none; }
summary.tree-row:hover { background: var(--wash); }
.tree-name { position: relative; padding-left: 1.15em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details > summary .tree-name::before {
  content: "\25B8";
  position: absolute;
  left: 0.1em;
  color: var(--gold);
  transition: transform 0.15s ease;
}
details[open] > summary .tree-name::before { transform: rotate(90deg); }
.tree-name a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--gold); }
.tree-name a:hover { color: var(--c-headword); border-bottom-style: solid; }
.tree-bar { display: block; height: 9px; background: var(--wash); border-radius: 2px; overflow: hidden; }
.tree-val { text-align: right; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tree-more { margin: 1px 0 5px 1.7em; font-size: 0.76rem; font-style: italic; color: var(--brown); }

/* --- sunburst ----------------------------------------------------------------------- */
.sunburst-crumbs { min-height: 1.7em; margin: 0 0 4px; font-size: 0.82rem; color: var(--brown); }
.sunburst-crumbs button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--brown);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  cursor: pointer;
}
.sunburst-crumbs button:hover { color: var(--ink); }
.sunburst-crumbs .sep { margin: 0 0.35em; color: var(--gold); }
.sunburst-crumbs .here { color: var(--ink); font-weight: 600; }
.sunburst { width: 100%; max-width: 560px; margin: 0 auto; }
.sunburst svg { display: block; width: 100%; height: auto; overflow: visible; animation: dashPop 0.35s ease-out; }
.sunburst .arc { cursor: pointer; stroke: var(--card); stroke-width: 1.5; transition: filter 0.12s ease; }
.sunburst .arc:hover, .sunburst .arc:focus-visible { filter: brightness(1.14) saturate(1.1); outline: none; }
.sunburst .arc:focus-visible { stroke: var(--ink); stroke-width: 2; }
.sunburst text { pointer-events: none; font-family: var(--sans); }
.sunburst .center { cursor: default; outline: none; }
.sunburst .center.can-zoom { cursor: pointer; }
.sunburst .center.can-zoom:hover circle, .sunburst .center.can-zoom:focus-visible circle { fill: var(--wash); }
.sunburst-detail { min-height: 3.4em; margin: 8px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 0.88rem; }
.sunburst-detail strong { font-family: var(--serif); font-size: 1.05rem; }
.sunburst-detail .browse { display: inline-block; margin-top: 3px; font-size: 0.85rem; }
.sunburst-fallback { display: none; margin: 0; font-size: 0.85rem; color: var(--brown); }
html:not(.js) .sunburst-fallback { display: block; }
html:not(.js) .sunburst-crumbs, html:not(.js) .sunburst-detail { display: none; }
@keyframes dashPop { from { opacity: 0; transform: scale(0.965); } to { opacity: 1; transform: none; } }
@keyframes dashFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* --- noun stem x gender matrix -------------------------------------------------------------- */
.matrix-wrap { overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.matrix th, .matrix td { padding: 7px 14px; border: 1px solid var(--line-soft); text-align: right; }
.matrix thead th { background: var(--wash); color: var(--brown); font-weight: 600; }
.matrix thead th:not(:first-child):not(:last-child) { text-transform: capitalize; }
.matrix thead th:first-child, .matrix tbody th { text-align: left; }
.matrix tbody th { font-weight: 600; white-space: nowrap; }
.matrix tbody th a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--gold); }
.matrix td { background: rgba(122, 59, 18, var(--a, 0)); }
.matrix td a { display: block; margin: -7px -14px; padding: 7px 14px; color: inherit; text-decoration: none; }
.matrix td a:hover { text-decoration: underline; }
.matrix td.hot, .matrix td.hot a { color: #fffefb; }
.matrix td.zero { color: #c5bba3; }
.matrix .matrix-total { background: var(--wash); font-weight: 600; }

/* --- cognate language drill-down --------------------------------------------------------------- */
.language-panel { margin: 0 0 14px; scroll-margin-top: 56px; }
.language-panel-empty {
  margin: 0;
  padding: 14px 18px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  font-size: 0.88rem;
  font-style: italic;
  color: var(--brown);
}
.lang-panel {
  padding: 16px 18px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--c-cognate);
  border-radius: 4px;
  animation: dashFade 0.3s ease-out;
}
.lang-panel h3 { margin: 0; font-size: 1.15rem; font-family: var(--serif); }
.lang-panel-sub { margin: 2px 0 10px; font-size: 0.82rem; color: var(--brown); }
.lang-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.lang-table th, .lang-table td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.lang-table thead th { font-size: 0.72rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--brown); }
.lang-orth { font-family: var(--serif); font-size: 1.05rem; color: var(--c-cognate); }
.lang-translit { color: var(--c-cognate); font-style: italic; }
.lang-count { white-space: nowrap; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.hw-link { font-style: italic; text-decoration: none; }
.hw-link:hover { text-decoration: underline; }
.lang-entries { margin-right: 0.4em; }
.lang-more { font-size: 0.78rem; color: var(--brown); }
.lang-close { margin: 10px 0 2px; font-size: 0.8rem; }
@media (max-width: 640px) { .lang-table th:nth-child(3), .lang-table td:nth-child(3) { display: none; } }

/* --- research topics --------------------------------------------------------------------------------- */
.topic-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; margin: 0 0 10px; }
.topic-groups .dash-card { margin: 0; }
.topic-list { list-style: none; margin: 0; padding: 0; }
.topic-list a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  text-decoration: none;
}
.topic-list li:last-child a { border-bottom: 0; }
.topic-list a:hover { background: var(--wash); }
.topic-count { flex: 0 0 3em; text-align: right; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--c-headword); font-variant-numeric: lining-nums tabular-nums; }
.topic-text { min-width: 0; }
.topic-label { display: block; font-weight: 600; font-size: 0.9rem; }
.topic-blurb { display: block; font-size: 0.76rem; color: var(--brown); line-height: 1.3; }

/* --- curiosities ---------------------------------------------------------------------------------------- */
.random-slot { min-width: 0; }
.random-card {
  position: relative;
  padding: 20px 22px 16px;
  background: linear-gradient(180deg, var(--card), #f9f3e3);
  border: 1px solid var(--line);
  border-radius: 4px;
  animation: dashFade 0.3s ease-out;
}
.random-eyebrow { margin: 0 0 4px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brown); }
.random-card h3 { margin: 0; font-family: var(--serif); font-size: 2.1rem; font-weight: 700; line-height: 1.15; }
.random-card h3 a { color: var(--c-headword); text-decoration: none; }
.random-card h3 a:hover { text-decoration: underline; }
.random-meta { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
.random-runic { margin-left: 0.7em; font-family: "Segoe UI Historic", "Noto Sans Runic", "Segoe UI Symbol", serif; font-size: 1.15rem; letter-spacing: 0.1em; color: var(--gold); }
.random-grammar { margin: 2px 0 10px; font-size: 0.83rem; color: var(--brown); }
.random-senses { margin: 0 0 10px 1.3em; padding: 0; font-family: var(--serif); font-size: 0.98rem; }
.random-senses li { margin: 2px 0; }
.random-foot { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; margin: 12px 0 0; font-size: 0.83rem; color: var(--brown); }
.random-again {
  margin-left: auto;
  padding: 5px 13px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 0.83rem;
  text-decoration: none;
  color: var(--brown-dark);
  background: #fffefb;
}
.random-again:hover { background: var(--gold-soft); color: var(--ink); }
.records { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; align-content: start; }
.record { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.record-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brown); }
.record-value { margin: 2px 0 1px; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.record-value a { text-decoration: none; }
.record-value a:hover { text-decoration: underline; }
.record-detail { font-size: 0.78rem; line-height: 1.35; color: var(--brown); }

/* --- definitions ----------------------------------------------------------------------------------------- */
.dash-definitions { padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; }
.dash-definitions > summary { cursor: pointer; font-family: var(--serif); font-size: 1.15rem; font-weight: 700; }
.dash-definitions[open] > summary { margin-bottom: 10px; }
.dash-definitions dl { display: grid; grid-template-columns: minmax(9em, 16em) 1fr; gap: 8px 22px; margin: 0; font-size: 0.88rem; }
.dash-definitions dt { font-weight: 600; }
.dash-definitions dd { margin: 0; color: var(--ink-soft); }
@media (max-width: 640px) { .dash-definitions dl { grid-template-columns: 1fr; gap: 0; } .dash-definitions dd { margin-bottom: 10px; } }

/* --- tooltip (same look as the entry-page hover tooltip) ------------------------------------------------------ */
.dash-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 320px;
  padding: 7px 10px;
  border-radius: 4px;
  background: #2b2b2b;
  color: #f5f5f5;
  font-family: var(--sans, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.dash-tooltip[hidden] { display: none; }

/* --- entrance motion: only when dashboard.js is running (html.js), and never for people who ask for less --- */
.js .dashboard .reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.55s ease, transform 0.55s ease; }
.js .dashboard .reveal.in { opacity: 1; transform: none; }
.js .dashboard .reveal:not(.in) .bar-fill { width: 0; }
.js .dashboard .reveal:not(.in) .col-bar,
.js .dashboard .reveal:not(.in) .col-stack { height: 0; }
.js .dashboard .reveal:not(.in) .gauge-fill { stroke-dasharray: 0 351.86; }
@media (prefers-reduced-motion: reduce) {
  .dashboard *, .dashboard *::before, .dashboard *::after { transition: none !important; animation: none !important; }
  .js .dashboard .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
@media print {
  .dash-nav { display: none; }
  .js .dashboard .reveal { opacity: 1; transform: none; }
  .js .dashboard .reveal:not(.in) .bar-fill { width: var(--w, 0%); }
  .js .dashboard .reveal:not(.in) .col-bar { height: var(--h, 0%); }
  .js .dashboard .reveal:not(.in) .col-stack { height: var(--h, 0%); }
  .js .dashboard .reveal:not(.in) .gauge-fill { stroke-dasharray: var(--dash, 0) 351.86; }
  .dash-card, .kpi, .record { break-inside: avoid; }
}
@media (max-width: 560px) {
  .dash-hero h1 { font-size: 2.1rem; }
  .kpi-value { font-size: 1.85rem; }
  .dash-runes { font-size: 0.9rem; letter-spacing: 0.35em; }
  .cols--alpha { gap: 2px; }
}
