@import url('https://fonts.googleapis.com/css2?family=Literata:ital,opsz,wght@0,7..72,400;1,7..72,400&family=Ubuntu:wght@300;400;500;700&display=swap');

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #e9f3eb;
  --surface-0:   #ffffff;
  --surface-1:   #ffffff;
  --surface-2:   #ffffff;
  --border:      #000000;
  --text:        #000000;
  --text-dim:    #000000;
  --accent:      #000000;
  --shadow:      none;
  --shadow-sm:   none;
  /* Alleen zachte diepte: geen 0 1px 0; die stapelt als tweede rand op de 0 0 0 1px-omlijning. */
  --window-shadow: 0 16px 48px -20px rgba(0, 0, 0, 0.12);
  --radius:      8px;
  --taskbar-h:   0px;
  --font:        'Ubuntu', system-ui, sans-serif;
  --font-reading: 'Literata', Georgia, 'Times New Roman', serif;
  --font-mono:   'Ubuntu Mono', 'Courier New', monospace;
  /* Vensters en lijstweergave mogen nooit boven de desktop-iconen schilderen */
  --z-windows-layer: 10;
  --z-list-mode:     500;
  --z-desktop-icons: 600;
  /* Type: 16px-basis, body ≥17px voor leescomfort (WCAG-advies rond 16-18px) */
  --fs-reading: 1.0625rem;
  --fs-reading-lg: 1.125rem;
  --fs-h1: 2.5rem;
  --fs-h2: 1.3125rem;
  --fs-kicker: 0.8125rem;
  --fs-label: 0.8125rem;
  --fs-caption: 0.8125rem;
  --fs-ui: 0.875rem;
  --fs-small: 0.75rem;
  /* Witruimte: iets ruimer ritme + ruimte rond focusring (WCAG 2.4.13 Focus Appearance) */
  --space-paragraph: 1.125em;
  --space-block: 1.25rem;
  --space-tight: 0.5rem;
  --pad-window-inline: 1.25rem;
  --pad-window-block: 1.125rem;
  --focus-ring: 2px solid var(--accent);
  --focus-offset: 3px;
}

html {
  font-size: 16px;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  user-select: none;
}

/* === DESKTOP === (groot scherm: pictogrammen links, verticaal gecentreerd; mobiel: .layout-mobile-stack) */
#desktop {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: auto;
  /* Kolombreedte: icoon + label op één regel (o.a. «Wisse Paardekooper») */
  width: min(300px, 36vw);
  min-width: 252px;
  max-height: 100%;
  z-index: var(--z-desktop-icons);
  pointer-events: none;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 6px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  box-sizing: border-box;
}

/* === DESKTOP ICONS === (icoon links, label rechts) */
.desktop-icon {
  pointer-events: auto;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid transparent;
}
.desktop-icon:hover    { background: #fff; border-color: #000; }
.desktop-icon.selected { background: #000; border-color: #000; }
.desktop-icon:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.desktop-icon span {
  font-size: var(--fs-caption); color: #000;
  text-align: left;
  word-break: normal;
  overflow-wrap: normal;
  white-space: nowrap;
  line-height: 1.35;
  pointer-events: none;
  flex: 1;
  padding: 0;
}
.desktop-icon.selected span { color: #fff; }

/* SVG-iconen: alleen zwart/wit via currentColor */
.ui-icon { display: block; color: inherit; }
.icon-img {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  color: #000;
  pointer-events: none;
  flex-shrink: 0;
}
.icon-img .ui-icon { width: 36px; height: 36px; }
.desktop-icon.selected .icon-img { color: #fff; }

.menu-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 8px;
  color: #000;
}
.menu-item-icon .ui-icon { width: 18px; height: 18px; }

/* Profielfoto hero (zelfde bron als grote foto in venster): rond */
.cv-hero-avatar {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.menu-item-icon .cv-hero-avatar {
  width: 18px;
  height: 18px;
}
.window-title-icon .cv-hero-avatar {
  width: 16px;
  height: 16px;
}
.desktop-icon.selected .cv-hero-avatar {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45);
}
.window-nav button .cv-hero-avatar {
  display: inline-block;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  margin-right: 4px;
}
.taskbar-window-btn .tb-label .cv-hero-avatar {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.view-toggle-float .ui-icon { width: 22px; height: 22px; margin: 0 auto; }
.view-toggle-float.active .ui-icon { color: #fff; }

/* Alle tekstvarianten: geen grijs, alleen #000 op wit (of geërfd in zwarte vlakken) */
.window-body strong, .window-body b,
#list-mode .list-section strong, #list-mode .list-section b {
  color: #000;
  font-weight: 700;
}
.window-body em, .window-body i,
#list-mode .list-section em, #list-mode .list-section i {
  color: #000;
  font-style: italic;
}
.window-body code, .window-body kbd,
#list-mode .list-section code, #list-mode .list-section kbd {
  font-family: var(--font-mono);
  color: #000;
  background: #fff;
  border: 1px solid #000;
  padding: 1px 5px;
  font-size: 0.92em;
}
.window-body ::selection,
#list-mode ::selection {
  background: #000;
  color: #fff;
}
.gemini-msg strong, .gemini-msg b { font-weight: 700; color: inherit; }
.gemini-msg em, .gemini-msg i { font-style: italic; color: inherit; }
.gemini-msg code {
  font-family: var(--font-mono);
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  padding: 0 3px;
  font-size: 0.95em;
}

/* === MAIN SCROLL + VENSTERLAAG (desktop: vol scherm; mobiel: zie .layout-mobile-stack) === */
.main-scroll {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: var(--taskbar-h);
  z-index: var(--z-windows-layer);
  pointer-events: none;
  background: transparent;
}
#windows-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
}

/* === UBUNTU WINDOW === */
.win98-window {
  position: absolute;
  min-width: 240px; min-height: 120px;
  background: var(--surface-1);
  pointer-events: all;
  border-radius: var(--radius);
  /* Geen border: onder perspective + translate3d tekent WebKit/Chrome de hoeken vaak kapot.
     box-shadow volgt border-radius wél betrouwbaar op de GPU-laag. */
  border: none;
  box-shadow:
    0 0 0 1px var(--border),
    var(--window-shadow);
  display: flex; flex-direction: column;
  overflow: hidden;
  opacity: 1;
  transition: box-shadow 0.15s ease-out;
}
.win98-window.focused {
  box-shadow:
    0 0 0 2px var(--border),
    var(--window-shadow);
}
.win98-window.minimized { display: none; }

