/* Niuance tokens (apps/site/DESIGN.md): lightbox paper and ink; proofreader's red only marks what was caught. */
.dk {
  --paper: #eef2f0;
  --surface: #ffffff;
  --text: #121413;
  --muted: #5c6360;
  --rule: #c9d1cd;
  --mark: #d9262e;
  --serif: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --ui: "Schibsted Grotesk", system-ui, -apple-system, "PingFang SC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color: var(--text);
  font: 400 16px/1.7 var(--serif);
  background: var(--paper);
  min-height: 100vh;
}
@media (prefers-color-scheme: dark) {
  .dk { --paper: #101211; --surface: #1a1d1b; --text: #d8ded9; --muted: #9aa39e; --rule: #2c312e; --mark: #ff5a52; }
}
/* Chinese fonts carry Cyrillic and Latin glyphs too and would win over Georgia; put the Western serif first. */
.dk:not([data-lang="zh"]) { --serif: "Source Serif 4", Georgia, "Times New Roman", serif; }
html, body { margin: 0; background: #eef2f0; }
@media (prefers-color-scheme: dark) { html, body { background: #101211; } }
.dk *, .dk *::before, .dk *::after { box-sizing: border-box; }
.dk :focus-visible { outline: 2px solid var(--mark); outline-offset: 2px; }
.dk button, .dk input { font: inherit; color: inherit; }
.dk a { color: inherit; }
.dk b { font-weight: 700; }

.dk-kicker { margin: 0; font: 500 12px/1 var(--ui); letter-spacing: 0.06em; color: var(--muted); }
.dk-title { margin: 8px 0 0; font: 900 40px/1.15 var(--serif); }
.dk-title span { display: block; margin-top: 6px; font: 400 17px/1.4 var(--serif); color: var(--muted); }
.dk-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 400 13px/1.6 var(--ui); }
.dk-langs button { border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; }
.dk-langs button:hover { color: var(--mark); }
.dk-langs button[aria-pressed="true"] { color: var(--text); font-weight: 500; }
.dk-foot { margin-top: 64px; font: 400 12px/1.7 var(--ui); color: var(--muted); }

/* Hub */
.dk-hub { max-width: 1280px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 96px; }
.dk-hub-head { display: grid; gap: 16px; max-width: 44rem; margin-bottom: 40px; }
.dk-intro { margin: 0; color: var(--muted); }
.dk-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.dk-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
.dk-card h2 { margin: 0; font: 900 24px/1.25 var(--serif); }
.dk-card p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.dk-card-sub { font: 400 14px/1.4 var(--serif); color: var(--muted); font-style: italic; }
.dk-card-links { margin-top: auto; display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--rule); font: 500 14px/1.4 var(--ui); }
.dk-card-links a { text-decoration: none; }
.dk-card-links a:hover { color: var(--mark); }

/* Topic page */
.dk-shell { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; max-width: 1280px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 96px; }
.dk-side { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 24px; }
.dk-back { font: 500 13px/1 var(--ui); color: var(--muted); text-decoration: none; }
.dk-back:hover { color: var(--mark); }
.dk-search { width: 100%; padding: 11px 14px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); font: 400 16px/1.4 var(--ui); }
.dk-search:focus { border-color: var(--text); outline: none; }
[data-filters] { display: grid; gap: 20px; }
.dk-group { display: flex; flex-direction: column; gap: 8px; }
.dk-label { font: 500 12px/1 var(--ui); letter-spacing: 0.02em; color: var(--muted); }
.dk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dk-chip { border: 1px solid var(--rule); border-radius: 3px; background: transparent; padding: 4px 9px; font: 500 14px/1.4 var(--ui); cursor: pointer; }
.dk-chip:hover { border-color: var(--text); }
.dk-chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--paper); }
.dk-quest { display: block; padding: 14px 16px; border: 1px solid var(--text); border-radius: 4px; font: 500 14px/1.5 var(--ui); text-decoration: none; }
.dk-quest:hover { border-color: var(--mark); color: var(--mark); }
.dk-quest small { display: block; font-weight: 400; color: var(--muted); }
.dk[data-mode="drill"] [data-list-only], .dk[data-mode="rules"] [data-list-only], .dk:not([data-mode="drill"]) [data-drill-only] { display: none; }
.dk-bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.dk-count { font: 400 13px/1.5 var(--ui); color: var(--muted); }
.dk-empty { margin: 48px 0; font: 400 17px/1.8 var(--serif); color: var(--muted); }

