/* Dutch Companion — styles
   Kleuren hebben een vaste betekenis:
   terracotta = regelen en actie · teal = mensen · geel = Nederlandse leerlaag */

:root {
  --bg: #FBF8F3;
  --bg-outer: #F1EAE0;
  --surface: #FFFFFF;
  --ink: #1F2B3A;
  --ink-2: #566273;
  --ink-3: #8A94A1;
  --line: #EAE3D9;

  --act: #B5471F;
  --act-hover: #9A3A17;
  --act-soft: #F7E7DE;

  --people: #2A6B62;
  --people-hover: #20564F;
  --people-soft: #E1EFEB;

  --marker: #FBE38E;
  --marker-soft: #FDF3C8;

  --ok: #3B7A4C;
  --ok-soft: #E4F1E7;
  --urgent: #B42318;
  --urgent-soft: #FCEBE9;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-card: 20px;
  --r-btn: 14px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(31, 43, 58, .05), 0 6px 20px rgba(31, 43, 58, .06);

  --tabbar-h: 68px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg-outer);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .4em;
  text-wrap: balance;
}
h1 { font-size: 1.85rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.icon { width: 22px; height: 22px; flex-shrink: 0; }
.rot-180 { transform: rotate(180deg); }
.rot-270 { transform: rotate(270deg); }
.muted { color: var(--ink-2); }

:focus-visible {
  outline: 3px solid var(--act);
  outline-offset: 2px;
  border-radius: 6px;
}
h1:focus { outline: none; }

.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100;
}
.skip-link:focus { top: 12px; }

/* ---------- Venster, stage en scroller ----------
   .stage is een CSS-container: de lay-out reageert op de breedte van de
   stage, niet van het venster. Zo werkt dezelfde code in het telefoonframe. */
html, body { height: 100%; }
body { overflow: hidden; }
.device { position: relative; width: 100vw; height: 100vh; height: 100dvh; }
.device-status { display: none; }
.stage {
  position: relative;
  width: 100%; height: 100%;
  container-type: size;
  container-name: stage;
  overflow: hidden;
  transform: translateZ(0); /* vaste elementen (tabbalk, sheet) blijven binnen de stage */
  z-index: 1;
  background: var(--bg);
}
.scroller {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.stage.sheet-open .scroller { overflow: hidden; }
.app { min-height: 100cqh; background: var(--bg); }

/* ---------- Nederlandse leerlaag (het herkenbare element) ---------- */
.marker, .nl, .marker-inline {
  background-image: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
  padding: 0 .08em;
}
.nl {
  border: 0;
  background-color: transparent;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border-radius: 3px;
  transition: background-color .15s;
}
.nl:hover { background-color: var(--marker-soft); }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: var(--r-btn);
  border: 1.5px solid transparent;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 20px; height: 20px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--act); color: #fff; }
.btn-primary:hover { background: var(--act-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: rgba(31, 43, 58, .04); }
.btn-people { background: var(--people); color: #fff; }
.btn-people:hover { background: var(--people-hover); }
.btn-going { background: var(--people-soft); color: var(--people); border-color: var(--people-soft); }
.btn-danger { background: var(--urgent-soft); color: var(--urgent); }
.btn-danger:hover { border-color: var(--urgent); }

.icon-btn {
  width: 44px; height: 44px;
  display: inline-grid; place-items: center;
  border: 0; background: transparent; border-radius: 12px;
  margin-left: -10px;
}
.icon-btn:hover { background: rgba(31, 43, 58, .06); }

.link-btn {
  border: 0; background: none; padding: 0;
  color: var(--act); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Welkom ---------- */
.welcome {
  min-height: 100cqh;
  display: flex; flex-direction: column;
  padding: max(20px, var(--safe-top)) 24px max(24px, var(--safe-bottom));
}
.brand-line {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  margin: 0;
}
.brand-line .icon { color: var(--act); }
.welcome-hero { margin: auto 0; padding: 40px 0; }
.welcome-word {
  font-size: clamp(3.6rem, 19cqw, 9rem);
  line-height: .95;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
}
.welcome-word .nl { padding: 0 .04em; }
.welcome-say { color: var(--ink-2); max-width: 32ch; }
.welcome-lead { font-size: 1.2rem; line-height: 1.45; max-width: 26ch; margin-top: 28px; }
.welcome-actions { display: grid; gap: 6px; }

/* ---------- Formulieren ---------- */
.form-screen {
  padding: max(16px, var(--safe-top)) 24px 32px;
}
.form-screen h1 { margin-top: 20px; }
.form-screen form { display: grid; gap: 18px; margin: 28px 0 20px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: .95rem; }
.field input, .big-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--surface);
  transition: border-color .15s;
}
.field input:focus, .big-input:focus { border-color: var(--act); outline: none; box-shadow: 0 0 0 3px var(--act-soft); }
.big-input { font-size: 1.2rem; min-height: 60px; }
.field-error { color: var(--urgent); font-size: .9rem; min-height: 1em; margin: 0; }
.field-error:empty { min-height: 0; }
.note { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); }
.note .icon { width: 18px; height: 18px; margin-top: 2px; }