/**
 * Desktop: lichte “camera”-diepte (z-as). Actief venster komt naar voren;
 * het andere zak iets terug. Startmenu open = alles ver naar achteren;
 * menu dicht of venster focussen = vloeiend terug naar leesbare positie.
 * Mobiel: .layout-mobile-stack houdt vlakke panelen (geen 3D hier).
 */
@media (min-width: 901px) {
  body:not(.layout-mobile-stack) #windows-layer {
    perspective: 1680px;
    perspective-origin: 50% 36%;
  }

  body:not(.layout-mobile-stack) .win98-window:not(.minimized) {
    transform-origin: 50% 42%;
    transition:
      transform 0.52s cubic-bezier(0.25, 0.88, 0.32, 1),
      opacity 0.45s cubic-bezier(0.25, 0.88, 0.32, 1),
      box-shadow 0.15s ease-out;
    backface-visibility: hidden;
  }

  body:not(.layout-mobile-stack) .win98-window.focused {
    transform: translate3d(0, 0, 48px) scale(1);
    opacity: 1;
  }

  body:not(.layout-mobile-stack) .win98-window:not(.focused):not(.minimized) {
    transform: translate3d(0, 0, -48px) scale(0.994);
    opacity: 0.91;
  }

  body.start-menu-open:not(.layout-mobile-stack) .win98-window:not(.minimized) {
    transform: translate3d(0, 0, -180px) scale(0.97);
    opacity: 0.74;
  }

  /** Alleen tijdens ←/→ tussen hoofdstukken: zachte beweging van formaat en positie. */
  body:not(.layout-mobile-stack) .win98-window.win98-geometry-transition:not(.minimized) {
    transition:
      transform 0.52s cubic-bezier(0.25, 0.88, 0.32, 1),
      opacity 0.45s cubic-bezier(0.25, 0.88, 0.32, 1),
      box-shadow 0.15s ease-out,
      width 0.72s cubic-bezier(0.2, 0.75, 0.25, 1),
      height 0.72s cubic-bezier(0.2, 0.75, 0.25, 1),
      left 0.72s cubic-bezier(0.2, 0.75, 0.25, 1),
      top 0.72s cubic-bezier(0.2, 0.75, 0.25, 1);
  }
}

@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  body:not(.layout-mobile-stack) #windows-layer {
    perspective: none;
  }
  body:not(.layout-mobile-stack) .win98-window:not(.minimized) {
    transition-duration: 0.01ms;
  }
  body:not(.layout-mobile-stack) .win98-window:not(.minimized),
  body.start-menu-open:not(.layout-mobile-stack) .win98-window:not(.minimized) {
    transform: none;
    opacity: 1;
  }

  body:not(.layout-mobile-stack) .win98-window.win98-geometry-transition:not(.minimized) {
    transition:
      transform 0.01ms,
      opacity 0.01ms,
      box-shadow 0.01ms,
      width 0.01ms,
      height 0.01ms,
      left 0.01ms,
      top 0.01ms;
  }

  body:not(.layout-mobile-stack) .hero-photo img,
  body:not(.layout-mobile-stack) .hero-photo img:hover {
    transition: none;
    transform: none;
    box-shadow: none;
  }
}

/* === TITLEBAR === */
.window-titlebar {
  height: 34px;
  background: linear-gradient(180deg, #fff 0%, #f4f4f6 100%);
  display: flex; align-items: center;
  padding: 0 10px;
  gap: 8px;
  cursor: move; flex-shrink: 0;
  user-select: none;
  border-bottom: 1px solid var(--border);
}

.window-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #000;
  pointer-events: none;
}
.window-title-icon .ui-icon { width: 16px; height: 16px; }
.window-title-text {
  flex: 1;
  font-size: var(--fs-ui); font-weight: 500;
  color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}

.window-titlebar .win-minimize {
  flex-shrink: 0;
  width: 22px;
  height: 18px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: #fff;
  cursor: pointer;
  position: relative;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.06);
}
.window-titlebar .win-minimize::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 5px;
  height: 0;
  border-bottom: 1px solid #000;
}
.window-titlebar .win-minimize:hover {
  background: #f0f0f2;
}
.window-titlebar .win-minimize:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* === WINDOW BODY === */
.window-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: var(--pad-window-block) var(--pad-window-inline);
  user-select: text;
  scrollbar-width: thin;
  scrollbar-color: #000 #fff;
  background: linear-gradient(165deg, #f7f8fa 0%, #fff 42%, #fff 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.window-body::-webkit-scrollbar { width: 6px; }
.window-body::-webkit-scrollbar-thumb { background: #000; border-radius: 3px; }

/* Gefocust venster (desktop): vaste verticale schuifbalk + lichte inset-schaduw als er inhoud boven/onder buiten beeld is.
   Track + appearance reset: overlay-scrollbars (o.a. macOS Chrome/Safari) blijven anders vaak onzichtbaar tot je scrollt. */
@media (min-width: 901px) {
  body:not(.layout-mobile-stack) .win98-window.focused .window-body {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: #1a1a1a #dedee2;
  }
  body:not(.layout-mobile-stack) .win98-window.focused .window-body::-webkit-scrollbar {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
  }
  body:not(.layout-mobile-stack) .win98-window.focused .window-body::-webkit-scrollbar-track {
    background: #dedee2;
    border-left: 1px solid rgba(0, 0, 0, 0.12);
  }
  body:not(.layout-mobile-stack) .win98-window.focused .window-body::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 5px;
    border: 2px solid #dedee2;
  }
  body:not(.layout-mobile-stack) .win98-window.focused .window-body::-webkit-scrollbar-thumb:hover {
    background: #000;
  }

  body:not(.layout-mobile-stack) .win98-window.focused[data-id="contact"] .gemini-chat-log {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: #1a1a1a #dedee2;
  }
  body:not(.layout-mobile-stack) .win98-window.focused[data-id="contact"] .gemini-chat-log::-webkit-scrollbar {
    -webkit-appearance: none;
    appearance: none;
    width: 11px;
  }
  body:not(.layout-mobile-stack) .win98-window.focused[data-id="contact"] .gemini-chat-log::-webkit-scrollbar-track {
    background: #dedee2;
    border-left: 1px solid rgba(0, 0, 0, 0.12);
  }
  body:not(.layout-mobile-stack) .win98-window.focused[data-id="contact"] .gemini-chat-log::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 5px;
    border: 2px solid #dedee2;
  }

  body:not(.layout-mobile-stack) .win98-window.focused .window-body.cv-scroll-hint-top,
  body:not(.layout-mobile-stack) .win98-window.focused .gemini-chat-log.cv-scroll-hint-top {
    box-shadow: inset 0 10px 10px -10px rgba(0, 0, 0, 0.16);
  }

  body:not(.layout-mobile-stack) .win98-window.focused .window-body.cv-scroll-hint-bottom,
  body:not(.layout-mobile-stack) .win98-window.focused .gemini-chat-log.cv-scroll-hint-bottom {
    box-shadow: inset 0 -10px 10px -10px rgba(0, 0, 0, 0.16);
  }

  body:not(.layout-mobile-stack) .win98-window.focused .window-body.cv-scroll-hint-top.cv-scroll-hint-bottom,
  body:not(.layout-mobile-stack) .win98-window.focused .gemini-chat-log.cv-scroll-hint-top.cv-scroll-hint-bottom {
    box-shadow:
      inset 0 10px 10px -10px rgba(0, 0, 0, 0.14),
      inset 0 -10px 10px -10px rgba(0, 0, 0, 0.14);
  }
}

