:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece4;
  --ink: #16151a;
  --ink-2: #4a4852;
  --ink-3: #807d88;
  --line: #dcd8cd;
  --accent: #c2410c;
  --block: #c0262d;
  --block-bg: #fbe4e3;
  --partial: #b7791f;
  --partial-bg: #fbf0d9;
  --allow: #2f7d4f;
  --allow-bg: #e2f1e7;
  --unknown: #8a8794;
  --unknown-bg: #eceaf0;
  --focus: #2563eb;
  --serif: "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(20, 18, 30, .06), 0 4px 16px rgba(20, 18, 30, .05);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121116; --surface: #1b1a21; --surface-2: #24232b; --ink: #f1eff5; --ink-2: #bdbac6; --ink-3: #8b8895;
    --line: #2f2e37; --accent: #fb923c; --block: #f87171; --block-bg: #3a1b1d; --partial: #fbbf24; --partial-bg: #3a2e14;
    --allow: #4ade80; --allow-bg: #15301f; --unknown: #9b98a6; --unknown-bg: #2a2931; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121116; --surface: #1b1a21; --surface-2: #24232b; --ink: #f1eff5; --ink-2: #bdbac6; --ink-3: #8b8895;
  --line: #2f2e37; --accent: #fb923c; --block: #f87171; --block-bg: #3a1b1d; --partial: #fbbf24; --partial-bg: #3a2e14;
  --allow: #4ade80; --allow-bg: #15301f; --unknown: #9b98a6; --unknown-bg: #2a2931; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { font: 700 19px/1 var(--serif); letter-spacing: -.01em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 700 13px/1 var(--mono); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 14px; padding: 6px 10px; border-radius: 6px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.theme-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
@media (max-width: 760px) { .nav { display: none; } .theme-btn { margin-left: auto; } }

/* hero */
.hero { padding: 64px 0 40px; }
.kicker { font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.hero h1 { font: 600 clamp(34px, 5.4vw, 62px)/1.04 var(--serif); letter-spacing: -.025em; margin: 0 0 22px; max-width: 17ch; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--block); }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 62ch; margin: 0 0 22px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-3); font-size: 13.5px; }
.meta-row span::before { content: "•"; margin-right: 8px; color: var(--line); }
.meta-row span:first-child::before { content: none; }

