/* JIP v2 app-shell en kernschermen. Vereist tokens.css en base.css. */

:root { --tabbar-h: 64px; --appbar-h: 56px; }

html, body { height: 100%; }
body { overflow: hidden; }

/* ---------- podium en toestel ---------- */
.stage { height: 100%; }
.stage-intro { display: none; }
.device { height: 100%; }
.device-screen {
  position: relative; height: 100%; height: 100dvh; overflow: hidden;
  display: flex; flex-direction: column; background: var(--bg);
  transform: translateZ(0); /* houdt fixed sheets en toasts binnen het scherm */
}
.statusbar { display: none; }
.view {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; outline: none;
  padding-top: env(safe-area-inset-top);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.screen { min-height: 100%; display: flex; flex-direction: column; }
.screen > .page { flex: 1; }
.screen.enter-fwd { animation: enterFwd var(--t-med) var(--ease) both; }
.screen.enter-back { animation: enterBack var(--t-med) var(--ease) both; }
.screen.enter-tab { animation: enterTab var(--t-med) var(--ease) both; }
@keyframes enterFwd { from { opacity: 0; transform: translateX(18px); } }
@keyframes enterBack { from { opacity: 0; transform: translateX(-18px); } }
@keyframes enterTab { from { opacity: 0; transform: translateY(6px); } }

.boot { min-height: 70vh; display: grid; place-content: center; justify-items: center; gap: 20px; color: var(--ink); }

/* Desktop: telefoon in een frame met toelichting links */
@media (min-width: 960px) {
  body { background: radial-gradient(1200px 700px at 70% 40%, color-mix(in srgb, var(--brand-soft) 70%, var(--bg)), var(--bg)); }
  .stage { display: grid; grid-template-columns: minmax(300px, 440px) auto; gap: clamp(48px, 7vw, 120px); align-items: center; justify-content: center; padding: 24px 40px; }
  .stage-intro { display: block; color: var(--ink); }
  .stage-logo { display: inline-block; color: var(--ink); }
  .stage-logo svg { height: 40px; width: auto; }
  .stage-kicker { margin: 28px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .stage-intro h1 { font-size: 36px; line-height: 42px; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 16px; text-wrap: balance; }
  .stage-lead { font-size: 17px; line-height: 27px; color: var(--ink-2); margin: 0 0 28px; max-width: 40ch; }
  .stage-points { list-style: none; display: grid; gap: 12px; margin: 0 0 32px; }
  .stage-points li { display: flex; gap: 12px; align-items: center; font-size: 15px; color: var(--ink-2); }
  .stage-points li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--ink); flex: none; }
  .stage-points b { color: var(--ink); font-weight: 600; }
  .stage-points p { margin: 0; }
  .stage-qr { display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); max-width: 380px; font-size: 13.5px; line-height: 19px; color: var(--ink-2); }
  .stage-qr strong { color: var(--ink); font-size: 14.5px; }
  .qr { width: 76px; height: 76px; flex: none; border-radius: 10px; border: 1px dashed var(--line-strong);
    background:
      linear-gradient(90deg, var(--surface) 8px, transparent 0) 0 0 / 16px 16px,
      linear-gradient(var(--surface) 8px, transparent 0) 0 0 / 16px 16px,
      color-mix(in srgb, var(--ink) 12%, var(--surface)); opacity: .7; }
  .stage-note { margin: 20px 0 0; font-size: 12.5px; color: var(--ink-3); max-width: 44ch; }

  .device {
    width: 410px; height: min(864px, calc(100vh - 48px)); padding: 10px; border-radius: 58px;
    background: #0D0F12; box-shadow: 0 0 0 1.5px #2A2E35, 0 40px 80px -20px rgba(15, 18, 22, .35), 0 18px 36px -18px rgba(15, 18, 22, .3);
    position: relative;
  }
  .device::before { content: ""; position: absolute; top: 20px; left: 50%; width: 110px; height: 32px; margin-left: -55px; border-radius: 20px; background: #0D0F12; z-index: 5; }
  .device-screen { height: 100%; border-radius: 48px; }
  .statusbar { display: flex; flex: none; height: 50px; align-items: center; justify-content: space-between; padding: 6px 32px 0 40px; font-size: 15px; font-weight: 600; color: var(--ink); background: var(--bg); }
  .sb-icons { display: flex; gap: 6px; align-items: center; }
  .sb-icons i { display: block; width: 17px; height: 11px; border-radius: 3px; background: currentColor; opacity: .9; }
  .sb-icons i:nth-child(1) { width: 16px; clip-path: polygon(0 100%, 25% 100%, 25% 70%, 50% 70%, 50% 40%, 75% 40%, 75% 10%, 100% 10%, 100% 100%); border-radius: 1px; }
  .sb-icons i:nth-child(2) { width: 15px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; clip-path: polygon(50% 100%, 0 20%, 100% 20%); }
  .sb-icons i:nth-child(3) { width: 25px; border-radius: 4px; background: transparent; border: 1.5px solid currentColor; position: relative; }
  .sb-icons i:nth-child(3)::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: currentColor; border-radius: 1.5px; }
  .view { padding-top: 0; }
  .device-screen[data-route="welkom"] .statusbar { background: var(--bg); }
}

