/* ==========================================================================
   Solcelle-rådgiver – designsystem
   Baseret på UI UX Pro Max: "Sustainable Energy / Climate Tech" + "Financial
   Dashboard". Stil: Minimalism & Swiss Modernism, data-tæt. Lys og mørk
   variant designet sammen (tonale, desaturerede varianter – ikke inverteret).
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f4f8f6;
  --bg-elev: #eef4f1;
  --card: #ffffff;
  --input: #f8fbf9;
  --border: #d6e4dd;
  --border-strong: #b7cdc3;
  --grid: #e3ece8;
  --text: #0f2a22;
  --muted: #4b5e57;
  --faint: #5f716a;
  --primary: #047857;
  --primary-hover: #065f46;
  --primary-ink: #ffffff;
  --primary-soft: #e3f4ec;
  --accent: #f59e0b;
  --accent-ink: #1f1300;
  --accent-soft: #fff4dc;
  --ring: #0d9488;
  --pos: #047857;
  --neg: #b91c1c;
  --warn: #92400e;
  --good-bg: #e3f4ec; --mid-bg: #fff4dc; --bad-bg: #fde8e6;
  --chip: #eef4f1;
  --c1: #d97706; --c2: #2563eb; --c3: #059669; --c4: #dc2626; --c5: #7c3aed;
  --heat-pos: 4,120,87; --heat-neg: 185,28,28;
  --radius: 14px; --radius-sm: 10px; --radius-xs: 8px;
  --shadow: 0 1px 2px rgba(15,42,34,.04), 0 4px 16px rgba(15,42,34,.05);
  --shadow-lg: 0 10px 30px rgba(15,42,34,.12);
  --ease: cubic-bezier(.2,.7,.2,1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1311; --bg-elev: #0e1a17; --card: #111d1a; --input: #0d1816;
    --border: #23342f; --border-strong: #3a554d; --grid: #1b2925;
    --text: #e8f2ee; --muted: #a7bbb3; --faint: #8fa59d;
    --primary: #34d399; --primary-hover: #6ee7b7; --primary-ink: #052e21; --primary-soft: #12302a;
    --accent: #fbbf24; --accent-ink: #1f1300; --accent-soft: #332a12;
    --ring: #5eead4;
    --pos: #34d399; --neg: #f87171; --warn: #fbbf24;
    --good-bg: #12302a; --mid-bg: #332a12; --bad-bg: #3a1a17; --chip: #15231f;
    --c1: #fbbf24; --c2: #60a5fa; --c3: #34d399; --c4: #f87171; --c5: #a78bfa;
    --heat-pos: 52,211,153; --heat-neg: 248,113,113;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1311; --bg-elev: #0e1a17; --card: #111d1a; --input: #0d1816;
  --border: #23342f; --border-strong: #3a554d; --grid: #1b2925;
  --text: #e8f2ee; --muted: #a7bbb3; --faint: #8fa59d;
  --primary: #34d399; --primary-hover: #6ee7b7; --primary-ink: #052e21; --primary-soft: #12302a;
  --accent: #fbbf24; --accent-ink: #1f1300; --accent-soft: #332a12;
  --ring: #5eead4;
  --pos: #34d399; --neg: #f87171; --warn: #fbbf24;
  --good-bg: #12302a; --mid-bg: #332a12; --bad-bg: #3a1a17; --chip: #15231f;
  --c1: #fbbf24; --c2: #60a5fa; --c3: #34d399; --c4: #f87171; --c5: #a78bfa;
  --heat-pos: 52,211,153; --heat-neg: 248,113,113;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
}

/* ---------- Grundlag ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 var(--font); font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
a { color: var(--primary); text-underline-offset: 2px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
svg.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Header ---------- */
header { max-width: 1440px; margin: 0 auto; padding: 24px 24px 8px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #1f1300; box-shadow: var(--shadow); }
.brand .logo svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
header h1 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.lead { font-size: 1.05rem; color: var(--muted); margin: 12px 0 18px; max-width: 70ch; }
.lead b { color: var(--text); }
.theme-toggle { display: inline-flex; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; box-shadow: var(--shadow); }
.theme-toggle button { border: none; background: none; border-radius: 999px; min-height: 38px; min-width: 42px; padding: 0 12px; color: var(--muted); gap: 6px; font-size: .82rem; }
.theme-toggle button:hover { background: var(--bg-elev); color: var(--text); }
.theme-toggle button[aria-pressed="true"] { background: var(--primary-soft); color: var(--text); }
.theme-toggle button span { display: none; }
@media (min-width: 720px) { .theme-toggle button span { display: inline; } }

.howto { list-style: none; counter-reset: h; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0; margin: 0; max-width: 1100px; }
.howto li { counter-increment: h; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 14px 58px; position: relative; font-size: .92rem; box-shadow: var(--shadow); }
.howto li::before { content: counter(h); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--text); display: grid; place-items: center; font-weight: 800; font-size: .85rem; border: 1px solid var(--border); }
.howto li b { display: block; font-weight: 700; }
.howto li span { display: block; color: var(--muted); font-size: .86rem; margin-top: 2px; }
@media (max-width: 760px) { .howto { grid-template-columns: 1fr; } }