/* ---------- Intake ---------- */
.intake {
  min-height: 100cqh;
  display: flex; flex-direction: column;
  padding: max(12px, var(--safe-top)) 24px max(20px, var(--safe-bottom));
}
.intake-head { display: flex; align-items: center; gap: 10px; }
.intake-progress { flex: 1; }
.intake-block { font-size: .85rem; font-weight: 600; color: var(--ink-2); margin: 0 0 6px; }
.segments { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.seg { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.seg span { display: block; height: 100%; background: var(--act); transition: width .35s ease; }
.intake-body { padding-top: 36px; }
.intake-body h1 { font-size: 1.7rem; margin-bottom: 10px; }
.why {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: .92rem; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
}
.why .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--people); }
.intake-body > .big-input, .options, .chips, .privacy-card { margin-top: 22px; }
.intake-foot { margin-top: auto; padding-top: 24px; display: grid; gap: 4px; }

.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 12px 16px;
  text-align: left; font-weight: 500;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-btn);
  transition: border-color .15s, background-color .15s;
}
.option:hover { border-color: var(--ink-3); }
.option-dot {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent;
}
.option-dot .icon { width: 16px; height: 16px; }
.option[aria-checked="true"] { border-color: var(--act); background: var(--act-soft); }
.option[aria-checked="true"] .option-dot { background: var(--act); border-color: var(--act); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 500;
  transition: border-color .15s, background-color .15s;
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-sm { min-height: 38px; padding: 6px 14px; font-size: .92rem; }
.chips-static .chip { cursor: default; }
.chips-static .chip:hover { border-color: var(--line); }

.privacy-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); padding: 18px 20px;
}
.privacy-card ul { padding-left: 1.1em; margin: 0 0 12px; }
.privacy-card li { margin-bottom: 6px; }
.privacy-card .muted { font-size: .9rem; margin: 0; }
.consent {
  display: flex; align-items: center; gap: 12px;
  margin-top: 18px; font-weight: 600; cursor: pointer;
}
.consent input { width: 24px; height: 24px; accent-color: var(--act); }

/* ---------- Plan wordt gebouwd (het ene georkestreerde moment) ---------- */
.building {
  min-height: 100cqh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 32px 24px;
}
.building-kicker { color: var(--ink-2); margin: 0 0 6px; }
.building h1 { font-size: 2.2rem; margin-bottom: 28px; }
.building-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 14px; }
.building-list li, .building-result, .building-btn {
  opacity: 0;
  animation: rise .5s ease forwards;
  animation-delay: var(--d);
}
.building-list li { display: flex; align-items: center; gap: 12px; font-size: 1.05rem; }
.building-list .icon {
  width: 28px; height: 28px; padding: 5px;
  background: var(--ok-soft); color: var(--ok); border-radius: 50%;
}
.building-result {
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem;
}
.building-result, .building-btn { margin-top: 8px; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Shell: topbalk + tabbalk (mobiel) ---------- */
.side-only { display: none !important; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(10px, var(--safe-top)) 20px 10px;
  background: rgba(251, 248, 243, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--people-soft); color: var(--people);
  border: 0; font-weight: 700; font-family: var(--font-display); font-size: 1.05rem;
}
button.avatar.is-active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--people); }
.avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }

