/* 3matenmeten.nl — brand layer over the Bootstrap 5.3 grid (no Bootstrap theme, no Bootstrap JS).
      All custom components are prefixed mm-. Tokens are mapped to --bs-* where useful. */

.mm {
    --brand-ink: #0F172A;
    --brand-meten: #0EA5A4;
    --brand-berekenen: #F97316;
    --brand-omrekenen: #6366F1;
    --brand-accent: #FACC15;
    --text-meten: #0F766E;
    --text-berekenen: #C2410C;
    --text-omrekenen: #4F46E5;
    --soft-meten: #E2F4F3;
    --soft-berekenen: #FFEEE2;
    --soft-omrekenen: #EBECFD;
    --surface: #F2F5F9;
    --surface-card: #FFFFFF;
    --surface-sunken: #EBF0F6;
    --card-border: rgba(15, 23, 42, .07);
    --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --text: #0F172A;
    --text-muted: #475569;
    --text-subtle: #64748B;
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --success: #15803D;
    --success-soft: #ECFDF3;
    --warning: #A16207;
    --warning-soft: #FEFCE8;
    --danger: #B91C1C;
    --danger-soft: #FEF2F2;
    --focus: #2563EB;
    --grid-line: rgba(15, 23, 42, .06);
    --shadow-lift: 0 6px 18px rgba(15, 23, 42, .08);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 18px;
    --font-head: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
    --font-body: "Inter", system-ui, sans-serif;
    --font-num: "Inter", system-ui, sans-serif;
    --bs-primary: var(--brand-ink);
    --bs-body-bg: var(--surface);
    --bs-body-color: var(--text);
    --bs-border-color: var(--border);
    --bs-gutter-x: 1rem;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}
.mm[data-bs-theme="dark"] {
    --brand-ink: #E2E8F0;
    --brand-meten: #2DD4BF;
    --brand-berekenen: #FB923C;
    --brand-omrekenen: #818CF8;
    --text-meten: #5EEAD4;
    --text-berekenen: #FDBA74;
    --text-omrekenen: #A5B4FC;
    --soft-meten: rgba(45, 212, 191, .12);
    --soft-berekenen: rgba(251, 146, 60, .12);
    --soft-omrekenen: rgba(129, 140, 248, .14);
    --surface: #0B1120;
    --surface-card: #111827;
    --surface-sunken: #0F172A;
    --text: #E2E8F0;
    --text-muted: #A3B1C6;
    --text-subtle: #8796AD;
    --border: #1F2937;
    --border-strong: #334155;
    --success: #4ADE80;
    --success-soft: rgba(74, 222, 128, .1);
    --warning: #FACC15;
    --warning-soft: rgba(250, 204, 21, .1);
    --danger: #F87171;
    --danger-soft: rgba(248, 113, 113, .1);
    --focus: #60A5FA;
    --card-border: #1F2937;
    --shadow-card: none;
    --grid-line: rgba(226, 232, 240, .05);
    --shadow-lift: 0 6px 18px rgba(0, 0, 0, .35);
}
.mm *, .mm *::before, .mm *::after { box-sizing: border-box; }
.mm h1, .mm h2, .mm h3, .mm h4, .mm h5 { font-family: var(--font-head); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0; color: var(--text); }
.mm h1 { font-size: 36px; }
.mm h2 { font-size: 28px; }
.mm h3 { font-size: 22px; }
.mm h4 { font-size: 18px; }
.mm h5 { font-size: 16px; }
@media (min-width: 992px) { .mm h1 { font-size: 48px; } .mm h2 { font-size: 36px; } .mm h3 { font-size: 22px; } }
.mm p { margin: 0; }
.mm a { color: inherit; text-decoration: none; }
.mm a:hover { color: inherit; }
.mm ul, .mm ol { margin: 0; padding: 0; list-style: none; }
.mm button, .mm input, .mm select, .mm textarea { font: inherit; color: inherit; }
.mm :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mm .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.mm .muted { color: var(--text-muted); }
.mm .subtle { color: var(--text-subtle); }
.mm .small { font-size: 14px; }
.mm .xsmall { font-size: 12px; }
.mm .lead { font-size: 18px; color: var(--text-muted); }
.mm .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-subtle); }
.mm .section { padding-block: 40px; }
@media (min-width: 992px) { .mm .section { padding-block: 72px; } }
.mm .section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.mm .section-head p { color: var(--text-muted); margin-top: 6px; }
.mm .link-more { font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; color: var(--text); border-bottom: 1px solid var(--border-strong); padding-bottom: 2px; }
.mm .link-more:hover { border-color: var(--text); }
.mm .stack { display: flex; flex-direction: column; }
.mm .row-flex { display: flex; align-items: center; }
.mm .gap-1 { gap: 4px; } .mm .gap-2 { gap: 8px; } .mm .gap-3 { gap: 16px; } .mm .gap-4 { gap: 24px; }
.mm .wrap { flex-wrap: wrap; }
.mm .between { justify-content: space-between; }
.mm .divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* pillar scoping */
.mm.p-meten, .mm .p-meten { --pc: var(--brand-meten); --pc-text: var(--text-meten); --pc-soft: var(--soft-meten); }
.mm.p-berekenen, .mm .p-berekenen { --pc: var(--brand-berekenen); --pc-text: var(--text-berekenen); --pc-soft: var(--soft-berekenen); }
.mm.p-omrekenen, .mm .p-omrekenen { --pc: var(--brand-omrekenen); --pc-text: var(--text-omrekenen); --pc-soft: var(--soft-omrekenen); }
.mm .pc-text { color: var(--pc-text); }
.mm .pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--pc); display: inline-block; flex: none; }

/* ruler tick motif */
.mm .mm-ticks { height: 8px; background-image: url("../images/tick-light.svg"); background-repeat: repeat-x; background-position: left bottom; }
.mm[data-bs-theme="dark"] .mm-ticks { background-image: url("../images/tick-dark.svg"); }
.mm .mm-blueprint { background-color: var(--surface); background-image: url("../images/grid-light.svg"); background-size: 24px 24px; }
.mm[data-bs-theme="dark"] .mm-blueprint { background-image: url("../images/grid-dark.svg"); }

