/* ==========================================================================
   Rekentool lasrobot — losse laag bovenop redesign.css
   Alles met rt- prefix zodat niets botst met de rest van de site.
   ========================================================================== */

.rt-page {
    padding: calc(var(--nav-h) + 48px) 0 96px;
    background: var(--gray-50);
    min-height: 100vh;
}

.rt-shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- kop ---------- */

.rt-intro {
    margin-bottom: 36px;
}

.rt-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-text);
    margin: 0 0 12px;
}

.rt-intro h1 {
    color: var(--primary);
    font-size: clamp(2rem, 4.4vw, 3rem);
    line-height: 1.06;
    margin: 0 0 14px;
    text-wrap: balance;
}

.rt-intro .rt-lead {
    color: var(--gray-700);
    font-size: 1.0625rem;
    line-height: 1.7;
    max-width: 62ch;
    margin: 0;
}

/* ---------- stappenbalk ---------- */

.rt-steps {
    display: flex;
    gap: 0;
    margin: 0 0 28px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
}

.rt-step {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-right: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    min-width: 0;
}

.rt-step:last-child { border-right: none; }

.rt-step-num {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--gray-100);
    color: var(--gray-500);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 700;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}

.rt-step-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-step.is-active {
    background: var(--primary);
    color: var(--white);
}

.rt-step.is-active .rt-step-num {
    background: var(--accent);
    color: var(--white);
}

.rt-step.is-done { color: var(--primary); }

.rt-step.is-done .rt-step-num {
    background: var(--accent);
    color: var(--white);
}

@media (max-width: 720px) {
    .rt-step-label { display: none; }
    .rt-step { justify-content: center; padding: 12px 8px; }
}

/* ---------- paneel ---------- */

.rt-panel {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -24px rgba(15, 23, 42, 0.4);
}

.rt-panel[hidden] { display: none !important; }

.rt-panel h2 {
    color: var(--primary);
    font-size: 1.5rem;
    line-height: 1.2;
    margin: 0 0 6px;
}

.rt-panel-sub {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.65;
    margin: 0 0 24px;
    max-width: 62ch;
}

@media (max-width: 560px) {
    .rt-panel { padding: 20px 18px; }
}

/* ---------- velden ---------- */

.rt-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
    .rt-grid { grid-template-columns: 1fr; }
}

.rt-grid .rt-span { grid-column: 1 / -1; }

.rt-field { display: flex; flex-direction: column; gap: 6px; }

.rt-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
}

.rt-field .rt-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.5;
}

.rt-field input[type="text"],
.rt-field input[type="email"],
.rt-field input[type="tel"],
.rt-field input[type="number"],
.rt-field select {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 11px 13px;
    width: 100%;
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.rt-field input:hover,
.rt-field select:hover { border-color: var(--gray-400); }

.rt-field input:focus-visible,
.rt-field select:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 25, 147, 0.14);
}

.rt-field input[aria-invalid="true"] { border-color: #B42318; }

/* schuifregelaar met uitleeswaarde */

.rt-range-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.rt-range-value {
    font-family: var(--font-mono);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.rt-field input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    height: 24px;
}

.rt-checkline {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.rt-checkline input { width: 17px; height: 17px; accent-color: var(--primary); }

/* ---------- knoppenrij ---------- */

.rt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--gray-200);
}

.rt-actions .rt-spacer { flex: 1 1 auto; }

.rt-link-btn {
    background: none;
    border: none;
    color: var(--gray-600);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 4px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rt-link-btn:hover { color: var(--primary); }

/* ---------- resultaten ---------- */

.rt-stats {
    display: grid;
    gap: 1px;
    background: var(--gray-200);
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 720px) { .rt-stats { grid-template-columns: repeat(2, 1fr); } }

.rt-stat { background: var(--white); padding: 16px 18px; }

.rt-stat-k {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.rt-stat-v {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.05;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.rt-stat-u {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-500);
    margin-left: 3px;
}

.rt-stat.rt-stat-hero { background: var(--primary); }
.rt-stat.rt-stat-hero .rt-stat-k { color: rgba(255, 255, 255, 0.72); }
.rt-stat.rt-stat-hero .rt-stat-v { color: var(--white); }
.rt-stat.rt-stat-hero .rt-stat-u { color: rgba(255, 255, 255, 0.72); }

/* vergelijking ZZP versus robot */

.rt-compare { margin-top: 24px; display: grid; gap: 14px; }

.rt-bar-row { display: grid; gap: 6px; }

.rt-bar-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.875rem;
}

.rt-bar-name { font-weight: 600; color: var(--gray-800); }

.rt-bar-amount {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--gray-900);
    font-variant-numeric: tabular-nums;
}

