/* Braials — De Buurt
 * Street-sign typography, an abstract street grid and clear address cards.
 * No geographic claims, addresses, names or dates are generated by CSS.
 * Loaded after lesson-template.css. Inter and Work Sans are already available
 * in the built-in font system and the Thema-studio custom font pack.
 */
:root {
  --ink: #20382f;
  --ink-mid: #455c51;
  --ink-soft: #586b61;
  --soft: #455c51;
  --paper: #f4f2e9;
  --paper-warm: #eae9dc;
  --paper-2: #f9f8f2;
  --white: #ffffff;
  --card: #ffffff;
  --border: #ced4c9;
  --line: #ced4c9;
  --ocean: #24584a;
  --ocean-dark: #163e33;
  --ocean-light: #e7efe7;
  --gold: #956121;
  --gold-dark: #724610;
  --gold-light: #f5ebd7;
  --forest: #286440;
  --forest-light: #eaf3e8;
  --ember: #a14030;
  --ember-light: #f8ebe5;
  --plum: #695274;
  --plum-light: #f0eaf3;
  --correct: #23623d;
  --correct-bg: #eaf3e8;
  --incorrect: #a52f36;
  --incorrect-bg: #fbeced;
  --radius: 7px;
  --shadow: 0 2px 0 rgba(32, 56, 47, .05);
  --shadow-md: 0 3px 10px rgba(32, 56, 47, .045);
  --shadow-lg: 0 3px 10px rgba(32, 56, 47, .045);
  --font-heading: 'Inter', 'Work Sans', system-ui, sans-serif;
  --font-body: 'Work Sans', 'Inter', system-ui, sans-serif;
  --header-bg: #183f33;
}

body {
  background: var(--paper);
  background-image: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
}
h1, h2, h3 { font-family: var(--font-heading); letter-spacing: -.025em; }
::selection { background: var(--ocean-light); color: var(--ocean-dark); }

