/* Braials — Stripverhaal
 * Adult graphic-novel typography: ink frames, paper captions and a sequential
 * panel layout. Existing speaker identities determine position; CSS introduces
 * no dialogue, scene descriptions or illustration. Load after lesson-template.
 */
:root {
  --ink: #262b31;
  --ink-mid: #454b53;
  --ink-soft: #596069;
  --paper: #f2eee4;
  --paper-warm: #eae4d7;
  --paper-2: #faf7ef;
  --white: #fffdf7;
  --border: #262b31;
  --line: #b4ad9f;
  --ocean: #275674;
  --ocean-dark: #1c4058;
  --ocean-light: #e2edf1;
  --gold: #b78b12;
  --gold-dark: #745600;
  --gold-light: #f8dd80;
  --ember: #a74735;
  --ember-light: #f8e4db;
  --forest: #286444;
  --forest-light: #e6efe5;
  --plum: #775066;
  --plum-light: #f0e6ee;
  --correct: #21633f;
  --correct-bg: #e6f3e8;
  --incorrect: #a4332c;
  --incorrect-bg: #fff0ec;
  --radius: 3px;
  --shadow: none;
  --shadow-md: none;
  --shadow-lg: none;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', system-ui, sans-serif;
  --header-bg: #f8dd80;
}