.dk-section { margin-top: 40px; }
.dk-section h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; font: 900 26px/1.2 var(--serif); }
.dk-section h2 span { font: 400 15px/1 var(--serif); font-style: italic; color: var(--muted); }
.dk-sec-intro { margin: -4px 0 12px; font: 400 14px/1.6 var(--ui); color: var(--muted); }
.dk-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.dk-table th, .dk-table td { padding: 9px 12px; border: 1px solid var(--rule); text-align: left; vertical-align: baseline; overflow-wrap: anywhere; }
.dk-table thead th { font: 500 13px/1.3 var(--ui); color: var(--muted); }
.dk-table tbody th { font: 700 17px/1.35 var(--serif); }
.dk-table td { font: 400 16px/1.4 var(--serif); }
.dk-table td small, .dk-table th small { display: block; font: 400 12px/1.4 var(--ui); color: var(--muted); }
.dk-table .dk-tr { font-family: var(--ui); font-size: 14px; color: var(--muted); }
.dk-notes { margin-top: 48px; max-width: 46rem; }
.dk-notes h2 { margin: 0 0 12px; font: 900 22px/1.3 var(--serif); }
.dk-notes ol { margin: 0; padding-left: 1.4em; display: grid; gap: 10px; }

/* Drill */
.dk-drill { display: grid; gap: 14px; max-width: 42rem; margin-top: 40px; }
.dk-drill-kicker { margin: 0; font: 500 13px/1.5 var(--ui); color: var(--muted); }
.dk-drill-q { margin: 0; font: 400 clamp(28px, 4.6vw, 42px)/1.25 var(--serif); }
.dk-gap { border-bottom: 2px solid var(--text); color: var(--muted); }
.dk-drill-hint { margin: -4px 0 0; font: 400 16px/1.5 var(--ui); color: var(--muted); }
.dk-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.dk-choice { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); font: 700 20px/1.2 var(--serif); cursor: pointer; text-align: left; }
.dk-choice small { font: 400 11px/1 var(--mono); color: var(--muted); }
.dk-choice:hover:not(:disabled) { border-color: var(--text); }
.dk-choice:disabled { cursor: default; color: var(--muted); }
.dk-choice[data-answer] { border-color: var(--text); background: var(--text); color: var(--paper); }
.dk-choice[data-answer] small { color: inherit; }
.dk-choice[data-wrong] { border-color: var(--mark); color: var(--mark); text-decoration: line-through; }
.dk-result { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--rule); }
.dk-verdict { margin: 0; font: 500 16px/1.5 var(--ui); }
.dk-verdict[data-wrong] { color: var(--mark); }
.dk-row { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); border: 1px solid var(--rule); background: var(--surface); }
.dk-row > span { display: grid; gap: 2px; padding: 8px 10px; border-left: 1px solid var(--rule); font: 400 17px/1.3 var(--serif); overflow-wrap: anywhere; }
.dk-row > span:first-child { border-left: 0; }
.dk-row small { font: 400 11px/1.3 var(--ui); color: var(--muted); }
.dk-row .dk-hit { box-shadow: inset 0 -3px 0 var(--text); }
.dk-note { margin: 0; padding-left: 12px; border-left: 2px solid var(--rule); font: 400 14px/1.6 var(--ui); color: var(--muted); }
.dk-next { justify-self: start; margin-top: 6px; padding: 10px 18px; border: 1px solid var(--text); border-radius: 4px; background: var(--text); font: 500 15px/1.2 var(--ui); cursor: pointer; }
.dk .dk-next { color: var(--paper); }
.dk-next:hover { background: var(--mark); border-color: var(--mark); }
.dk-hint { margin: 0; font: 400 13px/1.6 var(--ui); color: var(--muted); }
.dk-hint kbd { font: 400 11px/1 var(--mono); border: 1px solid var(--rule); border-radius: 3px; padding: 2px 5px; }