/* === CONTENT TYPOGRAPHY === */
.window-body h1 {
  font-family: var(--font);
  font-size: var(--fs-h1); font-weight: 300;
  line-height: 1.22; margin-bottom: var(--space-block); color: #000;
  text-wrap: balance;
}
.window-body h2 {
  font-size: var(--fs-h2); font-weight: 600;
  color: #000; font-family: var(--font);
  letter-spacing: 0.01em; line-height: 1.3;
  margin-bottom: 1rem; margin-top: 0.25rem;
}
.window-body p {
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  font-optical-sizing: auto;
  line-height: 1.72;
  margin-bottom: var(--space-paragraph);
  color: #000;
  user-select: text;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.window-body ul { list-style: none; padding: 0; margin-bottom: var(--space-block); }
.window-body ul li {
  padding: 0.45em 0 0.45em 1.15em; position: relative;
  color: #000;
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  font-optical-sizing: auto;
  line-height: 1.68;
  user-select: text;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
.window-body ul li::before {
  content: '›'; position: absolute; left: 0;
  color: var(--accent); font-size: var(--fs-reading); line-height: 1.35;
}
.window-body blockquote {
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  line-height: 1.68;
  border-left: 2px solid var(--accent);
  padding: 0.35em 0 0.35em 1rem; margin: var(--space-block) 0;
  color: #000; font-style: italic; user-select: text;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.window-body a { color: #000; text-decoration: underline; text-underline-offset: 0.2em; }
.window-body a:hover { text-decoration: underline; }
.window-body a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}

.window-body .label {
  display: block; font-size: var(--fs-label); color: #000;
  font-family: var(--font); font-weight: 600; letter-spacing: 0.02em;
  margin: 1.125rem 0 var(--space-tight);
}
.window-body .label:first-child { margin-top: 0; }

.window-body .tip-intro {
  font-size: var(--fs-caption); line-height: 1.55; color: #000;
  margin: 0 0 12px; opacity: 0.92;
}
.window-body .tip-rotator {
  min-height: 140px;
}
.window-body .tip-rotator-inner {
  transition: opacity 0.35s ease;
  opacity: 0.35;
}
.window-body .tip-rotator-inner--in {
  opacity: 1;
}
.window-body .tip-text {
  font-family: var(--font-reading);
  font-size: var(--fs-reading-lg); font-weight: 400;
  color: #000; line-height: 1.7; padding: 6px 0;
  margin: 0;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.window-body .tip-type {
  display: inline-block; font-size: var(--fs-small);
  font-family: var(--font-mono); color: var(--accent);
  border: 1px solid #000;
  padding: 2px 8px; border-radius: 3px; margin-bottom: 12px;
}
.window-body .tip-checklist-lead {
  font-family: var(--font-reading);
  font-size: var(--fs-reading); font-weight: 600; margin: 0 0 8px;
  line-height: 1.5; color: #000;
}
.window-body .tip-checklist {
  margin: 0; padding-left: 1.15em;
  font-family: var(--font-reading);
  font-size: var(--fs-reading); font-weight: 400;
  line-height: 1.65; color: #000;
}
.window-body .tip-checklist li { margin: 4px 0; }
.window-body .tip-controls {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 14px; padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.window-body .tip-controls button {
  background: var(--surface-0); border: 1px solid #000;
  font-family: var(--font-mono); font-size: var(--fs-small);
  padding: 4px 10px; cursor: pointer; color: #000;
  border-radius: 3px;
}
.window-body .tip-controls button:hover {
  background: #fff; outline: 1px solid var(--accent);
}
.window-body .tip-controls button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.window-body .tip-counter {
  font-family: var(--font-mono); font-size: var(--fs-small);
  color: var(--text-dim); flex: 1; text-align: center;
}
.window-body .contact-line {
  display: block; padding: 6px 0;
  font-family: var(--font-mono); font-size: var(--fs-ui);
  color: #000; user-select: text;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.window-body .contact-line--text {
  text-decoration: none;
  cursor: default;
}
.contact-form-extra {
  margin-top: 16px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: calc(var(--radius) - 2px);
  background: linear-gradient(165deg, #f4f5f8 0%, #fafbfc 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-form-extra .label { margin-top: 6px; }
.contact-form-extra .label:first-child { margin-top: 0; }
.contact-form-extra-note {
  margin: 0 0 4px;
  font-family: var(--font-reading);
  font-size: 1rem;
  line-height: 1.62;
  color: #000;
}
.window-body .separator { border: none; border-top: 1px solid #000; margin: 12px 0; }
.window-body .client-list { color: #000; font-size: var(--fs-caption); font-family: var(--font-mono); }

.window-body .window-crosslink,
#list-mode .window-crosslink {
  margin: 16px 0 0;
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  line-height: 1.65;
  color: var(--text);
}
.window-body .cross-window-link,
#list-mode .cross-window-link {
  display: inline;
  margin: 0; padding: 0;
  border: none; background: none;
  font: inherit; color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  user-select: text;
}
.window-body .cross-window-link:hover,
#list-mode .cross-window-link:hover {
  text-decoration-thickness: 2px;
}
.window-body .cross-window-link:focus-visible,
#list-mode .cross-window-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}

.window-body .window-cta,
#list-mode .window-cta {
  margin: 16px 0 0;
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  line-height: 1.65;
  color: var(--text);
  user-select: text;
}
.window-body .window-cta--hero {
  margin-top: 10px;
}
.hero-contact-hint {
  margin-top: 6px;
  margin-bottom: 0;
  font-size: var(--fs-caption);
  line-height: 1.45;
  color: #000;
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  max-width: 32em;
}
.hero-contact-hint strong {
  font-weight: 600;
}
.hero-copy .window-cta {
  user-select: text;
}

/* === HERO (wisse.paardekooper) === */
.hero-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 18px;
}
.hero-copy {
  flex: 1;
  min-width: 0;
}
.hero-copy .label:last-child {
  margin-bottom: 0;
  text-decoration: none;
  font-weight: 500;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.hero-photo {
  margin: 0;
  flex-shrink: 0;
  align-self: flex-start;
  display: flex;
}
.hero-photo img {
  display: block;
  width: 168px;
  height: 248px;
  object-fit: cover;
  object-position: 72% 32%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
  transition: transform 1.25s cubic-bezier(0.45, 0, 0.55, 1);
}

.hero-kicker {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #000;
  padding-left: 10px;
  border-left: 2px solid #000;
  line-height: 1.4;
  max-width: max-content;
}

/* Desktop: geen dubbele contact-CTA als het contactvenster al zichtbaar is */
@media (min-width: 901px) {
  body.cv-contact-open .hero-contact-cta {
    display: none;
  }
}

.hero-contact-cta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem 0.65rem;
  max-width: 100%;
  width: fit-content;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(248, 249, 251, 0.85);
  box-shadow: none;
}

.hero-contact-cta-lead {
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1.3;
  color: #000;
}

.hero-contact-open-btn {
  margin: 0;
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  cursor: pointer;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hero-contact-open-btn:hover {
  background: #fafafa;
  border-color: rgba(0, 0, 0, 0.4);
}

.hero-contact-open-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.hero-contact-cta-tail {
  flex-basis: 100%;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  line-height: 1.4;
  letter-spacing: 0.02em;
  color: #000;
  opacity: 0.72;
  max-width: 18em;
}

.hero-paths {
  margin-top: 0.85rem;
  margin-bottom: 0.35rem;
  padding: 0.5rem 0.75rem 0.65rem;
  max-width: 100%;
  width: fit-content;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.65);
}
.hero-paths-lead {
  margin: 0.15rem 0 0.5rem;
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1.35;
  color: #000;
}
.hero-paths-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.6rem;
  align-items: stretch;
}
.hero-path-btn {
  margin: 0;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: #000;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
  line-height: 1.35;
  max-width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.hero-path-btn:hover {
  background: #fafafa;
  border-color: rgba(0, 0, 0, 0.45);
}
.hero-path-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.window-path {
  margin: 0 0 1rem;
  padding: 0.4rem 0 0.65rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.window-path-inline {
  margin: 0.35rem 0 0;
  font-size: var(--fs-reading);
  line-height: 1.6;
  color: var(--text);
}

/* === WINDOW NAV === */
.window-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  gap: var(--space-tight);
  border-top: 1px solid var(--border);
  background: var(--surface-0);
  flex-shrink: 0;
}
.window-nav button {
  background: none; border: none;
  color: var(--text-dim); font-size: var(--fs-ui);
  font-family: var(--font); cursor: pointer;
  padding: 0.5em 0.65em; border-radius: 4px;
  min-height: 2.5rem;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 46%;
}
.window-nav button:hover { color: #000; background: #fff; outline: 1px solid #000; }
.window-nav button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.window-nav button .ui-icon {
  display: inline-block;
  vertical-align: middle;
  width: 14px;
  height: 14px;
  margin-right: 4px;
}
.window-nav--hero-peers {
  justify-content: stretch;
  gap: 10px;
}

/* Hero: lichte zoom op hover (binnen scroll/clipping; zelfde vensterkader als andere ramen) */
@media (min-width: 901px) {
  body:not(.layout-mobile-stack) .hero-layout {
    position: relative;
  }
  body:not(.layout-mobile-stack) .hero-copy {
    position: relative;
    z-index: 0;
  }
  body:not(.layout-mobile-stack) .hero-photo img {
    position: relative;
    z-index: 1;
  }
  body:not(.layout-mobile-stack) .hero-photo img:hover {
    z-index: 2;
    transform: scale(1.18);
    transform-origin: 50% 20%;
  }
}

/* Hero: compacter venster + duidelijkere rand naar Zakelijk/Particulier (desktop) */
body:not(.layout-mobile-stack) .win98-window[data-id="hero"] .window-body {
  padding-bottom: 0.875rem;
}
body:not(.layout-mobile-stack) .win98-window[data-id="hero"] .window-nav--hero-peers {
  border-top-width: 2px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.window-nav--hero-peers .nav-peer {
  flex: 1;
  max-width: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.nav-next { text-align: right; }

.window-nav--empty {
  display: none;
}

/* === RESIZE HANDLE === */
.resize-handle {
  position: absolute; right: 2px; bottom: 2px;
  width: 14px; height: 14px;
  cursor: se-resize; color: #000; font-size: var(--fs-small);
  display: flex; align-items: center; justify-content: center;
  user-select: none; pointer-events: all;
}

/**
 * Desktop: weerstand aan scrollrand (rubberband-gevoel): zachte rand + pijl die meebeweegt
 * met de “trek”, plus sectietitel (geen horizontale voortgangsbalk).
 */
.cv-rail-resist-hud {
  position: absolute;
  left: 1px;
  right: 1px;
  top: 34px;
  bottom: 48px;
  pointer-events: none;
  z-index: 8;
  overflow: hidden;
}
.cv-rail-pull {
  --cv-rail-p: 0;
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.16s ease,
    visibility 0.16s;
}
.cv-rail-pull.is-active {
  opacity: 1;
  visibility: visible;
}
.cv-rail-pull--top {
  top: 0;
  height: 46%;
}
.cv-rail-pull--bottom {
  bottom: 0;
  height: 46%;
}
.cv-rail-pull-wash {
  position: absolute;
  inset: 0;
  opacity: clamp(0, calc(var(--cv-rail-p) * 1.05), 1);
  transition: opacity 0.08s ease-out;
}
.cv-rail-pull--bottom .cv-rail-pull-wash {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.11) 0%,
    rgba(0, 0, 0, 0.035) 42%,
    transparent 100%
  );
}
.cv-rail-pull--top .cv-rail-pull-wash {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.11) 0%,
    rgba(0, 0, 0, 0.035) 42%,
    transparent 100%
  );
}
.cv-rail-pull-mid {
  position: absolute;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  max-width: calc(100% - 1.5rem);
  text-align: center;
}
.cv-rail-pull--bottom .cv-rail-pull-mid {
  bottom: 14%;
  transform: translate(
    -50%,
    calc(-1 * (1 - var(--cv-rail-p)) * 22px + var(--cv-rail-p) * 6px)
  );
  transition: transform 0.07s ease-out;
}
.cv-rail-pull--top .cv-rail-pull-mid {
  top: 14%;
  transform: translate(
    -50%,
    calc((1 - var(--cv-rail-p)) * 22px - var(--cv-rail-p) * 6px)
  );
  transition: transform 0.07s ease-out;
}
.cv-rail-pull-arrow {
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  color: rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  opacity: calc(0.35 + var(--cv-rail-p) * 0.65);
  transition: opacity 0.08s ease-out;
}
.cv-rail-pull-title {
  font-family: var(--font);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1.25;
  color: rgba(0, 0, 0, 0.5);
  text-wrap: balance;
  opacity: calc(min(1, max(0, (var(--cv-rail-p) - 0.07) * 1.35)));
  transition: opacity 0.1s ease-out;
}
body.layout-mobile-stack .cv-rail-resist-hud {
  display: none !important;
}
@media (max-width: 900px) {
  .cv-rail-resist-hud {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cv-rail-pull,
  .cv-rail-pull-wash,
  .cv-rail-pull-mid,
  .cv-rail-pull-arrow,
  .cv-rail-pull-title {
    transition-duration: 0.01ms;
  }
}

/* === TASKBAR (verborgen; vensters via desktop-iconen + zwevende lijstknop) === */
#taskbar {
  position: fixed; bottom: 0; left: 0;
  width: 100%; height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  padding: 0; margin: 0; border: none;
  z-index: -1;
}

/* Lijstweergave-toggle: desktop linksonder (geen overlap met iconen); mobiel: zie media query */
.view-toggle-float {
  position: fixed;
  z-index: 2000;
  top: auto;
  bottom: max(14px, env(safe-area-inset-bottom, 14px));
  left: max(14px, env(safe-area-inset-left, 14px));
  right: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-0);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, border-color 0.15s;
}
.view-toggle-float:hover {
  background: #fff;
  outline: 1px solid #000;
  outline-offset: -1px;
}
.view-toggle-float.active {
  background: #000;
  border-color: #000;
  color: #fff;
}
.view-toggle-float:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Mobiel: hamburger + drawer-backdrop (desktop: verborgen) */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 2550;
  top: max(8px, env(safe-area-inset-top, 8px));
  left: max(8px, env(safe-area-inset-left, 8px));
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  background: var(--surface-0);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, border-color 0.15s;
}
.mobile-nav-toggle:hover {
  background: #fff;
  outline: 1px solid #000;
  outline-offset: -1px;
}
.mobile-nav-toggle:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.mobile-nav-toggle .ui-icon {
  width: 22px;
  height: 22px;
  margin: 0 auto;
}
.mobile-nav-toggle-x {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2450;
  background: rgba(0, 0, 0, 0.4);
  -webkit-tap-highlight-color: transparent;
}

