/* Woordenboekie. Vormregel: alles haaks, alleen de duimgreep-tabs hebben een ronde linkerkant.
   Motief: de omgevouwen paginahoek. Een accentkleur: kobalt. */
:root {
  color-scheme: light;
  --paper: #ffffff;
  --sheet: #ffffff;
  --tint: #f2f4f7;
  --ink: #12151c;
  --soft: #515868;
  --rule: #d0d5dd;
  --accent: #1d3fd1;
  --fill: #1d3fd1;
  --on-fill: #f8f9fd;
  --fold: #c4cbd8;
  --shadow: rgb(29 45 110 / .18);
  --display: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --edge: clamp(16px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; border-radius: 0; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { display: inline-block; width: 1em; height: 1em; flex: none; }
.icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.ipa { font-family: "Segoe UI", "Noto Sans", "Lucida Sans Unicode", system-ui, sans-serif; }
.soft { color: var(--soft); }

/* Ruimte rechts voor de duimgreep */
.page { padding-inline: var(--edge) calc(var(--edge) + 44px); max-width: 1480px; margin-inline: auto; }

/* Balk */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 25px/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
.mark { width: 22px; height: 26px; background: var(--fill); clip-path: polygon(0 0, 62% 0, 100% 32%, 100% 100%, 0 100%); }
.bar nav { display: flex; gap: clamp(14px, 3vw, 32px); font-weight: 500; }
.bar nav a { padding-block: 10px; text-decoration: none; box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .2s, color .2s; white-space: nowrap; }
.bar nav a:hover { color: var(--accent); }
.bar nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* Knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 26px; background: var(--fill); color: var(--on-fill); border: 0; font-weight: 600; text-decoration: none; white-space: nowrap; transition: transform .25s var(--ease), filter .2s; }
.btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); filter: none; }
.arrow-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; text-decoration: none; }
.arrow-link .icon { transition: transform .25s var(--ease); }
.arrow-link:hover .icon { transform: translateX(4px); }

/* Blad met ezelsoor */
.sheet-wrap { filter: drop-shadow(0 24px 40px var(--shadow)); }
.sheet { position: relative; padding: clamp(24px, 3vw, 40px); background: var(--sheet); clip-path: polygon(0 0, calc(100% - 52px) 0, 100% 52px, 100% 100%, 0 100%); }
.sheet::after { content: ""; position: absolute; top: 0; right: 0; width: 52px; height: 52px; background: linear-gradient(to top right, var(--fold) 50%, transparent 50%); }

/* Home: held */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding-block: clamp(24px, 5vh, 64px) clamp(40px, 7vh, 80px); }
.hero h1, .big-label { display: block; font: 700 clamp(46px, 6.6vw, 96px)/1.02 var(--display); letter-spacing: -.025em; }
.hero-sub { max-width: 44ch; margin-top: 22px; color: var(--soft); font-size: 19px; }
.ask { position: relative; }
.ask-row { position: relative; display: block; }
.ask input { display: block; width: 100%; padding: .08em 0 .14em; background: transparent; border: 0; border-bottom: 5px solid var(--ink); font: 700 clamp(40px, 6.6vw, 96px)/1.1 var(--display); letter-spacing: -.025em; color: var(--accent); transition: border-color .2s; }
.ask input::placeholder { color: var(--soft); opacity: 1; font-weight: 500; }
.ask input:focus { outline: none; border-color: var(--accent); }
.ask input::-webkit-search-cancel-button { display: none; }
.ask .btn { margin-top: 22px; }
.suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 0px); background: var(--sheet); box-shadow: 0 24px 40px var(--shadow); }
.suggest a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 18px; font: 600 22px/1.3 var(--display); letter-spacing: -.01em; text-decoration: none; }
.suggest a[aria-selected="true"], .suggest a:hover { background: var(--fill); color: var(--on-fill); }
.suggest a[aria-selected="true"] small, .suggest a:hover small, .suggest a[aria-selected="true"] mark, .suggest a:hover mark { color: inherit; }
.suggest small { color: var(--soft); font: 400 14px var(--body); }
.suggest mark { background: none; color: var(--accent); }