@media (max-width: 860px) {
  .dk-shell { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; }
  .dk-side { position: static; }
  .dk[data-mode="drill"] .dk-side { order: 2; }
  .dk-title { font-size: 32px; }
  .dk-table th, .dk-table td { padding: 7px 6px; }
  .dk-table tbody th { font-size: 15px; }
  .dk-table td { font-size: 14px; }
  .dk-row { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .dk-row > span { border-top: 1px solid var(--rule); }
}
@media (prefers-reduced-motion: reduce) { .dk * { transition: none !important; } }

/* Words read aloud (labels.js say) and the listen button after an answer. */
.dk-word { display: inline; padding: 0; border: 0; border-bottom: 1px dotted var(--muted); background: none; font: inherit; cursor: pointer; text-align: left; }
.dk-word:hover { color: var(--mark); border-bottom-color: var(--mark); }
.dk-word b { color: var(--mark); }
.dk-words { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.dk[data-speech="off"] .dk-word { border-bottom: 0; cursor: text; }
.dk-say { justify-self: start; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); font: 500 14px/1.2 var(--ui); cursor: pointer; }
.dk-say:hover { border-color: var(--text); }
/* Letters a question points at (*…* in its text); the filled gap stays plain bold. */
.dk-drill-q b:not(.dk-fill) { text-decoration: underline 3px; text-underline-offset: 0.18em; }
.dk-choices[data-labels] .dk-choice { font: 500 16px/1.35 var(--ui); }
.dk-tag { display: inline-block; white-space: nowrap; overflow-wrap: normal; margin-left: 6px; padding: 1px 5px; border: 1px solid var(--mark); border-radius: 3px; font: 500 11px/1.4 var(--ui); color: var(--mark); vertical-align: 2px; }
.dk-ipa { font: 400 17px/1.3 var(--serif); white-space: nowrap; }
.dk-examples { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); background: var(--surface); }
.dk-examples li { display: grid; gap: 2px; padding: 10px 14px; border-top: 1px solid var(--rule); font: 400 17px/1.45 var(--serif); }
.dk-examples li:first-child { border-top: 0; }
.dk-examples small { font: 400 13px/1.5 var(--ui); color: var(--muted); }
.dk-examples .dk-word { justify-self: start; }

/* Word families: a root verb and its prefixed branches, drawn as a tree */
.dk-trees { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.dk-tree { padding: 16px 18px 14px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); }
.dk-tree-root { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0 0 8px; }
.dk-tree-root .dk-word { font: 900 26px/1.2 var(--serif); }
.dk-tree-root small { font: 400 13px/1.4 var(--ui); color: var(--muted); }
.dk-branches { list-style: none; margin: 0 0 0 6px; padding: 0; }
.dk-branches li { position: relative; display: grid; gap: 1px; padding: 5px 0 5px 22px; }
.dk-branches li::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 18px; border-left: 1px solid var(--muted); border-bottom: 1px solid var(--muted); }
.dk-branches li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--muted); }
.dk-branches .dk-word { justify-self: start; font: 400 18px/1.3 var(--serif); }
.dk-branch-zh { font: 400 14px/1.45 var(--ui); }
.dk-branch-form { font: 400 13px/1.4 var(--serif); color: var(--muted); }
.dk-tag { margin-left: 6px; padding: 0 5px; border: 1px solid var(--rule); border-radius: 3px; font: 500 11px/1.5 var(--ui); color: var(--muted); }