/* buttons */
.mm .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 500; font-size: 15px; line-height: 1; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, transform .1s; }
.mm .btn:active { transform: translateY(1px); }
.mm .btn-primary { background: var(--brand-ink); color: var(--surface-card); }
.mm[data-bs-theme="dark"] .btn-primary { color: #0B1120; }
.mm .btn-primary:hover { background: #1E293B; color: #fff; }
.mm[data-bs-theme="dark"] .btn-primary:hover { background: #fff; color: #0B1120; }
.mm .btn-outline { background: var(--surface-card); border-color: var(--border-strong); color: var(--text); }
.mm .btn-outline:hover { border-color: var(--text); }
.mm .btn-ghost { background: transparent; color: var(--text); }
.mm .btn-ghost:hover { background: var(--surface-sunken); }
.mm .btn-pillar { background: var(--pc-text); color: #fff; }
.mm[data-bs-theme="dark"] .btn-pillar { background: var(--pc); color: #0B1120; }
.mm .btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.mm .btn-lg { min-height: 52px; padding: 0 24px; font-size: 16px; }
.mm .btn-icon { width: 44px; padding: 0; }
.mm .btn-icon.btn-sm { width: 36px; }
.mm .btn[disabled] { opacity: .45; cursor: not-allowed; }
.mm .bi { font-size: 1.05em; line-height: 1; }

/* badges & chips */
.mm .badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1; background: var(--surface-sunken); color: var(--text-muted); border: 1px solid var(--border); }
.mm .badge-new { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.mm .badge-pop { background: var(--pc-soft, var(--surface-sunken)); color: var(--pc-text, var(--text)); border-color: transparent; }
.mm .badge-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--brand-berekenen); color: #fff; border: 0; font-size: 11px; justify-content: center; }
.mm .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mm .chips-scroll { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.mm .chips-scroll > * { scroll-snap-align: start; flex: none; }
@media (min-width: 768px) { .mm .chips-scroll { flex-wrap: wrap; overflow: visible; } }
.mm .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface-card); border: 1px solid var(--border); font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; }
.mm .chip:hover { border-color: var(--border-strong); }
.mm .chip.is-active { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--surface-card); }
.mm[data-bs-theme="dark"] .chip.is-active { color: #0B1120; }
.mm .chip .bi { color: var(--text-subtle); }
.mm .chip.is-active .bi { color: inherit; }
.mm kbd { font-family: var(--font-num); font-size: 12px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface-card); color: var(--text-muted); }

/* header */
.mm .mm-header { background: var(--surface-card); position: relative; z-index: 5; }
.mm .mm-header-bar { display: flex; align-items: center; gap: 16px; height: 68px; }
.mm .mm-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-size: 20px; letter-spacing: -.02em; color: var(--text); flex: none; }
.mm .mm-logo b { font-weight: 700; }
.mm .mm-logo span { font-weight: 400; }
.mm .mm-nav { display: none; align-items: center; gap: 4px; margin-left: 16px; }
.mm .mm-nav a { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--radius-sm); font-weight: 500; font-size: 15px; color: var(--text); }
.mm .mm-nav a:hover, .mm .mm-nav a.is-open { background: var(--surface-sunken); }
.mm .mm-nav a.is-active { box-shadow: inset 0 -2px 0 var(--pc); border-radius: 0; }
.mm .mm-nav .bi-chevron-down { font-size: 11px; color: var(--text-subtle); }
.mm .mm-search-trigger { display: none; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; min-width: 260px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text-subtle); font-size: 14px; cursor: text; margin-left: auto; }
.mm .mm-search-trigger kbd { margin-left: auto; }
.mm .mm-header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mm .mm-header-actions .btn-icon { position: relative; }
@media (min-width: 992px) {
    .mm .mm-nav { display: flex; }
    .mm .mm-search-trigger { display: inline-flex; }
    .mm .mm-header-actions { margin-left: 0; }
}

/* mega menu */
.mm .mm-megamenu { background: var(--surface-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lift); padding-block: 28px; }
.mm .mm-megamenu h5 { font-family: var(--font-body); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); margin-bottom: 12px; }
.mm .mm-megamenu li a { display: block; padding: 6px 0; font-size: 15px; color: var(--text); }
.mm .mm-megamenu li a:hover { color: var(--pc-text); }

/* hero & search */
.mm .mm-hero { border-bottom: 1px solid var(--border); }
.mm .mm-hero-inner { padding-block: 48px 40px; }
@media (min-width: 992px) { .mm .mm-hero-inner { padding-block: 88px 72px; } }
.mm .mm-search-lg { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 8px 0 20px; background: var(--surface-card); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.mm .mm-search-lg:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.mm .mm-search-lg .bi-search { font-size: 20px; color: var(--text-subtle); }
.mm .mm-search-lg input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 18px; color: var(--text); }
.mm .mm-search-lg input::placeholder { color: var(--text-subtle); }

/* cards */
.mm .card { background: var(--surface-card); border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.mm .card-pad { padding: 20px; }
@media (min-width: 992px) { .mm .card-pad { padding: 24px; } }
.mm .lift { transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
.mm .lift:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }

.mm .mm-pillar-card { height: 100%; display: flex; flex-direction: column; border-top: 4px solid var(--pc); border-radius: var(--radius); overflow: hidden; }
.mm .mm-pillar-card .pc-icon { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--pc-soft); color: var(--pc-text); display: grid; place-items: center; font-size: 24px; }
.mm .mm-pillar-card .num-badge { font-family: var(--font-num); font-size: 13px; color: var(--pc-text); font-weight: 600; }
.mm .mm-pillar-card ul li a { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--border); font-size: 15px; font-weight: 500; }
.mm .mm-pillar-card ul li a .bi { color: var(--text-subtle); }
.mm .mm-pillar-card ul li a:hover { color: var(--pc-text); }

.mm .mm-tool-card { height: 100%; display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.mm .mm-tool-card .tc-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.mm .mm-tool-card .tc-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--pc-soft); color: var(--pc-text); display: grid; place-items: center; font-size: 20px; flex: none; }
.mm .mm-tool-card h4 { font-size: 17px; }
.mm .mm-tool-card p { font-size: 14px; color: var(--text-muted); }
.mm .mm-tool-card .tc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-subtle); }
.mm .mm-tool-card .tc-fav { width: 32px; height: 32px; margin: -6px -6px 0 0; border: 0; background: transparent; color: var(--text-subtle); border-radius: 6px; cursor: pointer; }
.mm .mm-tool-card .tc-fav:hover { background: var(--surface-sunken); color: var(--text); }
.mm .mm-tool-card.compact { flex-direction: row; align-items: center; padding: 14px; }
.mm .mm-tool-card.compact h4 { font-size: 15px; }

/* breadcrumb */
.mm .mm-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--text-subtle); }
.mm .mm-breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.mm .mm-breadcrumb .bi { font-size: 10px; }
.mm .mm-breadcrumb [aria-current] { color: var(--pc-text); font-weight: 500; }

/* step indicator */
.mm .mm-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); overflow: hidden; }
.mm .mm-steps a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-size: 14px; font-weight: 500; color: var(--text-muted); border-right: 1px solid var(--border); position: relative; }
.mm .mm-steps a:last-child { border-right: 0; }
.mm .mm-steps a .sn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-num); font-size: 12px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--text-muted); flex: none; }
.mm .mm-steps a.is-done .sn { background: var(--pc-text); border-color: var(--pc-text); color: #fff; }
.mm .mm-steps a.is-current { color: var(--text); }
.mm .mm-steps a.is-current .sn { border-color: var(--pc-text); color: var(--pc-text); border-width: 2px; }
.mm .mm-steps a.is-current::after, .mm .mm-steps a.is-done::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--pc); }
.mm .mm-steps .st-sub { display: none; font-size: 12px; color: var(--text-subtle); font-weight: 400; }
@media (min-width: 768px) { .mm .mm-steps a { padding: 14px 18px; } .mm .mm-steps .st-sub { display: block; } }

