:root {
  --blue: #315efb;
  --blue-dark: #244ce2;
  --blue-pale: #eef2ff;
  --ink: #081326;
  --muted: #687b99;
  --line: #e1e6ef;
  --canvas: #f4f6fa;
  --white: #fff;
  --green: #07863f;
  --green-pale: #e6f6ed;
  --orange: #e56c12;
  --red: #c74545;
  --shadow: 0 8px 24px rgba(33, 52, 85, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.is-hidden, .summary-card { display: none !important; }
.sr-only { 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; }
.print-only { display: none; }

.page-shell { width: min(880px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 50px; }
.app-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.brand-line { margin: 0 0 10px; color: #526987; font-family: Georgia, serif; font-size: 10px; letter-spacing: 2.4px; font-weight: 700; }
.app-header h1 { margin: 0; font-size: clamp(29px, 5vw, 38px); line-height: 1; letter-spacing: -1.6px; }
.app-header > div > p:last-child { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.quiet-button { padding: 10px 14px; color: #4e6380; border: 1px solid var(--line); border-radius: 10px; background: white; font-size: 10px; font-weight: 750; }
.quiet-button:hover { color: var(--blue); border-color: #bdc9f7; }

.energy-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 12px; padding: 0; border: 0; }
.energy-choice label { display: block; }
.energy-choice input { position: absolute; opacity: 0; }
.energy-choice label > span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px; color: #697a94; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 1px 2px rgba(30,45,70,.04); font-size: 12px; font-weight: 750; transition: .18s ease; cursor: pointer; }
.energy-choice label > span b { color: #7d8ba1; font-size: 17px; }
.energy-choice input:checked + span { color: var(--blue); border: 2px solid var(--blue); padding: 9px; box-shadow: 0 4px 15px rgba(49,94,251,.10); }
.energy-choice input:checked + span b { color: var(--blue); }
.energy-choice input:focus-visible + span { outline: 3px solid rgba(49,94,251,.18); outline-offset: 2px; }

.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 12px; }
.progress-step { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 10px; color: #8593a8; border: 0; border-radius: 9px; background: transparent; text-align: left; }
.progress-step span { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px; background: #e7ebf2; font-size: 9px; font-weight: 850; }
.progress-step small { overflow: hidden; text-overflow: ellipsis; font-size: 9px; font-weight: 750; white-space: nowrap; }
.progress-step.is-active { color: var(--blue); background: var(--blue-pale); }
.progress-step.is-active span { color: white; background: var(--blue); }
.progress-step.is-complete { color: #536987; }
.progress-step.is-complete span { color: var(--green); background: var(--green-pale); }

.wizard-card { border: 1px solid #edf0f5; border-radius: 18px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.form-step { display: none; padding: 26px 26px 20px; animation: appear .18s ease; }
.form-step.is-active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.step-heading { margin-bottom: 24px; }
.step-heading > p { margin: 0 0 6px; color: var(--blue); font-size: 8px; letter-spacing: 1.3px; font-weight: 850; }
.step-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.7px; }
.step-heading > span { display: block; margin-top: 6px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.catalogue-status { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--muted); font-size: 8px; }
.catalogue-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a8b2c2; }
.catalogue-status.is-live { color: var(--green); }
.catalogue-status.is-live::before { background: var(--green); }
.catalogue-status.is-fallback { color: #7a551a; }
.catalogue-status.is-fallback::before { background: var(--orange); }

.field-grid { display: grid; gap: 15px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-cols { grid-template-columns: 1fr 1.1fr .8fr; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > span, .control-label > span { color: #19263b; font-size: 10px; font-weight: 750; }
.field input, .field select, .input-suffix input {
  width: 100%; height: 44px; padding: 0 12px;
  color: var(--ink); border: 1px solid #dce2ec; border-radius: 10px; outline: none; background: #fff;
}
.field input::placeholder { color: #a5afbf; }
.field input:focus, .field select:focus, .input-suffix input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,94,251,.11); }
.field input.invalid, .field select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(199,69,69,.09); }
.field select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #8190a5 50%), linear-gradient(135deg, #8190a5 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.field small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 48px; }
.input-suffix i { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 8px; font-style: normal; font-weight: 700; }
.inline-note, .warning-note { display: flex; align-items: center; gap: 8px; margin: 20px 0 0; padding: 11px 13px; color: #4d657f; border-radius: 9px; background: #f5f8fc; font-size: 9px; line-height: 1.4; }
.inline-note b { color: var(--green); }.warning-note { color: #7a551a; background: #fff8ea; }.warning-note b { color: var(--orange); }

.energy-panel, .current-contract { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.energy-panel + .energy-panel, .current-contract + .current-contract { margin-top: 13px; }
.energy-panel h3, .current-contract h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 20px; color: #697b96; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; }
.energy-panel h3 b, .current-contract h3 b { display: grid; place-items: center; width: 25px; height: 25px; color: var(--blue); border-radius: 7px; background: var(--blue-pale); font-size: 14px; }
.energy-panel h3 b.gas, .current-contract h3 b.gas { color: #b56800; background: #fff3df; }
.control-block + .control-block { margin-top: 20px; }
.control-label { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 10px; }
.control-label > small { color: var(--blue); font-size: 10px; font-weight: 800; }
.control-label > strong { color: #4d617d; font-size: 9px; }
.control-label label { display: flex; align-items: baseline; gap: 5px; }
.control-label label input { width: 74px; padding: 0; color: var(--ink); border: 0; outline: 0; background: transparent; text-align: right; font-size: 12px; font-weight: 850; }
.control-label label i { color: var(--muted); font-size: 9px; font-style: normal; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row button { min-height: 36px; padding: 0 14px; color: #26344a; border: 1px solid #dce2ec; border-radius: 99px; background: #fff; font-size: 10px; font-weight: 750; }
.pill-row button:hover { border-color: #aebdf8; }
.pill-row button.is-selected { color: white; border-color: var(--blue); background: var(--blue); box-shadow: 0 4px 11px rgba(49,94,251,.20); }
.power-select-inline { width: 128px; height: 34px; margin: 0 0 9px; padding: 0 28px 0 10px; color: #536987; border: 1px solid #dce2ec; border-radius: 9px; outline: 0; background: white; font-size: 9px; }
.range-input { width: 100%; height: 5px; margin: 8px 0; accent-color: var(--blue); cursor: pointer; }
.gas-range { accent-color: #db8b18; }
.compact-control { max-width: 360px; }

.wizard-actions { display: flex; align-items: center; gap: 9px; padding: 16px 26px 22px; border-top: 1px solid #edf0f5; }
.action-spacer { flex: 1; }
.primary-button, .back-button, .save-button { min-height: 40px; padding: 0 15px; border-radius: 9px; font-size: 9px; font-weight: 800; }
.primary-button { color: white; border: 1px solid var(--blue); background: var(--blue); }
.primary-button:hover { background: var(--blue-dark); }
.back-button, .save-button { color: #536987; border: 1px solid var(--line); background: white; }
.save-button { color: var(--blue); }
.autosave-control { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.autosave-control > small { color: #8a97aa; font-size: 7px; }
.autosave-switch { display: flex; align-items: center; gap: 6px; color: #61728b; font-size: 8px; cursor: pointer; }
.autosave-switch input { position: absolute; opacity: 0; }
.autosave-switch > span { position: relative; width: 27px; height: 15px; border-radius: 99px; background: #cdd5e1; }
.autosave-switch > span::after { content: ""; position: absolute; width: 11px; height: 11px; left: 2px; top: 2px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .18s ease; }
.autosave-switch input:checked + span { background: var(--blue); }
.autosave-switch input:checked + span::after { transform: translateX(12px); }
.form-error { min-height: 14px; padding: 0 26px; color: var(--red); font-size: 9px; font-weight: 700; }

.best-banner { margin-bottom: 18px; padding: 18px 20px; color: white; border-radius: 13px; background: linear-gradient(105deg, #315efb, #3c67fb); }
.best-banner p { margin: 0 0 6px; font-size: 9px; }.best-banner strong { display: block; font-size: 23px; letter-spacing: -.8px; }.best-banner small { display: block; margin-top: 2px; color: rgba(255,255,255,.72); font-size: 8px; }
.result-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 0 3px 9px; }
.result-toolbar strong { font-size: 11px; }.result-toolbar button { padding: 6px; color: var(--muted); border: 0; background: transparent; font-size: 8px; }
.results-list { border: 1px solid #edf0f5; border-radius: 14px; background: white; overflow: hidden; }
.result-card { position: relative; display: grid; grid-template-columns: minmax(230px, 1fr) 145px 110px; gap: 14px; align-items: center; padding: 18px; background: white; }
.result-card + .result-card { border-top: 1px solid var(--line); }
.result-card:first-child { background: #fbfcff; }
.result-provider { display: flex; gap: 11px; align-items: flex-start; min-width: 0; }
.provider-logo { display: grid; place-items: center; flex: 0 0 27px; width: 27px; height: 27px; color: #27364c; border-radius: 7px; background: #edf0f5; font-size: 9px; font-weight: 850; }
.result-card:first-child .provider-logo { color: white; background: var(--blue); }
.result-provider h4 { margin: 0 0 4px; font-size: 11px; }
.result-provider p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.result-provider .promotion-copy { margin-top: 5px; color: var(--orange); }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { padding: 3px 6px; color: var(--green); border-radius: 5px; background: var(--green-pale); font-size: 6px; font-weight: 850; }
.tag.promo { color: var(--orange); background: #fff1e4; }
.result-price { text-align: right; }
.result-price strong { display: block; font-size: 17px; letter-spacing: -.5px; }.result-price small { color: var(--muted); font-size: 7px; }
.result-saving { padding-left: 12px; border-left: 1px solid var(--line); }
.result-saving span { color: var(--muted); font-size: 6px; text-transform: uppercase; letter-spacing: .5px; }.result-saving strong { display: block; margin-top: 4px; color: var(--green); font-size: 11px; }.result-saving strong.is-cost { color: var(--orange); }
.result-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 0 0 47px; border-top: 1px solid #f0f2f6; }
.result-links a { color: #617493; font-size: 7px; text-decoration: none; }.result-links a:hover { color: var(--blue); text-decoration: underline; }
.method-details { margin-top: 14px; padding: 12px 14px; color: var(--muted); border-radius: 10px; background: #f5f7fa; font-size: 8px; }
.method-details summary { color: #435772; font-weight: 800; cursor: pointer; }.method-details p { margin: 8px 0 0; line-height: 1.55; }

.app-footer { display: flex; justify-content: space-between; align-items: center; padding: 17px 4px; color: #8794a7; font-size: 8px; }
.app-footer button { padding: 5px 0; color: var(--red); border: 0; background: transparent; font-size: 8px; }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 20; transform: translate(-50%, 20px); padding: 10px 15px; color: white; border-radius: 99px; background: #14233b; box-shadow: 0 10px 30px rgba(20,35,59,.2); opacity: 0; pointer-events: none; font-size: 9px; font-weight: 750; transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 720px) {
  .page-shell { width: min(100% - 20px, 880px); padding-top: 22px; }
  .app-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .energy-choice { gap: 6px; }.energy-choice label > span { min-height: 48px; font-size: 10px; }
  .progress-step { justify-content: center; padding: 7px; }.progress-step small { display: none; }
  .form-step { padding: 21px 16px 16px; }
  .two-cols, .three-cols { grid-template-columns: 1fr; }.field.full { grid-column: auto; }
  .energy-panel, .current-contract { padding: 16px; }
  .wizard-actions { flex-wrap: wrap; padding: 15px 16px 18px; }
  .autosave-control { order: 4; align-items: flex-start; width: 100%; }
  .result-card { grid-template-columns: 1fr 1fr; gap: 10px; padding: 15px; }
  .result-provider { grid-column: 1 / -1; }.result-price { text-align: left; padding-left: 47px; }.result-saving { border-left: 0; }.result-links { padding-left: 47px; }
}

@media print {
  @page { size: A4; margin: 13mm; }
  body { background: white; }
  .app-header, .energy-choice, .progress, .form-step:not(.results-step), .wizard-actions, .app-footer, .method-details, .result-toolbar { display: none !important; }
  .page-shell { width: 100%; padding: 0; }
  .wizard-card, .results-list { border: 0; box-shadow: none; }
  .results-step { display: block !important; padding: 0; }
  .print-only { display: block; margin-bottom: 14px; color: var(--muted); font-size: 9px; }
  .print-only strong { display: block; color: var(--ink); font-size: 18px; }
  .best-banner { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .result-card { break-inside: avoid; padding: 12px; }
}