/* Word-family explorer (kit/families.js): index on the left, one family on the right */
.fx { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; margin-top: 28px; align-items: start; }
.fx-index { position: sticky; top: 16px; }
.fx-index > summary { display: none; }
.fx-noindex { grid-template-columns: minmax(0, 1fr); margin-top: 20px; }
.dk-side-after:empty { display: none; }
.dk-side-after .fx-index { position: static; }
.fx-filters { display: grid; gap: 12px; margin: 0 0 12px; }
.fx-filters .dk-chip { padding: 4px 9px; font-size: 13px; }
.fx-list { list-style: none; margin: 0; padding: 0 6px 0 0; max-height: max(240px, calc(100vh - 560px)); overflow-y: auto; border-top: 1px solid var(--rule); }
.fx-letter { position: sticky; top: 0; padding: 8px 0 2px; background: var(--paper); font: 700 12px/1.2 var(--ui); color: var(--muted); }
.fx-list button { display: grid; grid-template-columns: 1fr auto 2.2em; gap: 8px; width: 100%; padding: 4px 6px; border: 0; border-radius: 3px; background: none; text-align: left; font: 400 16px/1.4 var(--serif); cursor: pointer; }
.fx-list button small { font: 400 11px/1.9 var(--mono); color: var(--muted); text-align: right; }
.fx-list button:hover { color: var(--mark); }
.fx-list button[aria-current="true"] { background: var(--text); color: var(--paper); }
.fx-list button[aria-current="true"] small { color: inherit; }
.fx-note { margin: 8px 0 0; font: 400 12px/1.5 var(--ui); color: var(--muted); }
.fx-head h2 { display: flex; align-items: baseline; gap: 12px; margin: 0; font: 900 44px/1.1 var(--serif); }
.fx-head p { margin: 6px 0 0; font: 400 15px/1.6 var(--ui); color: var(--muted); }
.fx-head p span[lang="de"] { font-family: var(--serif); }
.fx-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 16px 0 18px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.fx-nav { display: flex; gap: 6px; }
.fx-nav button, .fx-tools button { padding: 4px 10px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; font: 500 13px/1.4 var(--ui); cursor: pointer; }
.fx-nav button:hover:not(:disabled), .fx-tools button:hover { border-color: var(--text); }
.fx-nav button:disabled { opacity: 0.4; cursor: default; }
.fx-level { display: inline-block; padding: 0 5px; border: 1px solid var(--rule); border-radius: 3px; font: 500 11px/1.6 var(--mono); color: var(--muted); vertical-align: middle; }
.fx-head h2 .fx-level { font-size: 13px; }
.fx-tools { display: flex; gap: 6px; margin-bottom: 10px; }

/* Tree */
.fx-tree { padding: 18px 20px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); }
.fx-groups, .fx-branches { list-style: none; margin: 0; padding: 0; }
.fx-groups > li + li { margin-top: 10px; }
.fx-groups > li > details > summary { cursor: pointer; font: 700 14px/1.6 var(--ui); color: var(--muted); }
.fx-branches { margin: 4px 0 0 6px; }
.fx-branches > li { position: relative; padding: 3px 0 3px 22px; }
.fx-branches > li::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 19px; border-left: 1px solid var(--muted); border-bottom: 1px solid var(--muted); }
.fx-branches > li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1px solid var(--muted); }
.fx-branches summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; cursor: pointer; list-style: none; }
.fx-branches summary::-webkit-details-marker { display: none; }
.fx-branches summary::before { content: "+"; width: 0.8em; font: 400 13px/1 var(--mono); color: var(--muted); }
.fx-branches details[open] > summary::before { content: "−"; }
.fx-branches .dk-word { font: 400 18px/1.4 var(--serif); }
.fx-mean { font: 400 14px/1.5 var(--ui); }
.fx-hit > details > summary .fx-mean { background: var(--paper); box-shadow: inset 0 -2px 0 var(--text); }
.fx-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 16px; margin: 6px 0 6px 1.2em; padding: 8px 12px; border-left: 2px solid var(--rule); }
.fx-forms div { display: grid; }
.fx-forms dt { font: 400 12px/1.4 var(--ui); color: var(--muted); }
.fx-forms dd { margin: 0; font: 400 18px/1.4 var(--serif); }