/* inputs */
.mm .mm-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.mm .mm-group { padding-block: 18px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.mm .mm-group:first-of-type { border-top: 0; }
.mm .mm-group-title { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-subtle); }
.mm .mm-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.mm .mm-label .bi-info-circle { color: var(--text-subtle); font-size: 14px; }
.mm .mm-input { display: flex; align-items: stretch; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-card); overflow: hidden; }
.mm .mm-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.mm .mm-input input, .mm .mm-input select { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 12px; font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 15px; }
.mm .mm-input select { font-family: var(--font-body); appearance: none; cursor: pointer; }
.mm .mm-input .unit { display: grid; place-items: center; padding: 0 12px; background: var(--surface-sunken); border-left: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.mm .mm-input.is-invalid { border-color: var(--danger); }
.mm .mm-input.is-disabled { background: var(--surface-sunken); opacity: .6; }
.mm .mm-hint { font-size: 13px; color: var(--text-subtle); }
.mm .mm-hint.is-error { color: var(--danger); display: flex; gap: 6px; align-items: start; }
.mm .mm-range { display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; align-items: center; }
.mm .mm-range input[type="range"] { width: 100%; height: 28px; accent-color: var(--pc-text); cursor: pointer; margin: 0; }
.mm .mm-range-scale { display: flex; justify-content: space-between; font-family: var(--font-num); font-size: 11px; color: var(--text-subtle); margin-top: -6px; padding-right: 116px; }
.mm .mm-stepper { display: inline-grid; grid-template-columns: 44px 56px 44px; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-card); }
.mm .mm-stepper button { border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--text); }
.mm .mm-stepper button:hover { background: var(--surface-sunken); }
.mm .mm-stepper output { display: grid; place-items: center; font-family: var(--font-num); font-weight: 600; border-inline: 1px solid var(--border); }
.mm .mm-segment { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-sm); background: var(--surface-sunken); border: 1px solid var(--border); }
.mm .mm-segment button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; font-size: 14px; font-weight: 500; color: var(--text-muted); cursor: pointer; }
.mm .mm-segment button.is-active { background: var(--surface-card); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.mm .mm-segment.full { display: flex; } .mm .mm-segment.full button { flex: 1; }
.mm .mm-pattern { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mm .mm-pattern button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-muted); }
.mm .mm-pattern button.is-active { border-color: var(--pc-text); color: var(--text); box-shadow: inset 0 0 0 1px var(--pc-text); }
.mm .mm-collapse { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 44px; border: 0; background: transparent; padding: 0; font-weight: 500; font-size: 15px; cursor: pointer; color: var(--text); }

/* results */
.mm .mm-result-hero { position: relative; padding: 28px 24px 24px; border-radius: var(--radius); background: var(--surface-card); border: 1px solid var(--border); overflow: hidden; }
.mm .mm-result-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 10px; background-color: var(--brand-accent); background-image: url("../images/tape.svg"); background-repeat: repeat-x; background-position: left top; }
.mm .mm-result-big { font-family: var(--font-head); font-variant-numeric: tabular-nums; font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -.03em; color: var(--text); }
@media (min-width: 992px) { .mm .mm-result-big { font-size: 72px; } }
.mm .mm-result-unit { font-family: var(--font-head); font-size: 22px; font-weight: 500; color: var(--text-muted); }
.mm .mm-stat { height: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card); }
.mm .mm-stat .k { font-size: 13px; color: var(--text-muted); }
.mm .mm-stat .v { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; margin-top: 2px; }
.mm .mm-stat .v small { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--text-subtle); }
.mm .mm-stat .d { font-size: 12px; color: var(--text-subtle); margin-top: 2px; }
.mm .mm-visual { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-card); overflow: hidden; }
.mm .mm-visual-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.mm .mm-visual-stage { position: relative; background: var(--surface-sunken); padding: 24px; display: grid; place-items: center; }

/* alerts */
.mm .mm-alert { display: flex; gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; border: 1px solid transparent; }
.mm .mm-alert .bi { font-size: 18px; margin-top: 1px; }
.mm .mm-alert.info { background: var(--surface-sunken); border-color: var(--border); }
.mm .mm-alert.warn { background: var(--warning-soft); color: var(--text); border-color: rgba(161, 98, 7, .2); }
.mm .mm-alert.warn .bi { color: var(--warning); }
.mm .mm-alert.ok { background: var(--success-soft); border-color: rgba(21, 128, 61, .2); }
.mm .mm-alert.ok .bi { color: var(--success); }
.mm .mm-alert.err { background: var(--danger-soft); border-color: rgba(185, 28, 28, .2); }
.mm .mm-alert.err .bi { color: var(--danger); }

/* shopping list */
.mm .mm-shop li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); }
.mm .mm-shop li:first-child { border-top: 0; }
.mm .mm-check { width: 20px; height: 20px; accent-color: var(--brand-ink); margin: 0; cursor: pointer; }
.mm .mm-shop .q { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; }
.mm .mm-shop .price { font-family: var(--font-num); font-size: 14px; color: var(--text-muted); text-align: right; white-space: nowrap; }
.mm .mm-shop .is-done .name { text-decoration: line-through; color: var(--text-subtle); }
.mm .ad-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-subtle); }

/* tabs */
.mm .mm-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.mm .mm-tabs button { flex: none; min-height: 48px; padding: 0 16px; border: 0; background: transparent; font-weight: 500; font-size: 15px; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mm .mm-tabs button.is-active { color: var(--text); border-bottom-color: var(--text); }
.mm .mm-formula { padding: 20px; border-radius: var(--radius-sm); background: var(--surface-sunken); border: 1px solid var(--border); font-family: var(--font-num); font-size: 15px; line-height: 2; overflow-x: auto; }
.mm .mm-formula .var { color: var(--pc-text); font-weight: 600; }
.mm .prose p { color: var(--text-muted); margin-bottom: 14px; max-width: 68ch; }
.mm .prose h3 { margin: 28px 0 10px; }
.mm .prose ul { margin: 0 0 14px; }
.mm .prose ul li { position: relative; padding-left: 20px; margin-bottom: 6px; color: var(--text-muted); }
.mm .prose ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 2px; background: var(--text-subtle); }

/* accordion / FAQ */
.mm .mm-faq { border-top: 1px solid var(--border); }
.mm .mm-faq details { border-bottom: 1px solid var(--border); }
.mm .mm-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0; font-weight: 500; font-size: 16px; cursor: pointer; }
.mm .mm-faq summary::-webkit-details-marker { display: none; }
.mm .mm-faq summary .bi { transition: transform .2s; color: var(--text-subtle); }
.mm .mm-faq details[open] summary .bi { transform: rotate(45deg); }
.mm .mm-faq details p { padding: 0 0 18px; color: var(--text-muted); max-width: 70ch; }

/* carousel */
.mm .mm-carousel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 80%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.mm .mm-carousel > * { scroll-snap-align: start; }
@media (min-width: 768px) { .mm .mm-carousel { grid-auto-columns: minmax(240px, calc(33.333% - 11px)); } }
@media (min-width: 1200px) { .mm .mm-carousel { grid-auto-columns: calc(25% - 12px); } }