/* sections */
section { padding: 36px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
h2 { font: 600 clamp(24px, 2.6vw, 30px)/1.15 var(--serif); letter-spacing: -.015em; margin: 0; }
.sec-sub { color: var(--ink-2); margin: 6px 0 0; max-width: 70ch; }
h3 { font: 600 17px/1.3 var(--sans); margin: 0 0 6px; }

/* insights */
.insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.insight { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.insight .big { font: 600 40px/1 var(--serif); letter-spacing: -.02em; }
.insight .big small { font-size: 18px; color: var(--ink-3); font-weight: 400; }
.insight p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.insight button.linkish { margin-top: auto; align-self: start; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }

/* segmented controls / chips */
.controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--ink-2); font: 500 13.5px/1 var(--sans); padding: 8px 12px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.search { position: relative; flex: 1 1 220px; max-width: 320px; }
.search input { width: 100%; font: 14px var(--sans); padding: 9px 12px 9px 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
select { font: 14px var(--sans); padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }

/* bot bars */
.botgroups { display: grid; gap: 22px; }
.botgroup h3 { display: flex; gap: 10px; align-items: baseline; }
.botgroup h3 span { font-weight: 400; color: var(--ink-3); font-size: 14px; }
.bars { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow); }
.bar { display: grid; grid-template-columns: 190px 1fr 64px; align-items: center; gap: 14px; padding: 7px 8px; border-radius: 7px; cursor: pointer; border: 0; background: none; color: inherit; font: inherit; text-align: left; width: 100%; }
.bar:hover { background: var(--surface-2); }
.bar .name { font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.bar .name small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12.5px; }
.track { height: 14px; border-radius: 4px; background: var(--allow-bg); overflow: hidden; display: flex; }
.track i { display: block; height: 100%; }
.track .b { background: var(--block); }
.track .p { background: var(--partial); }
.track .u { background: var(--unknown); opacity: .5; }
.bar .pct { font: 600 15px/1 var(--sans); text-align: right; font-variant-numeric: tabular-nums; }
.bar .pct small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; margin-top: 3px; }
@media (max-width: 640px) { .bar { grid-template-columns: 1fr 52px; } .bar .track { grid-column: 1 / -1; grid-row: 2; } }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* matrix */
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.table-scroll { overflow: auto; max-height: 78vh; }
table.matrix { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.matrix th, .matrix td { border-bottom: 1px solid var(--line); padding: 0; }
.matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); vertical-align: bottom; }
.matrix th.site, .matrix td.site { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 210px; border-right: 1px solid var(--line); }
.matrix thead th.site { z-index: 3; }
.matrix th.site { padding: 10px 14px; font-weight: 600; font-size: 12.5px; color: var(--ink-3); }
.matrix th.bot { padding: 8px 2px; width: 46px; min-width: 46px; }
.matrix th.bot button { writing-mode: vertical-rl; transform: rotate(180deg); border: 0; background: none; font: 600 12.5px/1 var(--sans); color: var(--ink-2); cursor: pointer; padding: 6px 0; white-space: nowrap; }
.matrix th.bot button:hover { color: var(--ink); }
.matrix th.bot button[aria-sort] { color: var(--accent); }
.matrix th.sig { padding: 8px 2px; width: 46px; min-width: 46px; }
.matrix th.sig span { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 12.5px/1 var(--sans); color: var(--ink-3); padding: 6px 0; display: inline-block; white-space: nowrap; }
.matrix th.divider, .matrix td.divider { border-left: 2px solid var(--line); }
.matrix tbody tr { cursor: pointer; }
.matrix tbody tr:hover td { background: var(--surface-2); }
.matrix tbody tr:hover td.site { background: var(--surface-2); }
.matrix td.site button { all: unset; display: block; padding: 9px 14px; cursor: pointer; width: 100%; box-sizing: border-box; }
.matrix td.site button:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.matrix td.site strong { display: block; font-weight: 600; line-height: 1.25; }
.matrix td.site small { color: var(--ink-3); font-size: 12px; }
.matrix td.cell { text-align: center; }
.cat-row td { background: var(--surface-2) !important; font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 9px 14px !important; cursor: default; }
.cat-row td.site { background: var(--surface-2) !important; }

.v { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; font: 700 13px/1 var(--sans); }
.v-blocked { background: var(--block-bg); color: var(--block); }
.v-partial { background: var(--partial-bg); color: var(--partial); }
.v-allowed { background: transparent; color: var(--allow); }
.v-unknown { background: var(--unknown-bg); color: var(--unknown); }
.v.inherit { box-shadow: inset 0 0 0 1.5px currentColor; background: transparent; }
.v.server { position: relative; }
.v.server::after { content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); }
.sigdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.sigdot.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.empty { padding: 40px; text-align: center; color: var(--ink-3); }
.table-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