/* ---------- app-kop ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
  min-height: var(--appbar-h); padding: 4px 8px;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(20px); backdrop-filter: saturate(1.2) blur(20px);
  border-bottom: 1px solid transparent; transition: border-color var(--t-med);
}
.is-scrolled .appbar { border-bottom-color: var(--line); }
.appbar-title { flex: 1; min-width: 0; text-align: center; display: grid; line-height: 1.2; }
.appbar-title span { font-size: 16.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-title small { font-size: 11.5px; color: var(--ink-3); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar-back, .appbar-btn {
  width: var(--hit); height: var(--hit); display: grid; place-items: center; border-radius: 14px; color: var(--ink); flex: none;
  transition: background var(--t-fast);
}
.appbar-back:hover, .appbar-btn:hover { background: var(--surface-2); text-decoration: none; }
.appbar-back:active, .appbar-btn:active { background: var(--surface-3); }
.appbar-btn[aria-pressed="true"] { color: var(--brand); }
.appbar-btn[aria-pressed="true"] .ic { fill: currentColor; }
.appbar-actions { display: flex; align-items: center; }
.appbar-spacer-w { width: var(--hit); flex: none; }
.appbar-large { position: relative; display: block; padding: 8px var(--gutter) 4px; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; min-height: 0; }
.appbar-large .appbar-row { display: flex; align-items: center; margin: 0 -8px 2px; min-height: 40px; }
.appbar-large .appbar-spacer { flex: 1; }
.appbar-large h1 { padding-top: 10px; }
.appbar-large .appbar-row + h1 { padding-top: 0; }
.appbar-sub { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }

/* ---------- pagina ---------- */
.page { padding: 8px var(--gutter) 28px; }
/* Ruimte onder de inhoud zodat de zwevende knop nooit de laatste kaart afdekt, ook bij modules zonder .page. */
.device-screen:not(.no-fab) .screen::after { content: ""; display: block; flex: none; height: 84px; }
.page-actions {
  position: sticky; bottom: 0; z-index: 15; display: flex; align-items: center; gap: 2px;
  padding: 8px 10px 8px 6px; background: color-mix(in srgb, var(--surface) 98%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.no-tabbar .page-actions { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
.page-actions .solve { flex: 1; margin-left: 6px; min-height: 52px; font-size: 16px; }
.list-foot { margin: 10px 2px 0; display: flex; gap: 6px; align-items: flex-start; }
.list-foot .ic { margin-top: 2px; flex: none; }
.row-ic { width: 40px; height: 40px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.row-ic-brand { background: var(--brand-soft); color: var(--brand); }
.row-danger .row-title { color: var(--alert); }
.row-danger .row-ic { background: var(--alert-soft); color: var(--alert); }
.form-stack { display: grid; gap: 16px; }
.role-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.role-grid .chip { min-height: 40px; }
.tile-stack { display: flex; }
.tile-stack .brand-tile { box-shadow: 0 0 0 2px var(--surface); }
.tile-stack .brand-tile + .brand-tile { margin-left: -6px; }

/* ---------- tabbalk ---------- */
.tabbar {
  flex: none; position: relative; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 96%, transparent); border-top: 1px solid var(--line);
}
.no-tabbar .tabbar { display: none; }
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-3); font-size: 11.5px; font-weight: 500; letter-spacing: .005em; text-decoration: none !important;
  transition: color var(--t-fast);
}
.tab .ic { width: 24px; height: 24px; transition: transform var(--t-med) var(--ease); }
.tab::before { content: ""; position: absolute; top: -1px; left: 50%; width: 0; height: 3px; margin-left: 0; border-radius: 0 0 3px 3px; background: var(--signal); transition: width var(--t-med) var(--ease), margin var(--t-med) var(--ease); }
.tab.is-active { color: var(--ink); font-weight: 600; }
.tab.is-active::before { width: 28px; margin-left: -14px; }
.tab.is-active .ic { stroke-width: 2; }
.tab:active .ic { transform: scale(.9); }
.tab-ic { position: relative; display: grid; place-items: center; }

/* ---------- zwevende knop ---------- */
.fab {
  position: absolute; z-index: 25; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 15px; text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(22, 25, 30, .12), 0 10px 28px rgba(29, 59, 110, .28);
  transition: transform var(--t-med) var(--ease), padding var(--t-med) var(--ease), opacity var(--t-med), box-shadow var(--t-fast);
}
.fab .ic { width: 22px; height: 22px; flex: none; }
.fab span { max-width: 120px; overflow: hidden; white-space: nowrap; transition: max-width var(--t-med) var(--ease), opacity var(--t-fast); }
.fab:active { transform: scale(.96); }
.fab.fab-compact { padding: 0 15px; }
.fab.fab-compact span { max-width: 0; opacity: 0; margin-left: -8px; }
.no-fab .fab { opacity: 0; transform: translateY(12px) scale(.9); pointer-events: none; }
.no-tabbar .fab { bottom: calc(16px + env(safe-area-inset-bottom)); }

.device-screen .toast-host { bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom)); }
.device-screen.no-fab .toast-host { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); }
.device-screen.no-tabbar .toast-host { bottom: calc(96px + env(safe-area-inset-bottom)); }
.device-screen[data-route="storing"] .toast-host { bottom: 150px; }