/* ---------- Layout ---------- */
main { display: grid; grid-template-columns: minmax(360px, 480px) minmax(0, 1fr); gap: 20px; max-width: 1440px; margin: 0 auto; padding: 16px 24px 48px; align-items: start; }
@media (max-width: 1023px) { main { grid-template-columns: 1fr; } }
@media (max-width: 520px) { header { padding: 16px 16px 4px; } main { padding: 12px 16px 40px; } }
#results { min-width: 0; }

/* ---------- Kort ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card h2 { font-size: 1.08rem; font-weight: 750; letter-spacing: -.01em; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h2 small, .opt { font-weight: 500; color: var(--faint); font-size: .8rem; }
.card h3 { font-size: .75rem; margin: 22px 0 8px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.step { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: inline-grid; place-items: center; font-size: .85rem; font-weight: 800; }
.step svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.intro { margin: -4px 0 16px; color: var(--muted); font-size: .94rem; max-width: 72ch; }
.hint { font-size: .82rem; color: var(--faint); margin: 6px 0 10px; line-height: 1.5; }
.hint a { color: var(--primary); }
details.card > summary { cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h2 { margin: 0; }
details.card > summary small { color: var(--faint); font-size: .82rem; }
details[open].card > summary { margin-bottom: 10px; }

/* ---------- Formular ---------- */
label { display: block; font-size: .84rem; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
input, select {
  display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 9px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--input); color: var(--text);
  font: 500 .95rem var(--font); transition: border-color .15s, box-shadow .15s, background-color .2s;
}
input::placeholder { color: var(--faint); opacity: .85; }
input:hover, select:hover { border-color: var(--primary); }
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 35%, transparent); }
input:disabled { opacity: .6; cursor: not-allowed; }
input[type=checkbox] { display: inline-block; width: 20px; height: 20px; min-height: 0; margin: 0 10px 0 0; padding: 0; accent-color: var(--primary); cursor: pointer; flex: none; }
input[type=file] { padding: 8px; cursor: pointer; }
label.check { display: flex; align-items: center; color: var(--text); font-weight: 600; min-height: 36px; cursor: pointer; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 44px; gap: 0 10px; align-items: end; }
.offer .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
@media (max-width: 520px) { .grid4 { grid-template-columns: 1fr 1fr; } .grid4 .remove { grid-column: span 2; justify-self: end; } .offer .grid4 { grid-template-columns: 1fr 1fr; } }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 0 0 12px; padding: 10px 14px 4px; }
legend { padding: 0 6px; font-size: .92rem; font-weight: 700; }
legend label { margin: 0; display: flex; align-items: center; }
legend svg.ic { color: var(--primary); margin-right: 6px; }
.offer { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 14px 56px 4px 14px; margin-bottom: 12px; position: relative; background: var(--bg-elev); }
.offer > .remove { position: absolute; top: 10px; right: 10px; }
ol.mini { margin: 0 0 14px; padding-left: 20px; font-size: .9rem; color: var(--muted); }
ol.mini li { margin: 3px 0; }
details.sub { border-top: 1px dashed var(--border); margin: 10px 0 4px; padding-top: 4px; }
details.sub > summary { cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--primary); padding: 8px 0; list-style: none; display: flex; align-items: center; gap: 6px; min-height: 40px; }
details.sub > summary::-webkit-details-marker { display: none; }
details.sub > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .2s var(--ease); margin-right: 4px; }
details.sub[open] > summary::before { transform: rotate(45deg); }
details.sub > summary small { color: var(--faint); font-weight: 500; }
.status { font-size: .88rem; margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; }
.status.ok { color: var(--pos); } .status.err { color: var(--neg); }
.mp { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); font-size: .88rem; font-weight: 500; color: var(--text); cursor: pointer; }
.mp small { color: var(--faint); display: block; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 8px 0; }
.row label { flex: 1; margin: 0; }