/* feedback */
.mm .mm-feedback { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* trust strip */
.mm .mm-trust { display: flex; flex-wrap: wrap; gap: 10px 28px; justify-content: center; font-size: 15px; font-weight: 500; color: var(--text-muted); }
.mm .mm-trust span { display: inline-flex; align-items: center; gap: 8px; }
.mm .mm-trust .bi { color: var(--text); }

/* footer */
.mm .mm-footer { background: #0F172A; color: #CBD5E1; }
.mm[data-bs-theme="dark"] .mm-footer { background: #070B16; }
.mm .mm-footer h5 { color: #fff; font-family: var(--font-head); font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.mm .mm-footer li a { display: block; padding: 5px 0; font-size: 14px; color: #CBD5E1; }
.mm .mm-footer li a:hover { color: #fff; text-decoration: underline; }
.mm .mm-footer .mm-logo { color: #fff; }
.mm .mm-footer .fine { font-size: 13px; color: #94A3B8; }
.mm .mm-footer .fine a { color: #CBD5E1; }
.mm .mm-footer .mm-ticks { background-image: url("../images/tick-dark.svg"); }
.mm .mm-news { display: flex; gap: 8px; max-width: 440px; }
.mm .mm-news input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid #334155; background: #111827; color: #fff; }
.mm .mm-news input::placeholder { color: #94A3B8; }
.mm .mm-footer .btn-light { background: #fff; color: #0F172A; }
.mm .mm-footer .p-meten h5 .pdot, .mm .mm-footer .p-berekenen h5 .pdot, .mm .mm-footer .p-omrekenen h5 .pdot { width: 10px; height: 10px; }

/* mobile bottom nav */
.mm .mm-bottom-nav { position: sticky; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface-card); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.mm .mm-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; font-size: 11px; font-weight: 500; color: var(--text-subtle); position: relative; }
.mm .mm-bottom-nav a .bi { font-size: 20px; }
.mm .mm-bottom-nav a.is-active { color: var(--pc-text, var(--text)); }
.mm .mm-bottom-nav a.is-active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--pc, var(--text)); border-radius: 0 0 3px 3px; }
@media (min-width: 992px) { .mm .mm-bottom-nav { display: none; } }

/* sticky result bar (mobile) */
.mm .mm-sticky-result { position: sticky; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface-card); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(15, 23, 42, .06); }
.mm .mm-sticky-result::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 4px; background: var(--brand-accent); }
@media (min-width: 992px) { .mm .mm-sticky-result { display: none; } }

/* projects */
.mm .mm-project-card .pj-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--surface-sunken); display: grid; place-items: center; font-size: 24px; color: var(--text); border: 1px solid var(--border); }
.mm .mm-project-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding-top: 14px; border-top: 1px solid var(--border); }
.mm .mm-project-card dt { font-size: 12px; color: var(--text-subtle); font-weight: 400; }
.mm .mm-project-card dd { margin: 0; font-family: var(--font-num); font-weight: 600; font-size: 15px; }

/* instrument */
.mm .mm-instrument { background: #0B1120; color: #E2E8F0; }
.mm .mm-perm-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 32px; background: var(--soft-meten); color: var(--text-meten); }

/* toast */
.mm .mm-toast { display: inline-flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: var(--radius-sm); background: #0F172A; color: #fff; font-size: 14px; box-shadow: var(--shadow-lift); }
.mm .mm-toast .bi-check-circle { color: #4ADE80; }
.mm .mm-toast a { text-decoration: underline; color: #fff; }

/* skeleton */
.mm .mm-skel { background: var(--surface-sunken); border-radius: 6px; position: relative; overflow: hidden; }
.mm .mm-skel::after { content: ""; position: absolute; inset: 0; background: var(--border); opacity: 0; animation: mm-pulse 1.4s ease-in-out infinite; }
@keyframes mm-pulse { 50% { opacity: .7; } }

/* ad slot */
.mm .mm-ad { display: grid; place-items: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--text-subtle); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; background: var(--surface); }

/* palette */
.mm .mm-palette { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 24px 60px rgba(15, 23, 42, .25); overflow: hidden; }
.mm .mm-palette-group { padding: 8px; }
.mm .mm-palette-group > .eyebrow { padding: 8px 10px 6px; display: block; }
.mm .mm-palette-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius-sm); font-size: 15px; }
.mm .mm-palette-item.is-active { background: var(--surface-sunken); }
.mm .mm-palette-item .meta { margin-left: auto; font-size: 13px; color: var(--text-subtle); }

/* section bands: alternate colour so pages read in clear blocks */
.mm .band-white { background: var(--surface-card); }
.mm .band-grey { background: var(--surface); }
.mm .band-meten { background: var(--soft-meten); }
.mm .band-berekenen { background: var(--soft-berekenen); }
.mm .band-omrekenen { background: var(--soft-omrekenen); }
.mm .band-ink { background-color: #0F172A; --text: #F8FAFC; --text-muted: #CBD5E1; --text-subtle: #94A3B8; color: var(--text); }
.mm[data-bs-theme="dark"] .band-ink { background-color: #020617; }
.mm .band-ink.mm-blueprint { background-image: url("../images/grid-dark.svg"); }
.mm .band-ink.mm-hero { border-bottom: 0; }
.mm .band-ink .chip { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #F8FAFC; }
.mm .band-ink .chip:hover { background: rgba(255, 255, 255, .12); }
.mm .band-ink .chip .bi { color: #94A3B8; }
.mm .band-ink .eyebrow { color: var(--brand-accent); }
.mm:not([data-bs-theme="dark"]) .band-ink .card,
.mm:not([data-bs-theme="dark"]) .band-ink .mm-search-lg { --text: #0F172A; --text-muted: #475569; --text-subtle: #64748B; color: var(--text); }
.mm .band-ink .mm-search-lg { border-color: transparent; }

/* sticky helper */
@media (min-width: 992px) { .mm .sticky-lg { position: sticky; top: 96px; } }

@media (prefers-reduced-motion: reduce) {
    .mm *, .mm *::before, .mm *::after { animation: none !important; transition: none !important; }
}
@media print {
    .mm .mm-header, .mm .mm-footer, .mm .mm-bottom-nav, .mm .mm-sticky-result, .mm .mm-ad, .mm .no-print { display: none !important; }
}

/* ---- page shell (static export) ---- */
html, body { margin: 0; background: #F2F5F9; }
html[data-mm-theme="dark"], html[data-mm-theme="dark"] body { background: #0B1120; }
/* conditional blocks rendered by the template engine; toggled by JS via [hidden] */
[data-if] { display: contents; }
[data-if][hidden] { display: none; }
.mm-header-wrap { position: relative; }

/* ====================================================================================
   APP LAYER — components added for the PHP build (dialogs, palette, offcanvas, sheet,
   engine inputs, sensor instruments, maps, embeds, print). Same tokens as above.
   ==================================================================================== */

/* ---------- basics ---------- */
/* [hidden] must win over component display rules (.mm-alert, .row, .btn …), the scripts toggle it everywhere */
[hidden] { display: none !important; }
.mm .visually-hidden, .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.mm-skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: #0F172A; color: #fff; font: 600 14px Inter, sans-serif; text-decoration: none; }
.mm-skip:focus { top: 12px; }
.mm-root { min-height: 100vh; background: var(--surface); }
.mm .mm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mm .mm-anchor, .mm [id] { scroll-margin-top: 96px; }
.mm .mm-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
body.is-locked { overflow: hidden; }
.mm #main:focus { outline: 0; }
.mm .mm-hero-title { font-size: 44px; letter-spacing: -.03em; max-width: 12ch; }
@media (min-width: 992px) { .mm .mm-hero-title { font-size: 56px; } }
.mm .mm-tool-title { font-size: 30px; }
@media (min-width: 992px) { .mm .mm-tool-title { font-size: 36px; } }

/* icon tiles */
.mm .mm-icon-tile { width: 44px; height: 44px; border-radius: var(--radius-sm); display: grid; place-items: center; flex: none; background: var(--pc-soft, var(--surface-sunken)); color: var(--pc-text, var(--text)); font-size: 22px; }
.mm .mm-icon-tile.lg { width: 64px; height: 64px; border-radius: 10px; font-size: 30px; }
.mm .mm-icon-tile.xl { width: 56px; height: 56px; border-radius: 10px; font-size: 28px; }
.mm .mm-icon-tile.neutral { background: var(--surface-sunken); color: var(--text); border: 1px solid var(--border); }
.mm .mm-icon-tile.solid { background: var(--pc-text); color: #fff; }
.mm[data-bs-theme="dark"] .mm-icon-tile.solid { background: var(--pc); color: #0B1120; }

/* numbered steps */
.mm .mm-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; font-family: var(--font-num); font-size: 12px; font-weight: 600; border: 1px solid var(--border-strong); color: var(--text-muted); }
.mm .mm-num.is-current { background: var(--pc-soft); color: var(--pc-text); border-color: transparent; }
.mm .mm-num.is-done { background: var(--pc-text); color: #fff; border-color: var(--pc-text); }

/* header: mega menu sits under the bar; sticky on scroll */
.mm .mm-header-wrap { position: sticky; top: 0; z-index: 30; }
.mm .mm-megamenu { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; }
.mm .mm-megamenu h5 a { display: inline-flex; align-items: center; gap: 6px; }
.mm .mm-megamenu h5 a:hover { color: var(--pc-text); }
.mm .mm-megamenu h5 .bi { font-size: 13px; color: var(--pc-text); }
.mm .mm-megamenu li a { display: flex; align-items: center; gap: 10px; }
.mm .mm-megamenu li a .bi { flex: none; width: 16px; font-size: 15px; color: var(--text-subtle); transition: color .15s; }
.mm .mm-megamenu li a:hover .bi { color: var(--pc-text); }
.mm .mm-megamenu li a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm .mm-megamenu .mm-mega-all { font-weight: 500; padding-left: 26px; }
.mm .mm-nav a.is-active { color: var(--text); }
.mm .btn.is-active, .mm .tc-fav.is-fav, .mm [data-fav].is-fav .bi { color: var(--brand-accent); }
.mm .btn-outline.is-active { border-color: var(--text); background: var(--surface-sunken); }
.mm .tc-fav.is-fav { color: #CA8A04; }

/* offcanvas */
.mm .mm-offcanvas { position: fixed; inset: 0; z-index: 60; }
.mm .mm-offcanvas-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.mm .mm-offcanvas-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw); background: var(--surface-card); display: flex; flex-direction: column; box-shadow: var(--shadow-lift); animation: mm-slide-in .2s ease-out; padding-bottom: env(safe-area-inset-bottom); }
.mm .mm-offcanvas-list li a { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 500; }
.mm .mm-offcanvas-list li a .bi { color: var(--text-subtle); }
.mm .mm-offcanvas-list li a .num { margin-left: auto; }
.mm .mm-offcanvas .mm-faq summary { min-height: 52px; }
@keyframes mm-slide-in { from { transform: translateX(30px); opacity: 0; } }

/* dialogs */
.mm .mm-dialog { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100vw - 24px)); width: 100%; color: var(--text); }
.mm .mm-dialog::backdrop { background: rgba(15, 23, 42, .5); }
.mm .mm-dialog-card { background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); }
.mm .mm-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.mm .mm-dialog-palette { max-width: 680px; margin-top: 10vh; }
.mm .mm-palette-body { max-height: min(60vh, 520px); overflow-y: auto; }
.mm .mm-palette-item { cursor: pointer; color: var(--text); }
.mm .mm-palette-item:hover { background: var(--surface-sunken); }
.mm .mm-palette-answer { background: var(--pc-soft); }
.mm .mm-palette-answer.is-active { box-shadow: inset 0 0 0 2px var(--pc-text); background: var(--pc-soft); }
@media (max-width: 767.98px) {
    .mm .mm-dialog-palette { margin: 0; max-width: 100vw; height: 100dvh; max-height: 100dvh; }
    .mm .mm-dialog-palette .mm-palette { height: 100%; border-radius: 0; display: flex; flex-direction: column; }
    .mm .mm-dialog-palette .mm-palette-body { flex: 1; max-height: none; }
}
.mm .mm-share-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 12px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text); }
.mm .mm-share-btn .bi { font-size: 20px; }
.mm .mm-share-btn:hover { border-color: var(--border-strong); }
.mm .mm-qr { width: 128px; height: 128px; flex: none; display: grid; place-items: center; padding: 6px; border-radius: 8px; background: #fff; color: #0F172A; border: 1px solid var(--border); }
.mm .mm-qr svg { width: 100%; height: 100%; }
.mm .mm-radio-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.mm .mm-radio-card:has(input:checked) { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.mm .mm-radio-card input { accent-color: var(--brand-ink); width: 18px; height: 18px; margin: 0; }
.mm .mm-radio-card .xsmall { margin-left: auto; }

/* toasts */
.mm .mm-toasts { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 24px); }
@media (min-width: 992px) { .mm .mm-toasts { bottom: 24px; } }
.mm .mm-toast { pointer-events: auto; animation: mm-toast-in .2s ease-out; transition: opacity .3s, transform .3s; }
.mm .mm-toast.is-out { opacity: 0; transform: translateY(8px); }
@keyframes mm-toast-in { from { opacity: 0; transform: translateY(8px); } }

/* result pulse on change */
.mm .mm-pulse { animation: mm-pulse-once .6s ease-out; }
@keyframes mm-pulse-once { 0% { box-shadow: 0 0 0 0 rgba(250, 204, 21, .55); } 100% { box-shadow: 0 0 0 14px rgba(250, 204, 21, 0); } }
.mm .mm-anim-icon .bi { display: inline-block; transition: transform .3s ease; }
.mm .mm-pillar-card:hover .mm-anim-icon .bi { transform: rotate(-8deg) scale(1.08); }

/* ---------- engine inputs ---------- */
.mm .mm-input .unit-plain { background: transparent; border-left: 0; pointer-events: none; }
.mm .mm-input select { padding-right: 0; }
.mm .mm-input input[type="date"], .mm .mm-input input[type="time"] { font-family: var(--font-body); }
.mm .mm-textarea { width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-card); color: var(--text); resize: vertical; font: inherit; }
.mm .mm-textarea:focus { outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.mm .mm-switch { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; cursor: pointer; }
.mm .mm-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mm .mm-switch-track { width: 42px; height: 24px; flex: none; border-radius: 12px; background: var(--border-strong); position: relative; transition: background .15s; }
.mm .mm-switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.mm .mm-switch input:checked + .mm-switch-track { background: var(--pc-text, var(--brand-ink)); }
.mm .mm-switch input:checked + .mm-switch-track::after { transform: translateX(18px); }
.mm .mm-switch input:focus-visible + .mm-switch-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.mm .mm-repeat-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.mm .mm-repeat-row .mm-repeat-cell:not(.is-num) { grid-column: span 1; }
.mm .mm-repeat-num { font-family: var(--font-num); font-size: 12px; color: var(--text-subtle); text-align: center; }
.mm .mm-repeat-cell .mm-input { height: 40px; }
.mm .mm-repeat-cell .mm-input input, .mm .mm-repeat-cell .mm-input select { padding: 0 8px; font-size: 14px; }
.mm .mm-repeat-cell .unit { padding: 0 8px; font-size: 12px; }
.mm .mm-range-scale { margin-top: -8px; }
.mm .mm-input-card .mm-group:first-of-type { border-top: 0; }
.mm .mm-hint.is-error[hidden] { display: none; }

/* ---------- results ---------- */
.mm .mm-result-big { word-break: break-word; }
.mm .mm-sticky-num { font-size: 24px; font-weight: 600; }
.mm .mm-visual-stage svg { max-width: 100%; height: auto; }
.mm .mm-visual-stage { overflow-x: auto; }
.mm .mm-visual:fullscreen { background: var(--surface-card); display: flex; flex-direction: column; }
.mm .mm-visual:fullscreen .mm-visual-stage { flex: 1; }
.mm .mm-visual:fullscreen svg { max-height: 85vh !important; }
.mm .mm-table-wrap { overflow: auto; max-height: 420px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-card); }
.mm .mm-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.mm .mm-table caption { caption-side: top; text-align: left; padding: 12px 14px 4px; font-weight: 600; color: var(--text); }
.mm .mm-table th, .mm .mm-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mm .mm-table thead th { position: sticky; top: 0; background: var(--surface-sunken); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-subtle); font-weight: 600; z-index: 1; }
.mm .mm-table tbody th { font-weight: 500; }
.mm .mm-table tr.is-match th, .mm .mm-table tr.is-match td { background: var(--pc-soft, var(--soft-omrekenen)); color: var(--text); font-weight: 600; }
.mm .mm-table tr.is-match th:first-child { box-shadow: inset 3px 0 0 var(--pc-text, var(--text)); }
.mm .prose .mm-table-wrap { margin-bottom: 16px; max-height: none; }
.mm .mm-stat-btn { width: 100%; text-align: left; cursor: pointer; color: var(--text); }
.mm .mm-stat-btn:hover, .mm .mm-stat.is-active { border-color: var(--pc-text, var(--text)); box-shadow: inset 0 0 0 1px var(--pc-text, var(--text)); }
.mm .mm-next { display: block; padding: 20px; border-top: 4px solid var(--pc); }
.mm .mm-tabpanel { padding-top: 24px; }

/* sticky result → bottom sheet (mobile) */
.mm .mm-sticky-result { bottom: 0; }
@media (max-width: 991.98px) {
    body.is-tool .mm-bottom-nav { position: static; }
}
.mm .mm-sheet { position: fixed; inset: 0; z-index: 55; }
.mm .mm-sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.mm .mm-sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 85vh; overflow-y: auto; background: var(--surface-card); border-radius: 16px 16px 0 0; border-top: 4px solid var(--brand-accent); padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); animation: mm-sheet-up .22s ease-out; }
.mm .mm-sheet-handle { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 0 auto 14px; border: 0; padding: 0; cursor: pointer; }
@keyframes mm-sheet-up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 992px) { .mm .mm-sheet { display: none !important; } }

/* guided flow bar */
.mm .mm-flow-bar { background: var(--surface-card); border-bottom: 1px solid var(--border); }
.mm .mm-flow-dots { display: inline-flex; gap: 6px; }
.mm .mm-flow-dots a { width: 22px; height: 6px; border-radius: 3px; background: var(--border-strong); }
.mm .mm-flow-dots a.is-done { background: var(--pc-text); }
.mm .mm-flow-dots a.is-current { background: var(--pc); width: 34px; }
.mm .mm-flow-step { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--border); font-size: 14px; }
.mm .mm-flow-step a:hover { text-decoration: underline; }