/* changes */
.changes { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.changes li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.changes li strong { color: var(--ink); font-weight: 600; }
.changes li:last-child { border-bottom: 0; }
.changes time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.changes .empty-note { display: block; padding: 22px 16px; color: var(--ink-2); }

/* trend chart */
.trend { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.trend svg { width: 100%; height: 220px; display: block; }

/* method / prose */
.prose { max-width: 74ch; }
.prose p, .prose li { color: var(--ink-2); }
.prose h3 { margin-top: 28px; font-size: 18px; color: var(--ink); }
.prose code { font: 13.5px var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 20px 0; }
.layer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.layer .tag { display: inline-block; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 4px 7px; border-radius: 4px; margin-bottom: 10px; }
.tag.good { background: var(--allow-bg); color: var(--allow); }
.tag.mid { background: var(--partial-bg); color: var(--partial); }
.tag.weak { background: var(--block-bg); color: var(--block); }
.layer p { margin: 0; font-size: 14.5px; }
.callout { border-left: 3px solid var(--accent); background: var(--surface); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 22px 0; }
.callout p { margin: 0; color: var(--ink); }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(10, 8, 16, .4); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--bg); z-index: 41; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto; border-left: 1px solid var(--line); }
.drawer.open { transform: none; }
.drawer header { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 18px 24px; display: flex; gap: 16px; align-items: start; z-index: 2; }
.drawer header h2 { font-size: 26px; }
.drawer header .close { margin-left: auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; width: 36px; height: 36px; cursor: pointer; font-size: 18px; flex: none; }
.drawer .body { padding: 20px 24px 60px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (max-width: 640px) { .drawer header, .drawer .body { padding-left: 16px; padding-right: 16px; } }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--ink-3); }
.fact b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin-top: 2px; word-break: break-word; }
.botlist { display: grid; gap: 6px; }
.botrow { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.botrow .t { font-weight: 600; }
.botrow .t small { font-weight: 400; color: var(--ink-3); }
.botrow .why { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.botrow .why code { font: 12.5px var(--mono); background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.rawwrap { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; max-height: 460px; overflow: auto; }
.raw { font: 12.5px/1.55 var(--mono); margin: 0; padding: 8px 0; counter-reset: ln; }
.raw div { padding: 0 12px 0 0; white-space: pre; }
.raw div::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 44px; padding-right: 12px; text-align: right; color: var(--ink-3); user-select: none; }
.raw .hl { background: var(--partial-bg); }
.raw .hl-b { background: var(--block-bg); }
.raw .c { color: var(--ink-3); }

footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0 50px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 12px; border-radius: 8px; font: 500 13.5px var(--sans); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.4; padding: 7px 10px; border-radius: 6px; max-width: 280px; opacity: 0; transition: opacity .1s; }
.tip.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* timeline */
.trend { position: relative; }
.trend .tt { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 12.5px; line-height: 1.5; padding: 8px 10px; border-radius: 6px; opacity: 0; transition: opacity .1s; white-space: nowrap; z-index: 3; }
.trend .tt.show { opacity: 1; }
.trend .tt b { font-weight: 600; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.trend-legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.gantt { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px 14px; overflow-x: auto; }
.gantt-row { display: grid; grid-template-columns: 190px minmax(420px, 1fr) 96px; gap: 12px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-row:hover { background: var(--surface-2); }
.gantt-row .gn { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 4px; }
.gantt-row .gd { font-size: 12.5px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; padding-right: 4px; }
.gtrack { position: relative; height: 16px; background: var(--surface-2); border-radius: 3px; }
.gtrack i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--block); }
.gtrack i.p { background: var(--partial); }
.gaxis { display: grid; grid-template-columns: 190px minmax(420px, 1fr) 96px; gap: 12px; font-size: 11.5px; color: var(--ink-3); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.gaxis div { position: relative; height: 16px; }
.gaxis div span { position: absolute; transform: translateX(-50%); }
.gaxis div span:first-child { transform: none; }
.histlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.histlist li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 14px; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
.histlist time { font-weight: 600; font-variant-numeric: tabular-nums; }
.histlist time small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; }
.histlist .plus { color: var(--block); }
.histlist .minus { color: var(--allow); }
@media (max-width: 640px) { .histlist li { grid-template-columns: 1fr; gap: 2px; } }

/* compact change feed */
#aendringer .changes { max-width: 760px; box-shadow: none; }
.changes .more { color: var(--ink-3); font-size: 13px; }

/* teaching page */
.course-facts { margin: 6px 0 14px; max-width: 760px; }
.live-note { font-size: 13.5px; color: var(--ink-3); }
.module { border-top: 1px solid var(--line); }
.mod-head { display: flex; gap: 18px; align-items: center; margin-bottom: 22px; }
.mod-no { flex: none; width: 52px; height: 52px; border-radius: 12px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 600 26px/1 var(--serif); }
.mod-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .mod-grid { grid-template-columns: minmax(0, 1fr); } }
.mod-grid .prose { max-width: none; }
.teacher { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; font-size: 14px; position: sticky; top: 80px; }
.teacher h3 { font-size: 15px; color: var(--accent); margin: 0 0 8px; }
.teacher p { color: var(--ink-2); margin: 0 0 10px; }
.terms { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.terms dt { font-weight: 600; }
.terms dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .terms { grid-template-columns: 1fr; } .terms dd { margin-bottom: 8px; } }
.tasks li { margin-bottom: 10px; }
.live { display: inline; background: var(--partial-bg); color: var(--ink); padding: 1px 5px; border-radius: 4px; font-size: .95em; }
.live:empty { display: none; }
.small { font-size: 13px; color: var(--ink-3); }
.actors { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 10px 0 8px; }
.actor { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.actor b { display: block; margin-bottom: 4px; }
.actor span { color: var(--ink-2); }
table.payoff, table.xtab { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--surface); }
.payoff th, .payoff td, .xtab th, .xtab td { border: 1px solid var(--line); padding: 10px 12px; text-align: center; vertical-align: top; }
.payoff thead th, .xtab thead th { background: var(--surface-2); font-weight: 600; }
.payoff tbody th, .xtab tbody th { text-align: left; background: var(--surface-2); font-weight: 600; }
.payoff td b { display: block; font: 600 20px/1.2 var(--serif); }
.payoff td small { color: var(--ink-3); font-size: 12.5px; }
.xtab td { font-variant-numeric: tabular-nums; }
.xtab tr.total th, .xtab tr.total td { font-weight: 700; border-top: 2px solid var(--ink-3); }
.xtab-controls { margin: 10px 0 12px; font-size: 14px; }
.xtab-controls label { display: inline-flex; gap: 8px; align-items: center; }
@media print {
  .topbar, .theme-btn, .xtab-controls, footer, #produkt .btn { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .module { break-before: page; }
  .teacher { position: static; break-inside: avoid; }
  a { color: inherit; }
}
.teach .wrap.prose { max-width: 1180px; }
.teach .wrap.prose > p, .teach .wrap.prose > ul, .teach .wrap.prose > h2, .teach .wrap.prose > h3, .teach .wrap.prose > .callout { max-width: 78ch; }
/* undervisning: brugsidéer */
.uses { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.use { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.use-no { width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--bg); display: grid; place-items: center; font: 600 15px/1 var(--serif); margin-bottom: 12px; }
.use h3 { font-size: 18px; margin-bottom: 8px; }
.use p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.use .fits { margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--accent); font-weight: 600; letter-spacing: .02em; }