/* ---------- Knapper ---------- */
button { font: 600 .92rem var(--font); cursor: pointer; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--card); color: var(--text); padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s; }
button:hover { border-color: var(--primary); background: var(--primary-soft); }
button:active { transform: translateY(1px); }
button.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); width: 100%; padding: 14px 20px; font-size: 1rem; font-weight: 700; box-shadow: var(--shadow); }
button.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
button.secondary { background: transparent; }
button.remove { min-height: 40px; min-width: 40px; width: 40px; padding: 0; color: var(--neg); border-color: var(--border); margin-bottom: 12px; background: var(--card); }
button.remove:hover { background: var(--bad-bg); border-color: var(--neg); }
button:disabled { opacity: .65; cursor: progress; }
.linkbtn { background: none; border: none; min-height: 40px; color: var(--primary); padding: 6px 0; font-size: .88rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { background: none; color: var(--primary-hover); }
.actions { position: sticky; bottom: 16px; z-index: 4; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; padding: 4px; background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; }
.tabs button { flex: 1; border: none; background: transparent; font-size: .88rem; min-height: 44px; flex-direction: column; gap: 0; line-height: 1.2; color: var(--muted); padding: 6px 8px; }
.tabs button small { font-size: .7rem; font-weight: 500; opacity: .9; }
.tabs button:hover { background: var(--card); color: var(--text); }
.tabs button.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }
.dep[hidden] { display: none; }

/* ---------- Hjælpebobler ---------- */
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--faint);
  color: var(--faint); font-size: .68rem; font-weight: 800; cursor: help; vertical-align: 1px; margin-left: 4px; user-select: none; position: relative; }
.info::after { content: ""; position: absolute; inset: -11px; }
.info:hover, .info:focus-visible { border-color: var(--primary); color: var(--primary); }
#tipbox { position: absolute; z-index: 60; background: var(--text); color: var(--bg); padding: 10px 12px; border-radius: 10px; font-size: .84rem; line-height: 1.45; box-shadow: var(--shadow-lg); pointer-events: none; font-weight: 500; }

/* ---------- Resultat ---------- */
.placeholder h2 { font-size: 1.2rem; }
ul.checks { padding-left: 0; list-style: none; margin: 6px 0 12px; }
ul.checks li { padding-left: 30px; position: relative; margin: 9px 0; }
ul.checks li::before { content: ""; position: absolute; left: 2px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-soft); box-shadow: inset 0 0 0 1px var(--primary); }
ul.checks li::after { content: ""; position: absolute; left: 8px; top: 6px; width: 5px; height: 9px; border: solid var(--primary); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.loading h2 { display: flex; align-items: center; gap: 10px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.rtabs { display: flex; gap: 4px; margin-bottom: 16px; position: sticky; top: 8px; z-index: 5; padding: 4px; background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; box-shadow: var(--shadow); }
.rtabs button { flex: 1; border: none; background: transparent; white-space: nowrap; color: var(--muted); }
.rtabs button:hover { background: var(--bg-elev); color: var(--text); }
.rtabs button.active { background: var(--primary); color: var(--primary-ink); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: .85rem; }
.chips > span { color: var(--faint); font-weight: 600; }
.chips button { background: var(--card); border-color: var(--border); text-align: left; font-size: .85rem; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 14px; }
.chips button small { color: var(--faint); font-size: .72rem; font-weight: 500; }
.chips button.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); }