.today { rotate: 1.4deg; transition: rotate .5s var(--ease); }
.today:hover { rotate: 0deg; }
.today small { display: block; color: var(--soft); font-size: 15px; font-weight: 500; }
.today h2 { margin-top: 10px; font: 700 clamp(34px, 3.6vw, 50px)/1.05 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.today .ipa { display: block; margin-top: 6px; color: var(--soft); }
.today p { margin-top: 16px; font-size: 18px; line-height: 1.45; }
.today em { display: block; margin-top: 10px; color: var(--soft); }
.today .arrow-link { margin-top: 20px; }

/* Band met woorden, de enige marquee op de site */
.band { background: var(--fill); color: var(--on-fill); overflow: hidden; }
.band-track { display: flex; width: max-content; }
.band ul { display: flex; flex: none; }
.band a { display: block; padding: 18px clamp(16px, 2vw, 28px); font: 600 clamp(24px, 2.6vw, 36px)/1.1 var(--display); letter-spacing: -.02em; text-decoration: none; transition: opacity .2s; }
.band a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.band a:focus-visible { outline-color: var(--on-fill); outline-offset: -6px; }

/* Bladeren */
.browse { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 64px); padding-block: clamp(56px, 9vh, 112px); scroll-margin-top: 16px; }
.browse-letter { font: 800 clamp(120px, 21vw, 320px)/.85 var(--display); letter-spacing: -.025em; color: var(--accent); text-transform: uppercase; }
.browse h2 { font: 700 clamp(28px, 3vw, 40px)/1.1 var(--display); letter-spacing: -.02em; }
.browse-words { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 32px; margin-top: 24px; }
.browse-words a { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.browse-words b { font: 600 22px/1.25 var(--display); letter-spacing: -.01em; transition: color .15s, translate .25s var(--ease); }
.browse-words a:hover b { color: var(--accent); translate: 4px 0; }
.browse-words small { color: var(--soft); font-size: 14px; }
.recent { margin-top: 36px; }
.recent h3 { font-size: 15px; font-weight: 600; color: var(--soft); }
.inline-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.inline-links a { font-weight: 500; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.inline-links a:hover { color: var(--accent); text-decoration-color: currentColor; }
.letter-strip { display: none; }

/* Gezegde groot */
.statement { padding-block: clamp(48px, 8vh, 96px); border-top: 5px solid var(--ink); }
.statement small { color: var(--soft); font-size: 16px; font-weight: 500; }
.statement blockquote { max-width: 19ch; margin: 14px 0 0; font: 700 clamp(38px, 6vw, 84px)/1.04 var(--display); letter-spacing: -.025em; }
.statement p { max-width: 50ch; margin-top: 20px; font-size: 20px; }
.statement .arrow-link { margin-top: 24px; }

/* Duimgreep */
.thumb { position: fixed; z-index: 10; right: 0; top: 50%; translate: 0 -50%; display: grid; }
.thumb a, .thumb span { --h: min(27px, calc((100dvh - 40px) / 26)); display: block; width: 38px; height: var(--h); line-height: var(--h); padding-left: 11px; font: 600 13px/var(--h) var(--display); text-decoration: none; }
.thumb a { background: var(--sheet); border-radius: 7px 0 0 7px; box-shadow: -1px 0 0 var(--rule), 0 1px 0 var(--rule); transition: translate .25s var(--ease), background-color .15s, color .15s; }
.thumb a:hover { translate: -8px 0; background: var(--fill); color: var(--on-fill); }
.thumb a[aria-current="true"] { translate: -8px 0; background: var(--fill); color: var(--on-fill); }
.thumb span { color: var(--soft); opacity: .55; }

/* Woordpagina */
.lemma-wrap { container-type: inline-size; padding-block: clamp(16px, 4vh, 40px) clamp(20px, 3vh, 32px); border-bottom: 5px solid var(--ink); }
.lemma-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: 19px; }
.lemma-top .art { font: 600 28px/1.2 var(--display); color: var(--accent); }
.lemma { font: 800 min(172px, calc(100cqw / (var(--len, 8) * .6)))/1 var(--display); letter-spacing: -.025em; padding-bottom: .1em; }
.entry-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); padding-block: clamp(32px, 6vh, 64px); align-items: start; }
.side { position: sticky; top: 24px; display: grid; gap: 28px; max-height: calc(100dvh - 48px); overflow-y: auto; padding: 4px; margin: -4px; }
.toc h2 { color: var(--soft); font-size: 14px; font-weight: 400; }
.toc ol { margin-top: 8px; border-left: 2px solid var(--rule); }
.toc a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-left: -2px; padding: 7px 12px; border-left: 2px solid transparent; font-size: 16px; font-weight: 500; line-height: 1.35; text-decoration: none; transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--accent); }
.toc a[aria-current="true"] { border-left-color: var(--accent); color: var(--accent); font-weight: 600; }
.toc small { color: var(--soft); font-size: 14px; font-weight: 400; }
.toc a.is-empty { color: var(--soft); pointer-events: none; }
.toc-main { min-width: 0; }
.toc-main > section { scroll-margin-top: 24px; }
.facts { display: grid; gap: 18px; }
.facts dt { color: var(--soft); font-size: 14px; }
.facts dd { font-size: 19px; font-weight: 500; }
.speak { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px; padding: 6px 14px; background: none; border: 1.5px solid var(--ink); font-weight: 600; font-size: 15px; transition: background-color .15s, color .15s, transform .2s var(--ease); }
.speak:hover { background: var(--ink); color: var(--paper); }
.speak:active { transform: scale(.98); }
.defs { display: grid; gap: clamp(28px, 4vh, 44px); }
.defs li { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: start; }
.defs .n { color: var(--accent); font: 800 44px/1 var(--display); }
.defs b { display: block; font: 600 clamp(24px, 2.7vw, 36px)/1.18 var(--display); letter-spacing: -.02em; }
.defs em { display: block; margin-top: 10px; color: var(--soft); font-size: 19px; }
.more { margin-top: clamp(40px, 7vh, 64px); }
.more .inline-links { margin-top: 10px; }
.more .qa { margin-top: 12px; }
.m-say-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 32px; margin-top: 14px; }
.m-say-list b { display: block; font: 600 20px/1.25 var(--display); }
.m-say-list span { color: var(--soft); font-size: 16px; }
.h3 { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.syn-run { margin-top: 10px; font: 500 clamp(24px, 2.6vw, 32px)/1.3 var(--display); letter-spacing: -.02em; }
.syn-run a { color: var(--accent); text-underline-offset: 5px; text-decoration-thickness: 2px; }
.qa details { border-bottom: 1px solid var(--rule); }
.qa details:first-child { border-top: 1px solid var(--rule); }
.qa summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 600; font-size: 19px; line-height: 1.35; cursor: pointer; list-style: none; transition: color .15s; }
.qa summary:hover { color: var(--accent); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .icon { transition: transform .25s var(--ease); }
.qa details[open] summary .icon { transform: rotate(180deg); }
.qa p { padding-bottom: 18px; max-width: 62ch; }
.outlinks { display: grid; justify-items: start; gap: 6px; margin-top: 24px; font-size: 16px; }
.outlinks a { display: inline-flex; align-items: center; gap: 8px; text-underline-offset: 4px; }
.flip { display: grid; grid-template-columns: 1fr 1fr; border-top: 5px solid var(--ink); }
.flip a { display: block; padding-block: 24px 40px; text-decoration: none; }
.flip a + a { text-align: right; }
.flip small { display: block; color: var(--soft); font-size: 15px; }
.flip b { font: 700 clamp(24px, 4vw, 52px)/1.1 var(--display); letter-spacing: -.02em; transition: color .15s; overflow-wrap: anywhere; }
.flip a:hover b { color: var(--accent); }
.empty-state { display: grid; gap: 20px; justify-items: start; padding-block: clamp(32px, 8vh, 96px); }
.empty-state h1 { max-width: 16ch; font: 800 clamp(44px, 7vw, 100px)/1.02 var(--display); letter-spacing: -.025em; }
.empty-state p { max-width: 52ch; font-size: 19px; }
.syn-run.left { margin-top: 0; }

/* Gezegden */
.say-hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding-block: clamp(20px, 4vh, 48px) clamp(32px, 5vh, 56px); }
.say-hero h1 { font: 800 clamp(52px, 8vw, 120px)/.98 var(--display); letter-spacing: -.025em; }
.say-ask { margin-top: 18px; }
.say-ask label { display: block; color: var(--soft); font-size: 17px; }
.say-ask input { display: block; width: 100%; padding: 6px 0 10px; background: transparent; border: 0; border-bottom: 4px solid var(--ink); font: 600 clamp(26px, 3.2vw, 40px)/1.2 var(--display); letter-spacing: -.02em; color: var(--accent); }
.say-ask input:focus { outline: none; border-color: var(--accent); }
.pick small { display: block; color: var(--soft); font-size: 15px; font-weight: 500; }
.pick b { display: block; margin-top: 10px; font: 700 clamp(26px, 2.6vw, 34px)/1.12 var(--display); letter-spacing: -.025em; }
.pick p { margin-top: 12px; }
.pick .btn { margin-top: 20px; }
.with-toc { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); align-items: start; padding-top: 28px; border-top: 5px solid var(--ink); }
.say-group { margin-bottom: clamp(40px, 7vh, 64px); }
.say-group h2 { font: 700 clamp(28px, 3vw, 40px)/1.1 var(--display); letter-spacing: -.02em; }
.quiz { display: inline-flex; justify-self: start; justify-content: center; align-items: center; gap: 10px; min-height: 44px; padding: 6px 14px; background: none; border: 1.5px solid var(--ink); font-weight: 600; font-size: 15px; transition: background-color .15s, color .15s; }
.quiz[aria-pressed="true"] { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.say-count { margin-bottom: 12px; color: var(--soft); font-size: 15px; }
.mason { columns: 2 280px; column-gap: 16px; margin-top: 16px; }
.say { break-inside: avoid; margin-bottom: 16px; padding: 22px; background: var(--tint); }
.say b { display: block; font: 600 24px/1.16 var(--display); letter-spacing: -.02em; }
.say p { margin-top: 10px; color: var(--soft); font-size: 16px; line-height: 1.45; }
.say mark { background: color-mix(in srgb, var(--accent) 26%, transparent); color: inherit; }
.say.lead { background: var(--fill); color: var(--on-fill); }
.say.lead b { font-size: 31px; line-height: 1.08; }
.say.lead p { color: var(--on-fill); }
.say.lead .reveal-btn { color: var(--on-fill); border-color: var(--on-fill); }
.reveal-btn { min-height: 44px; margin-top: 12px; padding: 6px 12px; background: none; border: 1px solid currentColor; color: var(--accent); font-size: 15px; font-weight: 600; }
.say-empty { display: grid; gap: 16px; justify-items: start; padding-block: 48px; }
.say-empty p { font: 600 clamp(26px, 3vw, 38px)/1.2 var(--display); letter-spacing: -.02em; max-width: 26ch; }
.terms { padding-block: clamp(24px, 4vh, 40px) clamp(56px, 9vh, 96px); }
.terms h2 { font: 700 clamp(30px, 4vw, 56px)/1.05 var(--display); letter-spacing: -.025em; }
.terms dl { margin-top: 28px; display: grid; gap: 0; }
.terms dl > div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 8px 32px; padding-block: 18px; border-top: 1px solid var(--rule); }
.terms dt { color: var(--accent); font: 700 clamp(22px, 2.4vw, 30px)/1.2 var(--display); letter-spacing: -.02em; }
.terms dd { max-width: 58ch; font-size: 18px; }

