:root { --fg:#222; --muted:#666; --line:#ddd; --ok:#2a7; --warn:#c60; --bad:#a33; --info:#468; --bg-soft:#f6f6f8; --bg:#fff; color-scheme: only light; }
/* light only, for now: Teams (dark mode) and dark-mode browsers would otherwise give the page a dark canvas under light-tuned colours (Markus 2026-10-20) */
html, body { background: var(--bg); }
body { font-family: system-ui, sans-serif; max-width: 56rem; margin: 0 auto; padding: 0 1rem 3rem; color: var(--fg); line-height: 1.45; }
.loading { padding: 3rem 0; color: var(--muted); }
header.top { display: flex; gap: 1rem; align-items: baseline; flex-wrap: wrap; padding: .8rem 0; border-bottom: 1px solid var(--line); }
header.top h1 { font-size: 1.2rem; margin: 0; }
nav.tabs { display: flex; gap: .4rem; margin: .8rem 0; }
nav.tabs button { font: inherit; padding: .3rem .9rem; border: 1px solid var(--line); background: var(--bg-soft); border-radius: .4rem; cursor: pointer; }
nav.tabs button.active { background: var(--fg); color: #fff; border-color: var(--fg); }
.card { border: 1px solid var(--line); border-radius: .4rem; margin: .6rem 0; }
.card > .head { display: flex; gap: .6rem; align-items: baseline; flex-wrap: wrap; padding: .5rem .8rem; cursor: pointer; }
.card > .head:hover { background: var(--bg-soft); }
.card > .body { padding: .2rem .8rem .8rem; border-top: 1px solid var(--line); }
.badge { display: inline-block; padding: 0 .45rem; border-radius: .3rem; font-size: .85em; background: #eee; }
.badge.ok { background: #dfd; } .badge.warn { background: #fed; } .badge.bad { background: #fdd; } .badge.info { background: #dde8ff; }
.meta { color: var(--muted); font-size: .9em; }
.task { border-left: 3px solid var(--line); padding: .2rem .8rem; margin: .5rem 0; }
.task .ref { font-family: monospace; background: #eef; padding: 0 .3rem; border-radius: .2rem; }
.md blockquote { border-left: 3px solid #ccc; margin: .5rem 0; padding: .1rem .8rem; color: #444; }
.md .geometry svg { max-width: 100%; height: auto; display: block; margin: .4rem auto; }
/* code blocks (#+begin_src LANG) and inline code (~code~), 2026-10-20 */
.md pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: .3rem; padding: .5rem .7rem; overflow-x: auto; font-size: .9em; line-height: 1.35; }
.md code { font-family: ui-monospace, Menlo, Consolas, monospace; }
.md :not(pre) > code { background: var(--bg-soft); padding: 0 .25em; border-radius: .2rem; font-size: .92em; }
details summary { cursor: pointer; color: var(--info); }
.row { padding: .4rem 0; border-top: 1px dashed var(--line); }
.row .level { cursor: help; border-bottom: 1px dotted var(--muted); }
ul.plain { list-style: none; padding-left: 0; }
.row .level { margin-left: .5rem; font-size: .85em; }
.notes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .5rem 0; } /* the BTC grid is 2x2 (2026-10-19) */
@media (max-width: 30rem) { .notes-grid { grid-template-columns: 1fr; } }
.notes-grid > .cell { border: 1px solid var(--line); border-radius: .3rem; padding: .3rem .7rem; background: var(--bg-soft); }
.notes-grid > .cell > :first-child { margin-top: .2rem; } .notes-grid > .cell > :last-child { margin-bottom: .2rem; }
.future { opacity: .55; }
.note { margin: .6rem 0; }
.note-more { margin: .3rem 0 0; }
.note .md > :first-child { margin-top: .3rem; } .note .md > :last-child { margin-bottom: 0; } /* lists and code of a teacher's note */
.card .card { margin: .4rem 0; }
/* header: tabs left, name right */
header.top { justify-content: space-between; padding: 0; border-bottom: 2px solid var(--line); }
header.top nav.tabs { margin: 0; gap: 0; }
header.top nav.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: .7rem 1rem; margin-bottom: -2px; color: var(--muted); }
header.top nav.tabs button.active { background: none; color: var(--fg); border-bottom-color: var(--fg); }
header.top .who { padding: .7rem 0; }
/* competence grids */
.grid-section h2 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
table.grid { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .92em; }
:is(table.grid > tr, table.grid > tbody > tr) > th { text-align: left; font-weight: normal; color: var(--muted); padding: .2rem .5rem; width: 27%; }
:is(table.grid > tr, table.grid > tbody > tr) > th:first-child { width: 19%; }
:is(table.grid > tr, table.grid > tbody > tr) > td { vertical-align: top; border: 1px solid var(--line); padding: .4rem .5rem; }
table.grid tr.comp { cursor: pointer; }
/* hover (2026-11-02): a translucent grey veil over the cell's own colour – the stand
   colours stay recognisable, only muted; the content is not touched */
table.grid tr.comp:hover > td { box-shadow: inset 0 0 0 100vmax rgba(120, 120, 120, .13); }
:is(table.grid > tr, table.grid > tbody > tr) > td.comp-title { background: var(--bg-soft); }
table.grid td.cell.empty { background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f1f1f1 6px, #f1f1f1 12px); }
table.grid td.stand-assessed { background: #c8f0d0; } table.grid td.stand-strong { background: #d9f5df; }
table.grid td.stand-emerging { background: #ecf9ee; } table.grid td.stand-partial { background: #f4f8d8; }
table.grid td.stand-notyet { background: #fff3d6; }
.badge.stand-assessed, .badge.stand-strong { background: #2a7; color: #fff; } .badge.stand-emerging { background: #8d5; }
.badge.stand-partial { background: #dd5; } .badge.stand-notyet { background: #f3c15f; color: #4a3104; }
.badge .icon { display: inline-flex; vertical-align: -.15em; margin-right: .2rem; font-size: 1.1em; }
.cell .desc { color: var(--muted); font-size: .9em; margin: .2rem 0; } .cell .desc p { margin: .2rem 0; }
.cell .chips { display: flex; flex-wrap: wrap; gap: .25rem; margin: .3rem 0 .1rem; }
.chip { display: inline-flex; align-items: center; gap: .2rem; font-size: .75em; padding: .05rem .4rem .05rem .3rem; border-radius: .9rem; border: 1px solid transparent; cursor: help; line-height: 1.5; }
.chip .icon { display: inline-flex; font-size: 1.25em; }
.chip.formal { border-color: #4a5568; font-weight: 600; }
/* abilities: green, yellow-green, blue (with help), amber (not yet: on the way, never red) */
.chip.ab-s { background: #cfead3; color: #1f5e30; } .chip.ab-d { background: #e4f3cf; color: #3f6a1a; }
.chip.ab-u { background: #d9e6fb; color: #2a4a80; } .chip.ab-n { background: #ffe9bf; color: #7a4f08; }
.meta.small { font-size: .8em; }
tr.comp-details td { background: #fafafa; }
tr.comp-details .task { margin: .3rem 0; }
/* below 64 rem the grid stacks (see .grid-stack) */
/* collapsed grids, dialog */
.grid-section h2.head { cursor: pointer; }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: flex-start; justify-content: center; padding: 3rem 1rem; z-index: 10; overflow: auto; }
/* as wide as the page's content (Markus 2026-11-02) */
.dialog { background: #fff; border-radius: .5rem; max-width: 54rem; width: 100%; max-height: calc(100vh - 6rem); overflow: hidden; padding: .4rem 1rem .8rem; box-shadow: 0 10px 40px rgba(0,0,0,.3); box-sizing: border-box; display: flex; flex-direction: column; }
/* the crumbs and the head stay, the body scrolls (2026-11-02) */
.dialog > .crumbs, .dialog > .dialog-head, .dialog > .hi-actions { flex: none; }
.dialog > .dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
/* the stack of dialogs above the head: always a line, the dialog below as a
   link, "… »" in front when deeper, the earlier ones on hover */
.crumbs { display: flex; align-items: center; gap: .25rem; min-height: 1.4rem; font-size: .8em; color: var(--muted); white-space: nowrap; }
.crumbs button.crumb { font: inherit; border: 0; background: none; padding: 0; color: var(--info); cursor: pointer; overflow: hidden; text-overflow: ellipsis; max-width: 30rem; }
.crumbs button.crumb:hover { text-decoration: underline; }
.crumb-more { position: relative; cursor: default; padding: .1rem .2rem; }
.crumb-more .crumb-list { display: none; position: absolute; left: 0; top: 100%; z-index: 5; background: var(--bg); border: 1px solid var(--line); border-radius: .3rem; box-shadow: 0 4px 14px rgba(0,0,0,.15); padding: .3rem .5rem; flex-direction: column; align-items: flex-start; gap: .2rem; }
.crumb-more:hover .crumb-list { display: flex; }
.dialog-head .back { font: inherit; font-size: 1.2rem; line-height: 1; border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 .2rem 0 0; }
.dialog-head .back:hover { color: var(--info); }
.card.ausgabe-link > .head { align-items: baseline; }
.dialog-head { display: flex; gap: .5rem; align-items: baseline; border-bottom: 1px solid var(--line); padding-bottom: .4rem; margin-bottom: .4rem; }
.dialog-head .close { margin-left: auto; font: inherit; font-size: 1.3rem; line-height: 1; border: 0; background: none; cursor: pointer; color: var(--muted); }
/* task header band */
.task { border-left: 0; padding: 0; margin: .7rem 0; }
.task-head { background: var(--bg-soft); border-left: 3px solid #b8c4d6; padding: .3rem .6rem; border-radius: 0 .3rem .3rem 0; margin-bottom: .3rem; }
.task > .md, .task > details, .task > p { padding-left: .6rem; }
.dialog details > summary { margin: .5rem 0; }
/* a school-book collection in a level's dialog: a fold of its own, apart from the class's tasks */
.dialog details.sammlung { margin: 1rem 0 0; }
.dialog details.sammlung > summary { font-weight: 600; }
.md img { max-width: 100%; height: auto; cursor: zoom-in; }
/* formulas (index.js): the source until the image is there, an error marked */
.tex:not(.tex-ok) { color: #777; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }
.tex.tex-error { color: #b00; text-decoration: underline wavy; cursor: help; }
.tex-display { display: block; text-align: center; margin: .4rem 0; }
.md img.math-formula { max-width: none; cursor: auto; }
/* tap-to-enlarge: the image at the full width of the screen (up to 64rem), scrollable, a tap closes */
.lightbox { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.88); overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: .5rem; cursor: zoom-out; }
.lightbox img { display: block; width: 100%; max-width: 64rem; height: auto; margin: auto; }
/* timeline: a vertical line on the left, one branch per day with the date on
   the line's left; the day's entries as boxes to the right */
.timeline { position: relative; margin: 1rem 0 1rem 6.6rem; padding-left: 1.4rem; border-left: 2px solid var(--line); }
.day { position: relative; padding: .15rem 0 .55rem; }
.day::before { content: ""; position: absolute; left: -1.4rem; top: 1.05rem; width: 1.1rem; border-top: 2px solid var(--line); }
.day::after { content: ""; position: absolute; left: calc(-1.4rem - 6px); top: calc(1.05rem - 4px); width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--muted); box-sizing: border-box; }
.day > .date { position: absolute; right: calc(100% + 1.9rem); top: .55rem; white-space: nowrap; color: var(--muted); font-size: .9em; }
.day.future::after { border-style: dashed; }
.entry { border: 1px solid var(--line); border-radius: .4rem; padding: .4rem .7rem; margin: .3rem 0; cursor: pointer; min-width: 0; }
.entry:hover { background: var(--bg-soft); }
.entry.bare { cursor: default; border-style: dashed; }
.entry .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.entry .badges { display: flex; flex-wrap: wrap; gap: .25rem .3rem; margin-top: .25rem; }
.badges .badge { font-size: .75em; padding: 0 .4rem; line-height: 1.6; }
.badges .aus { display: inline-flex; gap: .25rem; cursor: pointer; border-radius: .3rem; }
.badges .aus .badge { transition: box-shadow .1s, filter .1s; }
.badges .aus:hover .badge { filter: brightness(.9); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--info); text-decoration: underline; }
.entry.homework .title { font-weight: normal; }
.entry.chapter { background: var(--bg-soft); border-color: #c9d3e3; }
.entry.chapter .title { color: var(--info); }
.entry.chapter .title .meta { font-weight: normal; }
.dialog-head .badges { display: inline-flex; gap: .25rem; margin-left: .3rem; }
.chip.implicit { opacity: .55; border-style: dashed; border-color: currentColor; }
.badge.lvl-none { background: #eee; color: var(--muted); } .badge.lvl-notyet { background: #ffe9bf; color: #7a4f08; }
.badge.lvl-W { background: #e3f4e6; color: #1f5e30; } .badge.lvl-M { background: #bfe8c8; color: #1f5e30; } .badge.lvl-F { background: #2a7; color: #fff; }
/* points and grade above a chapter's grid (Kapitelbewertung): the bar is all points,
   a second one the level Wesentlich alone, segments the judgements in the colours of
   the .badge.stand-* rules */
.kpunkte { margin: .2rem 0 .8rem; }
.kp-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem 1rem; align-items: baseline; margin-bottom: .3rem; }
.kp-note small { color: var(--muted); }
.kp-titel { font-size: .8rem; margin-top: .3rem; }
.kp-balken { display: flex; height: 1.7rem; border: 1px solid var(--muted); border-radius: .3rem; overflow: hidden; }
.kp-seg.badge { display: flex; align-items: center; justify-content: center; border-radius: 0; padding: 0; overflow: hidden; font-size: .85rem; font-weight: 600; }
.kp-legende { display: flex; flex-wrap: wrap; gap: .1rem 1rem; align-items: center; margin-top: .3rem; font-size: .85rem; }
.kp-lg { display: inline-flex; align-items: center; gap: .3rem; }
.kp-sw.badge { display: inline-block; width: .8rem; height: .8rem; padding: 0; border-radius: .15rem; }
.kp-sw.kp-offen { background: var(--bg); border: 1px solid var(--muted); box-sizing: border-box; }
.kp-gewichte { font-size: .8rem; margin-top: .1rem; }
.dialog.wide { max-width: 80rem; min-width: 64rem; }
@media (max-width: 600px) { .timeline { margin-left: 5.2rem; } .day > .date { font-size: .8em; right: calc(100% + 1.7rem); } }
.fold { color: var(--info); font-size: .85em; cursor: pointer; padding: .1rem .7rem; }
.fold:hover { text-decoration: underline; }
.entry.elided { border-style: dashed; color: var(--muted); font-size: .9em; padding: .25rem .7rem; }
.day.elided::after { border-style: dashed; }
/* hand-out header: title line, then kind/date left and state right */
.h-block { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .5rem; }
.h-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; min-width: 0; }
.h-kind { white-space: nowrap; }
.h-block .badges { margin-left: auto; margin-top: 0; display: inline-flex; gap: .25rem; flex: 0 0 auto; }
.h-sub { display: flex; align-items: baseline; gap: .5rem; }
.h-sub .badges { margin-left: auto; margin-top: 0; display: inline-flex; gap: .25rem; }
.card > .head { align-items: flex-start; }
.card > .head > .meta:first-child { padding-top: .1rem; }
.dialog-head .h-block .h-title { font-size: 1.05em; }
/* hand-ins: a row of small buttons under an open task, the reason form */
.submit { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: .3rem 0 .2rem .6rem; }
button.small, label.btn { font: inherit; font-size: .8em; padding: .1rem .6rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--bg-soft); cursor: pointer; color: var(--fg); }
button.small:hover, label.btn:hover { border-color: var(--info); color: var(--info); }
label.btn input[type=file] { display: none; }
.reject { display: flex; gap: .4rem; flex-wrap: wrap; width: 100%; margin-top: .2rem; }
.reject select, .reject input[type=text] { font: inherit; font-size: .85em; padding: .1rem .3rem; }
.reject input[type=text] { flex: 1; min-width: 10rem; }
.badge.sub { border: 1px dashed var(--info); background: #eef3ff; }
/* the hand-in box under an open task */
.handin { border: 1px dashed #b8c4d6; border-radius: .4rem; padding: .4rem .7rem; margin: .4rem 0 .3rem .6rem; background: #fafbfd; }
.handin-title { font-size: .8em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .2rem; }
.handin-row { display: flex; gap: .6rem; align-items: baseline; margin: .2rem 0; }
.handin-row > button, .handin-row > label { flex: 0 0 10rem; width: 10rem; box-sizing: border-box; display: inline-block; text-align: center; padding: .15rem .6rem; line-height: 1.4; }
.handin-row.off > button, .handin-row.off > label { opacity: .45; cursor: not-allowed; }
.handin-row.off .meta { font-style: italic; }
.handin .reject { margin-left: 0; }
/* examples of a competence level: one slide at a time */
.carousel { margin: .2rem 0; }
.carousel-head { display: flex; align-items: center; gap: .3rem; font-size: .8em; color: var(--muted); }
.carousel-head .meta { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carousel .md { font-size: .9em; } .carousel .md p { margin: .2rem 0; }
.carousel .md .geometry svg, .carousel .md figure.img svg { max-height: 9rem; }
.carousel .slides { display: grid; }
.carousel .slides > .slide { grid-area: 1 / 1; }
.carousel .slides > .slide.hidden { visibility: hidden; }
/* a level cell's buttons (2026-11-15): a column at the cell's right edge – next
   example, solution, level description, tasks –, each a bordered icon button a bit
   smaller than the Stoff view's tick, which stands at the foot of the column */
.cell-body { flex: 1; display: flex; gap: .4rem; min-width: 0; }
.cell-body > .cell-inner { min-width: 0; }
.cell-tools { flex: none; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.icon-btn { width: 1.6rem; height: 1.6rem; padding: 0; border: 1px solid var(--line); border-radius: .3rem; background: #fff; color: var(--muted); font-size: 1rem; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn .icon { display: inline-flex; }
/* a click on a button's icon is a click on the button: the SVG is rendered content,
   miso would not walk into it to the button's handler */
button .icon { pointer-events: none; }
.icon-btn:hover, .tipbox.offen > .icon-btn { border-color: var(--info); color: var(--info); }
.icon-slot { display: block; width: 1.6rem; height: 1.6rem; }
/* every rich tooltip (a grid button's .tip-body, a concept's .konzept-tip; Markus
   2026-11-15): an opaque card that stands out – a 2px frame, a drop shadow, a smaller
   font than the cell text (formulas are images sized in ex, so they follow it), a quick
   fade-in; open while the tooltip chain of the model has it (CompetencesLite.Tooltip).
   The colours are tokens (--tip-*), so a dark theme only redefines them */
:root { --tip-bg: #fdfdfe; --tip-rand: #9aa7b8; --tip-schatten: 0 8px 26px rgba(0,0,0,.26), 0 2px 5px rgba(0,0,0,.16); --tip-s: 1.5rem; }
.tipbox { display: block; }
.tip-body, .konzept-tip { box-sizing: border-box; padding: .45rem .7rem .6rem; background: var(--tip-bg); color: var(--fg); font-size: .85rem; line-height: 1.4; text-align: left; cursor: auto; border: 2px solid var(--tip-rand); border-radius: .45rem; box-shadow: var(--tip-schatten); overflow: auto; animation: tip-ein .12s ease-out; }
@keyframes tip-ein { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.tip-body { display: none; }
.tip-body.offen { display: block; }
/* in a grid: the grid is the containing block, the tooltip takes the grid area the
   model names (grid-row, grid-column inline: towards the grid's middle, never the cell
   itself, App.rasterLage) and stays inside it – the room in that direction is its
   max-height and max-width, longer content scrolls; a follow-up (--tip-k > 0) lies over
   its predecessor, --tip-s further towards the middle, leaving a strip of it visible */
table.grid { position: relative; }
.tip-raster { position: absolute; z-index: 6; --tip-v: calc(.25rem + var(--tip-k, 0) * var(--tip-s)); max-height: calc(100% - .5rem - var(--tip-k, 0) * var(--tip-s)); max-width: calc(100% - .5rem - var(--tip-k, 0) * var(--tip-s)); }
.tip-raster.tip-unten, .tip-raster.tip-daneben { top: var(--tip-v); }
.tip-raster.tip-oben { bottom: var(--tip-v); }
.tip-raster.tip-rechts { left: var(--tip-v); }
.tip-raster.tip-links { right: var(--tip-v); }
/* a middle column: the middle two thirds of its three columns, two cells wide */
.tip-raster.tip-mitte { left: calc(100% / 6 + var(--tip-k, 0) * var(--tip-s)); max-width: calc(200% / 3 - var(--tip-k, 0) * var(--tip-s)); }
/* the folded layout (no grid): below the buttons, full width, in the flow of the
   block; a follow-up below its predecessor, indented */
.tip-stapel .tip-gefaltet { position: relative; margin: .3rem 0 0 calc(var(--tip-k, 0) * var(--tip-s)); max-height: 60vh; }
/* the close timer runs (the pointer is in no active area): a bar at the bottom edge
   runs down in --tip-uhr (Tip.schliessenNach); pinned: a stronger frame */
.tip-body.schliesst::after, .konzept-tip.schliesst::after { content: ""; position: absolute; left: .4rem; right: .4rem; bottom: 2px; height: 3px; border-radius: 2px; background: var(--info); opacity: .55; transform-origin: left; animation: tip-uhr var(--tip-uhr, 2000ms) linear forwards; }
@keyframes tip-uhr { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.tip-body.fest, .konzept-tip.fest { border-color: var(--info); }
/* the cursor says that a tooltip is about to close (buttons and links keep theirs) */
.tip-schliesst { cursor: progress; }
.tip-body .tip-kind { font-size: .78em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: .3rem; }
.tip-body .tip-kind:first-child { margin-top: 0; }
.tip-body .md p { margin: .2rem 0; }
.tip-list { list-style: none; margin: .1rem 0 .3rem; padding: 0; }
.tip-item { display: block; width: 100%; font: inherit; font-size: .95em; text-align: left; padding: .2rem .3rem; border: 0; border-radius: .25rem; background: none; color: var(--fg); cursor: pointer; }
.tip-item:hover, .tip-item:focus-visible { background: var(--bg-soft); color: var(--info); }
.tip-item .ref { font-family: monospace; background: #eef; padding: 0 .3rem; border-radius: .2rem; font-size: .9em; }
.tip-item .badge { margin-left: .3rem; }
.tip-item.alle { color: var(--info); margin-top: .2rem; }
/* the task or resource picked in a cell's tooltip, in the level's dialog */
.dialog .gewaehlt { box-shadow: 0 0 0 2px var(--info); border-radius: .3rem; animation: gewaehlt 1.8s ease-out 1; }
/* and it lights up once when the dialog opens, so the eye finds it (Markus 2026-11-15) */
@keyframes gewaehlt { 0%, 30% { background-color: #dbe7f5; box-shadow: 0 0 0 5px var(--info); } 100% { box-shadow: 0 0 0 2px var(--info); } }
@media (prefers-reduced-motion: reduce) { .dialog .gewaehlt { animation: none; } .tip-body.schliesst::after, .konzept-tip.schliesst::after, .tip-body, .konzept-tip { animation: none; } }
/* teacher view: student picker in the header */
header.top .who select { font: inherit; padding: .25rem .4rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--bg-soft); max-width: 16rem; }
.teacher-note { font-size: .9em; color: var(--muted); border-top: 1px dashed var(--line); margin-top: .5rem; padding-top: .3rem; }
/* the Pflicht box: green = done, yellow = some work open, red = nothing done yet */
.clauses { margin: .4rem 0 .8rem; padding: .4rem .8rem; border-left: 3px solid #e8b04a; background: #fff8ec; border-radius: .2rem; }
.clauses p.meta { margin: 0 0 .3rem; font-weight: 600; color: #8a4b00; }
.clauses.done { border-left-color: #5a5; background: #f0faf0; } .clauses.done p.meta { color: #1f5e30; }
.clauses.none { border-left-color: #d66; background: #fff0ee; } .clauses.none p.meta { color: #8a2a1a; }
/* task states: the two greens count, light yellow asks for more, light red is still needed */
.badge.ok-light { background: #ecf7dc; } .badge.warn-light { background: #fff6dc; } .badge.bad-light { background: #fde7e3; }
.badge .tip { cursor: help; color: var(--info); }
/* the hand-in bar of a hand-out and the hand-in dialog over it */
.backdrop.over { z-index: 12; background: rgba(0,0,0,.45); }
.handin-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; border: 1px dashed #b8c4d6; border-radius: .4rem; padding: .4rem .7rem; margin: .4rem 0 .6rem; background: #fafbfd; }
.handin-bar .handin-title { margin: 0; }
.handin-bar button[disabled] { opacity: .45; cursor: not-allowed; }
.dialog h4 { margin: .7rem 0 .2rem; font-size: .8em; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hi-task { padding: .25rem 0; border-top: 1px solid var(--line); }
.hi-task label { cursor: pointer; }
.hi-task.done { color: var(--muted); }
.hi-task .reject { margin: .2rem 0 0 1.6rem; width: auto; } .hi-task .reject input[type=text] { min-width: 0; }
.hi-file { margin: .6rem 0; display: flex; gap: .5rem; align-items: center; }
.hi-actions { display: flex; gap: .5rem; margin-top: .6rem; }
.clause { margin: .15rem 0; }
/* Offen tab: the counter in the tab, the open tasks under a hand-out */
nav.tabs button .count { display: inline-block; min-width: 1.5em; height: 1.5em; line-height: 1.5em; padding: 0 .35em; margin-left: .35rem; border-radius: .75em; background: var(--info); color: #fff; font-size: .75em; font-weight: 600; text-align: center; vertical-align: .15em; box-sizing: border-box; }
.entry.open .badges { margin-top: .15rem; }
.open-tasks { margin: .35rem 0 0; font-size: .92em; }
.open-tasks li { padding: .1rem 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.open-tasks .ref { font-family: monospace; background: #eef; padding: 0 .3rem; border-radius: .2rem; font-size: .9em; }
/* hand-in dialog: section heads with "Alles erledigt", the absent button */
.dialog h4 { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.dialog h4 button.small { text-transform: none; letter-spacing: 0; font-size: 1em; }
.hi-absent { text-align: center; margin: .6rem 0 .2rem; }
/* hand-in dialog rows: one line, title cut, badge and reason box at the right */
.hi-line { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.hi-line label, .hi-line .hi-done { display: flex; align-items: center; gap: .35rem; flex: 1; min-width: 0; }
.hi-line .hi-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hi-line .badge { flex: none; white-space: nowrap; }
.hi-line select { flex: none; font: inherit; font-size: .85em; padding: .1rem .3rem; }
.hi-task .reject { margin: .25rem 0 0 1.6rem; } .hi-task .reject input[type=text] { flex: 1; }
/* Pflicht box head: headline left, the hand-in button right; attachment rows */
.clauses-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.clauses-head p.meta { margin: 0; margin-right: auto; } .clauses-head { gap: .4rem; } .clauses-head button.small { flex: none; }
.hi-upload { padding: .2rem 0; border-top: 1px solid var(--line); } .hi-upload button.small { flex: none; padding: 0 .45rem; }
.hi-upload .hi-done { gap: .5rem; }
/* Erwartungen: one line per expectation with the mark, unfolding to the criteria */
.erw { margin: .4rem 0 .8rem; padding: .4rem .8rem; border-left: 3px solid #b8c4d6; background: var(--bg-soft); border-radius: .2rem; }
.erw p.meta { margin: 0 0 .2rem; font-weight: 600; }
.erw details summary { cursor: pointer; margin: .15rem 0; }
.erw details .md { margin: .2rem 0 .3rem; }
.erw ul.plain { margin: 0 0 .3rem; }
.erw li { padding: .1rem 0; }
.erw li .md { display: inline; } .erw li .md p { display: inline; margin: 0; }
.erw li.reached { background: #dfd; border-radius: .3rem; padding: .1rem .3rem; }
/* Projekte: deadline line, the milestone list with Pflicht/Bonus, the dated log */
.projekt-meta { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; margin: .3rem 0 .6rem; }
.verlauf { margin: .3rem 0 .6rem; }
.verlauf li { padding: .1rem 0; }
.verlauf .date { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: .4rem; }
.verlauf .note { color: var(--muted); font-style: italic; }
.hi-partners { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .2rem 0; }
.hi-partners label { display: flex; align-items: center; gap: .3rem; cursor: pointer; }
.hi-partners label.off { color: var(--muted); cursor: default; }
/* images and inlined SVG pictures (TikZ): size from #+attr_roam: :größe */
.md figure.img { margin: .4rem auto; text-align: center; }
.md figure.img svg { max-width: 100%; height: auto; }
/* an SVG by name (index.js fills it): as if the SVG stood here itself */
.md .svg-ref { display: contents; }
.md .img.klein, .md figure.img.klein svg { max-width: 30%; }
.md .img.mittel, .md figure.img.mittel svg { max-width: 50%; }
.md .img.gross, .md figure.img.gross svg { max-width: 80%; }
.md figure.img figcaption { font-size: .9em; color: var(--muted); }
/* the standing (2026-10-19): the missed hand-outs folded at the end of Offen, and the way out */
h3.aktuell { margin: 1rem 0 .25rem; font-size: 1.05em; color: #555; }
details.versaeumt { margin: 1rem 0 0; } details.versaeumt > summary { cursor: pointer; font-weight: 600; color: #a33; }
details.abgegeben { margin: 1rem 0 0; } details.abgegeben > summary { cursor: pointer; font-weight: 600; color: var(--info); }
.nachholen { background: #fff6dc; border-left: 4px solid #e9b949; padding: .5rem .75rem; border-radius: .3rem; font-weight: 600; }
/* a refused hand-in or a failed load: a bar fixed at the bottom of the screen, a tap closes it (2026-10-20) */
.fehler { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: .8rem 1rem; background: #fdd; color: #7a1a1a; border-top: 3px solid var(--bad); font-weight: 600; cursor: pointer; box-shadow: 0 -6px 20px rgba(0,0,0,.15); }
.fehler::after { content: " ×"; color: var(--bad); }
/* the green counterpart: the hand-in was accepted (Markus 2026-10-22: students missed a confirmation) */
.hinweis { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; margin: 0; padding: .8rem 1rem; background: #dfd; color: #175a35; border-top: 3px solid var(--ok); font-weight: 600; cursor: pointer; box-shadow: 0 -6px 20px rgba(0,0,0,.15); }
.hinweis::after { content: " ×"; color: var(--ok); }
button.small.primary { background: var(--info); color: #fff; border-color: var(--info); }
button.small.primary:hover { background: #355a8a; color: #fff; }
button.small[disabled] { opacity: .45; cursor: not-allowed; }
/* phones and tablets (2026-10-20, Markus: the app is used on mobile devices): touch targets of at
   least 2.6rem, inputs at 16px so iOS does not zoom, dialogs over the full screen with the
   buttons fixed at the bottom, the timeline without its date gutter, the tabs scrollable */
@media (pointer: coarse) {
  button.small, label.btn, header.top .who select { font-size: 1em; padding: .5rem .9rem; min-height: 2.6rem; }
  .icon-btn, .icon-slot { width: 1.85rem; height: 1.85rem; }
  .dialog-head .close { font-size: 1.8rem; padding: .3rem .6rem; min-width: 2.6rem; min-height: 2.6rem; }
  .hi-line select, .reject select, .reject input[type=text] { font-size: 16px; padding: .4rem .5rem; min-height: 2.4rem; }
  input[type=checkbox] { width: 1.35rem; height: 1.35rem; margin: .3rem .4rem .3rem .1rem; }
  .hi-task label { min-height: 2.6rem; }
  .hi-line .badge { font-size: .8em; }
  .hi-upload button.small { padding: .3rem .7rem; }
  nav.tabs button .count { min-width: 1.6em; height: 1.6em; line-height: 1.6em; }
}
@media (max-width: 600px) {
  body { padding: 0 .7rem 3rem; }
  /* the tabs scroll sideways on their own line, the name goes below them */
  header.top { flex-wrap: wrap; gap: 0; }
  header.top nav.tabs { flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
  header.top nav.tabs button { padding: .7rem .7rem; white-space: nowrap; }
  header.top .who { flex: 1 1 100%; padding: .35rem 0; font-size: .9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* the date above the day's boxes instead of beside them: the cards get the width */
  .timeline { margin: .8rem 0 1rem .4rem; padding-left: .9rem; }
  .day { padding: .1rem 0 .5rem; }
  .day > .date { position: static; display: block; right: auto; font-size: .8em; margin: .1rem 0 .1rem; }
  .day::before { left: -.9rem; top: .75rem; width: .6rem; }
  .day::after { left: calc(-.9rem - 6px); top: calc(.75rem - 4px); }
  .entry { padding: .45rem .6rem; }
  /* dialogs: the whole screen, scrolling inside, the actions always within reach */
  .backdrop { padding: 0; align-items: stretch; }
  .dialog { max-width: none; max-height: 100vh; max-height: 100dvh; border-radius: 0; padding: .6rem .7rem; box-shadow: none; }
  .dialog-head .back { font-size: 1.8rem; padding: .3rem .6rem .3rem 0; min-height: 2.6rem; }
  .hi-actions { background: var(--bg); padding: .6rem .7rem 0; margin: .6rem -.7rem 0; border-top: 1px solid var(--line); }
  .hi-actions button { flex: 1; }
  .clauses-head { flex-wrap: wrap; }
  .clauses-head button.small { flex: 1 1 100%; margin-top: .3rem; }
  .handin-row > button, .handin-row > label { flex: 1 1 auto; width: auto; }
  .md .img.klein, .md figure.img.klein svg { max-width: 60%; }
  .md .img.mittel, .md figure.img.mittel svg { max-width: 85%; }
  .md .img.gross, .md figure.img.gross svg { max-width: 100%; }
  .fehler { padding: .8rem 2.2rem .8rem .8rem; }
}
/* Material eines Auftrags: eine Zeile echter Reiter über den Aufgaben (Markus 2026-10-21), seitlich
   scrollbar, wenn sie nicht hineinpassen. Die Grundlinie ist ein 1px-Hintergrund der Leiste; der
   aktive Reiter deckt sie mit seinem unteren Rand in Seitenfarbe und hängt so am Feld darunter. */
.tabbed { display: flex; flex-direction: column; margin-top: .3rem; }
.tabstrip { display: flex; align-items: flex-end; gap: .2rem; overflow-x: auto; scrollbar-width: thin; padding: .2rem .4rem 0;
  background: linear-gradient(var(--line), var(--line)) bottom / 100% 1px no-repeat; }
.tabstrip .tab { flex: 0 0 auto; white-space: nowrap; font: inherit; color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: .4rem .4rem 0 0; padding: .35rem .8rem; cursor: pointer; }
.tabstrip .tab:hover { color: var(--fg); }
.tabstrip .tab.on { background: var(--bg); color: var(--fg); font-weight: 600; border-bottom-color: var(--bg); }
.tabpane { padding-top: .5rem; }

/* Aktuell (2026-10-31): the last lesson on top, one timeline of the mandatory
   work below; settled days fold to one line with the icons at the right */
.letzte-stunde { margin: .5rem 0 1rem; padding: .2rem .9rem .6rem; border: 1px solid var(--line); border-radius: .5rem; background: #fafafa; }
.rueckmeldung { margin: .5rem 0 1rem; padding: .2rem .9rem .4rem; border: 1px solid var(--line); border-left: 4px solid #2a7; border-radius: .5rem; background: #f6fbf6; }
.rueckmeldung > h3.aktuell { margin: .5rem 0 .3rem; }
.letzte-stunde > h3.aktuell { cursor: pointer; margin: .5rem 0 .4rem; }
.letzte-stunde > h3.aktuell:hover { text-decoration: underline; }
/* the lesson as a short timeline (2026-11-03): a dot per line on a thin rule */
.letzte-stunde h4.kurz-titel { margin: .5rem 0 .2rem; font-size: .95em; }
ol.kurz { list-style: none; margin: .2rem 0 .3rem .3rem; padding: 0 0 0 1rem; border-left: 2px solid var(--line); }
ol.kurz > li { position: relative; padding: .2rem .3rem; border-radius: .3rem; cursor: pointer; }
ol.kurz > li > .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ol.kurz > li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: .65em; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted); box-sizing: border-box; }
ol.kurz > li.ausgabe::before { border-color: var(--info); background: var(--info); }
ol.kurz > li:hover { background: var(--bg-soft); }
ol.kurz > li .kind { margin-right: .4rem; }
.letzte-stunde .kurz-mehr { margin: .2rem 0 0; font-size: .9em; }
.order { display: flex; justify-content: flex-end; margin: .8rem 0 0; font-size: .9em; }
.order .toggle { display: inline-flex; border: 1px solid var(--info); border-radius: 1rem; overflow: hidden; }
.order .seg { padding: .15rem .7rem; border: 0; background: #fff; color: var(--info); cursor: pointer; font: inherit; font-size: .95em; }
.order .seg + .seg { border-left: 1px solid var(--info); }
.order .seg:hover { background: #eef3ff; }
.order .seg.active { background: var(--info); color: #fff; }
/* the branch of a day is an arrow: line → entry "ausgegeben", entry → line "fällig" */
.timeline.aktuell .day::before { content: none; }
.timeline.aktuell .day > .arrow { position: absolute; left: -1.4rem; top: 1.05rem; width: 1.1rem; border-top: 2px solid var(--line); }
.timeline.aktuell .day > .arrow::after { content: ""; position: absolute; top: -5px; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.timeline.aktuell.by-ausgabe .day > .arrow::after { right: -2px; border-left: 7px solid var(--muted); }
.timeline.aktuell.by-frist .day > .arrow::after { left: -2px; border-right: 7px solid var(--muted); }
 (pointer: coarse) { .timeline.aktuell .day > .arrow { left: -.9rem; top: .75rem; width: .6rem; } }
.entry.folded { display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .25rem .7rem; color: var(--muted); font-size: .9em; }
.entry.folded .title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; }
.entry.folded.run { border-style: dashed; }
.entry.folded:hover .title { text-decoration: underline; }
.entry.folded .marks { display: inline-flex; gap: .3rem; flex: 0 0 auto; }
.mark { display: inline-flex; align-items: center; gap: .15rem; padding: 0 .35rem; border-radius: .75em; font-size: .85em; line-height: 1.6; }
.mark .icon { display: inline-flex; font-size: 1.1em; }
.mark.fehlt { background: #fdd; color: #a33; }
.mark.abgegeben { background: #dde8ff; color: #246; }
.mark.ok { color: #2a7; }
/* the count turns red only when something is late; the summary sentence; the late mark */
nav.tabs button .count.late { background: #c33; }
p.summary { margin: .9rem 0 0; padding: .7rem 1rem; font-size: 1.1em; border: 2px solid var(--info); border-radius: .5rem; background: #eef3ff; }
p.summary.late { border-color: #c33; background: #fde7e3; }
p.summary.done { border-color: var(--ok); background: #ecf7dc; }
.mark.late { background: #fdd; color: #a33; margin-left: .45rem; font-size: .8em; vertical-align: .1em; }
/* an opened run: a strip at the right, across its days, folds it again */
.run-open { position: relative; padding-right: 1.6rem; }
.run-open > .fold-side { position: absolute; right: 0; top: .2rem; bottom: .4rem; width: 1.25rem; writing-mode: vertical-rl; display: flex; align-items: center; justify-content: center; font-size: .8em; color: var(--info); cursor: pointer; border-left: 1px dashed var(--line); border-radius: 0 .3rem .3rem 0; }
.run-open > .fold-side:hover { background: #eef3ff; text-decoration: underline; }
/* the participation of the last lesson, under its title */
.letzte-stunde .mitarbeit { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: -.1rem 0 .6rem; font-size: .95em; }

/* Schularbeit (spec/schularbeit.org, Abschnitt 6): the term line in Aktuell, the Stoff card in a lesson, the Stoff view */
.termin { margin: .3rem 0 .6rem; padding: .45rem .8rem; border: 1px solid #c9d3e3; border-radius: .5rem; background: var(--bg-soft); cursor: pointer; }
.termin:hover { border-color: var(--info); }
.termin .link { color: var(--info); text-decoration: underline; }
.stoff-card .small { margin-top: .3rem; }
table.grid.stoff th:not(:first-child) { width: auto; }
.vorbereiten { margin: .6rem 0; padding: .45rem .8rem; border-radius: .5rem; background: #fff3d6; }
.vorbereiten.done { background: #d9f5df; }

/* The competence grid (Markus 2026-11-01): the table from 64 to 80 rem with rotated titles and a hover overlay; below 64 rem one folding block per competence, the levels one after the other */
.grid-stack { display: none; }
@media (max-width: 64rem) { .dialog.wide { min-width: 0; } .grid-wide { display: none; } .grid-stack { display: block; } }
.grid-hint { margin: .2rem 0 .6rem; }
/* the full 80 rem (window ≥ 82 rem, the backdrop pads 1 rem a side): titles as text */
table.grid .rot { display: none; }
/* 64 to 82 rem: the title column narrow, the title rotated in two lines filling
   the row's height (word-wrapped, the ellipsis after the second line), the full
   title as an overlay on hover */
@media (min-width: 64rem) and (max-width: 81.99rem) {
  :is(table.grid > tr, table.grid > tbody > tr) > th { width: auto; }
  :is(table.grid > tr, table.grid > tbody > tr) > th:first-child { width: auto; }
  :is(table.grid > tr, table.grid > tbody > tr) > td.comp-title { width: auto; min-height: 9.5rem; position: relative; padding: 0; }
  table.grid { grid-template-columns: 2.9rem repeat(3, minmax(0, 1fr)); }
  table.grid.cols-2 { grid-template-columns: 2.9rem repeat(2, minmax(0, 1fr)); }
  table.grid.cols-1 { grid-template-columns: 2.9rem minmax(0, 1fr); }
  table.grid .rot { display: -webkit-box; position: absolute; top: .35rem; bottom: .35rem; left: .4rem; width: 2.4em; writing-mode: vertical-rl; transform: rotate(180deg); -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.2; font-weight: 600; font-size: .9em; cursor: default; }
  table.grid td.comp-title .full { display: none; position: absolute; left: 100%; top: 0; z-index: 5; min-width: 16rem; max-width: 26rem; padding: .5rem .7rem; background: #fff; border: 1px solid var(--line); border-radius: .4rem; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
  table.grid td.comp-title:hover .full { display: block; }
}
.comp-stack { margin: .35rem 0; border: 1px solid var(--line); border-radius: .4rem; padding: .2rem .6rem; }
.comp-stack > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; }
.comp-stack .lvl { margin: .35rem 0 .35rem 1.2rem; padding: .3rem .5rem; border-left: 3px solid var(--line); border-radius: 0 .3rem .3rem 0; }
.comp-stack .lvl-name { font-size: .78em; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .15rem; }
.comp-stack .lvl.stand-assessed { background: #c8f0d0; } .comp-stack .lvl.stand-strong { background: #d9f5df; }
.comp-stack .lvl.stand-emerging { background: #ecf9ee; } .comp-stack .lvl.stand-partial { background: #f4f8d8; }
.comp-stack .lvl.stand-notyet { background: #fff3d6; }

/* #+begin_auswahl: no bullets, a square to tick in front of every option */
ul.choice { list-style: none; padding-left: .2rem; margin: .4rem 0; }
ul.choice li { display: flex; gap: .45rem; align-items: baseline; margin: .2rem 0; }
ul.choice .box { font-size: 1.15em; line-height: 1; flex: 0 0 auto; }
ul.choice li > p { margin: 0; }

/* info boxes with an icon at the left (2026-11-01): ! attention, i information, ✓ done */
.box-icon { flex: 0 0 auto; display: inline-flex; font-size: 1.45em; line-height: 1; margin-top: .05em; }
.box-text { flex: 1; min-width: 0; }
p.summary, .termin, .vorbereiten, .nachholen { display: flex; gap: .65rem; align-items: flex-start; }
p.summary .box-icon { color: var(--info); }
p.summary.late .box-icon { color: #c33; }
p.summary.done .box-icon { color: var(--ok); }
.nachholen .box-icon, .vorbereiten .box-icon { color: #b8860b; }
.vorbereiten.done .box-icon { color: var(--ok); }
/* an upcoming Schularbeit: prominent, yellow, the exclamation mark */
.termin { background: #fff3c4; border: 2px solid #e9b949; font-size: 1.05em; padding: .6rem .9rem; margin: .8rem 0 .4rem; }
.termin:hover { border-color: #c99a1e; }
.termin .box-icon { color: #b8860b; font-size: 1.6em; }
/* the grade in place of the term, a week after the test (2026-11-12): calm, blue like the summary */
.termin.benotet { background: #eef3ff; border-color: #9fb3d6; }
.termin.benotet:hover { border-color: var(--info); }
.termin.benotet .box-icon { color: var(--info); }

/* the grading of a Schularbeit (2026-11-12): like the last page of the test, a small form */
.benotung { margin: .2rem 0 .8rem; padding: .5rem .8rem .6rem; border: 1px solid var(--line); border-radius: .4rem; }
.benotung-kopf { display: flex; flex-wrap: wrap; gap: .3rem 2.5rem; align-items: baseline; margin-bottom: .4rem; }
.benotung-kopf > span { display: inline-flex; align-items: baseline; gap: .5rem; }
.benotung-kopf strong { font-size: 1.45em; }
.benotung table { border-collapse: collapse; margin: .5rem 0; }
.benotung th, .benotung td { border: 1px solid var(--line); padding: .2rem .55rem; text-align: right; vertical-align: top; }
.benotung th:first-child, .benotung td:first-child { text-align: left; }
.benotung th { background: var(--bg-soft); font-weight: 600; font-size: .9em; }
.benotung-aufgaben { width: 100%; }
.benotung-aufgaben tr.summe td { font-weight: 600; border-top: 2px solid var(--muted); }
.benotung .ref { font-family: monospace; font-size: .85em; color: var(--muted); }
.benotung-schluessel tr.reached td { background: #e8f0ff; font-weight: 600; }
.benotung-rechnung { margin: .3rem 0; }
@media (max-width: 600px) {
  .benotung { padding: .4rem .5rem; }
  .benotung th, .benotung td { padding: .2rem .35rem; }
  .benotung .ref { display: none; }
}

/* the Stoff view's ticks and filter (2026-11-01) */
.stoff-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin: .5rem 0; }
.stoff-filter .toggle { display: inline-flex; border: 1px solid var(--line); border-radius: .4rem; overflow: hidden; }
.stoff-filter .seg { font: inherit; font-size: .9em; padding: .25rem .6rem; border: 0; border-left: 1px solid var(--line); background: #fff; cursor: pointer; }
.stoff-filter .seg:first-child { border-left: 0; }
.stoff-filter .seg.active { background: var(--info); color: #fff; }
/* a level cell is positioned (the folded block places its tooltip stack in it; a grid's
   tooltips take the grid as their containing block, .tip-raster) */
:is(table.grid > tr, table.grid > tbody > tr) > td.cell, .comp-stack .lvl { position: relative; }
/* the tick at the foot of the cell's button column, level with the footer's last line */
button.haken { flex: none; margin-top: auto; width: 2rem; height: 2rem; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #b5b5b5; font-size: 1.15rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
button.haken .icon { display: inline-flex; }
button.haken.an { color: var(--ok); border-color: var(--ok); }
button.haken:hover { color: #d2d2d2; background: #fafafa; }
button.haken.an:hover { color: #6fcf8f; }
button.haken:disabled { cursor: default; opacity: .7; }

/* a level cell (2026-11-01): the content on top, the status (stand, observations, tasks) at the bottom */
/* the grid table laid out as a CSS grid: every cell of a row stretches to the row's height */
table.grid { display: grid; }
@media (min-width: 82rem) {
  table.grid { grid-template-columns: 19% repeat(3, minmax(0, 1fr)); }
  table.grid.cols-2 { grid-template-columns: 19% repeat(2, minmax(0, 1fr)); }
  table.grid.cols-1 { grid-template-columns: 19% minmax(0, 1fr); }
}
/* only the grid's own rows and cells: tables inside a cell's content stay tables */
table.grid > tbody, table.grid > tr, table.grid > tbody > tr { display: contents; }
:is(table.grid > tr, table.grid > tbody > tr) > th { width: auto; }
:is(table.grid > tr, table.grid > tbody > tr) > td { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
:is(table.grid > tr, table.grid > tbody > tr) > td.comp-title { border-left: 1px solid var(--line); }
:is(table.grid > tr, table.grid > tbody > tr):nth-child(2) > td { border-top: 1px solid var(--line); }
:is(table.grid > tr, table.grid > tbody > tr) > td.cell { display: flex; flex-direction: column; }
.cell-inner { flex: 1; display: flex; flex-direction: column; }
.cell-foot { margin-top: auto; padding-top: .35rem; display: flex; flex-direction: column; justify-content: flex-end; }
/* the stand at the very top right of the cell */
.cell-inner > .stand { align-self: flex-end; margin-bottom: .2rem; }
/* the summary of the observations under the teacher's judgement: secondary */
.stand .badge.sekundaer { display: table; margin: .15rem 0 0 auto; opacity: .65; font-size: .8em; }

/* a table inside a level cell's content (examples, level texts): a plain small table */
table.grid td.cell table { border-collapse: collapse; margin: .3rem 0; }
table.grid td.cell table th, table.grid td.cell table td { border: 1px solid var(--line); padding: .1rem .4rem; width: auto; }
/* a project's milestones (2026-11-02): one fold each, in the lesson and in the
   hand-out dialog alike; a reached one starts folded */
details.milestone { margin: .7rem 0; }
details.milestone > summary { background: var(--bg-soft); border-left: 3px solid #b8c4d6; padding: .3rem .6rem; border-radius: 0 .3rem .3rem 0; color: var(--fg); }
details.milestone > summary .ref { font-family: monospace; background: #eef; padding: 0 .3rem; border-radius: .2rem; }
details.milestone > summary .badge { margin-left: .2rem; }
details.milestone[open] > summary { margin-bottom: .3rem; }
details.milestone > .task { margin-left: 1rem; }
/* admonitions (2026-11-02): a bar at the side in the kind's colour */
.admonition { border-left: 4px solid #b8c4d6; padding-left: 1em; margin: .6rem 0 .6rem 1em; }
.admonition > .admonition-title { margin: .2rem 0; }
.admonition.definition { border-left-color: #468; }
.admonition.satz { border-left-color: #a33; }
.admonition.beweis { border-left-color: #999; }
.admonition.bemerkung { border-left-color: #c60; }
.admonition.merksatz { border-left-color: #2a7; }
.admonition.beispiel { border-left-color: #8a6bbf; }

/* the views of a hand-out (2026-11-02): the switch, then the step view –
   the milestones as a bar with a dot per task or step, the page, back/on */
.ansicht { display: flex; gap: .3rem; justify-content: flex-end; margin: .2rem 0 .5rem; }
.ansicht button.small.on { background: var(--info); color: #fff; border-color: var(--info); }
.wt-nav { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; padding: .4rem .6rem; background: var(--bg-soft); border-radius: .4rem; margin-bottom: .6rem; }
.wt-group { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .15rem; }
.wt-dots { display: flex; gap: .3rem; }
.wt-label { font-family: monospace; font-size: .85em; color: var(--muted); cursor: pointer; border: 0; background: none; padding: 0; }
.wt-label:hover { color: var(--info); text-decoration: underline; }
.wt-label.blank { visibility: hidden; cursor: default; }
.wt-group.cur .wt-label { color: var(--fg); font-weight: 600; }
.wt-dot { width: .8rem; height: .8rem; padding: 0; border-radius: 50%; border: 1px solid #b8c4d6; background: #fff; cursor: pointer; }
.wt-dot.ok { background: #8fd19e; border-color: #5bb06f; }
.wt-dot.warn { background: #f6d77a; border-color: #d9b440; }
.wt-dot.cur { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--info); }
.wt-dot:hover { border-color: var(--info); }
.wt-head { background: var(--bg-soft); border-left: 3px solid #b8c4d6; padding: .3rem .6rem; border-radius: 0 .3rem .3rem 0; margin-bottom: .4rem; }
.wt-head .ref { font-family: monospace; color: var(--muted); }
/* a fixed height: the page scrolls, back and on stay where they are */
.wt-page { height: clamp(10rem, calc(100vh - 27rem), 40rem); overflow: auto; }
.wt-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); padding-top: .4rem; margin-top: .6rem; }
@media (max-width: 600px) { .wt-dot { width: 1.1rem; height: 1.1rem; } }
.clauses-head.bare { justify-content: flex-end; margin: .3rem 0; }
/* a file of the lesson (Word, PDF, …): opens or downloads in a new tab */
/* a file of the lesson in its own colour (Markus 2026-11-03), visited or not */
.md a.anhang, .md a.anhang:visited { color: #0b7285; }
.md a.anhang:hover { color: #075563; }
.md a.anhang::before { content: "📎"; margin-right: .15em; text-decoration: none; display: inline-block; }
/* a concept link (roam-server konzepte, 2026-11-15): dotted underline, focusable; its own
   children (a formula) do not catch the pointer, so the delegated handlers see the link */
.md .konzept { border-bottom: 1px dotted var(--info); cursor: help; border-radius: 2px; }
.md .konzept:hover, .md .konzept:focus-visible { background: #eef3fa; outline: none; }
.md .konzept * { pointer-events: none; }
/* the pointer rests on a concept link and its tooltip is about to open */
.tip-wartet .md .konzept:hover { cursor: progress; }
/* a concept's tooltip opened from a link in content (App.konzeptTips): fixed in the
   window, towards its middle from the link, not over it; place and room inline
   (Tooltip.fensterKasten, never past the window, so the page gets no scrolling); above
   the dialogs, below the enlarged image. Opened from a grid tooltip it is a .tip-raster
   or .tip-gefaltet like that one */
.konzept-tip.tip-fenster { position: fixed; z-index: 18; }
.konzept-tip .konzept-kopf { display: flex; align-items: center; gap: .5rem; justify-content: space-between; margin-bottom: .2rem; }
.konzept-tip .md p { margin: .2rem 0; }
.konzept-seite { flex: none; display: inline-flex; align-items: center; gap: .25rem; font: inherit; font-size: .85em; padding: .1rem .45rem; border: 1px solid var(--line); border-radius: .3rem; background: #fff; color: var(--info); cursor: pointer; }
.konzept-seite:hover, .konzept-seite:focus-visible { border-color: var(--info); }
.konzept-seite .icon { display: inline-flex; }
/* a concept's page: the short text as the lead */
.konzept-kurz { border-left: 4px solid var(--info); background: var(--bg-soft); padding: .3rem .8rem; margin: .2rem 0 .8rem; border-radius: .2rem; }
.konzept-abschnitt { margin: 1rem 0 .3rem; }

/* the pages of a hand-in with the teacher's correction over them
   (roam-server spec/scan-korrektur.org): the overlay has the page's size */
.korrektur { margin: 0.75rem 0; }
.korrektur-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.4rem; }
.seite { position: relative; margin: 0 0 0.75rem; border: 1px solid var(--line, #ddd); background: #fff; }
.seite img { display: block; width: 100%; height: auto; }
.seite .seite-korrektur { position: absolute; inset: 0; height: 100%; pointer-events: none; }

/* the page Leistungen: Schularbeiten and bigger projects on one timeline, a mark at today; what comes up is highlighted */
.timeline.leistungen .entry .kind { font-weight: normal; margin-right: .1rem; }
.entry.leistung .badges { align-items: center; }
.entry.anstehend { background: #fff3c4; border-color: #e9b949; }
.entry.anstehend:hover { background: #ffecaa; border-color: #c99a1e; }
.entry.anstehend .title { display: flex; align-items: center; gap: .3rem; }
.entry.anstehend .mark.anstehend { margin-left: auto; padding: 0; color: #b8860b; flex: 0 0 auto; }
.day.today::after { background: var(--info); border-color: var(--info); border-style: solid; }
.day.today > .date { color: var(--info); font-weight: 600; }
.day.today > .today-line { margin: .55rem 0; border-top: 2px dashed var(--info); }
/* Aktuell: the marked projects on one line, side by side below it */
.termin.projekte { margin-bottom: 0; cursor: default; border-bottom: 0; border-radius: .5rem .5rem 0 0; }
.termin-liste { margin: 0 0 .6rem; padding: .3rem .8rem .45rem 2.9rem; display: flex; flex-wrap: wrap; gap: .2rem .5rem; background: #fff3c4; border: 2px solid #e9b949; border-top: 0; border-radius: 0 0 .5rem .5rem; }
.termin-liste .link { color: var(--info); text-decoration: underline; cursor: pointer; }
.termin-liste .sep { color: var(--muted); }