/* crawler glossary */
.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; scroll-margin-top: 80px; }
.gcard:target { outline: 2px solid var(--accent); }
.gcard header { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.gcard .tok { font: 600 15.5px/1.2 var(--mono); word-break: break-all; }
.gcard .op { display: block; font: 400 13px var(--sans); color: var(--ink-3); margin-top: 3px; }
.chip { flex: none; font: 600 11px/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; padding: 5px 7px; border-radius: 4px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.training { background: var(--block-bg); color: var(--block); }
.chip.search { background: var(--allow-bg); color: var(--allow); }
.chip.user { background: var(--partial-bg); color: var(--partial); }
.gcard p { margin: 0; font-size: 14px; color: var(--ink-2); }
.gcard .if { font-size: 13.5px; color: var(--ink); background: var(--surface-2); border-radius: 6px; padding: 8px 10px; }
.gcard .if b { font-weight: 600; }
.gcard footer { margin: auto 0 0; border-top: 0; padding: 6px 0 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); }
.gcard .meter { flex: 1; min-width: 50px; height: 6px; border-radius: 3px; background: var(--allow-bg); overflow: hidden; max-width: 90px; }
.gcard .meter i { display: block; height: 100%; background: var(--block); }

.recent { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-3); }
.recent .linkish { font-size: 13.5px; color: var(--ink-2); }

/* prose sections align left with the rest of the page */
.wrap.prose { max-width: 1180px; }
.wrap.prose > * { max-width: 74ch; }
.wrap.prose > .cols { max-width: none; }

/* change list: plain rows, no box */
#aendringer .changes { max-width: 74ch; background: none; border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); }
#aendringer .changes li { padding: 10px 0; grid-template-columns: 120px 1fr; font-size: 14.5px; }
#aendringer h2 { margin-bottom: 14px; }

/* agents box */
.agents { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; scroll-margin-top: 80px; }
.agents h3 { font: 600 22px/1.2 var(--serif); margin: 0 0 6px; }
.agent-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.atype { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--bg); }
.atype h4 { margin: 10px 0 6px; font-size: 15.5px; }
.atype p { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); }
.atype code { font: 12.5px var(--mono); background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.atype .note { font-size: 13px; color: var(--ink-3); margin: 0; }
@media (max-width: 640px) { .agents { padding: 18px 16px; } }