/* Cloud */
.fx-stage { display: grid; gap: 10px; }
.fx-stage-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.fx-size { display: flex; align-items: center; gap: 8px; font: 500 13px/1.4 var(--ui); color: var(--muted); }
.fx-size input { width: 120px; accent-color: var(--text); }
.fx-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.fx-actions button { padding: 4px 10px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; font: 500 13px/1.4 var(--ui); cursor: pointer; }
.fx-actions button:hover { border-color: var(--text); }
.fx-stage.fx-is-full { box-sizing: border-box; width: 100%; height: 100%; padding: 16px 20px; overflow: auto; background: var(--surface); grid-template-rows: auto minmax(0, 1fr) auto; }
.fx-stage.fx-full { position: fixed; inset: 0; z-index: 1000; height: 100dvh; }
html.fx-lock, html.fx-lock body { overflow: hidden; }
.fx-is-full .fx-cloud { border: 0; overflow: hidden; }
.fx-is-full .fx-cloud svg { width: 100%; height: 100%; min-width: 0; }
.fx-is-full .fx-picked { margin-top: 0; }
.fx-is-full.fx-cardbox { grid-template-rows: auto auto; align-content: start; }
.fx-is-full .fx-canvas { max-width: min(100%, 1080px); justify-self: center; }
.fx-hint { margin: 0 0 8px; font: 400 13px/1.5 var(--ui); color: var(--muted); }
.fx-cloud { overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); }
.fx-cloud svg { display: block; width: 100%; min-width: 620px; height: auto; }
.fx-edge { stroke: var(--muted); stroke-width: 1; }
.fx-edge-u { stroke-dasharray: 4 4; }
.fx-node { cursor: pointer; }
.fx-node circle { fill: var(--text); }
.fx-node-de { font-family: var(--serif); font-weight: 400; fill: var(--text); }
.fx-node-de .fx-pre { font-weight: 700; fill: var(--mark); }
.fx-node-zh { font-family: var(--ui); fill: var(--muted); }
.fx-node:hover .fx-node-de, .fx-node:focus .fx-node-de { text-decoration: underline; }
.fx-node:focus { outline: none; }
.fx-node.fx-hit .fx-node-de, .fx-node[aria-pressed="true"] .fx-node-de { font-weight: 700; }
.fx-root { font-family: var(--serif); font-weight: 900; fill: var(--text); }
.fx-root-zh { font-family: var(--ui); fill: var(--muted); }
.fx-picked { margin-top: 12px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); }
.fx-picked p { margin: 0; font: 400 15px/1.6 var(--ui); }
.fx-picked p span[lang="de"] { font: 400 20px/1.4 var(--serif); }
.fx-picked p b { color: var(--mark); }
.fx-picked .fx-forms { margin-left: 0; }

/* Card */
.fx-cardbox { justify-items: stretch; }
.fx-canvas { width: 100%; max-width: 820px; height: auto; border-radius: 4px; justify-self: start; cursor: pointer; }
.fx-cardbox .fx-hint { margin: 0; }
.fx-cardbox .fx-picked-slot { position: sticky; bottom: 12px; max-width: 820px; }
.fx-cardbox .fx-picked { margin-top: 0; box-shadow: 0 6px 24px rgb(0 0 0 / 0.12); }
.fx-ex { display: grid; gap: 6px; margin: 4px 0 6px 1.2em; padding: 8px 12px; border-left: 2px solid var(--rule); }
.fx-ex-label { font: 400 11px/1.4 var(--ui); color: var(--muted); }
.fx-ex p { display: grid; gap: 2px; margin: 0; }
.fx-ex-de { justify-self: start; font: 400 16px/1.45 var(--serif); cursor: pointer; }
.fx-ex-tr { font: 400 14px/1.5 var(--ui); color: var(--muted); }
.fx-picked .fx-ex { margin-left: 0; }
.fx-picked { position: relative; }
.fx-close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 3px; background: none; font: 400 20px/1 var(--ui); color: var(--muted); cursor: pointer; }
.fx-close:hover { color: var(--text); }

@media (max-width: 860px) {
  .fx { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .fx-index { position: static; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); }
  .fx-index > summary { display: list-item; cursor: pointer; font: 500 14px/1.5 var(--ui); }
  .fx-index[open] > summary { margin-bottom: 8px; }
  .fx-list { max-height: 50vh; }
  .fx-letter { background: var(--surface); }
  .fx-head h2 { font-size: 34px; }
}