.hero { position: relative; overflow: hidden; padding: 26px; border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--primary); font-weight: 800; }
.hero .big { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 6px 0 12px; }
.summary { font-size: 1rem; max-width: 72ch; color: var(--text); }
.summary p { margin: 8px 0; }
.summary b { font-weight: 750; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.kpi { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--bg-elev); }
.kpi .v { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .8rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.robust { margin-top: 16px; border-radius: var(--radius-sm); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .92rem; border: 1px solid var(--border); }
.robust > span:not(.info) { flex-basis: 100%; color: var(--text); font-weight: 500; }
.robust b { font-weight: 800; }
.robust.good { background: var(--good-bg); } .robust.mid { background: var(--mid-bg); } .robust.bad { background: var(--bad-bg); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.badge.good { background: var(--good-bg); color: var(--pos); } .badge.mid { background: var(--mid-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--neg); }
.why p { font-size: .92rem; max-width: 72ch; color: var(--muted); }
.hero .row { margin-top: 16px; }
.hero .row button { flex: none; }

.tablewrap { overflow-x: auto; border-radius: var(--radius-xs); }
table { border-collapse: collapse; width: 100%; font-size: .86rem; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
th { color: var(--faint); font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; }
tbody tr { transition: background-color .15s; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--primary-soft); }
tr.sel td { background: var(--accent-soft); }
tr.total td { font-weight: 800; border-top: 2px solid var(--border-strong); }
.heat td { text-align: center; font-weight: 700; color: var(--text); }
.heat td.rec { outline: 3px solid var(--accent); outline-offset: -3px; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1200px) { .charts { grid-template-columns: 1fr; } }
.chartbox { position: relative; height: 300px; }
.datalist { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 20px; font-size: .88rem; }
.datalist div span { color: var(--faint); font-weight: 600; }

.sens { display: grid; gap: 2px; }
.srow { display: grid; grid-template-columns: minmax(160px, 1.4fr) 2fr minmax(96px, auto); gap: 12px; align-items: center; font-size: .88rem; padding: 7px 0; border-bottom: 1px solid var(--border); }
.srow.base { font-weight: 800; }
.sbar { position: relative; height: 12px; background: linear-gradient(90deg, transparent calc(50% - 1px), var(--border-strong) calc(50% - 1px), var(--border-strong) calc(50% + 1px), transparent calc(50% + 1px)); }
.sbar span { position: absolute; top: 0; height: 100%; border-radius: 4px; }
.sbar .p { background: var(--pos); } .sbar .n { background: var(--neg); }
.sval { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
@media (max-width: 560px) { .srow { grid-template-columns: 1fr auto; } .sbar { display: none; } }

.notes ul { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; color: var(--muted); }
.notes li { margin: 6px 0; }
ol.checklist { padding-left: 0; margin: 0; list-style: none; counter-reset: c; }
ol.checklist li { counter-increment: c; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px solid var(--border); }
ol.checklist li::before { content: counter(c); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: .82rem; }
ol.checklist li span { display: block; color: var(--muted); font-size: .88rem; margin-top: 2px; }
dl.glossary { display: grid; grid-template-columns: minmax(180px, 1fr) 3fr; gap: 10px 20px; margin: 0; font-size: .9rem; }
dl.glossary dt { font-weight: 700; }
dl.glossary dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) { dl.glossary { grid-template-columns: 1fr; gap: 2px; } dl.glossary dd { margin-bottom: 10px; } }

/* ---------- Guide (ét trin ad gangen) ---------- */
#wizNav, .wiznav, #summaryStep { display: none; }
body.wizard #wizNav { display: block; grid-column: 1 / -1; }
body.wizard main { grid-template-columns: 1fr; max-width: 880px; }
body.wizard #results, body.wizard .actions, body.wizard #wizAgain { display: none; }
body.wizard #form > section.card, body.wizard #form > details.card { display: none; }
body.wizard #form > section.wactive, body.wizard #form > details.wactive { display: block; animation: wizin .28s var(--ease); padding: 28px; }
body.wizard .wiznav { display: block; }
body.wizard .card h2 { font-size: 1.4rem; }
body.wizard .step { width: 36px; height: 36px; font-size: 1rem; }
body.wizard .intro { font-size: 1.02rem; color: var(--text); }
body.wizard details#advanced > summary { pointer-events: none; }
body.wizard:not(.wstep0) .howto { display: none; }
@keyframes wizin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 520px) { body.wizard #form > section.wactive, body.wizard #form > details.wactive { padding: 20px 16px; } body.wizard .card h2 { font-size: 1.2rem; } }
#wizNav { margin-bottom: 4px; }
.wizbar { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.wizbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); width: 0; transition: width .35s var(--ease); }
#wizNav ol { list-style: none; display: flex; gap: 4px; padding: 0; margin: 0; }
#wizNav li { flex: 1; min-width: 0; }
#wizNav button { width: 100%; background: none; border: none; padding: 4px 2px; min-height: 56px; font-size: .78rem; font-weight: 600; color: var(--faint);
  flex-direction: column; gap: 4px; white-space: normal; line-height: 1.15; text-align: center; }