.screen {
  padding: 8px 20px calc(var(--tabbar-h) + 32px + var(--safe-bottom));
  max-width: 720px;
  margin: 0 auto;
}
.screen > h1, .plan-head h1 { margin-top: 8px; }
.lead { color: var(--ink-2); font-size: 1.05rem; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 6px 8px max(8px, var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tabs { display: grid; grid-template-columns: repeat(5, 1fr); }
.tab {
  display: grid; justify-items: center; gap: 2px;
  min-height: 54px; padding: 6px 2px;
  border: 0; background: none; border-radius: 12px;
  color: var(--ink-3); font-size: .74rem; font-weight: 600;
}
.tab .icon { width: 24px; height: 24px; }
.tab.is-active { color: var(--act); }
.tab:hover { color: var(--ink); }
.tab.is-active:hover { color: var(--act); }

/* ---------- Kaarten ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.card-label { font-size: .88rem; font-weight: 600; color: var(--ink-2); margin: 0 0 8px; }
.section-title { font-size: 1.05rem; margin: 28px 0 12px; }

.greeting { font-size: 2rem; margin: 10px 0 4px; }
.greeting .nl { text-transform: capitalize; }
.nowrap { white-space: nowrap; }

.card-action { background: var(--act-soft); box-shadow: none; }
.card-action .card-label { color: var(--act-hover); }
.next-title { font-size: 1.35rem; margin: 14px 0 16px; }
.card-action .nl { background-image: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%); }

.bar { height: 8px; background: rgba(181, 71, 31, .15); border-radius: 5px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--act); border-radius: 5px; transition: width .4s ease; }
.bar-lg { height: 10px; background: var(--line); }
.bar-lg span { background: var(--ok); }

.help-row {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 8px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card);
  text-align: left;
  transition: border-color .15s;
}
.help-row:hover { border-color: var(--ink-3); }
.help-row > span:nth-child(2) { flex: 1; display: grid; }
.help-row small { color: var(--ink-2); font-size: .9rem; }
.help-row-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--ink); color: #fff;
}

.meetup { border-top: 0; }
.meetup-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.meetup h3 { margin-bottom: 8px; }
.meta { display: flex; align-items: center; gap: 8px; color: var(--ink-2); margin: 0 0 4px; font-size: .95rem; }
.meta .icon { width: 18px; height: 18px; color: var(--people); }
.meetup .btn { margin-top: 12px; min-height: 44px; padding: 8px 18px; }

.badge {
  display: inline-block; white-space: nowrap;
  font-size: .78rem; font-weight: 600;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--bg-outer); color: var(--ink-2);
}
.badge-people { background: var(--people-soft); color: var(--people); }

.word-card {
  width: 100%; border: 0; text-align: left;
  display: grid; gap: 4px;
  background: var(--surface);
}
.word-big { font-family: var(--font-display); font-weight: 700; font-size: 2rem; justify-self: start; letter-spacing: -0.02em; }
.word-en { color: var(--ink-2); }
.word-cta { display: flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--ink); margin-top: 6px; }
.word-cta .icon { width: 18px; height: 18px; }

.card-soon { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); }
.card-soon h2 { font-size: 1.15rem; }
.card-soon p:last-child, .card-soon .chips { margin-bottom: 0; }

/* ---------- My plan ---------- */
.overall { margin: 18px 0 16px; }
.overall p { margin: 8px 0 0; font-weight: 600; font-size: .95rem; }
.filters {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 -20px 8px; padding: 2px 20px 8px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filters .chip { flex-shrink: 0; }

.phase { margin-top: 22px; }
.phase-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.phase-head h2 { margin: 0; }
.phase-count { font-size: .9rem; font-weight: 600; color: var(--ink-2); }

.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.task-row { display: flex; align-items: flex-start; gap: 4px; padding: 8px 8px 8px 8px; }
.check {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border: 0; background: none; padding: 0;
}
.check .icon {
  width: 28px; height: 28px; padding: 5px;
  border-radius: 50%;
  border: 2px solid var(--line);
  color: transparent;
  transition: background-color .2s, border-color .2s, color .2s;
}
.check:hover .icon { border-color: var(--ok); color: var(--ok); }
.check[aria-pressed="true"] .icon { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.pop .icon { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.25); } }

.task-main { flex: 1; min-width: 0; }
.task-toggle {
  width: 100%;
  display: grid; grid-template-columns: 1fr auto; column-gap: 8px;
  align-items: center;
  padding: 6px 6px 8px 2px;
  border: 0; background: none; text-align: left;
}
.task-toggle > .icon { grid-row: 1 / span 2; grid-column: 2; width: 20px; height: 20px; color: var(--ink-3); transition: transform .2s; }
.task-cat { font-size: .75rem; font-weight: 600; color: var(--ink-3); }
.task-title { font-weight: 600; line-height: 1.35; }
.task.is-done .task-title { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.task-body { padding: 0 8px 10px 2px; color: var(--ink-2); }
.task-body p { margin-bottom: 10px; }
.task-terms:empty { display: none; }
.task-terms { font-size: .92rem; color: var(--ink); }
.ext-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--act); font-weight: 600; text-underline-offset: 3px;
}
.ext-link .icon { width: 16px; height: 16px; }

/* ---------- Dutch & Explore ---------- */
.word-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.word-tile {
  display: grid; gap: 2px; justify-items: start; align-content: start;
  padding: 14px; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px;
}
.word-tile:hover { border-color: var(--ink-3); }
.word-tile .marker { font-weight: 600; }
.word-tile small { color: var(--ink-2); font-size: .85rem; line-height: 1.35; }

.explore-list { display: grid; gap: 10px; margin-top: 18px; }
.explore-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border-radius: 16px; padding: 16px;
  box-shadow: var(--shadow);
}
.explore-item h2 { font-size: 1.05rem; margin-bottom: 2px; }
.explore-item p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.explore-item > div { flex: 1; }
.explore-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--act-soft); color: var(--act);
}