.rt-bar-track {
    height: 12px;
    background: var(--gray-100);
    border-radius: 6px;
    overflow: hidden;
}

.rt-bar-fill {
    height: 100%;
    border-radius: 6px;
    background: var(--gray-400);
    transition: width var(--duration-slow) var(--ease-out);
}

.rt-bar-fill.rt-bar-robot { background: var(--primary); }

/* ---------- notities en meldingen ---------- */

.rt-note {
    border-left: 3px solid var(--accent);
    background: var(--gray-50);
    border-radius: 0 8px 8px 0;
    padding: 13px 16px;
    margin-top: 20px;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--gray-700);
}

.rt-note strong { color: var(--gray-900); }
.rt-note p { margin: 0 0 8px; }
.rt-note p:last-child { margin-bottom: 0; }

.rt-alert {
    display: none;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.rt-alert.is-visible { display: block; }

.rt-alert-error {
    background: #FEF3F2;
    border: 1px solid #FDA29B;
    color: #912018;
}

.rt-alert-ok {
    background: #ECFDF3;
    border: 1px solid #A6F4C5;
    color: #05603A;
}

/* ---------- uploadvak ---------- */

.rt-drop {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    background: var(--gray-50);
    padding: 34px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.rt-drop:hover,
.rt-drop.is-over {
    border-color: var(--accent);
    background: rgba(66, 143, 231, 0.06);
}

.rt-drop:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 25, 147, 0.14);
}

.rt-drop-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 6px;
}

.rt-drop-sub {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin: 0;
}

.rt-file-line {
    display: none;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 11px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.rt-file-line.is-visible { display: flex; }

.rt-file-name {
    font-weight: 600;
    color: var(--gray-900);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rt-file-size {
    font-family: var(--font-mono);
    color: var(--gray-500);
    margin-left: auto;
    flex: 0 0 auto;
}

/* voortgang tijdens de analyse */

.rt-progress { display: none; margin-top: 20px; }
.rt-progress.is-visible { display: block; }

.rt-progress-track {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.rt-progress-bar {
    height: 100%;
    width: 30%;
    background: var(--primary);
    border-radius: 3px;
    animation: rt-sweep 1.5s var(--ease) infinite;
}

@keyframes rt-sweep {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(340%); }
}

.rt-progress-text {
    margin: 10px 0 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

@media (prefers-reduced-motion: reduce) {
    .rt-progress-bar { animation: none; width: 100%; opacity: 0.5; }
    .rt-bar-fill { transition: none; }
}

/* ---------- 3D-weergave ---------- */

.rt-viewer-wrap { margin-top: 24px; }

.rt-viewer {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--dark);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
}

.rt-viewer canvas { display: block; width: 100%; height: 100%; }

.rt-viewer-legend {
    position: absolute;
    left: 14px;
    bottom: 12px;
    display: flex;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

.rt-legend-item { display: flex; align-items: center; gap: 6px; }

.rt-legend-swatch {
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
}

.rt-legend-swatch.rt-legend-part { background: #7C8AA5; }

.rt-viewer-hint {
    margin: 9px 0 0;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ---------- tabel met aannames ---------- */

.rt-table-wrap {
    overflow-x: auto;
    margin-top: 22px;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
}

.rt-table {
    width: 100%;
    min-width: 460px;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.rt-table th,
.rt-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
}

.rt-table thead th {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.rt-table tbody tr:last-child td { border-bottom: none; }

.rt-table .rt-num {
    text-align: right;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---------- privacyregel ---------- */

.rt-privacy {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 18px;
    font-size: 0.8125rem;
    line-height: 1.6;
    color: var(--gray-500);
}

.rt-privacy svg { flex: 0 0 auto; margin-top: 2px; }