/* hubs */
.mm .mm-chipbar { position: sticky; top: 76px; z-index: 4; background: var(--surface-card); border-bottom: 1px solid var(--border); }
@media (max-width: 991.98px) { .mm .mm-chipbar { top: 76px; } }
.mm .mm-rank-link { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 15px; font-weight: 500; }
.mm .mm-rank-link:hover { color: var(--pc-text); }
.mm [data-hub-item][hidden], .mm [data-hub-section][hidden] { display: none; }

/* articles & search */
.mm .mm-article-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.mm .mm-article-visual { aspect-ratio: 16 / 9; display: grid; place-items: center; border-bottom: 1px solid var(--border); }
.mm .mm-featured { display: block; overflow: hidden; }
.mm .mm-toc { padding: 18px 20px; }
.mm .mm-toc summary { list-style: none; cursor: pointer; margin-bottom: 8px; }
.mm .mm-toc summary::-webkit-details-marker { display: none; }
.mm .mm-toc a { display: block; padding: 8px 0 8px 12px; border-left: 2px solid var(--border); color: var(--text-muted); }
.mm .mm-toc a.is-active { border-left-color: var(--pc-text); color: var(--text); font-weight: 500; }
.mm .mm-embed-calc { margin: 8px 0 28px; overflow: hidden; }
.mm .mm-embed-in { padding: 18px; border-right: 1px solid var(--border); }
.mm .mm-embed-in .mm-group { padding-block: 0 14px; border-top: 0; }
.mm .mm-embed-out { padding: 18px; background: var(--surface-sunken); }
@media (max-width: 767.98px) { .mm .mm-embed-in { border-right: 0; border-bottom: 1px solid var(--border); } }
.mm .mm-result-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.mm .mm-result-link:hover span:first-child { color: var(--pc-text, var(--text)); text-decoration: underline; }

