/* ============================================
   Energielabel (/energielabel) — bouwt voort op dienst.css en overzicht.css, alleen tokens
   ============================================ */

/* ---------- Officiële labelkleuren ---------- */
.el-lbl--a { background: var(--label-a); color: var(--white); }
.el-lbl--b { background: var(--label-b); color: var(--white); }
.el-lbl--c { background: var(--label-c); color: var(--inkt); }
.el-lbl--d { background: var(--label-d); color: var(--inkt); }
.el-lbl--e { background: var(--label-e); color: var(--inkt); }
.el-lbl--f { background: var(--label-f); color: var(--white); }
.el-lbl--g { background: var(--label-g); color: var(--white); }
.el-lbl--x { background: var(--slate-300); color: var(--inkt); }

/* ---------- Hero: labelschaal ---------- */
.el-scale-fig { justify-self: end; width: 100%; max-width: 420px; display: grid; gap: 6px; background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-md); }
.el-bar { display: block; position: relative; padding: .45rem .9rem; font: 700 var(--fs-md) var(--font-display); border-radius: var(--radius-sm) 0 0 var(--radius-sm); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.el-bar:nth-child(1) { width: 52%; }
.el-bar:nth-child(2) { width: 60%; }
.el-bar:nth-child(3) { width: 68%; }
.el-bar:nth-child(4) { width: 76%; }
.el-bar:nth-child(5) { width: 84%; }
.el-bar:nth-child(6) { width: 92%; }
.el-bar:nth-child(7) { width: 100%; }
.el-scale-fig figcaption { font-size: var(--fs-xs); color: var(--gedempt); margin-top: .5rem; }

/* ---------- Tool ---------- */
.el-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.el-layout .h-head { margin-bottom: 1.25rem; }
.el-lookup { background: var(--steen); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 1.25rem; }
.el-lookup-fields { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.el-field { display: grid; gap: .4rem; }
.el-field label { font-size: var(--fs-sm); font-weight: 600; color: var(--inkt); }
.el-field--pc { flex: 1 1 130px; }
.el-field--nr { flex: 1 1 100px; }
.el-field--tv { flex: 1 1 90px; }
.el-input {
  width: 100%; height: 46px; border: 0; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1.5px var(--lijn); background: var(--white);
  padding: 0 .85rem; font: 500 var(--fs-md) var(--font-body); color: var(--inkt);
}
.el-input:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--spar); }
.el-lookup-btn { height: 46px; }
.el-lookup-btn > span { display: inline-flex; }
.el-spin { width: 16px; height: 16px; border-radius: var(--radius-full); border: 2px solid var(--lijn); border-top-color: var(--spar); animation: el-spin .8s linear infinite; }
@keyframes el-spin { to { transform: rotate(360deg); } }
.el-lookup-msg { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1rem; padding: .85rem 1rem; border-radius: var(--radius-md); background: var(--white); font-size: var(--fs-sm); line-height: 1.55; }
.el-lookup-msg .icon { flex-shrink: 0; margin-top: .15rem; }
.el-lookup-msg.success .icon { color: var(--spar); }
.el-lookup-msg.warn .icon { color: var(--amber-700); }
.el-lookup-msg.error { color: var(--red-600); }
.el-chip { display: inline-block; min-width: 1.8em; text-align: center; padding: .05rem .45rem; border-radius: var(--radius-sm); font-weight: 700; }

.el-card { border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--lijn); padding: clamp(1.25rem, 3vw, 1.75rem); }
.el-card-title { font-size: var(--fs-lg); font-weight: 700; margin-bottom: 1.25rem; }
.el-q { border: 0; padding: 0 0 1.25rem; margin: 0 0 1.25rem; border-bottom: 1px solid var(--lijn); min-width: 0; }
.el-q legend { display: block; font-weight: 600; color: var(--inkt); margin-bottom: .75rem; padding: 0; }
.el-step { margin-right: .45rem; vertical-align: 1px; width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--green-50); color: var(--spar); display: inline-grid; place-items: center; font-size: var(--fs-2xs); }
.el-small { font-weight: 400; font-size: var(--fs-xs); color: var(--gedempt); }

.el-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.el-tile {
  display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem .75rem; text-align: left;
  border: 0; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1.5px var(--lijn); background: var(--white); cursor: pointer;
  font: 600 var(--fs-sm) var(--font-body); color: var(--inkt); transition: background-color .2s, box-shadow .2s;
}
.el-tile .icon { color: var(--spar); }
.el-tile small { display: block; font-weight: 400; font-size: var(--fs-2xs); color: var(--gedempt); }
.el-tiles-sm .el-tile { justify-content: flex-start; }
.el-tile:hover { background: var(--green-50); }
.el-tile.sel { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--spar); }
.el-tile:focus-visible { outline: 2px solid var(--spar); outline-offset: 2px; }
.el-dot { width: 12px; height: 12px; border-radius: var(--radius-full); flex-shrink: 0; box-shadow: 0 0 0 1px var(--slate-300); }