/* Voet */
.foot { padding-block: 40px 44px; border-top: 1px solid var(--rule); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); gap: 28px; font-size: 16px; }
.foot h2 { font-size: 15px; font-weight: 600; color: var(--soft); }
.foot p { max-width: 44ch; margin-top: 12px; color: var(--soft); }
.foot li { padding-block: 2px; }
.foot a { text-underline-offset: 4px; }

/* Beweging: volgorde bij binnenkomst, feedback bij wisselen van resultaten */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes rise { from { opacity: 0; translate: 0 22px; } to { opacity: 1; translate: 0 0; } }
  .js .reveal { opacity: 0; translate: 0 26px; transition: opacity .8s var(--ease), translate .8s var(--ease); }
  .js .reveal.in { opacity: 1; translate: 0 0; }
  .band-track { animation: slide 60s linear infinite; }
  .band:hover .band-track, .band:focus-within .band-track { animation-play-state: paused; }
  @keyframes slide { to { transform: translateX(-50%); } }
  .pop { animation: rise .4s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .band { overflow-x: auto; }
  .today { rotate: 0deg; }
}

/* Onder 1024px: duimgreep weg, alles in een kolom. De letters staan dan als veegstrook bij Bladeren. */
@media (max-width: 1023px) {
  .page { padding-inline: var(--edge); }
  .thumb { display: none; }
  .letter-strip { display: flex; gap: 4px; margin-bottom: 20px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
  .letter-strip button { flex: none; width: 44px; height: 44px; background: var(--tint); border: 0; font: 600 16px var(--display); scroll-snap-align: start; }
  .letter-strip button:disabled { background: transparent; color: var(--soft); opacity: .55; }
  .letter-strip button[aria-pressed="true"] { background: var(--fill); color: var(--on-fill); }
  .hero, .say-hero, .browse, .entry-grid, .with-toc { grid-template-columns: minmax(0, 1fr); }
  .today { rotate: 0deg; }
  .side { position: static; max-height: none; overflow: visible; padding: 0; margin: 0; gap: 24px; }
  .facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  /* De opgave staat hier boven de inhoud, als knoppen die mogen afbreken */
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; border-left: 0; }
  .toc a { min-height: 44px; align-items: center; margin-left: 0; padding: 8px 12px; border-left: 0; background: var(--tint); font-size: 15px; }
  .toc a[aria-current="true"] { background: var(--tint); }
  .toc a.is-empty { opacity: .6; }
  .browse-letter { font-size: clamp(110px, 30vw, 200px); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand { font-size: 22px; }
  .bar nav { font-size: 15px; gap: 14px; }
  .nav-long { display: none; }
  .ask .btn { width: 100%; }
  .defs li { grid-template-columns: 40px minmax(0, 1fr); }
  .defs .n { font-size: 32px; }
  .terms dl > div { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .sheet { clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%); }
  .sheet::after { width: 36px; height: 36px; }
}