/* Alleen mobiel: vast contact-icoon rechtsboven (desktop: verborgen) */
.mobile-contact-float {
  display: none;
}
.mobile-contact-float .ui-icon {
  width: 22px;
  height: 22px;
  margin: 0 auto;
}

.taskbar-btn {
  height: 28px; padding: 0 12px;
  background: transparent;
  color: var(--text);
  border: none; border-radius: 5px;
  font-size: var(--fs-ui); font-family: var(--font);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.taskbar-btn:hover  { background: #fff; outline: 1px solid #000; }
.taskbar-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.taskbar-btn.active { background: #000; color: #fff; }
#menu-btn { font-weight: 500; }

#taskbar-windows {
  flex: 1; display: flex; gap: 3px;
  overflow-x: auto; scrollbar-width: none; min-width: 0;
}
#taskbar-windows::-webkit-scrollbar { display: none; }

.taskbar-window-btn {
  height: 28px; max-width: 170px; min-width: 80px;
  padding: 0 10px; display: flex; align-items: center;
  gap: 6px; overflow: hidden;
  font-size: var(--fs-ui); font-family: var(--font);
  background: var(--surface-1); color: var(--text);
  border: 1px solid var(--border); border-radius: 5px;
  cursor: pointer; flex-shrink: 0;
}
.taskbar-window-btn:hover { background: #fff; outline: 1px solid #000; }
.taskbar-window-btn span.tb-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; text-align: left; pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.taskbar-window-btn .tb-label .ui-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: inherit;
}
.taskbar-window-btn .tb-close {
  font-size: var(--fs-caption); color: #000; flex-shrink: 0; padding: 1px 3px;
}
.taskbar-window-btn .tb-close:hover { color: #000; text-decoration: underline; }
.taskbar-window-btn.focused {
  background: #000;
  color: #fff;
  border-color: #000;
}
.taskbar-window-btn.focused span.tb-label { color: #fff; }
.taskbar-window-btn.focused .tb-close { color: #fff; }
.taskbar-window-btn:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

#taskbar-right {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0; padding-left: 8px;
  border-left: 1px solid var(--border); margin-left: 4px;
}
#clock {
  font-size: var(--fs-ui); font-family: var(--font);
  color: #000; min-width: 38px; text-align: right;
}

/* === START MENU === */
#start-menu {
  position: fixed; bottom: var(--taskbar-h); left: 0;
  width: 220px;
  background: var(--surface-0);
  z-index: 2000;
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
#start-menu ul { list-style: none; padding: 8px 0; }
#start-menu li {
  padding: 0.55rem 1rem; cursor: pointer;
  font-size: 1rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
}
#start-menu li .menu-item-label { overflow: hidden; text-overflow: ellipsis; }
#start-menu li:hover { background: #fff; outline: 1px solid #000; outline-offset: -1px; }
#start-menu li:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -2px;
  background: #fff;
}
#start-menu li.menu-separator {
  display: block;
  height: 1px; background: var(--border);
  padding: 0; margin: 4px 8px; pointer-events: none;
}

