/* k2-seite.css — Unterrichtsseite (Paket K2, 06.11.2026). Site-Tokens, hell und dunkel, Druck-Arbeitsblatt A4. */
:root[data-theme="light"] { --k2-ton-a: #efe3c4; --k2-ton-b: #dfe6f1; --k2-ton-c: #e9e1ee; --k2-ton-d: #dcebe4; --k2-ton-e: #f1e0d6; --k2-papier: #fffefa; }
:root[data-theme="dark"] { --k2-ton-a: #33301f; --k2-ton-b: #1f2f4c; --k2-ton-c: #2e2843; --k2-ton-d: #1c3532; --k2-ton-e: #3b2a24; --k2-papier: #fffefa; }

/* ---------- Kopf, Kacheln (magnetischer Bento-Hover) ---------- */
.k2-kopf__text { margin: 0 auto; padding: 0; }
.k2-kacheln { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 2rem; isolation: isolate; }
.k2-kacheln__flaeche { position: absolute; left: 0; top: 0; z-index: -1; border-radius: var(--radius); background: var(--k2-ton, var(--k2-ton-a)); opacity: 0; pointer-events: none;
  transition: transform .32s var(--k2-ease), width .32s var(--k2-ease), height .32s var(--k2-ease), opacity .25s, background-color .32s; }
.k2-kacheln.hat-flaeche .k2-kacheln__flaeche { opacity: 1; }
.k2-kachel { display: grid; grid-template-rows: auto auto 1fr auto; gap: .35rem; padding: 1rem 1.05rem; border-radius: var(--radius); background: var(--box);
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: background-color .25s, border-color .25s, scale .15s; }
.k2-kachel__nr { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.k2-kachel strong { font-family: var(--font-display); font-size: 1.04rem; line-height: 1.25; font-weight: 640; }
.k2-kachel__stufe { font-size: .84rem; color: var(--ink-2); line-height: 1.4; }
.k2-kachel__dauer { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.k2-kachel:active { scale: .97; }
.k2-kachel:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .k2-kacheln.hat-flaeche .k2-kachel { background: transparent; }
  .k2-kacheln.hat-flaeche .k2-kachel.ist-unter { border-color: transparent; }
  .k2-kacheln.hat-flaeche .k2-kachel.ist-unter .k2-kachel__nr { color: var(--ink); }
}
@media (max-width: 1060px) { .k2-kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .k2-kacheln { grid-template-columns: 1fr; } .k2-kachel { grid-template-rows: none; grid-template-columns: auto 1fr; align-items: baseline; column-gap: .8rem; }
  .k2-kachel > :not(.k2-kachel__nr) { grid-column: 2; } .k2-kachel__nr { grid-row: 1 / span 3; } }
.k2-paketehinweis { max-width: 760px; margin: 1.2rem 0 0; font-size: .92rem; color: var(--ink-2); }
.k2-sprungzeile { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.4rem 0 0; font-size: .9rem; color: var(--ink-2); }
.k2-sprung { display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 99px; background: var(--box); color: var(--ink); text-decoration: none; transition: border-color .2s, scale .15s; }
.k2-sprung:hover { border-color: var(--accent); color: var(--ink); }
.k2-sprung:active { scale: .97; }

/* ---------- Paket ---------- */
.k2-h3 { font-size: 1.05rem; font-family: var(--font-text); font-weight: 700; letter-spacing: .02em; margin: 1.8rem 0 .5rem; }
.k2-ablauf { border: 1px solid var(--line); border-radius: var(--radius); background: var(--box); padding: .4rem 1.1rem 1rem; }
.k2-ablauf__reiter { position: relative; display: inline-flex; gap: 0; margin: .4rem 0 .6rem; padding: 4px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); isolation: isolate; }
.k2-ablauf__tab { position: relative; z-index: 1; min-height: 40px; padding: 0 1rem; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; transition: color .25s; }
.k2-ablauf__tab[aria-selected="true"] { color: var(--ink); }
.k2-ablauf__tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.k2-ablauf__tab:active { scale: .97; }
.k2-ablauf__marke { position: absolute; left: 0; top: 4px; bottom: 4px; z-index: 0; width: 0; border-radius: 9px; background: var(--k2-ton); transition: transform .3s var(--k2-ease), width .3s var(--k2-ease); }
html:not(.js) .k2-ablauf__reiter { display: none; }
html.js .k2-ablauf__titel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
html.js .k2-ablauf__panel:not(.ist-aktiv) { display: none; }
html.js .k2-ablauf__panel.ist-aktiv { animation: k2-blende-ein .3s var(--k2-ease); }
.k2-ablauf__panel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.k2-ablauf__titel { font-size: .95rem; margin: .6rem 0 .3rem; }
.k2-phasen { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.k2-phase { display: grid; grid-template-columns: 9.5rem 1fr; gap: .2rem 1rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.k2-phase:first-child { border-top: 0; }
.k2-phase__kopf { display: flex; flex-direction: column; gap: .1rem; }
.k2-phase__min { font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.k2-phase p { margin: 0; font-size: .96rem; }
@media (max-width: 600px) { .k2-phase { grid-template-columns: 1fr; } .k2-phase__kopf { flex-direction: row; gap: .6rem; align-items: baseline; } }
.k2-geraete { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.k2-geraet-link { display: grid; gap: .1rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--box); color: var(--ink); text-decoration: none; transition: border-color .2s, translate .2s var(--k2-ease), scale .15s; }
.k2-geraet-link span { font-size: .9rem; color: var(--ink-2); }
.k2-geraet-link:hover { border-color: var(--accent); translate: 2px 0; color: var(--ink); }
.k2-geraet-link:active { scale: .98; }
.k2-leer, .k2-hinweis { font-size: .9rem; color: var(--ink-2); }
.k2-lesen { font-size: .95rem; margin: .8rem 0 0; }
.k2-lesen span { color: var(--ink-2); }
.k2-impulse { margin: 0; padding-left: 1.2rem; }
.k2-impulse li { margin: .35rem 0; }
.k2-impulse li::marker { color: var(--accent); content: "?  "; font-weight: 700; font-family: var(--font-display); }
.k2-blattzeile { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.k2-drucken { display: none; }
html.js .k2-drucken { display: inline-flex; }
.k2-drucken:active { scale: .97; }
.k2-blatt-vorschau { margin-top: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--box); }
.k2-blatt-vorschau > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: .7rem; list-style: none; }
.k2-blatt-vorschau > summary::-webkit-details-marker { display: none; }
.k2-blatt-vorschau > summary::before { content: ""; flex: none; width: .5rem; height: .5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; transition: rotate .25s var(--k2-ease); }
.k2-blatt-vorschau[open] > summary::before { rotate: 45deg; }
.k2-blatt-vorschau > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.k2-blatt-rahmen { padding: 0 1rem 1rem; }

/* ---------- Arbeitsblatt (Bildschirm: Papierblatt) ---------- */
.k2-blatt { background: var(--k2-papier); color: #1a1a1a; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .14); padding: 1.4rem 1.5rem; font-size: .88rem; line-height: 1.45; }
.k2-blatt a { color: inherit; }
.k2-blatt__kopf { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.k2-blatt__titel { flex: 1 1 auto; min-width: 0; }
.k2-blatt__kicker { margin: 0; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #555; }
.k2-blatt__t { font-family: var(--font-display); font-size: 1.35rem; margin: .2rem 0 .6rem; color: #111; }
.k2-blatt__felder { display: flex; gap: 1rem; margin: 0; font-size: .78rem; color: #444; }
.k2-blatt__felder span { flex: 1 1 0; border-bottom: 1px solid #888; padding-bottom: .9rem; }
.k2-blatt__felder span:first-child { flex-grow: 2; }
.k2-blatt__qr { flex: none; width: 92px; margin: 0; text-align: center; }
.k2-blatt__qr svg { display: block; width: 92px; height: 92px; }
.k2-blatt__qr figcaption { font-size: .66rem; color: #444; margin-top: .2rem; line-height: 1.2; }
.k2-blatt h4 { font-family: var(--font-text); font-size: .86rem; font-weight: 700; margin: 1rem 0 .25rem; padding-bottom: .15rem; border-bottom: 1.5px solid #222; color: #111; }
.k2-blatt__aufgabe p { margin: 0 0 .3rem; }
.k2-zeile { display: block; height: 1.5rem; border-bottom: 1px solid #9a9a9a; }
.k2-blatt__text { margin-top: 1rem; display: grid; gap: .5rem; }
.k2-blatt__zitat { margin: 0; padding: .5rem .8rem; border-left: 3px solid #333; background: #f3f1ea; }
.k2-blatt__zitat p { margin: 0; font-family: var(--font-display); font-style: italic; font-size: .95rem; }
.k2-blatt__zitat cite { display: block; font-style: normal; font-size: .72rem; color: #444; margin-top: .2rem; }
.k2-blatt__tabelle { width: 100%; border-collapse: collapse; margin-top: .3rem; font-size: .78rem; table-layout: fixed; }
.k2-blatt__tabelle th, .k2-blatt__tabelle td { border: 1px solid #555; padding: .3rem .4rem; text-align: left; vertical-align: top; }
.k2-blatt__tabelle thead th { background: #eeebe2; font-weight: 700; }
.k2-blatt__tabelle td { height: 3.2rem; }
.k2-blatt__tabelle--kreuz td { height: 1.8rem; text-align: center; vertical-align: middle; }
.k2-blatt__tabelle--kreuz tbody th { font-weight: 400; width: 40%; }
.k2-kaestchen { display: inline-block; width: 12px; height: 12px; border: 1.5px solid #333; border-radius: 2px; }
.k2-blatt__fuss { margin: 1rem 0 0; font-size: .66rem; color: #555; line-height: 1.35; }
@media (max-width: 560px) { .k2-blatt { padding: 1rem; } .k2-blatt__qr, .k2-blatt__qr svg { width: 72px; } .k2-blatt__qr svg { height: 72px; } .k2-blatt__tabelle { font-size: .7rem; } }

/* ---------- Beamer-Erklärung + Probe ---------- */
.k2-schritte { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.k2-schritte li { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--box); }
.k2-schritte__nr { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.k2-schritte p { margin: .2rem 0 0; font-size: .94rem; color: var(--ink-2); }
@media (max-width: 640px) { .k2-schritte { grid-template-columns: 1fr; } }
.k2-probe__auftrag { font-size: .92rem; color: var(--ink-2); margin: 0 0 .8rem; }
.k2-probe__frage { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; margin: 0 0 .8rem; }
.k2-probe__optionen { display: grid; gap: .5rem; }
.k2-probe__opt { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .8rem; width: 100%; min-height: 52px; padding: .6rem .9rem; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .2s, background-color .25s, scale .15s; }
.k2-probe__opt:hover { border-color: var(--stimme-du); }
.k2-probe__opt:active { scale: .98; }
.k2-probe__bst { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); font-weight: 700; transition: background-color .25s, color .25s, border-color .25s; }
.k2-probe__opt.ist-gewaehlt { border-color: var(--stimme-du); background: var(--stimme-du-soft); }
.k2-probe__opt.ist-gewaehlt .k2-probe__bst { background: var(--stimme-du); color: var(--box); border-color: var(--stimme-du); }
.k2-probe__opt.ist-richtig { border-color: var(--stimme-kant); background: var(--stimme-kant-soft); }
.k2-probe__opt.ist-richtig .k2-probe__bst { background: var(--stimme-kant); color: var(--box); border-color: var(--stimme-kant); }
.k2-probe__opt.ist-falsch { border-color: var(--widerspruch); }
.k2-probe__aufloesung { margin-top: 1rem; padding: 1rem 1.1rem; border-left: 4px solid var(--stimme-kant); border-radius: 0 12px 12px 0; background: var(--stimme-kant-soft); }
html:not(.js) .k2-probe__aufloesung { display: block; }
.k2-probe__aufloesung.ist-neu { animation: k2-blende-ein .35s var(--k2-ease); }
.k2-probe__urteil { font-weight: 700; color: var(--stimme-kant); margin: 0 0 .5rem; }
.k2-probe__zitat { margin: 0 0 .6rem; }
.k2-probe__zitat p { font-family: var(--font-display); font-style: italic; margin: 0; }
.k2-probe__zitat cite { font-size: .82rem; color: var(--ink-2); font-style: normal; }
.k2-probe__nochmal { min-height: 44px; padding: 0 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--box); color: var(--ink); font: inherit; font-size: .9rem; cursor: pointer; }
.k2-probe__nochmal:active { scale: .97; }
html.js .k2-probe__teilen { min-height: 56px; }
.k2-probe :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Einbetten ---------- */
.k2-ohne-rand { margin: 0 auto; padding: 0; }
.k2-einbett-liste { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.k2-einbett { display: grid; grid-template-rows: auto 1fr auto auto; gap: .45rem; padding: 1rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--box); }
.k2-einbett h3 { margin: 0; font-size: 1.05rem; }
.k2-einbett p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.k2-einbett__code { width: 100%; box-sizing: border-box; resize: vertical; min-height: 4.4rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink-2);
  font: .72rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.k2-einbett__code:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.k2-einbett__knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; }
.k2-knopf { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #191204;
  font: inherit; font-size: .88rem; font-weight: 650; cursor: pointer; transition: filter .2s, scale .15s, background-color .2s; }
.k2-knopf:hover { filter: brightness(1.06); }
.k2-knopf:active { scale: .97; }
.k2-knopf .k2-ico--haken { left: .9rem; }
.k2-knopf--leise { background: transparent; color: var(--ink); border-color: var(--line); }
.k2-knopf--leise[aria-pressed="true"] { border-color: var(--accent); background: var(--stimme-kant-soft); }
.k2-knopf:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.k2-einbett__neu { font-size: .85rem; }
html:not(.js) [data-k2-code], html:not(.js) [data-k2-vorschau], html:not(.js) .k2-vorschau { display: none; }
.k2-vorschau { margin-top: 1rem; min-height: 120px; display: grid; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.k2-vorschau__leer { margin: auto; padding: 1rem; color: var(--ink-2); font-size: .92rem; text-align: center; }
.k2-vorschau iframe { width: 100%; border: 0; display: block; background: var(--bg); transition: opacity .3s; }
.k2-vorschau iframe.laedt { opacity: 0; }

@keyframes k2-blende-ein { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .k2-kacheln__flaeche, .k2-ablauf__marke, .k2-geraet-link, .k2-probe__opt { transition-duration: .01ms; }
  html.js .k2-ablauf__panel.ist-aktiv, .k2-probe__aufloesung.ist-neu { animation: k2-nur-blende .15s; }
  @keyframes k2-nur-blende { from { opacity: 0; } }
}

/* ---------- Druck ---------- */
/* Rand: unbenannte @page (k2-unterricht.css, 15 mm) + benannte Seite fürs Blatt; Safari kennt keine benannten Seiten → Innenrand. */
@page k2blatt { size: A4; margin: 12mm 13mm; }
#k2-druck { display: none; }
@media print {
  html[data-k2-druck] body > *:not(#k2-druck) { display: none !important; }
  html[data-k2-druck] body { background: #fff !important; color: #000 !important; margin: 0 !important; padding: 0 !important; }
  html[data-k2-druck] #k2-druck { display: block; page: k2blatt; }
  @supports not (page: k2blatt) { html[data-k2-druck] #k2-druck { padding: 4mm 3mm; } }
  #k2-druck .k2-blatt { box-shadow: none; border-radius: 0; padding: 0; background: #fff; font-size: 9pt; line-height: 1.3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #k2-druck .k2-blatt__t { font-size: 14pt; margin: 1mm 0 2.5mm; }
  #k2-druck .k2-blatt__felder span { padding-bottom: 5mm; }
  #k2-druck .k2-blatt__qr, #k2-druck .k2-blatt__qr svg { width: 24mm; }
  #k2-druck .k2-blatt__qr svg { height: 24mm; }
  #k2-druck .k2-zeile { height: 6.2mm; border-bottom-color: #777; }
  #k2-druck .k2-blatt h4 { font-size: 9pt; margin: 2.8mm 0 .8mm; }
  #k2-druck .k2-blatt__aufgabe p { margin-bottom: .5mm; }
  #k2-druck .k2-blatt__text { margin-top: 2.5mm; gap: 1.6mm; }
  #k2-druck .k2-blatt__zitat { background: #f2f2f2; padding: 1.6mm 3mm; }
  #k2-druck .k2-blatt__zitat p { font-size: 9.6pt; }
  #k2-druck .k2-blatt__tabelle { font-size: 8pt; }
  #k2-druck .k2-blatt__tabelle th, #k2-druck .k2-blatt__tabelle td { padding: 1mm 1.4mm; }
  #k2-druck .k2-blatt__tabelle td { height: 9mm; }
  #k2-druck .k2-blatt__tabelle--kreuz td { height: 5.4mm; }
  #k2-druck .k2-blatt__fuss { margin-top: 2.5mm; font-size: 6.5pt; }
  #k2-druck .k2-blatt section, #k2-druck .k2-blatt__zitat { break-inside: avoid; }
  /* Ganze Seite drucken (ohne Knopf): Bedienelemente weg, Blätter bleiben zugeklappt */
  .k2-drucken, .k2-ablauf__reiter, .k2-vorschau, .k2-einbett__knoepfe, .k2-kacheln__flaeche { display: none !important; }
  html.js .k2-ablauf__panel:not(.ist-aktiv) { display: block; }
}
