/* nuchtr v2, base.css (M1a). Reset, typografie, .num, .panel, raster, utilities. */

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scrollbar-color: var(--ink-4) transparent; }
body { min-height: 100dvh; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: var(--t-body); line-height: 1.5; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; line-height: inherit; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
svg { fill: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
a.dvj-link, .dvj-text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; }
input, select, textarea { background: transparent; border: 0; outline: 0; }
table { border-collapse: collapse; border-spacing: 0; }
hr { border: 0; border-top: 1px solid var(--line); }
::selection { background: rgba(242,242,245,.18); }
::placeholder { color: var(--ink-3); opacity: 1; }
[hidden] { display: none !important; }

/* Focus, alleen op het toetsenbord (6.6) */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); border-radius: var(--r-xs); } /* 2px ink met 2px paper ertussen */

/* Typografie (2.2) */
.t-display { font-size: var(--t-display); line-height: var(--t-display-lh); letter-spacing: var(--t-display-ls); font-weight: 700; }
.t-big     { font-size: var(--t-big); line-height: 1.1; letter-spacing: -.02em; font-weight: 600; }
.t-kpi     { font-size: var(--t-kpi); line-height: 1.1; letter-spacing: -.015em; font-weight: 600; }
.t-h1      { font-size: var(--t-h1); line-height: 1.2; letter-spacing: var(--t-h1-ls); font-weight: 600; }
.t-h2      { font-size: var(--t-h2); line-height: 1.3; letter-spacing: -.01em; font-weight: 600; }
.t-stat    { font-size: var(--t-stat); line-height: 1.15; letter-spacing: -.015em; font-weight: 600; }
.t-sub     { font-size: var(--t-sub); line-height: 1.2; font-weight: 600; }
.t-body    { font-size: var(--t-body); line-height: 1.5; font-weight: 400; }
.t-ui      { font-size: var(--t-ui); line-height: 1.3; font-weight: 500; }
.t-small   { font-size: var(--t-small); line-height: 1.4; font-weight: 500; }
.t-label   { font-size: var(--t-label); line-height: 1.2; font-weight: 600; letter-spacing: var(--t-label-ls); text-transform: uppercase; color: var(--ink-3); }
.t-micro   { font-size: var(--t-micro); line-height: 1.2; font-weight: 500; }
.t-lesson  { font-size: var(--t-lesson); line-height: var(--t-lesson-lh); font-weight: 400; max-width: 64ch; }
.serif, .dvj-serif { font-family: inherit; font-style: normal; font-weight: inherit; font-size: inherit; letter-spacing: inherit; } /* geen cursief (brandboek) */
.num { font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* Uitkomstkleur, alleen via data-sign of klasse (1.2 regel 1) */
.pos, [data-sign="pos"] { color: var(--pos); }
.neg, [data-sign="neg"] { color: var(--neg); }
.flat, [data-sign="flat"] { color: var(--flat); }
.gold { color: var(--gold); }
.ink-2 { color: var(--ink-2); }
.ink-3 { color: var(--ink-3); }
.ink-4 { color: var(--ink-4); }
.ink { color: var(--ink); }

/* Privacy (3.4). De tekst zelf wordt door ui/fmt gemaskeerd; dit is de vaste breedte. */
html[data-privacy="1"] [data-money].is-masked, .is-masked { display: inline-block; min-width: 5ch; letter-spacing: .04em; }

/* Iconen (2.7) */
.ic { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.ic--16 { width: 16px; height: 16px; }
.ic--14 { width: 14px; height: 14px; }
.ic--12 { width: 12px; height: 12px; }
.ic--24 { width: 24px; height: 24px; }

/* Pagina en raster (2.3, 3.1) */
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--page-pad) 48px; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap-tile); }
.grid > [class*="col-"] { min-width: 0; }
.col-1 { grid-column: span 1; } .col-2 { grid-column: span 2; } .col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; } .col-6 { grid-column: span 6; } .col-7 { grid-column: span 7; } .col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; } .col-10 { grid-column: span 10; } .col-11 { grid-column: span 11; } .col-12 { grid-column: span 12; }
.sections { display: flex; flex-direction: column; gap: var(--gap-section); }
@media (max-width: 1023px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-2 { grid-column: span 2; } .col-3, .col-4, .col-5 { grid-column: span 3; }
  .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 { grid-column: span 6; }
}
@media (max-width: 767px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-1, .col-2, .col-3 { grid-column: span 1; }
  .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 { grid-column: span 2; }
  .col-m-2 { grid-column: span 2; }
}