#wizNav button:hover { background: none; color: var(--text); }
#wizNav button span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); background: var(--card); font-weight: 800; color: var(--faint); transition: background-color .2s, border-color .2s, box-shadow .2s; }
#wizNav li.done button span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-size: 0; }
#wizNav li.done button span::after { content: ""; width: 6px; height: 11px; border: solid var(--primary-ink); border-width: 0 2.5px 2.5px 0; transform: translate(0, -1px) rotate(45deg); }
#wizNav li.current button { color: var(--text); font-weight: 800; }
#wizNav li.current button span { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 4px var(--accent-soft); }
@media (max-width: 640px) { #wizNav button { font-size: 0; } #wizNav li.current button { font-size: .72rem; } }
.wiznav { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 16px; }
.wizbtns { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wizbtns button.primary { width: auto; padding: 12px 26px; }
.wizbtns button.secondary { padding: 12px 18px; }
.wizpos { color: var(--faint); font-size: .84rem; font-weight: 600; }
.wizmsg { color: var(--neg); font-size: .92rem; font-weight: 600; margin-bottom: 10px; padding: 10px 12px; background: var(--bad-bg); border-radius: var(--radius-xs); }
.wizmsg:empty { display: none; }
.wiznav .linkbtn { display: block; margin: 12px auto 0; }
#wizAgain { margin-bottom: 8px; display: inline-flex; }
dl.sumlist { margin: 0; }
dl.sumlist > div { display: grid; grid-template-columns: 140px 1fr auto; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: start; }
dl.sumlist dt { font-weight: 700; color: var(--muted); }
dl.sumlist dd { margin: 0; font-weight: 500; }
dl.sumlist .linkbtn { min-height: 32px; padding: 0; }
@media (max-width: 520px) { dl.sumlist > div { grid-template-columns: 1fr auto; } dl.sumlist dd { grid-column: 1 / -1; grid-row: 2; } .wizpos { display: none; } }

#rpane > *, .hero { scroll-margin-top: 76px; }

.smartnote { margin-top: 10px; display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft); border: 1px solid var(--border); font-size: .92rem; }
.smartnote svg.ic { color: var(--warn); margin-top: 2px; }