/* === DESKTOP HINT === */
#desktop-hint {
  position: fixed;
  bottom: calc(var(--taskbar-h) + 12px); right: 14px;
  font-size: var(--fs-caption); font-family: var(--font-mono);
  color: #000; pointer-events: none; z-index: 2;
  letter-spacing: 0.5px;
  transition: opacity 0.6s;
}
#desktop-hint.hidden { opacity: 0; }

/* === LIST MODE === */
#list-mode {
  position: fixed; inset: 0; bottom: var(--taskbar-h);
  overflow-y: auto; z-index: var(--z-list-mode);
  padding: 2.75rem 1.75rem;
  padding-bottom: max(56px, env(safe-area-inset-bottom, 40px));
  background: var(--bg); user-select: text;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#list-mode .list-section { max-width: 640px; margin: 0 auto 3.25rem; }
#list-mode .list-section h2 { font-size: var(--fs-h2); font-family: var(--font); font-weight: 600; color: #000; letter-spacing: 0.01em; margin-bottom: 1rem; margin-top: 0.25rem; }
#list-mode .list-section h1 { font-family: var(--font); font-size: var(--fs-h1); font-weight: 300; margin-bottom: var(--space-block); line-height: 1.22; color: #000; text-wrap: balance; }
#list-mode .list-section p {
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  font-optical-sizing: auto;
  color: #000;
  line-height: 1.72;
  margin-bottom: var(--space-paragraph);
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
#list-mode .list-section ul { list-style: none; padding: 0; }
#list-mode .list-section ul li {
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  font-optical-sizing: auto;
  padding: 0.45em 0 0.45em 1.15em; position: relative; color: #000; line-height: 1.68;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}