/* A street plaque, with purely decorative orthogonal lines at the right. */
.header {
  width: calc(100% - 2.4rem);
  max-width: 800px;
  margin: 1.7rem auto 0;
  padding: 2rem;
  background: var(--header-bg);
  border: 6px double #eff0df;
  border-radius: 9px;
  color: #fffef3;
  text-align: left;
  box-shadow: 0 3px 0 #c9cfc1;
}
.header::before {
  top: 0;
  right: 0;
  width: 29%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, var(--header-bg), transparent 55%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(241, 240, 219, .15) 38px 40px, transparent 40px 74px),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(241, 240, 219, .15) 31px 33px, transparent 33px 65px);
  pointer-events: none;
}
.header-inner { padding-right: 5.5rem; }
.header-tag {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #b2c6b9;
  border-radius: 0;
  padding: 0 0 .35rem;
  margin-bottom: 1rem;
  color: #e4edde;
  font-family: var(--font-heading);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.header h1 {
  color: #fffef3;
  font-size: clamp(1.85rem, 4.8vw, 2.7rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -.045em;
  margin: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.header p { max-width: 55ch; margin-top: .85rem; color: #e2eadd; opacity: 1; font-size: 1rem; }
.container { max-width: 840px; padding: 1.5rem 1.2rem 4rem; }
.progress-wrap { border: 1px solid var(--border); border-radius: 5px; box-shadow: none; }
.prog-fill { background: var(--ocean); }

/* Section headings read as street plaques, not decorative landscape cards. */
.sec, .section {
  margin: 1.9rem 0 1rem;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}
.sec-tag {
  display: block;
  width: fit-content;
  padding: 0;
  margin: 0 0 .45rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink-mid);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  box-shadow: none;
}
.sec h2, .section h2 {
  display: table;
  max-width: 100%;
  margin: 0;
  padding: .45rem .8rem;
  border: 4px double #dbe6d8;
  border-radius: 5px;
  background: var(--ocean);
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.sec-sub { margin-top: .5rem; color: var(--ink-mid); font-size: .9375rem; }

/* The exercise number uses the number already provided by the renderer. */
.card {
  margin-bottom: 1.25rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--ocean);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
  animation: none;
  transition: none;
}
.card:nth-child(n), .blok:nth-child(n) > .card { border-left-color: var(--border); }
.card:hover { transform: none; box-shadow: var(--shadow); }
.card-head { align-items: flex-start; gap: .9rem; margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border); }
.card-head > div { min-width: 0; }
.card:nth-child(n) .card-num, .blok:nth-child(n) > .card .card-num {
  width: 2.35rem;
  height: 2.35rem;
  border: 3px double var(--ocean);
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--ocean-dark);
  box-shadow: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}
.card-title { font-size: 1.125rem; line-height: 1.5; letter-spacing: -.025em; overflow-wrap: anywhere; }
.card-instr { margin: .25rem 0 0; color: var(--ink-mid); font-size: .9375rem; }
.card-lijst li:nth-child(n)::before { border-radius: 4px; background: var(--ocean); color: #fff; box-shadow: none; }
.info { border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 4px; font-size: 1rem; animation: none; }
.info.ocean { border-left-color: var(--ocean); }
.info.forest { border-left-color: var(--forest); }
.info.warning { border-left-color: var(--ember); }
.info h3 { font-size: 1rem; }
.scenario-box { background: var(--paper-2); border-radius: 4px; font-size: 1rem; }

/* Conversations use opposing address cards. Side always follows identity. */
.dialogue { gap: .85rem; margin: .25rem 0; padding: .25rem 0; }
.dialogue-bubble {
  width: fit-content;
  min-width: 0;
  max-width: 85%;
  padding: .85rem 1rem;
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
  box-shadow: none;
}
.dialogue-bubble.speaker-a {
  align-self: flex-start;
  border: 1px solid var(--border);
  border-left: 3px solid var(--ocean);
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--ink);
}
.dialogue-bubble.speaker-b {
  align-self: flex-end;
  border: 1px solid var(--border);
  border-right: 3px solid var(--gold);
  border-radius: 4px;
  background: var(--gold-light);
  color: var(--ink);
}
.dialogue-bubble strong { margin: 0 0 .2rem; color: var(--ocean-dark); font-family: var(--font-heading); font-size: .8125rem; font-weight: 700; letter-spacing: .015em; text-transform: none; }
.dialogue-bubble.speaker-b strong { color: var(--gold-dark); }
.dialogue-bubble .eng { color: var(--ink-mid); }
.dialogue-bubble.speaker-a + .dialogue-bubble.speaker-a,
.dialogue-bubble.speaker-b + .dialogue-bubble.speaker-b { margin-top: -.4rem; }

/* Explicit type selectors retain compact inline fields in every renderer. */
input[type="text"], textarea, select {
  max-width: 100%;
  border: 1px solid #718275;
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
}
input[type="text"].inline { width: 9.5rem; }
input[type="text"].narrow { width: 7.5rem; }
input[type="text"].wide { width: 17.5rem; }
input[type="text"]:not(:placeholder-shown):not(:focus) { border-color: #718275; }
.dialogue-bubble input { max-width: 100%; min-height: 2.5rem; background: var(--white); color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: 1; }
:is(button, a, input, textarea, select):focus-visible,
input[type="text"]:focus-visible { outline: 3px solid var(--ocean); outline-offset: 3px; }
input.input-ok, textarea.input-ok, select.input-ok { color: var(--correct); }
input.input-no, textarea.input-no, select.input-no { color: var(--incorrect); }
.btn, .btn-show { min-height: 2.75rem; border-radius: 4px; font-family: var(--font-body); font-size: .9375rem; font-weight: 600; }
.btn { background: var(--ocean); color: #fff; box-shadow: none; }
.btn:hover { background: var(--ocean-dark); transform: none; box-shadow: none; }
.btn:active { transform: none; }
.btn-show { background: var(--paper-2); border: 1px solid #718275; color: var(--ocean-dark); }
.btn-show:hover { background: var(--ocean-light); border-color: var(--ocean); color: var(--ocean-dark); }
.mc-radio label, .mco { background: var(--white); border: 1px solid var(--border); border-radius: 4px; padding: .8rem .95rem; font-size: 1rem; }
.mc-radio input[type="radio"] { flex-shrink: 0; accent-color: var(--ocean); }
.mc-radio label:hover, .mco:hover { background: var(--ocean-light); border-color: var(--ocean); }
.mc-radio label:has(input[type="radio"]:checked), .mco.sel { background: var(--ocean-light); border-color: var(--ocean); }
.mc-radio label.ok, .mc-radio label.ok:has(input[type="radio"]:checked), .mco.ok { background: var(--correct-bg); color: var(--correct); border-color: var(--correct); }
.mc-radio label.no, .mc-radio label.no:has(input[type="radio"]:checked), .mco.no { background: var(--incorrect-bg); color: var(--incorrect); border-color: var(--incorrect); }
.fb { border-radius: 4px; font-size: .9375rem; }
.fb.ok { background: var(--correct-bg); color: var(--correct); border-color: var(--correct); animation: none; }
.fb.no { background: var(--incorrect-bg); color: var(--incorrect); border-color: var(--incorrect); animation: none; }
.model-answer { background: var(--ocean-light); color: var(--ink); border-left-color: var(--ocean); font-size: 1rem; }
.model-answer strong { color: var(--ocean-dark); }
.row { font-size: 1rem; border-bottom-color: var(--border); }
.eng { color: var(--ink-soft); font-size: .875rem; }
.ww-chip { background: var(--gold-light); color: var(--gold-dark); border-color: var(--gold); }

/* Vocabulary resembles a row of building-directory labels. */
.vocab-list { gap: .65rem; }
.vocab-item:nth-child(n) { padding: .85rem 1rem; border: 1px solid var(--border); border-left: 4px solid var(--ocean); border-radius: 4px; background: var(--white); box-shadow: none; }
.vocab-item:nth-child(n):hover { transform: none; background: var(--paper-2); box-shadow: none; }
.vocab-item:nth-child(n) .dutch { color: var(--ocean-dark); font-family: var(--font-heading); font-size: 1rem; font-weight: 600; }
.vocab-item .english { color: var(--ink-mid); font-size: .9375rem; }
.vocab-play-btn { background: var(--ocean); color: #fff; }
.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(--border); border-radius: 4px; }
button.pov-optie, button.mem-kaart, button.cat-chip, button.zin-chip, button.galg-letter { min-height: 2.75rem; }

@media (max-width: 600px) {
  .header { width: calc(100% - 1.4rem); margin-top: .8rem; padding: 1.3rem; border-width: 5px; border-radius: 7px; }
  .header-inner { padding-right: 1.5rem; }
  .header::before { width: 22%; }
  .header p { font-size: .9375rem; }
  .container { padding: 1.1rem .7rem 2.5rem; }
  .card { padding: 1rem; }
  .card-head { gap: .65rem; }
  .dialogue-bubble { max-width: 94%; padding: .75rem .85rem; }
  .sec, .section { margin-top: 1.5rem; }
  .sec h2, .section h2 { font-size: 1.0625rem; }
  .vocab-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  body, .header, .card, .sec h2, .section h2,
  .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 #555; }
  .header::before { display: none; }
  .header-inner { padding-right: 0; }
  .header h1, .header p, .header-tag, .sec-tag, .sec-sub,
  .dialogue-bubble strong, .dialogue-bubble.speaker-b strong, .dialogue-bubble .eng { color: #000; }
  .dialogue-bubble.speaker-a, .dialogue-bubble.speaker-b { border-color: #666; break-inside: avoid; }
  .card { break-inside: auto; }
  .card-head, .sec, .section { break-after: avoid; }
  .card:nth-child(n) .card-num, .blok:nth-child(n) > .card .card-num { background: #fff; color: #000; border-color: #555; }
}