/* ---------- zoeken ---------- */
.sticky-search { position: sticky; top: 8px; z-index: 12; margin: 4px 0 12px; }
.sticky-search .search { box-shadow: 0 1px 2px rgba(22,25,30,.04); }
.search-results { margin-top: 4px; }
.search-sub { margin: 18px 2px 8px; }
.search-results > .list:first-child { margin-top: 0; }
.brand-filter { margin-bottom: 4px; padding-bottom: 6px; }
.chip-brand { padding-left: 4px; gap: 8px; min-height: 36px; }
.chip-brand .brand-tile { width: 26px; height: 26px; border-radius: 99px; font-size: 10px; }
.chip-brand[aria-pressed="true"] .brand-tile { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); border-color: transparent; }
.chip-soon { color: var(--ink-3); border-style: dashed; }
.soon-card { margin-top: 16px; padding: 24px 20px; display: grid; justify-items: start; gap: 10px; }
.soon-card h2 { margin-top: 6px; }
.soon-card p { margin: 0 0 6px; }

/* ---------- onboarding ---------- */
.ob { flex: 1; display: flex; flex-direction: column; padding: 4px var(--gutter) calc(20px + env(safe-area-inset-bottom)); }
.ob-is-splash .ob-body { display: flex; flex-direction: column; justify-content: center; }
.ob-top { display: flex; align-items: center; justify-content: space-between; min-height: 52px; margin: 0 -8px; }
.ob-dots { display: flex; gap: 6px; }
.ob-dots i { width: 22px; height: 4px; border-radius: 99px; background: var(--line-strong); transition: background var(--t-med); }
.ob-dots i.on { background: var(--ink); }
.ob-body { flex: 1; }
.ob-body.enter-fwd { animation: enterFwd var(--t-slow) var(--ease) both; }
.ob-body.enter-back { animation: enterBack var(--t-slow) var(--ease) both; }
.ob-foot { display: grid; gap: 18px; padding-top: 16px; }
.ob-foot .btn { min-height: 54px; font-size: 16px; }
.ob-dhps { display: flex; justify-content: center; color: var(--ink); }
.ob-dhps .powered { justify-items: center; }
.ob-splash { display: flex; flex-direction: column; justify-content: center; padding: 24px 4px 8px; }
.ob-mark { color: var(--ink); animation: markIn 700ms var(--ease) both; }
.ob-mark svg path:first-child, .ob-mark svg rect:first-of-type { transform-origin: 38px 4px; animation: helmet 900ms var(--ease) 250ms both; }
@keyframes markIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes helmet { from { opacity: 0; transform: translateY(-10px); } }
.ob-tag { margin: 18px 0 0; font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--ink-2); }
.ob-lead { margin: 22px 0 28px; font-size: 20px; line-height: 29px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); text-wrap: pretty; }
.ob-usp { list-style: none; display: grid; gap: 14px; }
.ob-usp li { display: flex; gap: 12px; align-items: center; font-size: 15.5px; color: var(--ink-2); }
.ob-usp .ic { color: var(--brand); }
.ob-step { padding-top: 12px; }
.ob-step .t-h1 { margin: 10px 0 6px; font-size: 26px; line-height: 32px; letter-spacing: -0.02em; }
.ob-sub { margin: 0 0 20px; }
.ob-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-grid-soon .brand-pick { min-height: 88px; }
.ob-soon-label { margin: 24px 0 10px; }
.ob-note { margin: 14px 2px 0; }
.ob-options { display: grid; gap: 10px; }
.ob-option { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color var(--t-fast), background var(--t-fast); }
.ob-option-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; transition: all var(--t-fast); }
.ob-radio { width: 22px; height: 22px; border-radius: 50%; border: 1.75px solid var(--line-strong); flex: none; transition: all var(--t-fast); }
.ob-option[aria-checked="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface)); }
.ob-option[aria-checked="true"] .ob-option-ic { background: var(--brand); color: var(--brand-ink); }
.ob-option[aria-checked="true"] .ob-radio { border: 7px solid var(--brand); }
.ob-privacy-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 24px 0 18px; background: var(--brand-soft); color: var(--brand); }