html { scrollbar-color: #8b887e var(--paper); }
body {
  background: var(--paper);
  background-image: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
}
h1, h2, h3 { font-family: var(--font-heading); letter-spacing: -.025em; }
::selection { background: var(--gold-light); color: var(--ink); }

/* A broad title strip reads like the opening caption of a printed story. */
.header {
  width: calc(100% - 2.4rem);
  max-width: 860px;
  margin: 1.75rem auto 0;
  padding: 1.65rem 2rem 1.85rem;
  text-align: left;
  background: var(--header-bg);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 3px;
  box-shadow: none;
}
.header::before { display: none; }
.header-tag {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 1px;
  padding: .2rem .65rem;
  margin-bottom: .8rem;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.header h1 {
  max-width: 20ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.15rem, 5.8vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.045em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.header p { max-width: 60ch; color: var(--ink-mid); opacity: 1; font-size: 1rem; margin-top: .85rem; }
.container { max-width: 900px; padding: 1.3rem 1.2rem 4rem; }
.progress-wrap { border: 1.5px solid var(--ink); border-radius: 2px; box-shadow: none; }
.prog-track, .prog-fill { border-radius: 0; }
.prog-fill { background: var(--ocean); }
.sec, .section {
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  margin: 1.8rem 0 1rem;
  padding: 0 0 .8rem;
  animation: none;
}
.sec-tag { background: var(--ink); color: var(--white); border-radius: 1px; box-shadow: none; font-size: .8125rem; padding: .2rem .65rem; }
.sec h2, .section h2 { font-size: 1.8rem; line-height: 1.25; }
.sec-sub { font-size: 1rem; color: var(--ink-mid); }

/* Framed pages; the wrapper selectors defeat the template's colour rotation. */
.card {
  padding: 1.35rem;
  margin-bottom: 1.2rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: none;
  animation: none;
  transition: none;
}
.card:nth-child(n), .blok:nth-child(n) > .card { border-left-color: var(--ink); }
.card:hover { transform: none; box-shadow: none; }
.card-head { align-items: flex-start; gap: .8rem; border-bottom: 1.5px solid var(--ink); margin-bottom: 1.15rem; padding-bottom: .85rem; }
.card-head > div { min-width: 0; }
.card:nth-child(n) .card-num, .blok:nth-child(n) > .card .card-num {
  width: 2.25rem;
  height: 2.25rem;
  border: 1.5px solid var(--ink);
  border-radius: 1px;
  background: var(--gold-light);
  color: var(--ink);
  box-shadow: none;
  font-size: 1rem;
  font-weight: 700;
}
.card-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.card-instr { margin: .3rem 0 0; font-size: 1rem; color: var(--ink-mid); }
.card, .info, .sec, .section { overflow-wrap: anywhere; }
.leestekst-card p { font-size: 1rem; }
.card-lijst li:nth-child(n)::before { background: var(--ink); color: var(--white); border-radius: 1px; box-shadow: none; }
.ww-chip { background: var(--gold-light); color: var(--ink); }
.vw-chip { background: var(--plum); color: var(--white); }
.pre-chip { background: var(--ocean); color: var(--white); }
.vast-chip { background: var(--forest); color: var(--white); }
.ww-chip, .vw-chip, .pre-chip, .vast-chip { white-space: normal; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.info { border: 1.5px solid var(--ink); border-radius: 2px; background: var(--paper-2); padding: 1rem 1.2rem; font-size: 1rem; animation: none; }
.info h3, .info.ocean h3, .info.forest h3, .info.warning h3 { color: var(--ink); font-size: 1.125rem; }
.info.ocean { border-color: var(--ink); background: var(--ocean-light); }
.info.forest { border-color: var(--ink); background: var(--forest-light); }
.info.warning { border-color: var(--ink); background: var(--ember-light); }
.goal-list li { background: var(--white); border-color: var(--line); border-radius: 1px; }
.goal-list li:nth-child(n)::before { border-radius: 1px; background: var(--ink); color: var(--white); }
.scenario-box { background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 2px; font-size: 1rem; }

/* Row-major grid keeps DOM reading order. Never use dense placement or order:
 * repeated turns from one speaker must not leapfrog another speaker's turn.
 */
.dialogue {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 1rem;
  margin: 0;
  padding: .15rem 0;
}
.dialogue-bubble {
  position: relative;
  align-self: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 1rem 1.1rem 1.15rem;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: none;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.dialogue-bubble.speaker-a {
  grid-column: 1;
  align-self: stretch;
  background: var(--ocean-light);
  border-color: var(--ink);
  border-radius: 18px 18px 18px 2px;
}
.dialogue-bubble.speaker-b {
  grid-column: 2;
  align-self: stretch;
  background: var(--ember-light);
  border-color: var(--ink);
  border-radius: 18px 18px 2px 18px;
}
.dialogue-bubble strong {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-bottom: .5rem;
  padding-bottom: .2rem;
  border-bottom: 1.5px solid currentColor;
  color: var(--ocean-dark);
  font-size: .875rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: .01em;
}
.dialogue-bubble.speaker-b strong { color: #833a2e; }
.dialogue-bubble.speaker-b .eng { color: var(--ink-mid); }

/* All answers and instructions remain at least 16px, including mobile. */
input[type="text"], textarea, select {
  max-width: 100%;
  min-height: 2.75rem;
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid #73726c;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 1rem;
  box-shadow: none;
}
input[type="text"].inline { width: 9.7rem; }
input[type="text"].narrow { width: 7.5rem; }
input[type="text"].wide { width: 17.5rem; }
input[type="text"]:not(:placeholder-shown):not(:focus) { border-color: #73726c; }
input[type="text"]::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: 1; }
input[type="text"]:focus, textarea:focus, select:focus { border-color: var(--ocean); background: var(--white); box-shadow: none; }
:is(button, a, input, textarea, select):focus-visible,
input[type="text"]:focus-visible { outline: 3px solid var(--ocean); outline-offset: 3px; }
.dialogue-bubble input { max-width: 100%; color: var(--ink); background: var(--white); }
input.input-ok, .dialogue-bubble input.input-ok { color: var(--correct); background: var(--correct-bg); border-color: var(--correct); animation: none; }
input.input-no, .dialogue-bubble input.input-no { color: var(--incorrect); background: var(--incorrect-bg); border-color: var(--incorrect); }
.row { font-size: 1rem; border-bottom-color: var(--line); }
.eng { color: var(--ink-soft); font-size: 1rem; }
.mc-radio { gap: .55rem; margin: .7rem 0 1.25rem; }
.mc-radio:last-child { margin-bottom: 0; }
.mc-radio label, .mco {
  min-height: 2.75rem;
  padding: .65rem .9rem;
  background: var(--paper-2);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  box-shadow: none;
  font-size: 1rem;
}
.mc-radio input[type="radio"] { accent-color: var(--ocean); flex-shrink: 0; }
.mc-radio label:hover, .mco:hover { background: var(--ocean-light); border-color: var(--ocean); }
.mc-radio label:has(input:checked), .mco.sel { background: var(--gold-light); color: var(--ink); border-color: var(--ink); box-shadow: none; }
.mc-radio label.ok, .mc-radio label.ok:has(input:checked), .mco.ok { color: var(--correct); background: var(--correct-bg); border-color: var(--correct); box-shadow: none; animation: none; }
.mc-radio label.no, .mc-radio label.no:has(input:checked), .mco.no { color: var(--incorrect); background: var(--incorrect-bg); border-color: var(--incorrect); box-shadow: none; }
.btn, .btn-show { min-height: 2.75rem; border: 1.5px solid var(--ink); border-radius: 2px; font-size: 1rem; font-weight: 600; box-shadow: none; }
.btn { background: var(--ink); color: var(--white); }
.btn:hover { background: var(--ocean-dark); transform: none; box-shadow: none; }
.btn:active { transform: none; }
.btn-show { background: var(--gold-light); color: var(--ink); }
.btn-show:hover { background: #f1cf61; color: var(--ink); border-color: var(--ink); transform: none; }
.model-answer { background: var(--ocean-light); color: var(--ink); border: 1.5px solid var(--ink); border-radius: 2px; font-size: 1rem; }
.fb { border-radius: 2px; font-size: 1rem; }
.fb.ok { color: var(--correct); border-color: var(--correct); background: var(--correct-bg); animation: none; }
.fb.no { color: var(--incorrect); border-color: var(--incorrect); background: var(--incorrect-bg); animation: none; }

/* Vocabulary and games share the ink frame without tilt or raised shadows. */
.vocab-item:nth-child(n) { background: var(--paper-2); border: 1.5px solid var(--ink); border-radius: 2px; box-shadow: none; }
.vocab-item:nth-child(n):hover { background: var(--ocean-light); transform: none; box-shadow: none; }
.vocab-item:nth-child(n) .dutch { font-size: 1rem; color: var(--ocean-dark); }
.vocab-item .english { font-size: 1rem; color: var(--ink-mid); }
.vocab-play-btn { background: var(--ocean); }
.vocab-play-btn:hover { transform: none; background: var(--ocean-dark); }
.pov-situatie, .tb-tekst, .hint-item, .galg-item { background: var(--paper-2); border-color: var(--ink); border-radius: 2px; }
button.pov-optie, button.mem-kaart, button.cat-chip, button.zin-chip, button.galg-letter { min-height: 2.75rem; border-radius: 2px; font-size: 1rem; box-shadow: none; }
.divider { background: var(--ink); height: 2px; border-radius: 0; }

@media (max-width: 600px) {
  .header { width: calc(100% - 1.4rem); margin-top: .7rem; padding: 1.25rem; }
  .header h1 { font-size: clamp(2rem, 8vw, 2.65rem); }
  .header p { font-size: 1rem; }
  .container { padding: 1rem .7rem 2.5rem; }
  .card { padding: 1rem; }
  .card-head { gap: .65rem; }
  .card-title { font-size: 1.15rem; }
  .dialogue { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .dialogue-bubble.speaker-a, .dialogue-bubble.speaker-b { grid-column: 1; width: calc(100% - .7rem); max-width: 100%; padding: .85rem 1rem; }
  .dialogue-bubble.speaker-a { justify-self: start; }
  .dialogue-bubble.speaker-b { justify-self: end; }
  .vocab-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body, .header, .card, .dialogue, .dialogue-bubble.speaker-a, .dialogue-bubble.speaker-b { background: #fff !important; color: #000 !important; box-shadow: none; }
  .header { width: 100%; max-width: none; margin: 0; border: 2px solid #000; }
  .header h1, .header p, .header-tag, .dialogue-bubble strong, .dialogue-bubble.speaker-b strong { color: #000; }
  .header-tag, .dialogue-bubble.speaker-a, .dialogue-bubble.speaker-b { border-color: #000; }
  .dialogue { display: block; }
  .dialogue-bubble.speaker-a, .dialogue-bubble.speaker-b { width: 94%; margin: 0 0 .6rem; break-inside: avoid; }
  .dialogue-bubble.speaker-b { margin-left: auto; }
  .card { break-inside: auto; }
  .card-head { break-after: avoid; }
}