/* Paneel (5.1, 2.5) */
.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--pad-card);
  box-shadow: var(--shadow-panel);
  min-width: 0;
}
@media (min-width: 1024px) and (hover: hover) {
  .panel { background: var(--panel-glass); -webkit-backdrop-filter: blur(28px); backdrop-filter: blur(28px); }
  .panel--lg { padding: 24px; }
}
.panel--flush { padding: 0; }
.panel--clickable { cursor: pointer; transition: border-color 160ms var(--ease), transform 160ms var(--ease), box-shadow 160ms var(--ease); }
@media (hover: hover) {
  .panel--clickable:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: var(--shadow-panel), var(--shadow-hover); }
}
.panel--accent::before {
  content: ""; position: absolute; left: var(--pad-card); top: -1px; width: 40px; height: 2px; background: var(--ink); border-radius: 0 0 2px 2px;
  animation: accent-in 400ms var(--ease) both;
}
@keyframes accent-in { from { width: 0; } to { width: 40px; } }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; margin-bottom: 12px; }
.panel__label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-label); line-height: 1.2; font-weight: 600; letter-spacing: var(--t-label-ls); text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.panel__label .ic { width: 14px; height: 14px; color: var(--ink-3); }
.panel__title { font-size: var(--t-h2); font-weight: 600; color: var(--ink); }
.panel__actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.panel__body { min-width: 0; }
.panel__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.panel[aria-busy="true"] { pointer-events: none; }

/* Panel-entrance (6.2) */
.page-enter [data-panel] { animation: panel-in var(--d-panel) var(--ease) both; animation-delay: calc(min(var(--i, 0), 7) * var(--d-stagger)); }
@keyframes panel-in { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
.page-back [data-panel] { animation: fade-in 120ms var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-swap { from { opacity: 0; } to { opacity: 1; } }

/* Stapelen en rijen */
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grow { flex: 1 1 auto; min-width: 0; }
.shrink-0 { flex: 0 0 auto; }
.right { text-align: right; }
.center { text-align: center; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; }
.mb-2 { margin-top: 0; margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.scroll-x { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.scroll-x--fade { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.hide-mobile { } .only-mobile { display: none !important; }
@media (max-width: 767px) { .hide-mobile { display: none !important; } .only-mobile { display: initial !important; } }

/* Scheidslijn en labels */
.divider { height: 1px; background: var(--line); border: 0; }
.label { font-size: var(--t-label); font-weight: 600; letter-spacing: var(--t-label-ls); text-transform: uppercase; color: var(--ink-3); }

/* Lijsten met definitie (recaps) */
.dvj-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.dvj-dl dt { color: var(--ink-3); }
.dvj-dl dd { color: var(--ink); font-weight: 500; }

/* Gedeelde tooltip-elementen (één per document) */
#chart-tip, #dvj-tip { position: fixed; z-index: var(--z-popover); pointer-events: none; }

/* Alleen-lezen (3.7) */
.is-readonly, [data-readonly="1"] .dvj-btn--primary { color: var(--ink-4) !important; background: var(--panel-3) !important; cursor: not-allowed; }

/* Zwart-wit afbeeldingen van firms (3.3) */
.dvj-firm { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; background: var(--panel-3); color: var(--ink-2); font-size: 10px; font-weight: 700; overflow: hidden; flex: 0 0 auto; }
.dvj-firm img { width: 100%; height: 100%; }
.dvj-firm--28 { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.dvj-firm--24 { width: 24px; height: 24px; font-size: 11px; }
.dvj-firm--round { border-radius: 999px; }

/* Beeldmerk-spinner (6.9) */
.dvj-spinner { width: 16px; height: 16px; color: currentColor; }
.dvj-spinner path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; animation: logo-draw 800ms var(--ease) infinite; }
.dvj-spinner path:nth-child(2) { animation-delay: 60ms; }
@keyframes logo-draw { 0% { stroke-dashoffset: 420; opacity: 1; } 75% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.dvj-spinner--24 { width: 24px; height: 24px; }
.dvj-spinner--40 { width: 40px; height: 40px; }