/* ---------- home ---------- */
.home-head { padding: 8px var(--gutter) 0; }
.home-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--ink); }
.home-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none !important; }
.home-greet { margin-top: 18px; }
.home-date { margin: 2px 0 0; color: var(--ink-2); font-size: 15px; }
.home-date::first-letter { text-transform: uppercase; }
.page-home { padding-top: 16px; }
.home-search { margin-bottom: 16px; }
.home-search .search { min-height: 60px; border-radius: 18px; box-shadow: 0 1px 2px rgba(22,25,30,.04), 0 6px 20px rgba(22,25,30,.04); }

.entries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entry {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 156px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none !important; overflow: hidden;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast);
}
.entry:hover { border-color: var(--line-strong); }
.entry:active { transform: scale(.98); }
.entry-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.entry:first-child .entry-ic { background: var(--brand); color: var(--brand-ink); }
.entry-title { font-size: 16.5px; line-height: 21px; font-weight: 600; letter-spacing: -0.01em; }
.entry-sub { font-size: 13px; line-height: 17px; color: var(--ink-2); padding-right: 14px; }
.entry-go { position: absolute; top: 16px; right: 14px; color: var(--ink-3); transition: transform var(--t-med) var(--ease); }
.entry:hover .entry-go { transform: translateX(3px); color: var(--ink); }

