/* Landing pages (merken, terugleverkosten, regio, vergelijking, rekentools).
   Built by scripts/build-website-pages.mjs; loaded after styles.css. */

.tbc-page .blog-article-content { max-width: 820px; }

/* Key facts */
.tbc-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 28px 0 8px;
    padding: 0;
}
.tbc-fact {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
}
.tbc-fact dt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ink-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 4px;
}
.tbc-fact dd {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 650;
    color: var(--ink-900);
    line-height: 1.4;
}

/* Tables */
.tbc-table-wrap {
    overflow-x: auto;
    margin: 20px 0 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
}
.tbc-page .blog-article-content .tbc-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
    font-variant-numeric: tabular-nums;
}
.tbc-table caption {
    caption-side: bottom;
    padding: 10px 14px;
    font-size: 0.8125rem;
    color: var(--ink-500);
    text-align: left;
}
.tbc-table th,
.tbc-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.tbc-table thead th {
    background: var(--brand-50);
    color: var(--ink-900);
    font-weight: 650;
    white-space: nowrap;
}
.tbc-table tbody th { font-weight: 650; color: var(--ink-900); }
.tbc-table tbody tr:last-child th,
.tbc-table tbody tr:last-child td { border-bottom: 0; }

.tbc-verdict {
    margin: 0 0 28px;
    padding: 16px 20px;
    border-left: 4px solid var(--accent-500);
    border-radius: var(--radius-sm);
    background: var(--accent-100);
}
.tbc-verdict p { margin: 0; }

/* Hub card groups */
.tbc-hub-group { margin: 40px 0 8px; }
.tbc-hub-group h2 { margin-top: 0; }

/* Assumptions under a calculator */
.tbc-assumptions {
    margin: 16px 0 28px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.tbc-assumptions summary { cursor: pointer; font-weight: 600; color: var(--brand-700); }
.tbc-assumptions ul { margin: 12px 0 0; padding-left: 20px; }
.tbc-assumptions li { font-size: 0.9375rem; }

/* ---------------------------------------------------------------- calculators */
.tbc-tool {
    margin: 28px 0 8px;
    padding: 28px;
    border: 1px solid rgba(20, 108, 60, 0.18);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--brand-50) 0%, #FFFFFF 100%);
    box-shadow: var(--shadow-md);
}
.tbc-tool h2 { margin-top: 0 !important; font-size: 1.375rem !important; }
.tbc-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px 20px;
}
.tbc-field { display: flex; flex-direction: column; gap: 6px; }
.tbc-field label,
.tbc-field .tbc-label {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--ink-900);
    line-height: 1.35;
}
.tbc-field small { color: var(--ink-500); font-size: 0.8125rem; line-height: 1.4; }
.tbc-field input[type="number"],
.tbc-field input[type="text"],
.tbc-field select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #C9D3CC;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    font: inherit;
    font-size: 1rem;
    color: var(--ink-900);
}
.tbc-field input:focus,
.tbc-field select:focus { outline: none; border-color: var(--brand-600); box-shadow: var(--focus-ring); }
.tbc-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
.tbc-check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 0.9375rem; }
.tbc-check input { width: 20px; height: 20px; accent-color: var(--brand-700); }
.tbc-check input[type="number"] { width: 64px; height: 36px; padding: 4px 8px; border: 1px solid #C9D3CC; border-radius: 8px; }
.tbc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.tbc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--brand-700);
    color: #FFFFFF;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}
.tbc-button:hover { background: var(--brand-800); }
.tbc-button.secondary { background: transparent; color: var(--brand-700); border: 1px solid var(--brand-700); }

.tbc-result {
    margin-top: 24px;
    padding: 20px;
    border-radius: var(--radius-md);
    background: #FFFFFF;
    border: 1px solid var(--border);
}
.tbc-result[hidden] { display: none; }
.tbc-result-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.tbc-stat { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--brand-50); }
.tbc-stat span { display: block; font-size: 0.8125rem; color: var(--ink-500); }
.tbc-stat strong { display: block; font-size: 1.5rem; line-height: 1.25; color: var(--brand-800); font-variant-numeric: tabular-nums; }
.tbc-stat.accent { background: var(--accent-100); }
.tbc-stat.accent strong { color: #8A5A10; }
.tbc-result p { margin: 8px 0 0; }
.tbc-result ul { margin: 8px 0 0; padding-left: 20px; }
.tbc-result-cta { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.tbc-error { color: #A12C2C; font-weight: 600; }

/* Price chart (dynamische stroomprijs) */
.tbc-chart { width: 100%; height: auto; margin-top: 12px; }
.tbc-chart .bar { fill: var(--brand-600); }
.tbc-chart .bar.cheap { fill: #2E9E5B; }
.tbc-chart .bar.dear { fill: #D9822B; }
.tbc-chart .bar.neg { fill: #2D6FB7; }
.tbc-chart .now { stroke: var(--ink-900); stroke-width: 2; stroke-dasharray: 4 3; }
.tbc-chart text { font-size: 11px; fill: var(--ink-500); }
.tbc-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-muted); margin-bottom: 8px; }
.tbc-tabs button { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 600; color: var(--ink-700); cursor: pointer; }
.tbc-tabs button[aria-selected="true"] { background: #FFFFFF; color: var(--brand-800); box-shadow: var(--shadow-sm); }

/* Bars in result rows (terugleverkosten) */
.tbc-rank { list-style: none; padding: 0 !important; margin: 12px 0 0 !important; }
.tbc-rank li { display: grid; grid-template-columns: minmax(120px, 160px) 1fr auto; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.9375rem; }
.tbc-rank .track { height: 10px; border-radius: 6px; background: var(--surface-muted); overflow: hidden; }
.tbc-rank .fill { height: 100%; background: var(--brand-600); border-radius: 6px; }
.tbc-rank li.mine { font-weight: 700; }
.tbc-rank li.mine .fill { background: var(--accent-500); }

@media (max-width: 640px) {
    .tbc-tool { padding: 20px 16px; border-radius: var(--radius-md); }
    .tbc-rank li { grid-template-columns: 110px 1fr auto; }
}

.blog-article-content .tbc-tool a.tbc-button { color: #FFFFFF; text-decoration: none; }
.blog-article-content .tbc-tool a.tbc-button.secondary { color: var(--brand-700); }
.blog-article-content .tbc-tool a.tbc-button.secondary:hover { color: #FFFFFF; background: var(--brand-700); }