/* Declension tables (kit/declension.js): moved from works/der-die-das and works/adjektivendungen */
.dk-side-extra { display: flex; flex-direction: column; gap: 16px; }
.dk-side-extra:empty { display: none; }
.dx-nouns { display: grid; gap: 6px; }
.dx-noun-row { display: grid; grid-template-columns: minmax(4.5em, auto) minmax(0, 1fr); align-items: baseline; gap: 8px; font: 400 12px/1.4 var(--ui); color: var(--muted); }
.dx-switch { display: flex; align-items: center; gap: 10px; font: 500 14px/1.4 var(--ui); cursor: pointer; }
.dx-switch input { width: 16px; height: 16px; accent-color: var(--text); margin: 0; }
.dx-testbar { margin: 16px 0 0; font: 400 14px/1.6 var(--ui); color: var(--muted); }
.dx-link { border: 0; background: none; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.dx-link:hover { color: var(--mark); }
.dx-tables { display: grid; gap: 40px; margin-top: 32px; }
.dx-table h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; font: 900 26px/1.2 var(--serif); }
.dx-table h2 span { font: 400 15px/1 var(--serif); font-style: italic; color: var(--muted); }
.dx-after { margin: -4px 0 12px; font: 400 14px/1.6 var(--ui); color: var(--muted); }
.dx-lead { margin: 0 0 12px; }
.dx-lead .dk-chip { font: 400 17px/1.3 var(--serif); padding: 6px 12px; }
.dx-table table { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--surface); }
.dx-table th, .dx-table td { padding: 10px 12px; border: 1px solid var(--rule); text-align: left; vertical-align: baseline; }
.dx-table thead th { font: 500 13px/1.3 var(--ui); }
.dx-table th small { display: block; font: 400 11px/1.3 var(--mono); color: var(--muted); }
.dx-table tbody th { width: 9.5em; font: 500 15px/1.3 var(--serif); }
.dx-table tbody th small { font-family: var(--ui); }
.dx-table td { font: 700 22px/1.2 var(--serif); }
.dx-table td small { display: block; margin-top: 4px; font: 400 14px/1.3 var(--serif); color: var(--muted); }
.dx-table td small b { color: var(--text); font-weight: 700; }
.dx-table td.dx-none { font-weight: 400; color: var(--muted); cursor: help; }
.dx-table td button { display: block; width: 100%; min-height: 1.2em; border: 0; padding: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.dx-table td button.dx-cover { background: var(--rule); border-radius: 2px; }
.dx-cover:hover { outline: 1px solid var(--text); }
.dx-table thead th, .dx-table td { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 860px) {
  .dx-table th, .dx-table td { padding: 8px 6px; }
  .dx-table tbody th { width: 6.2em; font-size: 13px; }
  .dx-table td { font-size: 17px; }
  .dx-table td small { font-size: 12px; }
  .dx-table thead th { font-size: 11px; }
}

/* Verb + preposition list (kit/combos.js): moved from works/verb-prepositions/assets/styles.css */
.vp-sort { display: flex; gap: 6px; margin-top: 16px; }
.vp-keys { margin: 0; font: 400 13px/1.6 var(--ui); color: var(--muted); }
.vp-keys kbd { font: 400 11px/1 var(--mono); border: 1px solid var(--rule); border-radius: 3px; padding: 2px 5px; }
.dk-chip small { margin-left: 4px; font: 400 11px/1 var(--mono); opacity: 0.7; }
.vp-section { margin-top: 40px; }
.vp-section:first-of-type { margin-top: 24px; }
.vp-section h2 {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 4px;
  font: 900 30px/1.2 var(--serif);
}
.vp-section h2 small { font: 400 12px/1 var(--mono); color: var(--muted); }
.vp-section h2 .vp-wo { font: 400 15px/1 var(--serif); color: var(--muted); font-style: italic; }
/* Mnemonic on the preposition heading: hover, or tap/keyboard focus on touch screens. */
.vp-hint-anchor { position: relative; cursor: help; text-decoration: underline dotted var(--muted); text-decoration-thickness: 1px; text-underline-offset: 6px; }
.vp-hint-anchor:hover, .vp-hint-anchor:focus { text-decoration-color: var(--mark); }
.vp-tip {
  display: none;
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 10;
  width: min(22rem, 80vw);
  padding: 12px 14px;
  border: 1px solid var(--text); border-radius: 4px;
  background: var(--surface);
  font: 400 13px/1.7 var(--ui); color: var(--muted);
  cursor: auto;
}
.vp-hint-anchor:hover .vp-tip, .vp-hint-anchor:focus .vp-tip { display: block; }
.vp-tip strong { display: block; margin-bottom: 4px; font-weight: 500; font-size: 14px; color: var(--text); }
.vp-tip small { display: block; margin-top: 6px; font: 400 11px/1 var(--mono); }
.vp-list { list-style: none; margin: 0; padding: 0; }
.vp-item { border-bottom: 1px solid var(--rule); }
.vp-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding: 12px 4px;
  cursor: pointer;
  list-style: none;
}
.vp-item summary::-webkit-details-marker { display: none; }
.vp-item summary:hover .vp-verb { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.vp-combo { font: 400 20px/1.4 var(--serif); }
.vp-combo .vp-prep { font-weight: 700; }
.vp-case {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 6px;
  border: 1px solid var(--text);
  border-radius: 3px;
  font: 500 11px/1.4 var(--ui);
  letter-spacing: 0.02em;
  vertical-align: 3px;
}
/* Dative filled, accusative outlined: told apart without colour. */
.vp-case[data-case="D"] { background: var(--text); color: var(--paper); }
.vp-gap { display: inline-block; min-width: 2.6em; border-bottom: 2px solid var(--text); color: transparent; line-height: 1.1; }
.vp-zh { font: 400 16px/1.5 var(--serif); color: var(--muted); }
.vp-level { font: 400 11px/1 var(--mono); color: var(--muted); }

.vp-detail { padding: 4px 4px 20px; display: grid; gap: 10px; }
.vp-sentence { margin: 0; font: 400 19px/1.6 var(--serif); }
.vp-sentence b { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.vp-sentence em { font-style: normal; font-weight: 700; }
.vp-trans { margin: 0; color: var(--muted); }
.vp-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; font: 400 14px/1.5 var(--ui); }
.vp-facts dt { color: var(--muted); }
.vp-facts div { display: flex; gap: 8px; }
.vp-facts dd { margin: 0; font-family: var(--serif); font-size: 16px; }
.vp-note { margin: 0; padding-left: 12px; border-left: 2px solid var(--rule); font: 400 14px/1.6 var(--ui); color: var(--muted); }
.vp-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vp-tool {
  border: 1px solid var(--rule); border-radius: 3px; background: var(--surface);
  padding: 4px 10px; font: 500 13px/1.4 var(--ui); cursor: pointer;
}
.vp-tool:hover { border-color: var(--text); }
.vp-also { font: 400 14px/1.5 var(--ui); color: var(--muted); }
.vp-also button { border: 0; background: none; padding: 0; font: 400 15px/1.5 var(--serif); color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.vp-also button:hover { color: var(--mark); }
.vp-empty { margin: 48px 0; font: 400 17px/1.8 var(--serif); color: var(--muted); }
.vp-foot { margin-top: 64px; font: 400 12px/1.7 var(--ui); color: var(--muted); }

.vp-item.flash summary { background: var(--surface); }

@media (max-width: 860px) {
  .vp-shell { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; }
  .vp-side { position: static; }
  /* Drilling on a phone: the question first, the filters below it. */
  .vp[data-mode="drill"] .vp-side { order: 2; }
  .vp-title { font-size: 32px; }
  .vp-item summary { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .vp-item summary .vp-zh { grid-column: 1; grid-row: 2; }
  .vp-item summary .vp-level { grid-column: 2; grid-row: 1; }
  .vp-combo { font-size: 18px; }
}
