/* Lettertypen in CFO.today-huisstijl: Bricolage Grotesque en Hanken Grotesk via Google Fonts (link in index.html),
   IBM Plex Mono zelf gehost (SIL Open Font License). */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* Layout: CFO.today-header bovenaan; daaronder sticky index van tools per Deel; hoofdkolom toont één tool als invoer | uitkomsten.
   Kleuren volgen cfo.today: groengetint papier, flessengroen, lime als markeerstift. */
:root {
  --bg: #F2F5EE; --surface: #FBFCF9; --sunk: #E8EDE3; --line: #CFD9CC;
  --fg: #10291D; --muted: #55685C; --brand: #123A28; --brand-fg: #EAF1E6;
  --accent: #536B0E; --accent-soft: #E4F2B0;
  --lime: #C8E64B; --lime-ink: #10291D;
  --band: #123A28; --band-ink: #EAF1E6; --band-muted: #A9BDAE;
  --pos: #2F7A4C; --neg: #B4542F; --neutral: #7C8B83;
  --s1: #123A28; --s2: #A4C21F; --s3: #5E8C6A; --s4: #B4542F; --s5: #2E6B8A;
  --f-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --r: 8px;
  --head-h: 70px;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0D1B14; --surface: #12241A; --sunk: #183022; --line: #24392D;
  --fg: #E6EEE3; --muted: #9AAD9F; --brand: #C8E64B; --brand-fg: #10291D;
  --accent: #C8E64B; --accent-soft: #2E3A12;
  --band: #163F2C; --band-ink: #EAF1E6; --band-muted: #A9BDAE;
  --pos: #7FC29B; --neg: #E0855E; --neutral: #93A39A;
  --s1: #C8E64B; --s2: #7FC29B; --s3: #A9C9B2; --s4: #E0855E; --s5: #7DB6D6; color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #0D1B14; --surface: #12241A; --sunk: #183022; --line: #24392D;
  --fg: #E6EEE3; --muted: #9AAD9F; --brand: #C8E64B; --brand-fg: #10291D;
  --accent: #C8E64B; --accent-soft: #2E3A12;
  --band: #163F2C; --band-ink: #EAF1E6; --band-muted: #A9BDAE;
  --pos: #7FC29B; --neg: #E0855E; --neutral: #93A39A;
  --s1: #C8E64B; --s2: #7FC29B; --s3: #A9C9B2; --s4: #E0855E; --s5: #7DB6D6; color-scheme: dark }
*, *::before, *::after { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
.app { display: grid; grid-template-columns: 270px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: env(safe-area-inset-top, 0px); align-self: start; height: 100vh; overflow-y: auto;
  background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px 40px max(16px, env(safe-area-inset-left, 0px)); }
.brand { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; color: var(--brand); line-height: 1.1; }
.brand-sub { font-size: .78rem; color: var(--muted); margin: 4px 0 18px; }
.nav-part { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px 8px; }
.nav a { display: grid; grid-template-columns: 38px 1fr; gap: 6px; align-items: baseline; padding: 6px 8px; border-radius: 6px; color: var(--fg); text-decoration: none; font-size: .88rem; }
.nav a .ch { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); }
.nav a:hover { background: var(--sunk); }
.nav a[aria-current="page"] { background: var(--brand); color: var(--brand-fg); }
.nav a[aria-current="page"] .ch { color: var(--brand-fg); opacity: .8; }
.mobile-nav { display: none; }
main { padding-block: 28px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); min-width: 0; }
.wrap { max-width: 1120px; margin: 0 auto; }
.tool-head { margin-bottom: 18px; }
.eyebrow { font-family: var(--f-mono); font-size: .75rem; color: var(--accent); letter-spacing: .04em; }
h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.15; margin: 4px 0 8px; color: var(--fg); text-wrap: balance; }
.lede { color: var(--muted); max-width: 68ch; margin: 0; }
.grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.panel h2 { font-family: var(--f-body); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.panel h3 { font-size: .95rem; margin: 18px 0 8px; }
.inputs { display: grid; gap: 10px; }
.field { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; align-items: center; }
.field label { font-size: .86rem; line-height: 1.3; }
.field .help { display: block; font-size: .74rem; color: var(--muted); }
.inbox { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.inbox:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.inbox input, .inbox select { width: 100%; border: 0; background: transparent; color: var(--fg); font: 500 .9rem var(--f-mono); padding: 6px 8px; text-align: right; min-width: 0; }
.inbox select { text-align: left; font-family: var(--f-body); }
.inbox input:focus, .inbox select:focus { outline: none; }
.inbox .unit { font-size: .74rem; color: var(--muted); padding-right: 8px; white-space: nowrap; }
.group-label { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-top: 8px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
button.btn { font: 500 .82rem var(--f-body); border: 1px solid var(--line); background: var(--sunk); color: var(--fg); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
button.btn:hover { border-color: var(--brand); }
button.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.results { display: grid; gap: 16px; min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--sunk); border-radius: var(--r); padding: 12px 14px; }
.kpi.hero { background: var(--brand); color: var(--brand-fg); }
.kpi .k-label { font-size: .75rem; color: inherit; opacity: .8; }
.kpi .k-val { font-family: var(--f-display); font-size: 1.75rem; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: .74rem; opacity: .8; }
.kpi.good .k-val { color: var(--pos); } .kpi.bad .k-val { color: var(--neg); }
.formula { background: var(--sunk); border-radius: var(--r); padding: 12px 14px; font-family: var(--f-mono); font-size: .84rem; overflow-x: auto; line-height: 1.7; }
.formula .fx { color: var(--muted); display: block; font-size: .75rem; font-family: var(--f-body); }
.formula b { color: var(--accent); font-weight: 500; }
.tbl-wrap { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: .84rem; font-variant-numeric: tabular-nums; }
table.t th, table.t td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.t th:first-child, table.t td:first-child { text-align: left; white-space: normal; }
table.t thead th { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
table.t tr.total td { font-weight: 600; border-top: 2px solid var(--fg); }
table.t td.pos { color: var(--pos); } table.t td.neg { color: var(--neg); }
table.t td.hl { background: var(--accent-soft); font-weight: 600; }
.chart { width: 100%; overflow-x: auto; }
.chart svg { display: block; width: 100%; height: auto; min-width: 360px; }
.chart text { fill: var(--muted); font-family: var(--f-body); font-size: 11px; }
.chart .v { fill: var(--fg); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .76rem; color: var(--muted); margin-top: 4px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.note { font-size: .84rem; color: var(--muted); border-left: 3px solid var(--accent); padding: 2px 0 2px 12px; max-width: 75ch; }
.note p { margin: 0 0 6px; }
.tag { display: inline-block; font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--fg); }
.tag.good { background: color-mix(in srgb, var(--pos) 18%, transparent); } .tag.bad { background: color-mix(in srgb, var(--neg) 18%, transparent); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 18px; }
.home-card { display: block; text-decoration: none; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.home-card:hover { border-color: var(--brand); }
.home-card .ch { font-family: var(--f-mono); font-size: .72rem; color: var(--accent); }
.home-card .tt { font-weight: 600; margin: 2px 0 4px; }
.home-card .ds { font-size: .8rem; color: var(--muted); }
.part-h { font-family: var(--f-display); font-size: 1.25rem; margin: 28px 0 0; }
.ex { font-size: .74rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mobile-nav { display: block; margin-bottom: 16px; }
  .mobile-nav select { width: 100%; font: 500 .95rem var(--f-body); padding: 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
  .grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) { .field { grid-template-columns: minmax(0, 1fr) 140px; } .kpi .k-val { font-size: 1.45rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Site-specifiek */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }
a { color: var(--brand); }
.brand a { color: inherit; text-decoration: none; }
.brand-by { font-size: .78rem; color: var(--muted); margin: 4px 0 18px; }
.brand-by a { color: var(--muted); }
.nav a { grid-template-columns: 1fr; }
.site-foot { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
.site-foot p { margin: 0; max-width: 70ch; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: var(--brand-fg); padding: 8px 12px; border-radius: 6px; z-index: 20; }
.skip:focus { left: 12px; }
.mobile-brand { display: none; }
@media (max-width: 900px) { .mobile-brand { display: block; margin-bottom: 14px; } .mobile-brand .brand { font-size: 1.4rem; } }
noscript p { padding: 24px; }

/* CFO.today-header en huisstijl */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--band); }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25; background: var(--band); color: var(--band-ink); }
.top-in { display: flex; align-items: center; gap: 24px; height: var(--head-h); max-width: 1180px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.logo { display: block; line-height: 0; flex-shrink: 0; }
.logo img { height: 46px; width: auto; display: block; }
.top-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: .95rem; }
.top-nav a { text-decoration: none; color: var(--band-muted); }
.top-nav a:hover { color: var(--band-ink); }
.top-nav a.lab { color: var(--band-ink); border: 1.5px solid var(--lime); border-radius: 999px; padding: .45em 1em; font-weight: 600; }
.top-nav a.lab[aria-current="page"] { background: var(--lime); color: var(--lime-ink); }
.pill { display: inline-flex; align-items: center; font: 600 .95rem var(--f-body); text-decoration: none; border-radius: 999px; padding: .7em 1.2em;
  background: var(--lime); color: var(--lime-ink); border: 1.5px solid var(--lime); white-space: nowrap; }
.top :focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.top-nav .sec { display: inline; }
.top-nav .sec { display: none; }
.top-nav .sec { white-space: nowrap; }
@media (max-width: 600px) { .top .pill { display: none; } .top-in { gap: 12px; } .logo img { height: 38px; } }
.side { top: calc(var(--head-h) + env(safe-area-inset-top, 0px)); height: calc(100vh - var(--head-h) - env(safe-area-inset-top, 0px)); }
.app { min-height: calc(100vh - var(--head-h)); }
.brand { font-weight: 700; letter-spacing: -.02em; font-variation-settings: "wdth" 85; }
h1 { font-weight: 700; letter-spacing: -.02em; font-variation-settings: "wdth" 85; font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.part-h { font-weight: 700; letter-spacing: -.01em; }
.kpi .k-val { font-weight: 700; letter-spacing: -.01em; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; }
.home-card:hover, button.btn:hover { border-color: var(--fg); }
.eyebrow { color: var(--muted); }

/* Account en opgeslagen berekeningen */
.acct { flex-shrink: 0; }
.acct[hidden] { display: none; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; font: 600 .95rem var(--f-body); color: var(--band-ink); text-decoration: none;
  background: none; border: 1.5px solid var(--band-muted); border-radius: 999px; padding: .45em 1em; cursor: pointer; white-space: nowrap; }
.acct-btn:hover { border-color: var(--band-ink); }
.acct-btn.acct-out { font-size: .85rem; font-weight: 500; color: var(--band-muted); padding: .35em .85em; }
.acct-btn.acct-out:hover { color: var(--band-ink); }
.acct-btn .dot { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin: -.2em 0 -.2em -.55em; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-size: .8rem; }
@media (max-width: 760px) { .acct-btn .dot + .acct-l { display: none; } .acct-btn:has(.dot) { padding: .35em; border-color: transparent; } .acct-btn .dot { margin: 0; } }

button.btn.primary { background: var(--brand); color: var(--brand-fg); border-color: var(--brand); font-weight: 600; }
button.btn.primary:hover { filter: brightness(1.12); border-color: var(--brand); }
button.btn.ghost { background: transparent; color: var(--muted); }
button.btn:disabled { opacity: .6; cursor: progress; }

.savebar { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--lime); border-radius: var(--r); padding: 12px 14px; margin: 0 0 16px; }
.savebar[hidden] { display: none; }
.sb-out { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; }
.sb-in { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sb-f { display: grid; gap: 4px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 0; flex: 1 1 220px; max-width: 360px; }
.sb-f .inbox select { font: 500 .88rem var(--f-body); text-transform: none; letter-spacing: 0; padding: 7px 8px; }
.sb-act { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.sb-st { font-size: .8rem; color: var(--muted); align-self: center; padding-top: 18px; }
.sb-act .btn { padding: 8px 14px; }
.sb-st.dirty { color: var(--accent); font-weight: 600; }
.sb-st.dirty::before { content: "● "; }
.bad { color: var(--neg); }

.dlg { border: 1px solid var(--line); border-radius: 12px; padding: 0; background: var(--surface); color: var(--fg); width: min(440px, calc(100vw - 32px)); box-shadow: 0 18px 50px rgb(0 0 0 / .25); }
.dlg::backdrop { background: rgb(8 20 14 / .55); }
.dlg-in { padding: 22px; display: grid; gap: 12px; }
.dlg h2 { margin: 0; font: 700 1.35rem var(--f-display); letter-spacing: -.01em; }
.dlg-sub { margin: 0; font-size: .88rem; color: var(--muted); }
.dlg-f { display: grid; gap: 5px; font-size: .84rem; font-weight: 600; }
.dlg-f em { font-style: normal; font-weight: 400; color: var(--muted); }
.dlg-f input { font: 500 .95rem var(--f-body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; width: 100%; }
.dlg-f textarea { font: 500 .95rem var(--f-body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; width: 100%; resize: vertical; min-height: 80px; }
.dlg-f input:focus, .dlg-f select:focus, .dlg-f textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
/* keuzelijst in een pop-up: zelfde vorm als de invoervelden, met een eigen pijltje */
.dlg-f select { font: 500 .95rem var(--f-body); color: var(--fg); background-color: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 9px 34px 9px 10px; width: 100%;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2355685C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.dlg-f input.code { font: 600 1.4rem var(--f-mono); letter-spacing: .3em; text-align: center; }
.dlg-fine { margin: 0; font-size: .76rem; color: var(--muted); }
.dlg-msg { margin: 0; font-size: .84rem; min-height: 0; }
.dlg-msg:empty { display: none; }
.dlg-msg.bad { color: var(--neg); }
.dlg-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.dlg-btns .btn { padding: 8px 14px; font-size: .88rem; }

table.mijn td:first-child, table.mijn th:first-child { text-align: left; }
table.mijn a { color: var(--fg); font-weight: 600; }
.mijn-acts { margin-top: 28px; }
/* Mijn berekeningen: alle labs in één lijst, versies uitklappen */
.lnk { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.lnk[aria-expanded="true"] { color: var(--accent); }
table.mijn-all td:nth-child(2), table.mijn-all th:nth-child(2) { text-align: left; }
tr.mijn-vers > td { background: var(--sunk); padding: 6px 10px 10px; }
table.mijn-vtab { width: 100%; }
table.mijn-vtab td:nth-child(3), table.mijn-vtab th:nth-child(3) { text-align: left; white-space: normal; }

.acct { display: flex; align-items: center; gap: 14px; }
.acct-adm { color: var(--band-muted); text-decoration: none; font-size: .95rem; }
.acct-adm:hover { color: var(--band-ink); }
a.btn { display: inline-flex; align-items: center; text-decoration: none; font: 600 .82rem var(--f-body); border-radius: 6px; padding: 6px 10px; }
a.btn.primary { background: var(--brand); color: var(--brand-fg); border: 1px solid var(--brand); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--fg); }
.tag.bad { background: transparent; border: 1px solid var(--neg); color: var(--neg); }
table.adm td { white-space: nowrap; }
.adm-acts { display: flex; gap: 6px; justify-content: flex-end; }
.adm-filter { max-width: 320px; margin: 0 0 10px; }
.adm-filter input { text-align: left; font-family: var(--f-body); }
.adm-add { display: flex; gap: 8px; margin: 12px 0; max-width: 460px; }
.adm-add .inbox { flex: 1; }
.adm-add input { text-align: left; font-family: var(--f-body); }
@media (max-width: 760px) { .acct-adm { display: none; } }
@media (max-width: 600px) { .top-nav { gap: 8px; } .top-nav a.lab { padding: .35em .75em; font-size: .85rem; } }
@media (max-width: 420px) { .logo img { height: 30px; } .top-in { gap: 8px; } .top-nav a.lab { padding: .3em .6em; font-size: .8rem; } .acct-btn:has(.dot) { padding: .2em; } }

/* tekstvelden (bijv. omschrijving van een mijlpaal) */
.inbox input[type="text"] { text-align: left; font-family: var(--f-body); }
/* labs op mobiel: alleen het huidige lab in de kopbalk, de andere onder de titel */
.lab-links { display: none; font-size: .85rem; color: var(--muted); margin-top: 4px; }
.lab-links a { color: var(--fg); }
@media (max-width: 1000px) { .top .pill { display: none; } }

.side .lab-links { margin: 2px 0 10px; font-size: .8rem; }
/* Cashlab: invoerraster van de 13-wekenforecast */
.cl-wide { margin-top: 18px; }
.cl-grid th { font-size: .72rem; white-space: nowrap; text-align: right; }
.cl-grid th small { font-weight: 400; color: var(--muted); }
table.t.cl-grid td:first-child, table.t.cl-grid th:first-child { white-space: nowrap; font-size: .82rem; position: sticky; left: 0; background: var(--surface); z-index: 1; text-align: left; padding-right: 10px; }
.cl-grid td { padding: 3px 4px; text-align: right; }
.cl-grid input { width: 4.2em; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--fg); font: 500 .8rem var(--f-mono); padding: 4px 5px; text-align: right; }
.cl-grid input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.cl-grid td.warn { color: var(--neg); font-weight: 600; }
.cl-grid td.neg { background: color-mix(in srgb, var(--neg) 15%, transparent); color: var(--neg); font-weight: 600; }
/* uitklapmenu "Rekenlabs" in de kopbalk */
.labs-menu { position: relative; }
.labs-menu summary { list-style: none; cursor: pointer; color: var(--band-ink); border: 1.5px solid var(--lime); border-radius: 999px; padding: .45em 1em; font-weight: 600; white-space: nowrap; }
.labs-menu summary::-webkit-details-marker { display: none; }
.labs-menu summary::after { content: " \25BE"; }
.labs-menu summary:hover, .labs-menu[open] summary { background: var(--lime); color: var(--lime-ink); }
.labs-pop { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.2); padding: 8px; min-width: 270px; z-index: 60; display: grid; gap: 2px; }
.top-nav .labs-pop a { display: block; color: var(--fg); padding: .55em .8em; border-radius: 9px; font-weight: 600; }
.top-nav .labs-pop a small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 1px; }
.top-nav .labs-pop a:hover { background: var(--sunk); color: var(--fg); }
.top-nav .labs-pop a[aria-current] { background: var(--sunk); }
@media (max-width: 600px) { .labs-menu summary { padding: .35em .75em; font-size: .85rem; } .top-nav a.lab[aria-current] { display: none; } }
@media (max-width: 420px) { .labs-menu summary { padding: .3em .6em; font-size: .8rem; } .labs-pop { right: -40px; min-width: 240px; } }
/* keuzelijsten en tekstvelden met langere teksten: onder het label, over de volle breedte */
.inputs .field:has(select), .inputs .field:has(input[type="text"]) { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.inputs .field:has(select) .inbox select { text-overflow: ellipsis; }
.inbox .unit { padding-left: 2px; }
/* lange teksten in KPI-tegels laten afbreken in plaats van uit de tegel te lopen */
.kpi { min-width: 0; }
.kpi .k-val, .kpi .k-sub, .kpi .k-label { overflow-wrap: anywhere; }
/* Het inhoudsblok krijgt focus via "Naar de inhoud" of een script; dat mag geen kader tekenen (geldt voor labs, platform en modules). */
#view:focus, #view:focus-visible { outline: none; box-shadow: none; }