/* ---------- Profiel ---------- */
.profile-head { display: flex; align-items: center; gap: 16px; margin: 8px 0 24px; }
.profile-head h1 { margin: 0; font-size: 1.6rem; }
.profile-head p { margin: 0; }
.profile-block-head { display: flex; justify-content: space-between; align-items: baseline; }
.profile-block dl { margin: 6px 0 0; display: grid; gap: 12px; }
.profile-block dt { font-size: .85rem; color: var(--ink-2); }
.profile-block dd { margin: 0; font-weight: 500; }
.profile-block .btn { margin-top: 4px; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(31, 43, 58, .4);
  animation: fade .2s ease;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 88cqh; overflow-y: auto;
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  padding: 26px 22px max(26px, var(--safe-bottom));
  animation: slide-up .25s ease;
}
.sheet-close { position: absolute; top: 12px; right: 12px; margin: 0; }
.sheet-title { font-size: 1.5rem; padding-right: 40px; }
.sheet-kicker { font-size: .88rem; font-weight: 600; color: var(--ink-2); margin: 0 0 4px; }
.sheet-actions { display: grid; gap: 6px; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -46%); } }

.term-word { font-size: 2.8rem; letter-spacing: -0.03em; margin: 0 0 8px; }
.term-say { color: var(--ink-2); }
.term-meaning { font-size: 1.15rem; font-weight: 500; }
.term-example {
  background: var(--surface); border-radius: 16px; padding: 14px 16px; margin: 16px 0;
}
.term-example p { margin: 0; }
.term-example p[lang="nl"] { font-weight: 600; font-size: 1.05rem; margin-bottom: 4px; }