.resume-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.resume .row-sub { white-space: nowrap; }
.resume { display: grid; gap: 10px; padding: 14px 16px 16px; }
.resume-kind { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.resume-main { display: flex; align-items: center; gap: 12px; }
.resume-main > .ic { color: var(--ink-3); }
.resume .progress { height: 4px; }
.resume:not(:has(.progress)) { padding-bottom: 14px; }

.fav-scroll { padding-bottom: 4px; }
.fav { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 14px 8px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; max-width: 260px; flex: none; }
.fav span:last-child { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.comm { display: flex; gap: 14px; align-items: center; padding: 10px; }
.comm-skel { display: flex; gap: 14px; align-items: center; padding: 10px; }
.comm-img { width: 96px; height: 76px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-3); }
.comm-img img { width: 100%; height: 100%; object-fit: cover; }
.comm-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 3px; }
.comm-meta .brand-tile { width: 20px; height: 20px; border-radius: 6px; font-size: 8.5px; }
.comm-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 14.5px; line-height: 19px; }

.offline-status { display: flex; align-items: flex-start; gap: 10px; margin: 28px 2px 0; font-size: 13px; line-height: 18px; color: var(--ink-2); }
.offline-status strong { color: var(--ink); font-weight: 600; }
.os-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-top: 5px; flex: none; box-shadow: 0 0 0 3px var(--ok-soft); }
.os-off { display: none; }
.is-offline .os-on { display: none; }
.is-offline .os-off { display: inline; }
.is-offline .os-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }

/* ---------- storing detail ---------- */
.page-detail { padding-top: 4px; }
.code-hero { padding: 4px 0 4px; }
.code-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.code-hero-brand { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.code-title { margin: 16px 0 12px; font-size: 24px; line-height: 30px; letter-spacing: -0.02em; text-wrap: balance; }
.code-status { display: flex; flex-wrap: wrap; gap: 6px; }
.code-lead { margin: 16px 0 0; font-size: 16px; line-height: 25px; color: var(--ink); }
.safety { margin-top: 12px; }
.safety:first-of-type { margin-top: 20px; }
.safety .callout { padding: 10px 14px; font-size: 13.5px; line-height: 19px; gap: 10px; }
.safety .callout .ic { width: 18px; height: 18px; }
.safety + .safety { margin-top: 8px; }
.steps-progress { margin: -2px 0 12px; }
.steps-progress .progress { height: 4px; }
.causes { list-style: none; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.causes li { position: relative; padding: 12px 16px 12px 34px; font-size: 15px; line-height: 22px; }
.causes li + li { border-top: 1px solid var(--line); }
.causes li::before { content: ""; position: absolute; left: 16px; top: 21px; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.source-card { display: grid; gap: 10px; }
.source-card-head { display: flex; gap: 12px; align-items: flex-start; }
.source-card-head > .ic { color: var(--ok); margin-top: 1px; }
.source-card-head div { display: grid; gap: 4px; }
.source-card-head strong { font-size: 14.5px; line-height: 20px; font-weight: 600; }
.source-card .btn { justify-self: start; margin-left: -10px; }
.solve.is-done { pointer-events: auto; }
.solve.pop { animation: pop 420ms var(--ease); }
.solve.pop .ic { animation: tick 420ms var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes tick { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: none; } }

/* Kom er niet uit en werkbon */
.hulp-call { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-card); background: var(--brand); color: var(--brand-ink); text-decoration: none !important; }
.hulp-call .row-title { color: inherit; font-weight: 600; }
.hulp-call .row-sub { color: inherit; opacity: .8; font-family: var(--mono); font-size: 13px; }
.hulp-call-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--brand-ink) 16%, transparent); flex: none; }
.hulp-tijden { display: flex; gap: 8px; align-items: center; margin: 10px 2px 20px; font-size: 13.5px; color: var(--ink-2); }
.hulp-sum .section-head { margin-bottom: 8px; }
.hulp-pre, .werkbon-pre { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-family: var(--mono); font-size: 13px; line-height: 20px; white-space: pre-wrap; word-break: break-word; color: var(--ink); }

