/* Mentagilist – das Skizzenbuch der beiden.
   Weißes Papier wie unter den Zeichnungen, Rot und Blau aus dem Logo,
   Karopapier nur im Notizbuch. */

@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-wght.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("../fonts/alegreya-wght-italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya Sans";
  src: url("../fonts/alegreya-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Patrick Hand";
  src: url("../fonts/patrick-hand-400.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: light;

  --papier: #ffffff;
  --tinte: #222222;
  --bleistift: #6b6b6b;
  --linie: #e3e3e3;
  --karo: #d9e4f1;

  /* Logo */
  --rot: #be1622;
  --blau: #2d2e83;
  /* Redefarben aus dem Original */
  --rede-agilist: #333399;
  --rede-mentalist: #993366;
  --fabel: #310ce6;

  --serif: "Alegreya", Georgia, serif;
  --sans: "Alegreya Sans", system-ui, sans-serif;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;

  --mass: 36rem;
  --rand: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums proportional-nums;
}

img { max-width: 100%; height: auto; }

a { color: var(--blau); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--rot); }
:focus-visible { outline: 2px solid var(--rot); outline-offset: 3px; border-radius: 2px; }

.springen {
  position: absolute;
  left: -999px;
  top: .5rem;
  background: var(--papier);
  padding: .5rem 1rem;
  font-family: var(--sans);
}
.springen:focus { left: 1rem; z-index: 10; }

/* Kopfleiste */

.kopfleiste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.25rem var(--rand) 1rem;
  font-family: var(--sans);
  font-size: 1.0625rem;
}
.marke img { display: block; width: 17.5rem; height: auto; }
.kopfleiste nav { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .25rem 1.4rem; }
.kopfleiste nav a {
  --strich: var(--tinte);
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: .3rem;
  padding: .25rem 0 .4rem;
  color: var(--tinte);
  text-decoration: none;
}
.nav-figur img { width: auto; height: 1.6rem; margin-bottom: .1rem; }
.kopfleiste nav .nav-figur--agilist { --strich: var(--blau); }
.kopfleiste nav .nav-figur--mentalist { --strich: var(--rot); }
/* Aktuelle Seite und Hover: ein handgezogener Markerstrich wie die Bodenlinien der Zeichnungen */
.kopfleiste nav a::after {
  content: "";
  position: absolute;
  left: -.15rem;
  right: -.15rem;
  bottom: 0;
  height: .45rem;
  background: var(--strich);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.5C20 3.6 41 4.4 58 3.4S88 2.6 98 4.2' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.5C20 3.6 41 4.4 58 3.4S88 2.6 98 4.2' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: 0;
}
.kopfleiste nav a:hover::after { opacity: .45; }
.kopfleiste nav a[aria-current="page"]::after { opacity: 1; }
.kopfleiste nav a[aria-current="page"]:not(.nav-figur) { --strich: var(--rot); }
@media (prefers-reduced-motion: no-preference) {
  .kopfleiste nav a::after { clip-path: inset(0 100% 0 0); transition: clip-path .25s ease-out, opacity .25s; }
  .kopfleiste nav a:hover::after, .kopfleiste nav a[aria-current="page"]::after { clip-path: inset(0 0 0 0); }
}
.seite-start .marke { visibility: hidden; }

/* Startseite: die beiden Figuren rahmen den Einstieg */

.buehne {
  display: grid;
  grid-template-columns: minmax(5rem, 12rem) minmax(0, 34rem) minmax(5rem, 12rem);
  justify-content: center;
  align-items: end;
  gap: 1rem 2rem;
  max-width: 68rem;
  margin: 1rem auto 0;
  padding: 0 var(--rand);
}
.buehne .figur { width: auto; max-width: 100%; height: 19rem; object-fit: contain; object-position: bottom; justify-self: center; }
.buehne-text { padding-bottom: 2.5rem; }
.buehne h1 { margin: 0 0 1.5rem; }
.buehne h1 img { display: block; width: 100%; }
.buehne p { margin: 0 0 1rem; font-size: 1.25rem; }
.buehne .autor { font-family: var(--sans); font-size: 1rem; color: var(--bleistift); }