.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.help-tile {
  display: grid; gap: 10px; justify-items: start;
  padding: 16px; min-height: 104px;
  text-align: left; font-weight: 600; line-height: 1.3;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 16px;
}
.help-tile:hover { border-color: var(--ink-3); }
.help-tile .icon { color: var(--act); }
.help-tile.is-urgent { background: var(--urgent-soft); border-color: var(--urgent-soft); color: var(--urgent); }
.help-tile.is-urgent .icon { color: var(--urgent); }

.urgent-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.urgent-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border-radius: 16px; padding: 14px 16px;
}
.urgent-item > div { display: grid; gap: 2px; }
.urgent-item span { color: var(--ink-2); font-size: .92rem; }
.urgent-item.is-red { background: var(--urgent-soft); }
.urgent-item.is-red strong { color: var(--urgent); }
.call {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 10px 14px; border-radius: 12px;
  background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.is-red .call { background: var(--urgent); }
.call .icon { width: 18px; height: 18px; }

/* ---------- Toast ---------- */
.toast-root {
  position: fixed; left: 20px; right: 20px; margin: 0 auto;
  bottom: calc(var(--tabbar-h) + 22px + var(--safe-bottom));
  z-index: 60; max-width: 420px;
  pointer-events: none;
}
.toast {
  background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 14px;
  font-weight: 500; text-align: center;
  animation: rise .25s ease;
}

.noscript { padding: 24px; text-align: center; }

/* Alleen zichtbaar in de website-lay-out */
.welcome-card-title { display: none; }

/* In web-weergave op middelgrote schermen ruimte maken voor de schakelaar */
@media (min-width: 701px) {
  body:not(.mode-phone) .topbar { padding-right: 200px; }
}

/* ======================================================
   WEBSITE-LAY-OUT (stage breder dan 900px)
   ====================================================== */
@container stage (min-width: 900px) {
  .side-only { display: flex !important; }

  .shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    min-height: 100cqh;
  }
  .tabbar {
    position: sticky; top: 0;
    height: 100cqh;
    display: flex; flex-direction: column; gap: 28px;
    padding: 26px 16px 20px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .tabbar .brand-line { padding: 0 12px; font-size: 1.15rem; white-space: nowrap; }
  .tabs { display: flex; flex-direction: column; gap: 4px; }
  .tab {
    display: flex; align-items: center; gap: 12px;
    min-height: 46px; padding: 10px 14px;
    font-size: 1rem; color: var(--ink-2);
  }
  .tab:hover { background: var(--bg); color: var(--ink); }
  .tab.is-active { background: var(--act-soft); color: var(--act-hover); }
  .tab.is-active:hover { color: var(--act-hover); }

  .side-profile {
    margin-top: auto;
    align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 14px;
    border: 0; background: none; text-align: left;
  }
  .side-profile:hover, .side-profile.is-active { background: var(--bg); }
  .side-profile-text { display: grid; line-height: 1.3; min-width: 0; }
  .side-profile-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-profile-text small { color: var(--ink-2); }

  .topbar { display: none; }
  .screen {
    max-width: 1180px;
    margin: 0;
    padding: 56px 56px 64px;
  }
  h1 { font-size: 2.3rem; }
  .greeting { font-size: 2.8rem; margin-top: 0; }

  /* Home: twee kolommen */
  .home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }
  .home-side .section-title:first-child { margin-top: 12px; }
  .card-action { padding: 28px 30px; }
  .next-title { font-size: 1.7rem; }

  /* My plan: kop naast voortgang, fases als drie kolommen */
  .plan-head {
    display: grid; grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px; align-items: end;
  }
  .plan-head .overall { margin: 0 0 18px; }
  .filters { margin: 8px 0 16px; padding: 2px 0 8px; flex-wrap: wrap; overflow: visible; }
  .phases {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px; align-items: start;
  }
  .phase { margin-top: 8px; }

  /* People, Dutch, Explore, profiel */
  .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px; margin-bottom: 16px;
  }
  .card-grid .card { margin: 0; display: flex; flex-direction: column; }
  .card-grid .meetup .btn { margin-top: auto; align-self: flex-start; }
  .card-grid .meetup .meta:last-of-type { margin-bottom: 16px; }
  .word-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .explore-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
  .profile-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px; align-items: start;
  }
  .profile-grid .card { margin: 0; }
  .card-soon { max-width: 720px; }
  .lead { max-width: 60ch; }

  /* Onboarding */
  .welcome {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(360px, 440px);
    grid-template-rows: auto 1fr;
    column-gap: 64px;
    max-width: 1240px; margin: 0 auto;
    padding: 36px 64px;
  }
  .welcome-top { grid-column: 1 / -1; }
  .welcome-hero { align-self: center; padding: 0; }
  .welcome-lead { font-size: 1.45rem; max-width: 30ch; }
  .welcome-actions {
    align-self: center;
    background: var(--surface);
    border-radius: 28px; padding: 36px;
    box-shadow: var(--shadow);
    gap: 8px;
  }
  .welcome-card-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; line-height: 1.25; margin-bottom: 16px; }

  .form-screen, .building { max-width: 520px; margin: 0 auto; }
  .form-screen { padding-top: 10cqh; }
  .intake {
    max-width: 680px; margin: 0 auto;
    min-height: 0;
    padding-top: 8cqh; padding-bottom: 56px;
  }
  .intake-foot { margin-top: 32px; max-width: 400px; }
  .options { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Sheet wordt een gecentreerd venster */
  .sheet {
    left: 50%; right: auto; top: 50%; bottom: auto;
    transform: translate(-50%, -50%);
    width: min(560px, calc(100% - 48px));
    max-height: 84cqh;
    border-radius: 24px;
    padding: 32px;
    animation: pop-in .2s ease;
  }
  .toast-root { bottom: 32px; }
}