/* empty states, projects */
.mm .mm-empty { text-align: center; }
.mm .mm-empty-icon { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; border: 1px dashed var(--border-strong); display: grid; place-items: center; font-size: 26px; color: var(--text-subtle); }
.mm .mm-new-card { width: 100%; height: 100%; min-height: 180px; border-style: dashed; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; color: var(--text-muted); }
.mm .mm-project-item { padding: 14px 0; border-bottom: 1px solid var(--border); }
.mm .mm-project-item:last-child { border-bottom: 0; }
.mm .mm-project-icon-btn { border: 0; background: transparent; padding: 0; cursor: pointer; }
.mm .mm-project-icon-btn .pj-icon { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--surface-sunken); display: grid; place-items: center; font-size: 24px; color: var(--text); border: 1px solid var(--border); }
.mm .mm-editable { border-radius: 6px; padding: 0 4px; margin: 0 -4px; outline: 0; }
.mm .mm-editable:hover, .mm .mm-editable:focus { background: var(--surface-sunken); }
.mm .mm-icon-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.mm .mm-icon-pick input { position: absolute; opacity: 0; }
.mm .mm-icon-pick span { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 20px; cursor: pointer; }
.mm .mm-icon-pick input:checked + span { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); background: var(--surface-sunken); }
.mm .mm-icon-pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.mm .mm-shop label.name { cursor: pointer; }
.mm .mm-shop .q { text-align: right; }