/* Inhaltsverzeichnis */

.inhalt {
  max-width: 50rem;
  margin: 4rem auto 0;
  padding: 0 var(--rand);
}
.inhalt-titel {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 2rem;
}
.kapitel { margin-bottom: 3.5rem; }
.kapitel h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  padding-bottom: .25rem;
  border-bottom: 2px solid var(--tinte);
}
.kapitel-text { margin: .5rem 0 1.25rem; color: var(--bleistift); font-style: italic; }

.toc { list-style: none; margin: 0; padding: 0; }
.toc li { border-bottom: 1px solid var(--linie); }
.toc a {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem 0;
  color: inherit;
  text-decoration: none;
}
.toc .ohne-bild { width: 6.5rem; }
.toc img {
  width: 6.5rem;
  height: 4.5rem;
  object-fit: contain;
  background: var(--papier);
}
.toc .eintrag { display: grid; gap: .1rem; }
.toc .titel { font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: var(--blau); }
.toc a:hover .titel { color: var(--rot); text-decoration: underline; text-underline-offset: .18em; }
.toc .anfang { font-style: italic; }
.toc time { font-family: var(--sans); font-size: .9375rem; color: var(--bleistift); }
.toc .nr {
  font-family: var(--hand);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--rot);
}
.toc--reihe .eintrag { grid-template-columns: 2.5rem 1fr; column-gap: .5rem; }
.toc--reihe .eintrag > :not(.nr) { grid-column: 2; }
.toc--reihe .nr { grid-row: 1 / span 3; padding-top: .15rem; }
.offen { font-family: var(--hand); font-size: 1.375rem; color: var(--blau); margin: 1.25rem 0 0; }

/* Geschichte */

.geschichte, .notizbuch-sammlung {
  max-width: calc(var(--mass) + 2 * var(--rand));
  margin: 2.5rem auto 0;
  padding: 0 var(--rand);
}
.kopf h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.875rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0;
  hyphens: manual;
  text-wrap: balance;
}
.datum { margin: .75rem 0 0; font-family: var(--sans); font-size: 1rem; color: var(--bleistift); }

.reihe { font-family: var(--sans); font-size: 1rem; color: var(--bleistift); margin-bottom: 1rem; }
.reihe > a { color: inherit; }
.reihe ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: .5rem 0 0; padding: 0; }
.reihe li a, .reihe li span {
  display: inline-grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .4rem;
  border: 1.5px solid currentColor;
  border-radius: 50% 45% 50% 40%;
  font-family: var(--hand);
  font-size: 1.125rem;
  text-decoration: none;
}
.reihe li a { color: var(--blau); }
.reihe li a:hover { color: var(--rot); }
.reihe li span { background: var(--blau); border-color: var(--blau); color: var(--papier); }

.text { margin-top: 2rem; }
.text p { margin: 0 0 1.1em; hyphens: auto; }
.text h2, .text h3, .text h4, .text h5 { line-height: 1.25; margin: 2.25rem 0 .75rem; font-weight: 700; }
.text h2 { font-size: 1.625rem; }
.text h3 { font-size: 1.375rem; }
.text h4, .text h5 { font-size: 1.1875rem; }
.text img { display: block; margin: 2rem auto; max-height: 34rem; width: auto; }
.text blockquote { margin: 1.5rem 0; padding-left: 1.25rem; border-left: 2px solid var(--linie); }

/* Wer spricht: die Farben aus dem Original, dazu eine Figur am Rand */
.agilist { color: var(--rede-agilist); }
.mentalist { color: var(--rede-mentalist); }
.fabel { color: var(--fabel); font-style: italic; }
.text .fabel p { margin-bottom: .9em; }

.text > p[class^="rede-"] { position: relative; }
.text > p[class^="rede-"]::before {
  content: "";
  position: absolute;
  top: .3rem;
  left: -1rem;
  width: 3px;
  height: calc(100% - .6rem);
  border-radius: 2px;
  background: var(--blau);
}
.text > p.rede-mentalist::before { background: var(--rot); }
.text > p.rede-beide::before { background: repeating-linear-gradient(var(--blau) 0 1.2rem, var(--rot) 1.2rem 2.4rem); }