.el-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.el-check { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1.5px var(--lijn); cursor: pointer; font-size: var(--fs-sm); font-weight: 500; color: var(--inkt); }
.el-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.el-check-box { width: 20px; height: 20px; border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1.5px var(--slate-300); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.el-check:has(input:checked) { background: var(--green-50); box-shadow: inset 0 0 0 2px var(--spar); }
.el-check input:checked + .el-check-box { background: var(--spar); box-shadow: none; color: var(--white); }
.el-check input:focus-visible + .el-check-box { outline: 2px solid var(--spar); outline-offset: 2px; }

/* Resultaat */
.el-result { padding-top: .25rem; }
.el-labels-row { display: flex; align-items: center; justify-content: center; gap: clamp(1rem, 4vw, 2.5rem); margin-bottom: 1.5rem; text-align: center; }
.el-label-tag { font-size: var(--fs-2xs); color: var(--gedempt); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.el-badge { min-width: 76px; height: 76px; padding: 0 .75rem; border-radius: var(--radius-lg); display: inline-grid; place-items: center; font: 800 var(--fs-2xl) var(--font-display); }
.el-badge:not([class*="el-lbl--"]) { background: var(--steen); color: var(--inkt); }
.el-badge-sub { font-size: var(--fs-xs); color: var(--gedempt); margin-top: .4rem; }
.el-arrow { color: var(--slate-400); }
.el-scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 2px; margin-bottom: 1.25rem; }
.el-scale-seg { text-align: center; padding: .35rem 0; font-size: var(--fs-2xs); font-weight: 700; opacity: .3; border-radius: 2px; overflow: hidden; }
.el-scale-seg.on { opacity: 1; box-shadow: 0 0 0 2px var(--inkt); }
.el-tip { display: flex; gap: .6rem; align-items: flex-start; background: var(--steen); border-radius: var(--radius-md); padding: .9rem 1rem; font-size: var(--fs-sm); margin-bottom: 1.25rem; }
.el-tip .icon { color: var(--spar); flex-shrink: 0; margin-top: .1rem; }
.el-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.el-link { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--fs-sm); font-weight: 600; color: var(--spar); }
.el-link:hover { text-decoration: underline; }
.el-disclaimer { font-size: var(--fs-xs); color: var(--gedempt); margin-top: 1rem; }

/* Zijkolom */
.el-sidebar { display: grid; gap: 1rem; position: sticky; top: 92px; }
.el-side-card { background: var(--steen); border-radius: var(--radius-lg); padding: 1.4rem; }
.el-side-card h3 { display: flex; align-items: center; gap: .5rem; font-size: var(--fs-base); font-weight: 700; margin-bottom: 1rem; }
.el-side-card h3 .icon { color: var(--spar); }
.el-ladder { list-style: none; display: grid; gap: .55rem; }
.el-ladder li { display: flex; align-items: center; gap: .75rem; font-size: var(--fs-xs); color: var(--gedempt); }
.el-ladder li strong { display: block; font-size: var(--fs-sm); color: var(--inkt); }
.el-ladder-badge { width: 36px; height: 30px; border-radius: var(--radius-sm); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); flex-shrink: 0; }
.el-sub-list { list-style: none; display: grid; }
.el-sub-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--lijn); font-size: var(--fs-sm); }
.el-sub-list li:last-child { border-bottom: 0; }
.el-sub-list .num { font-size: var(--fs-xs); color: var(--inkt); text-align: right; }
.el-side-note { font-size: var(--fs-xs); color: var(--gedempt); margin: .75rem 0; }

/* Uitleg */
.el-info { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.el-info > div { background: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.el-info h3 { font-size: var(--fs-lg); font-weight: 700; margin-bottom: .5rem; }
.el-info p { color: var(--tekst); font-size: var(--fs-md); line-height: 1.65; margin-bottom: .75rem; }

/* ---------- Responsief ---------- */
@media (max-width: 1024px) {
  .el-layout { grid-template-columns: 1fr; }
  .el-sidebar { position: static; grid-template-columns: 1fr 1fr; }
  .el-scale-fig { justify-self: start; }
}
@media (max-width: 640px) {
  .el-sidebar, .el-info { grid-template-columns: 1fr; }
  .el-lookup-btn { width: 100%; }
  .el-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .el-scale-seg { letter-spacing: -.04em; }
  .el-badge { min-width: 64px; height: 64px; font-size: var(--fs-xl); }
}

/* Wit/steen afwisselen: vragen wit, verder lezen steen */
.el-dq { background: var(--white); }
.el-dq .dq-list details { box-shadow: 0 0 0 1px var(--lijn); }
.el-dm { background: var(--steen); }
.el-dm .dm-links a { background: var(--white); box-shadow: var(--shadow-sm); }