/* ---------- chat ---------- */
.device-screen[data-route="chat"] .screen { min-height: 100%; }
.chat { flex: 1; padding: 4px var(--gutter) 16px; }
.chat-log { display: grid; gap: 18px; }
.chat-empty { padding: 28px 0 8px; }
.chat-empty-mark { color: var(--ink); margin-bottom: 22px; }
.chat-empty h2 { margin-bottom: 6px; }
.chat-empty > p { margin: 0 0 20px; }
.chat-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chat-sugg .chip, .jip-follow .chip { min-height: 38px; font-size: 14px; color: var(--ink); text-align: left; white-space: normal; padding: 6px 14px; line-height: 18px; }
.chat-photo-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; }
.chat-photo-card > .ic { color: var(--ink-3); }

.msg-in { animation: msgIn var(--t-slow) var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg-user { display: grid; justify-items: end; gap: 6px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 6px 18px; background: var(--brand); color: var(--brand-ink); font-size: 15.5px; line-height: 22px; white-space: pre-wrap; word-break: break-word; }
.msg-photo { width: 220px; max-width: 70%; border-radius: 14px; display: block; }
.scan-frame { position: relative; width: 220px; max-width: 70%; border-radius: 14px; overflow: hidden; }
.scan-frame .msg-photo { width: 100%; max-width: none; }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 36%; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--signal) 38%, transparent) 85%, var(--signal)); border-bottom: 1.5px solid var(--signal); animation: scan 1.8s var(--ease) infinite; opacity: .85; }
.scan-corners { position: absolute; inset: 10px; border: 0; background:
  linear-gradient(#fff, #fff) top left / 18px 2px no-repeat, linear-gradient(#fff, #fff) top left / 2px 18px no-repeat,
  linear-gradient(#fff, #fff) top right / 18px 2px no-repeat, linear-gradient(#fff, #fff) top right / 2px 18px no-repeat,
  linear-gradient(#fff, #fff) bottom left / 18px 2px no-repeat, linear-gradient(#fff, #fff) bottom left / 2px 18px no-repeat,
  linear-gradient(#fff, #fff) bottom right / 18px 2px no-repeat, linear-gradient(#fff, #fff) bottom right / 2px 18px no-repeat; opacity: .9; }
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(280%); } }
.scan-done .scan-line { display: none; }
.scan-done .scan-corners { opacity: 0; transition: opacity var(--t-slow); }
.scan-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.msg-jip { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.jip-avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; margin-top: 2px; }
.jip-avatar svg { height: 11px !important; }
.jip-body { min-width: 0; }
.jip-lead { margin: 4px 0 0; font-size: 16px; line-height: 25px; color: var(--ink); }
.jip-lead .code-chip { height: 24px; min-width: 0; font-size: 13.5px; vertical-align: 1px; }
.jip-rest > * { margin-top: 12px; }
.msg-jip:not(.is-done) .jip-rest { animation: fadeUp var(--t-slow) var(--ease) 300ms both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
.jip-details { list-style: none; display: grid; gap: 8px; }
.jip-details li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-size: 14.5px; line-height: 21px; color: var(--ink); }
.jip-details .ic { margin-top: 2px; color: var(--brand); flex: none; }
.jip-steps { counter-reset: s; list-style: none; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.jip-steps li { counter-increment: s; position: relative; padding: 11px 14px 11px 46px; font-size: 15px; line-height: 22px; }
.jip-steps li + li { border-top: 1px solid var(--line); }
.jip-steps li::before { content: counter(s); position: absolute; left: 14px; top: 11px; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-2); display: grid; place-items: center; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.jip-safety { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--warn); }
.jip-tip { font-size: 14.5px; line-height: 21px; }
.jip-tip .t-label { font-size: 11px; color: var(--ink-3); }
.jip-extra { display: grid; gap: 8px; }
.jip-extra-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 14px; font-weight: 500; }
.jip-extra-card span:not(.code-chip) { flex: 1; }
.jip-open { justify-self: start; }
.jip-call { min-height: 52px; }
.jip-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.jip-actions { display: flex; gap: 4px; margin-left: -8px !important; }
.jip-act { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.jip-act:hover { background: var(--surface-2); color: var(--ink); }
.jip-follow { display: flex; flex-wrap: wrap; gap: 8px; }
.jip-brands { display: flex; flex-wrap: wrap; gap: 8px; }
.jip-brand { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 16px 6px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 600; font-size: 15px; transition: border-color var(--t-fast), transform var(--t-fast) var(--ease); }
.jip-brand:hover { border-color: var(--brand); }
.jip-brand:active { transform: scale(.97); }
.typing, .jip-scanning { display: inline-flex; align-items: center; gap: 12px; margin-top: 7px; font-size: 14px; color: var(--ink-3); }

.composer {
  position: sticky; bottom: 0; z-index: 15; padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 98%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.composer-ctx { padding: 0 2px 8px; }
.chip-ctx { gap: 8px; padding: 0 4px 0 4px; min-height: 34px; color: var(--ink); }
.chip-ctx .brand-tile { width: 24px; height: 24px; border-radius: 99px; font-size: 9.5px; }
.chip-ctx button { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); }
.composer-row { display: flex; align-items: flex-end; gap: 6px; padding: 4px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line-strong); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.composer-row:focus-within { border-color: var(--brand-2); box-shadow: var(--focus); }
.composer textarea { flex: 1; min-width: 0; min-height: 44px; max-height: 132px; resize: none; border: 0; outline: none; background: transparent; padding: 11px 4px; font-size: 16px; line-height: 22px; }
.composer textarea::placeholder { color: var(--ink-3); }
.composer textarea:focus-visible { box-shadow: none; }
.device-screen[data-route="chat"] .toast-host { bottom: 92px; }
.composer-btn, .composer-send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--ink-2); transition: background var(--t-fast), transform var(--t-fast) var(--ease), opacity var(--t-fast); }
.composer-btn:hover { background: var(--surface-2); }
.composer-send { background: var(--brand); color: var(--brand-ink); }
.composer-send .ic { stroke-width: 2.2; }
.composer-send:disabled { background: var(--surface-3); color: var(--ink-3); cursor: default; }
.composer-send:not(:disabled):active { transform: scale(.92); }

/* ---------- ik ---------- */
.profile { display: flex; align-items: center; gap: 14px; padding: 16px; }
.profile-avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: 19px; letter-spacing: .02em; }
.profile .row-sub { white-space: normal; }
.profile-name { display: block; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; }
.profile-role { display: block; margin-top: 8px; }
.privacy-line { display: flex; align-items: center; gap: 8px; margin: 10px 4px 0; font-size: 13px; color: var(--ink-3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.stat { display: grid; gap: 2px; padding: 14px 12px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.stat-n { font-size: 26px; line-height: 30px; font-weight: 600; letter-spacing: -0.02em; }
.stat-l { font-size: 12.5px; line-height: 16px; color: var(--ink-2); }
.brand-log { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.brand-log-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.brand-log-item + .brand-log-item { border-top: 1px solid var(--line); }
.brand-log-item.is-empty .row-sub { color: var(--ink-3); }
.badges { list-style: none; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.badge { display: flex; align-items: center; gap: 14px; padding: 12px 16px; min-height: 64px; }
.badge + .badge { border-top: 1px solid var(--line); }
.badge-ic { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 1.5px dashed var(--line-strong); color: var(--ink-3); }
.badge-ic .brand-tile { position: absolute; right: -6px; bottom: -4px; width: 20px; height: 20px; border-radius: 6px; font-size: 8px; box-shadow: 0 0 0 2px var(--surface); }
.badge.is-earned .badge-ic { border: 0; background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--brand) 25%, transparent); }
.badge .row-sub { white-space: normal; }
.badge:not(.is-earned) .row-title { color: var(--ink-2); font-weight: 500; }
.badge-bar { display: block; margin-top: 7px; max-width: 180px; }
.badge-bar .progress { height: 4px; }
.badge-check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; flex: none; }
.badge-check .ic { stroke-width: 2.6; }
.export-card { display: flex; gap: 14px; padding: 18px 16px; }
.export-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }

.page-over { display: grid; gap: 20px; align-content: start; }
.over-hero { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 16px 8px 4px; }
.over-icon { width: 96px; height: 96px; border-radius: 24px; display: grid; place-items: center; background: var(--brand); color: #fff; margin-bottom: 12px; box-shadow: var(--shadow-float); }
.over-tag { margin: 0 0 6px; font-weight: 600; font-size: 16px; }
.over-hero .t-muted { max-width: 34ch; margin: 0; }
.over-dhps { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 20px 12px 8px; color: var(--ink); }
.over-dhps .powered { justify-items: center; }
.over-dhps p { max-width: 36ch; margin: 0; }

/* ---------- portfolio ---------- */
.page-portfolio { display: grid; gap: 16px; }
.doc { background: #fff; color: #16191E; border-radius: 6px; padding: 28px 24px; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 30px rgba(0,0,0,.08); font-size: 13px; line-height: 19px; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 14px; border-bottom: 2px solid #16191E; color: #16191E; }
.doc-head svg { height: 20px !important; }
.doc-kicker { margin: 6px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6E7480; }
.doc-date { margin: 0; color: #4A505A; font-size: 12px; }
.doc-title { margin: 20px 0 4px; font-size: 24px; line-height: 30px; letter-spacing: -0.02em; }
.doc-sub { margin: 0; color: #4A505A; }
.doc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 8px; }
.doc-stats div { display: grid; padding: 10px 12px; border: 1px solid #E2DFD6; border-radius: 8px; }
.doc-stats b { font-size: 22px; line-height: 28px; font-weight: 600; }
.doc-stats span { color: #4A505A; font-size: 11.5px; }
.doc-h { margin: 22px 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #4A505A; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.doc-table th { text-align: left; font-weight: 600; color: #4A505A; border-bottom: 1px solid #CFCBC0; padding: 6px 6px 6px 0; }
.doc-table td { border-bottom: 1px solid #EFEDE6; padding: 6px 6px 6px 0; vertical-align: top; }
.doc-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.doc-table .mono { font-family: var(--mono); font-weight: 600; }
.doc-table .nowrap { white-space: nowrap; }
.doc-list { list-style: none; }
.doc-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #EFEDE6; }
.doc-muted { color: #6E7480; white-space: nowrap; }
.doc-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid #CFCBC0; color: #4A505A; font-size: 11.5px; }
.doc-foot-row { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.doc-sign { flex: 1; border-bottom: 1px solid #16191E; height: 28px; }
.doc-dhps { margin-top: 18px; color: #16191E; }
.doc-dhps small { color: #6E7480; }

@media print {
  @page { size: A4; margin: 16mm; }
  html, body { height: auto !important; overflow: visible !important; background: #fff !important; }
  .stage, .device, .device-screen, .view, .screen { display: block !important; height: auto !important; min-height: 0 !important; overflow: visible !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: #fff !important; transform: none !important; width: auto !important; animation: none !important; }
  .device::before, .stage-intro, .statusbar, .tabbar, .fab, .appbar, #ui-layer, .no-print { display: none !important; }
  .page { padding: 0 !important; }
  .doc { box-shadow: none; padding: 0; border-radius: 0; font-size: 11pt; line-height: 1.45; }
  .doc-table tr, .doc-list li { break-inside: avoid; }
}