@media (min-width: 62rem) {
  .text > p[class^="rede-"]::before {
    top: .15rem;
    left: -4rem;
    width: 1.75rem;
    height: 2.75rem;
    border-radius: 0;
    background: url("../figuren/agilist.png") center top / contain no-repeat;
  }
  .text > p.rede-mentalist::before { background-image: url("../figuren/mentalist.png"); }
  .text > p.rede-beide::before {
    left: -5.25rem;
    width: 3.5rem;
    background:
      url("../figuren/mentalist.png") left top / 1.75rem auto no-repeat,
      url("../figuren/agilist.png") right top / 1.75rem auto no-repeat;
  }
}

/* Das Notizbuch */

.notizbuch { margin: 3rem 0; }
.notizbuch-wer {
  margin: 0 0 .5rem;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--bleistift);
}
.notizbuch-seite {
  --ink: var(--blau);
  position: relative;
  padding: 1.5rem 1.5rem 1.75rem 3.25rem;
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1.3125rem;
  line-height: 1.6rem;
  background-color: #fff;
  background-image:
    linear-gradient(var(--karo) 1px, transparent 1px),
    linear-gradient(90deg, var(--karo) 1px, transparent 1px);
  background-size: .8rem .8rem;
  background-position: -1px -1px;
  border: 1px solid #c9d3df;
  box-shadow: 0 1px 2px rgba(30, 40, 60, .12), 0 6px 14px -6px rgba(30, 40, 60, .18);
  transform: rotate(-.4deg);
}
/* Tintenfarbe wie auf der Originalseite */
.tinte-rot .notizbuch-seite { --ink: var(--rot); transform: rotate(.35deg); }
.tinte-gruen .notizbuch-seite { --ink: #2c7a3b; transform: rotate(.25deg); }
.tinte-schwarz .notizbuch-seite { --ink: #2b2b2b; }
/* Spiralbindung am linken Rand */
.notizbuch-seite::before {
  content: "";
  position: absolute;
  top: .5rem;
  bottom: .5rem;
  left: -.85rem;
  width: 2.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='26' viewBox='0 0 40 26'%3E%3Ccircle cx='30' cy='14' r='3.4' fill='%23fff' stroke='%23a3a9b2'/%3E%3Cpath d='M31 13.5C25 3 9 2 3.5 9.5' fill='none' stroke='%23303030' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 2.5rem 1.625rem repeat-y;
}
.notizbuch-seite h2 {
  font-family: var(--hand);
  font-weight: 400;
  font-size: 1.875rem;
  line-height: 1.2;
  margin: 0 0 1rem;
}
.notizbuch-seite h3 { font-family: var(--hand); font-weight: 400; font-size: 1.5rem; margin: 1.25rem 0 .5rem; }
.notizbuch-seite p { margin: 0 0 .6rem; }
.notizbuch-seite ul, .notizbuch-seite ol { margin: 0 0 .5rem; padding-left: 1.25rem; }
.notizbuch-seite ul { list-style: none; }
.notizbuch-seite ul > li { position: relative; margin-bottom: .45rem; }
.notizbuch-seite ul > li::before { content: "–"; position: absolute; left: -1.1rem; }
.notizbuch-seite strong { font-weight: 400; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; }
.notizbuch-seite table { border-collapse: collapse; margin: .75rem 0; font-size: 1.125rem; }
.notizbuch-seite th, .notizbuch-seite td { border: 1.5px solid var(--ink); padding: .2rem .5rem; text-align: left; font-weight: 400; }
.notizbuch-original { margin-top: .9rem; font-family: var(--sans); font-size: 1rem; }
.notizbuch-original summary { cursor: pointer; color: var(--bleistift); width: fit-content; }
.notizbuch-original summary:hover { color: var(--rot); }
.notizbuch-original img { display: block; margin: 1rem 0 0; max-width: 100%; max-height: none; }

/* Sammlung */
.notizbuch-sammlung .kopf p { margin: 1rem 0 0; }
.notiz-index {
  columns: 2 14rem;
  column-gap: 2rem;
  margin: 2rem 0 1rem;
  padding-left: 1.5rem;
  font-family: var(--sans);
  font-size: 1.0625rem;
}
.notiz-index li { break-inside: avoid; margin-bottom: .25rem; }
.notiz-eintrag { margin-top: 3.5rem; }
.notiz-eintrag .notizbuch { margin: 0; }
.notiz-quelle { margin: .9rem 0 0; font-family: var(--sans); font-size: 1rem; color: var(--bleistift); }

/* Seiten der Figuren */
.seite .kopf { display: flow-root; }
.seite .figur { float: right; width: 8rem; margin: 0 0 1rem 1.5rem; }
.seite .text img { max-height: 22rem; }

/* Modelle zum Ausprobieren: Rückseite des Inventurblocks, liniert, Agilisten-Tinte */
.inventurblock {
  --ink: var(--blau);
  margin: 2.5rem 0;
  padding: 1.25rem 1.25rem 1.5rem 2.75rem;
  background-color: #fffdf6;
  background-image:
    linear-gradient(90deg, transparent 2rem, rgba(190, 22, 34, .35) 2rem, rgba(190, 22, 34, .35) calc(2rem + 1px), transparent calc(2rem + 1px)),
    repeating-linear-gradient(transparent 0 calc(1.75rem - 1px), #d6dfea calc(1.75rem - 1px) 1.75rem);
  background-position: 0 0, 0 .9rem;
  border: 1px solid #e2dccb;
  box-shadow: 0 1px 2px rgba(30, 40, 60, .1), 0 6px 14px -6px rgba(30, 40, 60, .16);
  color: var(--ink);
  font-family: var(--hand);
  font-size: 1.25rem;
  line-height: 1.75rem;
}
.inventurblock-kopf { margin: 0 0 .75rem; font-size: 1.125rem; color: var(--bleistift); }
.ws-regler { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; }
.ws-regler label { grid-column: 1 / -1; }
.ws-regler input { width: 100%; accent-color: var(--blau); height: 1.75rem; margin: 0; }
.ws-regler output { min-width: 4.5rem; text-align: right; font-size: 1.5rem; }
.ws-knoepfe { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.ws-knoepfe button {
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid currentColor;
  border-radius: 50% 45% 50% 40% / 60% 55% 60% 50%;
  padding: .1rem .8rem;
  cursor: pointer;
}
.ws-knoepfe button:hover { color: var(--rot); }
.ws-knoepfe button[aria-pressed="true"] { background: var(--blau); border-color: var(--blau); color: #fff; }
.ws-rechnung p { margin: 0; }
.ws-ergebnis { margin: .75rem 0 0; font-size: 1.5rem; }
.ws-ergebnis strong { font-weight: 400; color: var(--rot); font-size: 1.875rem; }
.ws-schlange { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .15rem .1rem; min-height: 1.75rem; margin: .5rem 0 1rem; }
.ws-kasse { font-size: 1rem; color: var(--bleistift); border: 1.5px solid var(--bleistift); padding: 0 .4rem; margin-right: .5rem; line-height: 1.5rem; }
.ws-leute { display: contents; }
.ws-leute svg { fill: none; stroke: var(--tinte); stroke-width: 1.4; stroke-linecap: round; }
.ws-mehr { font-size: 1.0625rem; color: var(--rot); margin-left: .5rem; }
.ws-kurve { display: block; width: 100%; max-width: 26rem; height: auto; margin: 0 0 .5rem; overflow: visible; }
.ws-achse { fill: none; stroke: var(--tinte); stroke-width: 1.5; stroke-linecap: round; }
.ws-linie { fill: none; stroke: var(--blau); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ws-hilfslinie { stroke: var(--rot); stroke-width: 1.2; stroke-dasharray: 3 4; }
.ws-punkt { fill: var(--rot); }
.ws-punkt--oben { r: 7; }
.ws-punktwert { font-family: var(--hand); font-size: 16px; fill: var(--rot); }
.ws-beschriftung { font-family: var(--hand); font-size: 14px; fill: var(--bleistift); }
.ws-zitat { margin: .75rem 0 0; padding: 0; font-family: var(--serif); font-size: 1.0625rem; line-height: 1.55; font-style: italic; }
.ws-zitat.agilist { color: var(--rede-agilist); }
.ws-zitat.mentalist { color: var(--rede-mentalist); }
.ws-zitat-wer { display: block; margin-top: .2rem; font-family: var(--sans); font-style: normal; font-size: .9375rem; color: var(--bleistift); }
.inventurblock noscript p { font-family: var(--serif); color: var(--tinte); }

/* Steckbrief auf den Figurenseiten */
.seite-agilist { --figur: var(--blau); }
.seite-mentalist { --figur: var(--rot); }
.steckbrief, .eigene-notizen { margin-top: 3.5rem; }
.steckbrief h2, .eigene-notizen h2 { font-size: 1.625rem; line-height: 1.25; margin: 0 0 1.25rem; }
.steckbrief dl { margin: 0; border-top: 2px solid var(--tinte); }
.steckbrief-zeile {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: .25rem 1.25rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--linie);
}
.steckbrief dt {
  font-family: var(--hand);
  font-size: 1.375rem;
  line-height: 1.3;
  color: var(--figur, var(--tinte));
}
.steckbrief dd { margin: 0; }
.steckbrief dd p { margin: 0; }
.steckbrief .quelle { margin-top: .3rem; font-family: var(--sans); font-size: .9375rem; color: var(--bleistift); }
.steckbrief .quelle a { color: inherit; }
.steckbrief .quelle a:hover { color: var(--rot); }
.eigene-notizen p { margin: 0 0 .75rem; color: var(--bleistift); font-style: italic; }
.eigene-notizen ul { margin: 0; padding-left: 1.25rem; font-family: var(--hand); font-size: 1.375rem; color: var(--figur); }
.eigene-notizen li { margin-bottom: .25rem; }
.eigene-notizen a { color: inherit; }

/* Blättern */

.blaettern {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: calc(var(--mass) + 2 * var(--rand));
  margin: 4rem auto 0;
  padding: 1.25rem var(--rand) 0;
  border-top: 2px solid var(--tinte);
}
.blaettern a { display: block; text-decoration: none; font-weight: 700; line-height: 1.3; }
.blaettern span { display: block; margin-bottom: .2rem; font-family: var(--sans); font-weight: 400; font-size: .9375rem; color: var(--bleistift); }
.blaettern .weiter { grid-column: 2; text-align: right; }

/* Fuß */

.fuss {
  max-width: 68rem;
  margin: 5rem auto 0;
  padding: 1.5rem var(--rand) 2.5rem;
  border-top: 1px solid var(--linie);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--bleistift);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
}
.fuss p { margin: 0; }
.fuss a { color: inherit; }
.fuss p:last-child a + a { margin-left: 1.25rem; }

@media (max-width: 40rem) {
  body { font-size: 1.125rem; }
  .marke img { width: 14rem; }
  .nav-figur img { height: 1.35rem; }
  .kopfleiste nav { gap: .1rem .8rem; font-size: .9875rem; }
  .text > p[class^="rede-"]::before { left: -.7rem; }
  .buehne { grid-template-columns: 1fr 1fr; gap: 0 1rem; margin-top: 0; }
  .buehne-text { grid-column: 1 / -1; grid-row: 1; padding-bottom: 1rem; }
  .buehne .figur { height: 11rem; }
  .lang { display: none; }
  .toc a { grid-template-columns: 4.5rem 1fr; gap: .9rem; align-items: start; }
  .toc img { width: 4.5rem; height: 3.5rem; }
  .notizbuch-seite { padding: 1.25rem 1rem 1.5rem 2.6rem; font-size: 1.1875rem; }
  .blaettern { grid-template-columns: 1fr; }
  .blaettern .weiter { grid-column: 1; text-align: left; }
  .seite .figur { width: 5.5rem; }
  .steckbrief-zeile { grid-template-columns: 1fr; }
  .inventurblock { padding-left: 2.4rem; padding-right: .9rem; font-size: 1.125rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .notizbuch-original[open] img { animation: aufklappen .25s ease-out; }
  @keyframes aufklappen { from { opacity: 0; transform: translateY(-.5rem); } }
}
