/*
  lehmhub, Richtung "Strich": Seitenart "Thema" (thema/<slug>.html). Eine Seite beantwortet einen Suchbegriff vollstaendig.
  Grund #E9E6DF / Tusche #1E1A16 / Lavur Lehmocker #B99A6E / Schibsted Grotesk + Newsreader (alles aus seite.css).
  Kopf wie ein Kapitel (.kapitel-kopf), danach eine ruhige Lesefolge: links die Lesespalte (Frage, Kurzantwort, Erklaerung,
  weiter), rechts die Zeichnung, die sich beim Hineinscrollen einmal zeichnet und dann stehen bleibt (nicht klebend).
  Handy: Frage, Kurzantwort, Zeichnung, Erklaerung untereinander. Raster 5fr / 7fr wie Kapitelkopf und Werkseiten.
*/

.themaseite main { position: relative; z-index: 2; }
.thema-kopf .vorzeile { margin-bottom: var(--s4); }
.thema-kopf h1 { max-width: 14ch; }

/* ------------------------------------------------------------ contents: the sections as jump marks, phrased as searched */
.inhalt { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 5vw; padding: var(--s6) var(--rand) var(--s5); }
.inhalt h2 { font-family: var(--grotesk); font-weight: 500; font-size: 17px; letter-spacing: -0.01em; padding-top: 6px; }
/* two quiet columns, filled top to bottom; long entries wrap (the page sets --zeilen = half the number of entries) */
.inhalt ol { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-flow: column; grid-template-rows: repeat(var(--zeilen, 6), auto); gap: 0 5vw; align-content: start; }
.inhalt li { padding: 6px 0; min-width: 0; }
.inhalt a { font-family: var(--grotesk); font-size: 18px; letter-spacing: -0.01em; line-height: 1.3; color: var(--tusche); text-decoration: none; background-image: linear-gradient(var(--tusche), var(--tusche)); background-size: 0 1.5px; background-repeat: no-repeat; background-position: 0 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 0.35s ease; }
.inhalt a:hover, .inhalt a:focus-visible { background-size: 100% 1.5px; }

/* ------------------------------------------------------------ one section: question, short answer, drawing, explanation */
.frageteil { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto auto 1fr; gap: 0 5vw; padding: var(--s9) var(--rand) var(--s8); scroll-margin-top: 0; }
.frageteil > h2 { grid-column: 1; grid-row: 1; font-family: var(--grotesk); font-weight: 500; font-size: clamp(28px, 2.5vw, 36px); letter-spacing: -0.02em; line-height: 1.12; max-width: var(--spalte); scroll-margin-top: var(--s6); }
/* the short answer: the snippet. Same type as the text, a size up and a touch heavier, nothing around it */
.frageteil > .kurz { grid-column: 1; grid-row: 2; margin-top: var(--s4); max-width: var(--spalte); font-size: 21px; line-height: 1.45; font-weight: 500; }
.frageteil > .erklaerung { grid-column: 1; grid-row: 3; max-width: var(--spalte); }
.erklaerung p { margin-top: var(--s4); }
.erklaerung p:first-child { margin-top: var(--s5); }
.erklaerung a, .frageteil > .kurz a, .thema-ende a { text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(30, 26, 22, 0.45); }
.erklaerung a:hover, .thema-ende a:hover { text-decoration-color: var(--tusche); }
.erklaerung .weiter { margin-top: var(--s5); font-size: 17px; color: var(--leise); }
.erklaerung .weiter a { color: var(--tusche); }
.erklaerung .folgt, .kurz .folgt { color: var(--leise); font-style: italic; font-weight: 400; }

.frageteil > .bild { grid-column: 2; grid-row: 1 / span 4; margin: 0; align-self: start; }
.bild .zeichnung { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 76vh; }
.bild .zeichnung.hoch { aspect-ratio: 1 / 1; max-height: 86vh; }
.bild .zeichnung.breit { aspect-ratio: 16 / 9; }
.bild .zeichnung > .strich { position: absolute; inset: 0; }
.bild noscript img, .kopf-bild noscript img { width: 100%; height: auto; }
.bild figcaption { margin-top: var(--s3); font-style: italic; color: var(--leise); font-size: 16.5px; max-width: 32rem; }

/* without JavaScript the still image (noscript) stands in for the drawing, the empty drawing box goes */
html:not(.js) .bild .zeichnung { display: none; }

/* ------------------------------------------------------------ end: who does it, sources, related */
.thema-ende { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 5vw; padding: var(--s9) var(--rand) var(--s5); }
.thema-ende > div { grid-column: 1; max-width: var(--spalte); }
.thema-ende h2 { font-family: var(--grotesk); font-weight: 500; font-size: clamp(28px, 2.5vw, 36px); letter-spacing: -0.02em; line-height: 1.12; }
.thema-ende p { margin-top: var(--s4); }
.thema-ende .zum-finder { margin-top: var(--s5); }
.thema-ende .zum-finder a { font-family: var(--grotesk); font-size: 22px; letter-spacing: -0.01em; text-decoration: none; }
.thema-ende .zum-finder a span { display: block; color: var(--leise); font-size: 15px; margin-bottom: 4px; letter-spacing: 0; }
.thema-ende .zum-finder a:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.themaseite .quellen { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.themaseite .quellen > * { grid-column: 1; }

/* ------------------------------------------------------------ phone */
@media (max-width: 760px) {
  .inhalt { grid-template-columns: 1fr; padding-top: var(--s4); padding-bottom: var(--s6); }
  .inhalt h2 { margin-bottom: var(--s2); }
  .inhalt ol { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; grid-template-rows: none; }
  .inhalt a { font-size: 17px; }
  .frageteil { grid-template-columns: 1fr; grid-template-rows: none; padding: var(--s8) var(--rand) var(--s5); }
  .frageteil > h2, .frageteil > .kurz, .frageteil > .erklaerung, .frageteil > .bild { grid-column: 1; grid-row: auto; }
  .frageteil > .kurz { font-size: 19.5px; }
  .frageteil > .bild { margin: var(--s5) calc(-1 * var(--rand)) 0; }
  .bild .zeichnung { max-height: none; }
  .bild .zeichnung.hoch { aspect-ratio: 375 / 550; max-height: none; }
  .bild .zeichnung.breit { aspect-ratio: 4 / 3; }
  .bild figcaption { padding: 0 var(--rand); }
  .thema-ende { grid-template-columns: 1fr; padding-top: var(--s8); }
  .themaseite .quellen { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .inhalt a { transition: none; } }
/* formats of a drawing: handymittel (4:3, phone 4:5), handyhoch (4:3, phone tall), breit (16:9, phone tall) */
.bild .zeichnung.handymittel, .bild .zeichnung.handyhoch { aspect-ratio: 4 / 3; }
@media (max-width: 760px) {
  .bild .zeichnung.handymittel { aspect-ratio: 4 / 5; }
  .bild .zeichnung.handyhoch, .bild .zeichnung.breit { aspect-ratio: 375 / 560; }
}
/* notes of drawings taken over from the chapter Material: centred captions (same rule as css/material.css) */
.strich-notiz.mitte { transform: translate(-50%, -0.62em); text-align: center; }