@container stage (min-width: 1200px) {
  .screen { padding: 64px 72px 72px; }
}


/* ======================================================
   WEERGAVE-SCHAKELAAR + TELEFOONFRAME
   ====================================================== */
.view-switch {
  position: fixed; top: 16px; right: 20px; z-index: 200;
  display: flex; gap: 2px; padding: 4px;
  background: var(--ink);
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(31, 43, 58, .18);
}
.view-switch button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border: 0; border-radius: 999px;
  background: transparent; color: rgba(255, 255, 255, .7);
  font-size: .88rem; font-weight: 600;
}
.view-switch svg { width: 17px; height: 17px; }
.view-switch button:hover { color: #fff; }
.view-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); }
@media (max-width: 700px) { .view-switch { display: none; } }

body.mode-phone {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 20%, #F7E7DE 0, transparent 45%),
    radial-gradient(circle at 75% 80%, #E1EFEB 0, transparent 45%),
    var(--bg-outer);
}
.mode-phone .device {
  --scale: 1;
  width: 414px; height: 868px;
  padding: 12px;
  border-radius: 58px;
  background: #1A1D22;
  box-shadow: inset 0 0 0 2px #3A3F47, 0 30px 80px rgba(31, 43, 58, .28);
  transform: scale(var(--scale));
  flex-shrink: 0;
}
.mode-phone .stage {
  border-radius: 46px;
  --safe-top: 50px;
  --safe-bottom: 18px;
}
.mode-phone .device-status {
  display: flex; align-items: center; justify-content: space-between;
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 10;
  height: 50px; padding: 0 30px 0 38px;
  color: var(--ink); font-weight: 600; font-size: .95rem;
  pointer-events: none;
}
.device-island {
  position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  width: 118px; height: 34px; border-radius: 20px; background: #1A1D22;
}
.device-icons { display: flex; gap: 6px; align-items: center; }
.device-icons svg { height: 11px; fill: currentColor; }
.device-icons svg:first-child { width: 18px; }
.device-icons svg:last-child { width: 25px; }
.mode-phone .scroller { scrollbar-width: none; }
.mode-phone .scroller::-webkit-scrollbar { display: none; }

/* ---------- Minder beweging ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
}