/* home */
.mm .mm-phone-showcase { display: flex; justify-content: center; gap: 32px; align-items: end; }
.mm .mm-phone { width: 260px; height: 520px; border-radius: 40px; border: 10px solid #0F172A; background: #0B1120; padding: 28px 18px; display: flex; flex-direction: column; gap: 18px; color: #E2E8F0; }
.mm .mm-phone-tube { margin: auto 0; height: 56px; border-radius: 28px; border: 2px solid #334155; position: relative; background: #111827; overflow: hidden; }
.mm .mm-phone-tube span:first-child { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #334155; }
.mm .mm-phone-tube span:last-child { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #FACC15; transition: background .2s; }
.mm .mm-phone-tube span.is-level { background: #2DD4BF; }
.mm .mm-phone-buttons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mm .mm-phone-buttons span { height: 40px; border-radius: 8px; background: #1F2937; }
.mm .mm-phone-buttons span.is-on { background: #2DD4BF; }
.mm .mm-qr-card { width: 168px; padding: 16px; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.mm .mm-tape { position: relative; height: 40px; margin-top: 16px; background: var(--brand-accent); border-radius: 4px; overflow: hidden; }
.mm .mm-tape .mm-ticks { position: absolute; left: 0; right: 0; top: 0; height: 18px; transform: scaleY(-1); }
.mm .mm-tape span { position: absolute; right: 12px; bottom: 6px; font-size: 13px; font-weight: 600; color: #0F172A; }

/* footer accordion on mobile */
.mm .mm-footer-col summary { list-style: none; cursor: default; }
.mm .mm-footer-col summary::-webkit-details-marker { display: none; }
@media (max-width: 767.98px) {
    .mm .mm-footer-col { border-bottom: 1px solid #1E293B; }
    .mm .mm-footer-col summary { cursor: pointer; padding: 6px 0; }
    .mm .mm-footer-col summary h5 { margin-bottom: 8px; }
}
.mm .mm-footer .fine.is-error, .mm [data-form-msg].is-error { color: var(--danger); }
.mm .mm-footer [data-form-msg].is-error { color: #FCA5A5; }

/* feedback */
.mm .mm-feedback-more { width: 100%; }
.mm .mm-feedback .btn.is-active { border-color: var(--text); background: var(--surface-sunken); }

/* ---------- sensor tools ---------- */
.mm .mm-sensor-app { max-width: 520px; margin: 0 auto; }
.mm .mm-sensor-screen > .mm { width: 100%; min-height: 640px; display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.mm .mm-sensor-screen > .mm.mm-instrument { background: #0B1120; color: #E2E8F0; border-color: #1F2937; }
.mm .mm-sensor-top { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px; background: var(--surface-card); border-bottom: 1px solid var(--border); }
.mm .mm-sensor-content { flex: 1; padding: 24px 16px; display: flex; flex-direction: column; gap: 16px; }
.mm .mm-calib-visual { height: 220px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 12px; padding: 20px; overflow: hidden; }
.mm .mm-calib-phone { width: 200px; height: 26px; border-radius: 8px; background: #0F172A; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.mm .mm-calib-phone span { width: 40px; height: 4px; border-radius: 2px; background: #2DD4BF; }
.mm .mm-instrument-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 16px 20px 0; gap: 12px; }
.mm .mm-readout { font-size: 72px; font-weight: 600; line-height: 1; letter-spacing: -.04em; color: #fff; }
@media (min-width: 400px) { .mm .mm-readout { font-size: 84px; } }
.mm .mm-instrument-visual { flex: 1; width: 100%; display: grid; place-items: center; min-height: 220px; }
.mm .mm-instrument-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 20px calc(28px + env(safe-area-inset-bottom)); }
.mm .mm-instrument-controls .btn { flex-direction: column; gap: 4px; min-height: 64px; background: #111827; border-color: #1F2937; color: #E2E8F0; font-size: 13px; }
.mm .mm-instrument-controls .btn.is-on { background: #FACC15; border-color: #FACC15; color: #0F172A; }
.mm .mm-history-row { padding: 10px 14px; border-radius: 8px; background: #111827; border: 1px solid #1F2937; }
.mm .mm-cam { position: relative; width: 100%; max-width: 320px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #111827; }
.mm .mm-cam video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mm .mm-cam-target { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, .4); }
.mm .mm-swatch { display: block; width: 100%; max-width: 320px; height: 44px; margin-top: 10px; border-radius: 10px; border: 2px solid #334155; }
.mm .mm-onboard { display: flex; gap: 10px; align-items: start; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warning-soft); border: 1px solid rgba(161, 98, 7, .2); font-size: 14px; }
.mm .mm-onboard .bi-lightbulb { color: var(--warning); font-size: 18px; }
.mm .mm-onboard button { margin-left: auto; }
@media (max-width: 991.98px) { .mm .mm-desktop-only { display: none; } }
@media (hover: none) and (pointer: coarse) { .mm .mm-desktop-only { display: none; } }

/* instrument mode on phones: full screen, no chrome (plan 8: sensor tools hide the header) */
@media (max-width: 991.98px) {
    body.is-instrument .mm-header-wrap, body.is-instrument .mm-footer, body.is-instrument .mm-bottom-nav, body.is-instrument .mm-tool-band, body.is-instrument .mm-flow-bar { display: none; }
    body.is-instrument #instrument { position: fixed; inset: 0; z-index: 70; }
    body.is-instrument #instrument > .mm { min-height: 100%; height: 100%; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); }
    .mm .mm-sensor-screen > .mm:not(.mm-instrument) { min-height: 560px; }
}

/* screen tools */
.mm .mm-card-outline { position: relative; margin: 0 auto; max-width: 100%; border: 2px dashed var(--pc-text); border-radius: 3.2mm; background: var(--pc-soft); display: flex; align-items: end; justify-content: end; padding: 10px; }
.mm .mm-card-chip { position: absolute; left: 12%; top: 32%; width: 14%; height: 22%; border-radius: 4px; background: var(--brand-accent); opacity: .7; }
.mm .mm-ruler-stage { position: relative; height: 150px; margin: 16px 0; overflow: hidden; touch-action: none; user-select: none; }
.mm .mm-ruler { position: absolute; left: 0; right: 0; top: 0; height: 64px; background: var(--brand-accent); border-bottom: 1px solid rgba(15, 23, 42, .3); }
.mm .mm-ruler svg { color: #0F172A !important; }
.mm .mm-marker { position: absolute; top: 0; width: 28px; height: 140px; margin-left: -14px; border: 0; background: transparent; cursor: ew-resize; touch-action: none; }
.mm .mm-marker::before { content: ""; position: absolute; left: 13px; top: 0; bottom: 24px; width: 2px; background: var(--pc-text); }
.mm .mm-marker::after { content: ""; position: absolute; left: 4px; bottom: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--pc-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.mm .mm-marker-span { position: absolute; top: 64px; height: 8px; background: var(--pc); opacity: .35; }
.mm .mm-ring-stage { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center; padding: 28px 16px; }
.mm .mm-ring-circle { border-radius: 50%; border: 3px solid var(--pc-text); background: var(--pc-soft); box-shadow: 0 0 0 1px var(--surface-card), 0 0 0 4px var(--pc-soft); flex: none; }

/* photo & map tools */
.mm .mm-photo-stage { position: relative; background: var(--surface-sunken); min-height: 300px; display: grid; place-items: center; }
.mm .mm-photo-stage canvas { max-width: 100%; display: block; cursor: crosshair; touch-action: manipulation; }
.mm .mm-photo-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-subtle); }
.mm .mm-map { position: relative; height: 480px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface-sunken); z-index: 0; }
@media (max-width: 767.98px) { .mm .mm-map { height: 380px; } }
.mm-map-point { border-radius: 50%; background: #FACC15; border: 3px solid #0F172A; box-sizing: border-box; cursor: grab; }
.mm-map-point.is-first { background: #2DD4BF; }
.mm .leaflet-container { font: inherit; }

/* embed (iframe widgets) */
body.is-embed { background: transparent; }
.mm .mm-embed { padding: 12px; }
.mm .mm-embed-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mm .mm-embed-credit { margin-top: 10px; font-size: 13px; color: var(--text-subtle); text-align: right; }
.mm .mm-embed-credit a { color: var(--text); text-decoration: underline; }
body.is-embed .mm-root { min-height: 0; background: transparent; }

/* print & PDF: result, visual and shopping list */
@media print {
    .mm .mm-header-wrap, .mm .mm-tabs, .mm .mm-carousel, .mm .mm-feedback, .mm .mm-steps, .mm .mm-toasts, .mm .btn, .mm .chips, .mm .mm-onboard, .mm .mm-flow-bar, .mm .mm-skip, .mm .mm-sheet { display: none !important; }
    .mm .mm-tabpanel[hidden] { display: block !important; }
    .mm .card, .mm .mm-result-hero, .mm .mm-visual { box-shadow: none !important; break-inside: avoid; }
    .mm .sticky-lg { position: static !important; }
    .mm .section { padding-block: 12px !important; }
    .mm .col-lg-5, .mm .col-lg-7, .mm .col-xl-4, .mm .col-xl-8 { width: 100% !important; }
    .mm-root, body { background: #fff !important; }
    .mm .mm-result-hero::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .mm .mm-tool-band::after { content: "3matenmeten.nl · alle berekeningen zijn indicatief"; display: block; font-size: 11px; color: #64748B; margin-top: 8px; }
}

/* number field next to a slider grows with long units ("personen", "kWh/100 km") so the value stays readable */
.mm .mm-range { grid-template-columns: minmax(0, 1fr) minmax(104px, max-content); }
.mm .mm-range .mm-input input { flex: 1 0 64px; width: 64px; }
.mm .mm-range-scale { padding-right: 0; margin-right: 116px; }

/* the current step needs a visible ring: a soft fill alone disappears on the light surfaces */
.mm .mm-num.is-current { background: var(--pc-soft); color: var(--pc-text); border: 2px solid var(--pc-text); }

/* home hero: centred headline, search and chips */
.mm .mm-hero-center { text-align: center; }
.mm .mm-hero-center .mm-hero-title { max-width: none; }
.mm .mm-hero-center .lead { max-width: 60ch; margin-inline: auto; }
.mm .mm-hero-center .mm-search-lg { text-align: left; }
.mm .mm-hero-center .chips { justify-content: center; }
@media (max-width: 767.98px) { .mm .mm-hero-center .chips-scroll { justify-content: flex-start; } }

/* header search: one line, the hint text truncates before anything wraps */
.mm .mm-search-trigger { min-width: 0; flex: 0 1 300px; white-space: nowrap; }
.mm .mm-search-trigger span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mm .mm-search-trigger kbd, .mm kbd { white-space: nowrap; flex: none; }

/* icon tiles on a pillar-coloured band would vanish into the band: give them a card background */
.mm .mm-tool-band .mm-icon-tile, .mm [class*="band-"] .mm-icon-tile:not(.solid) { background: var(--surface-card); box-shadow: var(--shadow-card); }

/* ---------- short screens (phones in landscape): the header scrolls away instead of staying pinned ---------- */
@media (max-height: 600px) {
    .mm .mm-header-wrap { position: relative; }
    .mm .mm-chipbar { top: 0; }
    .mm .sticky-lg { top: 16px; }
}

/* ---------- screen tools (liniaal, ringmaat) ---------- */
.mm .mm-screen-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 0 20px; }
.mm .mm-screen-grid { display: grid; gap: 20px; padding: 16px 20px 20px; align-items: center; }
.mm .mm-screen-controls { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mm .mm-screen-slider { grid-template-columns: minmax(0, 1fr) auto; }
.mm .mm-screen-canvas { display: grid; place-items: center; min-width: 0; overflow: hidden; }
@media (min-width: 992px) { .mm .mm-screen-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
.mm .mm-ring-controls { width: min(100%, 420px); }

/* landscape phones: controls next to the card, no explanatory text, so nothing needs scrolling */
@media (orientation: landscape) and (max-height: 600px) {
    .mm .mm-screen-grid { grid-template-columns: minmax(220px, 2fr) minmax(0, 3fr); gap: 16px; padding: 10px 16px 14px; }
    .mm .mm-screen-hide-compact { display: none !important; }
    .mm .mm-ring-stage { flex-wrap: nowrap; padding: 12px 16px; gap: 20px; }
    .mm .mm-ring-stage .mm-result-hero { padding: 16px; }
    .mm .mm-ring-stage .mm-result-big { font-size: 36px !important; }
}

/* full-screen mode: the Fullscreen API hides the browser bar on Android; elsewhere a fixed overlay covers our own chrome */
.mm .mm-screen-shell.is-full { position: fixed; inset: 0; z-index: 90; background: var(--surface); overflow: auto; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); display: flex; flex-direction: column; }
.mm .mm-screen-shell:fullscreen { background: var(--surface); }
.mm .mm-screen-shell.is-full > .card { flex: 1; border-radius: 0; border: 0; box-shadow: none; display: flex; flex-direction: column; }
.mm .mm-screen-shell.is-full .mm-screen-grid { flex: 1; }
.mm .mm-screen-shell.is-full .mm-screen-hide-compact { display: none !important; }
.mm .mm-screen-shell.is-full .mm-ruler-stage { flex: 1; min-height: 150px; }
.mm .mm-screen-shell.is-full .mm-ring-stage { flex: 1; }
@media (orientation: portrait) {
    /* portrait full screen: the card on top, the controls within thumb reach below */
    .mm .mm-screen-shell.is-full .mm-screen-canvas { order: -1; }
}
body.is-screen-full { overflow: hidden; }