#list-mode .list-section ul li::before { content: '›'; position: absolute; left: 0; color: var(--accent); font-size: var(--fs-reading); line-height: 1.35; }
#list-mode .list-section blockquote {
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  line-height: 1.68;
  border-left: 2px solid var(--accent); padding: 0.35em 0 0.35em 1rem; color: #000; font-style: italic; margin: var(--space-block) 0;
  hyphens: auto;
  -webkit-hyphens: auto;
}
#list-mode .list-section a { color: #000; text-decoration: underline; text-underline-offset: 0.2em; }
#list-mode .list-section a:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: 2px;
}
#list-mode hr { border: none; border-top: 1px solid #000; margin: 3rem auto; max-width: 640px; }

/* === contact (formulier + thread): zelfde ritme als andere vensters === */
.gemini-chat {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex: 1;
  margin-top: 0;
  overflow-wrap: anywhere;
}

.gemini-chat-lead {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  line-height: 1.68;
  color: #000;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #f3f4f7 0%, #f9fafb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  hyphens: auto;
  -webkit-hyphens: auto;
}

.gemini-composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gemini-composer-actions--full {
  width: 100%;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.gemini-msg--contact-lead,
.gemini-msg--contact-tel {
  margin: 0;
}
.gemini-msg--contact .gemini-contact-mailto,
.gemini-msg--contact .gemini-msg--contact-tel a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.gemini-msg--contact .gemini-contact-mailto:hover,
.gemini-msg--contact .gemini-msg--contact-tel a:hover {
  text-decoration-thickness: 2px;
}
.chat-invoer-tip {
  font-size: var(--fs-caption);
  line-height: 1.45;
  color: #000;
  font-family: var(--font-mono);
  margin: 4px 0 8px;
  max-width: 100%;
  overflow-wrap: anywhere;
}
/* contact: body als kolom zodat chat-log ruimte krijgt */
/* flex-basis: 0 + min-height: 0 zodat de thread krimpt i.p.v. over composer/hele layout te schilderen */
.gemini-thread {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.gemini-thread[hidden] {
  display: none !important;
}
.gemini-thread > .label {
  flex-shrink: 0;
}

.win98-window[data-id="contact"] .window-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.win98-window[data-id="contact"] .gemini-chat {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.win98-window[data-id="contact"] .gemini-thread {
  flex: 1 1 0;
  min-height: 0;
}
.win98-window[data-id="contact"] .gemini-chat-log {
  flex: 1 1 0;
  min-height: 120px;
  max-height: none;
}

.gemini-chat-log {
  flex: 1 1 0;
  min-height: 120px;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 10px 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #000;
  border-radius: 3px;
  background: #fafafa;
  margin-bottom: 0;
  -webkit-overflow-scrolling: touch;
}

/* Composer en uitleg niet laten krimpen; blijven onder de scrollende thread */
.win98-window[data-id="contact"] .gemini-chat > :not(.gemini-thread) {
  flex-shrink: 0;
}

.contact-reply-mount {
  flex-shrink: 0;
  margin-top: 10px;
}
.contact-reply-mount:empty {
  display: none;
}

.gemini-msg {
  position: relative;
  max-width: min(92%, 38rem);
  font-family: var(--font-reading);
  font-size: var(--fs-reading);
  line-height: 1.68;
  user-select: text;
  hyphens: auto;
  -webkit-hyphens: auto;
}
.gemini-msg--user {
  align-self: flex-end;
  margin-left: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.gemini-bubble--user {
  padding: 10px 14px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #000;
  border: 1px solid #000;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 1px 1px 0 #000;
}
.gemini-msg--assistant {
  align-self: flex-start;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.gemini-bubble--assistant {
  padding: 10px 14px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
  border: 1px solid #000;
  color: #000;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 1px 1px 0 #000;
}
.gemini-msg--contact .gemini-bubble--assistant {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.gemini-input {
  width: 100%;
  display: block;
  padding: 0.55rem 0.25rem 0.65rem 1rem;
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-reading);
  line-height: 1.65;
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
  border: none;
  border-left: 2px solid #000;
  border-radius: 0 3px 3px 0;
  resize: vertical;
  min-height: 5.25rem;
  max-height: 220px;
  user-select: text;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  -webkit-appearance: none;
  appearance: none;
}
.gemini-input:focus {
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.gemini-input:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}
.gemini-input::placeholder {
  color: #000;
  opacity: 0.35;
}
.gemini-input--single {
  min-height: 0;
  height: auto;
  resize: none;
  padding-top: 8px;
  padding-bottom: 8px;
}
.gemini-input--warn {
  animation: gemini-shake 0.35s ease;
  border-left-color: #000;
  border-left-width: 4px;
}
@keyframes gemini-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.gemini-composer-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem 1rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
  width: 100%;
  min-width: 0;
}
.gemini-send {
  padding: 0.55rem 1.25rem;
  min-height: 2.75rem;
  font-size: var(--fs-ui);
  cursor: pointer;
  background: #000;
  border: 1px solid #000;
  border-radius: 3px;
  color: #fff;
  font-family: var(--font);
}
.gemini-send:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
.gemini-send:hover:not(:disabled) {
  background: #fff;
  color: #000;
}
.gemini-send:disabled {
  opacity: 0.4;
  cursor: wait;
}

/* === UTILS === */
.hidden { display: none !important; }

/* Alleen mobiele stack-layout; op desktop staat de knop in #desktop maar blijft verborgen */
.mobile-rail-toggle {
  display: none;
}

/* === TABLET / MOBILE: één kolom, iconenrail links, inhoud onder elkaar scrollbaar === */
@media (max-width: 900px) {
  html { font-size: 16px; }

  /* Iets vloeiendere witruimte op smalle schermen zonder layout te breken */
  :root {
    --pad-window-inline: clamp(0.8125rem, 3.6vw, 1.25rem);
    --pad-window-block: clamp(0.9375rem, 2.6vw, 1.125rem);
  }

  body.layout-mobile-stack {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overflow-x: clip;
  }

  body.layout-mobile-stack .mobile-nav-toggle,
  body.layout-mobile-stack .mobile-nav-backdrop,
  body.layout-mobile-stack .mobile-contact-float,
  body.layout-mobile-stack .view-toggle-float,
  body.layout-mobile-stack #taskbar,
  body.layout-mobile-stack #desktop-hint {
    display: none !important;
  }

  /* Mobiel: standaard smalle rail (alleen iconen); .mobile-rail-expanded = labels + breder */
  body.layout-mobile-stack #desktop {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
    position: relative;
    transform: none;
    width: 56px;
    min-width: 52px;
    max-width: 56px;
    flex-shrink: 0;
    height: 100dvh;
    max-height: 100dvh;
    padding: max(6px, env(safe-area-inset-top, 6px)) 6px max(6px, env(safe-area-inset-bottom, 6px)) max(6px, env(safe-area-inset-left, 6px));
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    z-index: 5;
    pointer-events: auto;
    background: var(--surface-0);
    border-right: 1px solid var(--border);
    transition: width 0.22s ease, max-width 0.22s ease, min-width 0.22s ease;
  }

  body.layout-mobile-stack.mobile-rail-expanded #desktop {
    align-items: stretch;
    width: min(300px, calc(100vw - 16px));
    min-width: min(200px, calc(100vw - 16px));
    max-width: none;
    padding: max(6px, env(safe-area-inset-top, 6px)) 12px max(6px, env(safe-area-inset-bottom, 6px)) max(8px, env(safe-area-inset-left, 8px));
  }

  body.layout-mobile-stack .desktop-icon {
    position: relative;
    width: 100%;
    flex-shrink: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 6px 4px;
    gap: 0;
    touch-action: manipulation;
  }

  body.layout-mobile-stack.mobile-rail-expanded .desktop-icon {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    padding: 6px 8px;
    gap: 8px;
  }

  body.layout-mobile-stack .desktop-icon > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
  }

  body.layout-mobile-stack.mobile-rail-expanded .desktop-icon > span {
    position: static;
    flex: 1;
    min-width: 0;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    clip: auto;
    white-space: nowrap;
    border: 0;
    font-size: var(--fs-caption);
    line-height: 1.25;
    text-align: left;
    pointer-events: none;
  }

  body:not(.layout-mobile-stack) .mobile-rail-toggle {
    display: none !important;
  }

  .mobile-rail-toggle {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 100%;
    min-height: 44px;
    margin-top: auto;
    padding: 8px 4px max(8px, env(safe-area-inset-bottom, 8px));
    border: none;
    border-top: 1px solid var(--border);
    background: var(--surface-0);
    color: var(--text);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
  }

  body.layout-mobile-stack .mobile-rail-toggle {
    display: flex;
  }

  .mobile-rail-toggle:hover {
    background: #fff;
  }

  .mobile-rail-toggle:focus-visible {
    outline: var(--focus-ring);
    outline-offset: -2px;
    z-index: 1;
  }

  .mobile-rail-toggle__chev {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 500;
    font-family: var(--font);
  }

  .mobile-rail-toggle__chev--expand::before {
    content: '››';
    letter-spacing: -0.2em;
  }

  .mobile-rail-toggle__chev--collapse::before {
    content: '‹‹';
    letter-spacing: -0.2em;
  }

  body.layout-mobile-stack:not(.mobile-rail-expanded) .mobile-rail-toggle__chev--collapse {
    display: none;
  }

  body.layout-mobile-stack.mobile-rail-expanded .mobile-rail-toggle__chev--expand {
    display: none;
  }

  body.layout-mobile-stack .icon-img .ui-icon {
    width: 26px;
    height: 26px;
  }

  body.layout-mobile-stack .icon-img .cv-hero-avatar {
    width: 26px;
    height: 26px;
  }

  body.layout-mobile-stack .main-scroll {
    position: relative;
    flex: 1;
    min-width: 0;
    min-height: 0;
    height: 100dvh;
    max-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    touch-action: pan-y pinch-zoom;
    pointer-events: auto;
    z-index: 1;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
  }

  body.layout-mobile-stack #windows-layer {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 2.8vw, 16px);
    padding: clamp(8px, 2.2vw, 12px) clamp(8px, 3vw, 14px) max(24px, env(safe-area-inset-bottom, 24px)) max(6px, env(safe-area-inset-right, 8px));
    min-height: min-content;
    pointer-events: auto;
  }

  body.layout-mobile-stack .win98-window {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0;
    flex-shrink: 0;
    scroll-margin-top: 8px;
    border-radius: var(--radius);
    /* Geen transform → border tekent hoeken goed; voorkomt dubbele lijn (ring + harde schaduw). */
    border: 1px solid var(--border);
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.06);
  }

  body.layout-mobile-stack .win98-window.focused {
    border-width: 2px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.06);
  }

  body.layout-mobile-stack .win98-window.minimized {
    display: none !important;
  }

  body.layout-mobile-stack .win98-window[data-id="contact"] {
    min-height: min(72dvh, 560px);
  }

  body.layout-mobile-stack .window-nav:not(.window-nav--hero-peers),
  body.layout-mobile-stack .resize-handle,
  body.layout-mobile-stack .window-titlebar .win-minimize {
    display: none !important;
  }

  body.layout-mobile-stack .win98-window[data-id="hero"] .window-nav--hero-peers {
    display: flex !important;
  }

  body.layout-mobile-stack .window-nav--hero-peers .nav-peer {
    touch-action: manipulation;
    min-height: 44px;
  }

  /* Eén portret in hero-inhoud; geen dubbele mini-foto in titelbalk (rail heeft al icoon). */
  body.layout-mobile-stack .win98-window[data-id="hero"] .window-title-icon {
    display: none !important;
  }

  .window-body {
    padding: var(--pad-window-block) var(--pad-window-inline) calc(var(--pad-window-block) + 0.25rem);
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }

  .window-titlebar {
    padding-left: max(10px, env(safe-area-inset-left, 10px));
    padding-right: max(10px, env(safe-area-inset-right, 10px));
  }

  .window-body h1 { font-size: clamp(1.7rem, 6vw + 0.55rem, var(--fs-h1)); }
  .window-body h2 { font-size: clamp(1.125rem, 2.4vw + 0.85rem, var(--fs-h2)); }
  #list-mode .list-section h1 { font-size: clamp(1.7rem, 6vw + 0.55rem, var(--fs-h1)); }
  #list-mode .list-section h2 { font-size: clamp(1.125rem, 2.4vw + 0.85rem, var(--fs-h2)); }
  .window-body p {
    font-size: clamp(1rem, 0.2vw + 0.95rem, var(--fs-reading));
    line-height: 1.72;
  }
  .window-body ul li {
    font-size: clamp(1rem, 0.2vw + 0.95rem, var(--fs-reading));
    line-height: 1.7;
  }

  .hero-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero-copy {
    order: 2;
    width: 100%;
  }
  .hero-photo {
    order: 1;
    align-self: center;
  }
  .hero-photo img {
    width: min(220px, 70vw);
    height: auto;
    min-height: 0;
    max-height: 280px;
    aspect-ratio: 1;
    object-position: 70% 30%;
  }

  .hero-contact-cta {
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }

  .hero-contact-cta-tail {
    max-width: 100%;
  }

  .hero-contact-open-btn {
    align-self: center;
  }

  .hero-paths {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%;
    text-align: left;
  }
  .hero-paths-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-path-btn {
    text-align: center;
  }

  .hero-kicker {
    margin-left: auto;
    margin-right: auto;
  }

  .gemini-chat-log {
    min-height: min(180px, 28dvh);
    max-height: none;
    flex: 1 1 0;
  }

  .win98-window[data-id="contact"] .gemini-chat-log {
    min-height: min(200px, 30dvh);
    max-height: none;
    flex: 1 1 0;
  }

  .gemini-input {
    min-height: 100px;
    max-height: min(40dvh, 260px);
    font-size: max(16px, var(--fs-reading)); /* ≥16px voorkomt zoom op iOS bij focus */
  }

  .gemini-send {
    min-height: 44px;
    padding-left: 18px;
    padding-right: 18px;
  }

  #list-mode {
    padding: max(24px, env(safe-area-inset-top, 24px)) max(16px, env(safe-area-inset-right, 16px)) max(32px, env(safe-area-inset-bottom, 32px)) max(16px, env(safe-area-inset-left, 16px));
  }

  #list-mode .list-section {
    max-width: none;
  }
}

@media (max-width: 480px) {
  :root {
    --pad-window-inline: clamp(0.75rem, 4.5vw, 1rem);
    --pad-window-block: clamp(0.875rem, 3.5vw, 1.0625rem);
  }

  .gemini-msg,
  .gemini-bubble--user,
  .gemini-bubble--assistant {
    max-width: 100%;
    font-size: clamp(1rem, 3.5vw, var(--fs-reading));
  }
}

/* Crawlers & toetsenbord: echte interne links; visueel verborgen (niet display:none i.v.m. sommige bots). */
.cv-seo-nav {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.cv-seo-nav a:focus {
  position: fixed;
  left: 8px;
  top: 8px;
  z-index: 10000;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  padding: 0.65rem 1rem;
  background: var(--surface-0);
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  white-space: normal;
}
