/* Hallmark · page: energikollen · genre: editorial · theme: project (Skog & Guld v4.2, assets/style.css) · shape: app screen (a guide in steps, the result in three columns) · signature: the answer panel that turns six answers into a priced proposal · surface: project · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S4 R5 V3 · weakest: V, the page is the site's own chrome around one tool; kept that on purpose because the site is a locked system */
/* waive 34: html/body overflow-x lives in assets/style.css (site-wide, out of scope for this page); this file sets clip for its own page */

:root {
  --ek-ink: var(--text);
  --ek-ink-2: var(--text-2);
  --ek-muted: var(--gray-500);
  --ek-paper: var(--off-white);
  --ek-card: var(--white);
  --ek-rule: var(--gray-200);
  --ek-accent: var(--green);
  --ek-accent-2: var(--green-2);
  --ek-deep: var(--navy);
  --ek-soft: var(--pale);
  --ek-gold: var(--gold);
  --ek-on-accent: var(--white);
  --ek-focus: var(--green-2);
  --ek-error: #a3352b;
  --ek-display: 'Archivo', sans-serif;
  --ek-body: 'Inter', sans-serif;
  --ek-radius: var(--radius);
  --ek-radius-lg: var(--radius-lg);
  --ek-ease: var(--ease-out);
  --ek-dur: 180ms;
  --ek-max: 1160px;
  --ek-gutter: clamp(16px, 4vw, 40px);
}

html, body { overflow-x: clip; }

.ek { background: var(--ek-paper); color: var(--ek-ink); font-family: var(--ek-body); padding: clamp(104px, 14vw, 140px) 0 clamp(56px, 8vw, 96px); }
.ek-wrap { max-width: var(--ek-max); margin: 0 auto; padding: 0 var(--ek-gutter); }

/* ---------- Topp: rubrik + frågepanel ---------- */
.ek-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.ek-intro h1 { font-family: var(--ek-display); font-weight: 800; font-size: clamp(2.1rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -0.02em; color: var(--ek-deep); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
.ek-intro p { margin-top: 20px; font-size: 1.125rem; line-height: 1.6; color: var(--ek-ink-2); max-width: 34ch; }
.ek-intro .ek-note { margin-top: 16px; font-size: 0.9375rem; color: var(--ek-muted); }

.ek-panel { background: var(--ek-card); border: 1px solid var(--ek-rule); border-radius: var(--ek-radius-lg); padding: clamp(20px, 3.4vw, 36px); box-shadow: var(--shadow); min-width: 0; }

.ek-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; font-size: 0.9375rem; color: var(--ek-muted); }
.ek-progress[hidden] { display: none; }
.ek-bar { flex: 1; height: 6px; border-radius: 6px; background: var(--ek-soft); overflow: hidden; }
.ek-bar span { display: block; height: 100%; background: var(--ek-accent); transform-origin: left center; transform: scaleX(0); transition: transform 320ms var(--ek-ease); }

.ek-step { border: 0; min-width: 0; }
.ek-step + .ek-step { margin-top: 36px; }
.ek-js .ek-step + .ek-step { margin-top: 0; }
.ek-js .ek-step:not(.is-current) { display: none; }
.ek-step legend { font-family: var(--ek-display); font-weight: 800; font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.2; color: var(--ek-deep); padding: 0; margin-bottom: 8px; overflow-wrap: break-word; }
.ek-hint { font-size: 0.9375rem; color: var(--ek-muted); margin-bottom: 20px; }
.ek-sub { font-weight: 600; font-size: 1rem; color: var(--ek-ink); margin: 20px 0 12px; }
.ek-sub:first-of-type { margin-top: 4px; }

/* Svarsalternativ: radio/checkbox i flödet, etiketten bär läget */
.ek-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ek-opts--row { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
.ek-opt { position: relative; min-width: 0; }
.ek-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ek-opt label { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; height: 100%; padding: 12px 16px; border: 1.5px solid var(--ek-rule); border-radius: var(--ek-radius); background: var(--ek-card); font-size: 1rem; font-weight: 400; line-height: 1.35; color: var(--ek-ink); cursor: pointer; transition: border-color var(--ek-dur) var(--ek-ease), background-color var(--ek-dur) var(--ek-ease); }
.ek-opt label small { font-size: 0.875rem; font-weight: 400; color: var(--ek-muted); }
.ek-opt label:hover { border-color: var(--ek-accent-2); }
.ek-opt input:checked + label { border-color: var(--ek-accent); background: var(--ek-soft); }
.ek-opt input:focus-visible + label { outline: 2px solid var(--ek-focus); outline-offset: 2px; }
.ek-opt input:disabled + label { opacity: 0.55; cursor: not-allowed; }

/* Reglaget för förbrukning */
.ek-range { margin-top: 8px; }
.ek-range output { display: block; font-family: var(--ek-display); font-weight: 800; font-size: clamp(2rem, 5vw, 2.75rem); line-height: 1; color: var(--ek-deep); font-variant-numeric: tabular-nums; }
.ek-range output small { font-family: var(--ek-body); font-weight: 400; font-size: 1rem; color: var(--ek-muted); margin-left: 8px; }
.ek-range input[type="range"] { width: 100%; margin: 20px 0 8px; accent-color: var(--ek-accent); min-height: 44px; }
.ek-range input[type="range"]:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 4px; }
.ek-range input[type="range"]:disabled { opacity: 0.45; filter: grayscale(1); cursor: not-allowed; }
.ek-scale { display: flex; justify-content: space-between; font-size: 0.875rem; color: var(--ek-muted); }
.ek-check { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 1rem; cursor: pointer; }
.ek-check input { width: 20px; height: 20px; accent-color: var(--ek-accent); }
.ek-check input:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 2px; }

/* Textfält */
.ek-field { display: grid; gap: 8px; margin-top: 16px; }
.ek-field label { font-size: 0.9375rem; font-weight: 600; color: var(--ek-ink); }
.ek-field input { min-height: 48px; padding: 0 16px; border: 1.5px solid var(--ek-rule); border-radius: 12px; background: var(--ek-card); font: 400 1rem/1 var(--ek-body); color: var(--ek-ink); outline: 2px solid transparent; outline-offset: 1px; transition: border-color var(--ek-dur) var(--ek-ease); width: 100%; min-width: 0; }
.ek-field input:hover { border-color: var(--ek-accent-2); }
.ek-field input:focus-visible { outline-color: var(--ek-focus); border-color: var(--ek-accent); }
.ek-field input[aria-invalid="true"] { border-color: var(--ek-error); }
.ek-field input:disabled { background: var(--ek-soft); color: var(--ek-muted); cursor: not-allowed; }
.ek-err { min-height: 1.4em; font-size: 0.9rem; color: var(--ek-error); margin-top: 8px; }

/* Knappar */
.ek-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.ek-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border: 1.5px solid var(--ek-accent); border-radius: 1000px; background: var(--ek-accent); color: var(--ek-on-accent); font: 600 1rem/1 var(--ek-body); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--ek-dur) var(--ek-ease), border-color var(--ek-dur) var(--ek-ease), transform 90ms var(--ek-ease); }
.ek-btn:hover { background: var(--ek-accent-2); border-color: var(--ek-accent-2); }
.ek-btn:active { transform: translateY(1px); }
.ek-btn:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 3px; }
.ek-btn:disabled, .ek-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.ek-btn[aria-busy="true"] { cursor: progress; opacity: 0.8; }
.ek-btn--quiet { background: transparent; color: var(--ek-accent); border-color: var(--ek-rule); }
.ek-btn--quiet:hover { background: var(--ek-soft); border-color: var(--ek-accent-2); }
.ek-back { background: none; border: 0; padding: 12px 4px; min-height: 44px; font: 400 1rem/1 var(--ek-body); color: var(--ek-ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.ek-back:hover { color: var(--ek-accent); }
.ek-back:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 2px; border-radius: 6px; }
.ek-back[hidden] { visibility: hidden; display: inline-block; }
.ek-nojs-only { display: block; }
.ek-js .ek-nojs-only { display: none; }
.ek-nojs { margin-top: 28px; padding: 16px 20px; border-radius: var(--ek-radius); background: var(--ek-soft); font-size: 1rem; }

/* ---------- Resultat ---------- */
.ek-result[hidden] { display: none; }
.ek-result-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: end; }
.ek-result-head h2 { font-family: var(--ek-display); font-weight: 800; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--ek-deep); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
.ek-summary { margin-top: 12px; font-size: 1.0625rem; color: var(--ek-ink-2); }
.ek-flags { margin-top: 16px; display: grid; gap: 8px; }
.ek-flags p { font-size: 0.9375rem; color: var(--ek-ink-2); padding: 12px 16px; border: 1px solid var(--ek-gold); border-radius: 12px; background: var(--ek-card); }

.ek-cards { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.ek-card { display: flex; flex-direction: column; background: var(--ek-card); border: 1.5px solid var(--ek-rule); border-radius: var(--ek-radius-lg); padding: 28px 24px 24px; min-width: 0; }
.ek-card.is-pick { border-color: var(--ek-accent); box-shadow: var(--shadow-lg); }
.ek-tier { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ek-tier h3 { font-family: var(--ek-display); font-weight: 800; font-size: 1.5rem; color: var(--ek-deep); }
.ek-badge { font-size: 0.875rem; font-weight: 600; padding: 4px 12px; border-radius: 1000px; background: var(--ek-accent); color: var(--ek-on-accent); white-space: nowrap; }
.ek-product { margin-top: 2px; font-size: 1rem; color: var(--ek-ink-2); }
.ek-why { margin-top: 12px; font-size: 0.9375rem; line-height: 1.5; color: var(--ek-deep); background: var(--ek-soft); border-radius: 12px; padding: 12px 12px; }
.ek-size { margin-top: 20px; display: flex; align-items: baseline; gap: 8px; font-family: var(--ek-display); font-weight: 800; font-size: 2.25rem; line-height: 1; color: var(--ek-deep); font-variant-numeric: tabular-nums; }
.ek-size small { font-family: var(--ek-body); font-weight: 400; font-size: 1rem; color: var(--ek-muted); }

.ek-rows { margin-top: 16px; border-top: 1px solid var(--ek-rule); }
.ek-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ek-rule); font-size: 0.9375rem; line-height: 1.45; }
.ek-row dt { color: var(--ek-muted); }
.ek-row dd { color: var(--ek-ink); font-weight: 400; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: break-word; }
.ek-row dd strong { font-family: var(--ek-display); font-weight: 800; font-size: 1.3rem; color: var(--ek-deep); display: block; line-height: 1.15; }
.ek-row dd span { display: block; font-weight: 400; color: var(--ek-ink-2); }
.ek-row dd.is-no { color: var(--ek-ink-2); }
.ek-pending { color: var(--ek-muted); font-weight: 400; }

.ek-card details { margin-top: 16px; font-size: 0.9rem; color: var(--ek-ink-2); }
.ek-card summary { cursor: pointer; font-weight: 600; color: var(--ek-accent); min-height: 44px; display: flex; align-items: center; list-style-position: inside; }
.ek-card summary:hover { color: var(--ek-accent-2); }
.ek-card summary:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 2px; border-radius: 6px; }
.ek-card details ul { margin: 4px 0 0 20px; display: grid; gap: 8px; line-height: 1.5; }

.ek-shared { margin-top: 20px; font-size: 0.9375rem; color: var(--ek-muted); max-width: 72ch; }

/* Handlingar */
.ek-actions { margin-top: 36px; padding: clamp(24px, 3.4vw, 36px); border-radius: var(--ek-radius-lg); background: var(--ek-deep); color: var(--ek-on-accent); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center; }
.ek-actions h3 { font-family: var(--ek-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
.ek-actions p { margin-top: 8px; font-size: 1rem; color: var(--ek-gold); }
.ek-actions-btns { display: flex; flex-wrap: wrap; gap: 12px; }
.ek-actions .ek-btn { background: var(--ek-gold); border-color: var(--ek-gold); color: var(--ek-deep); }
.ek-actions .ek-btn:hover { background: var(--ek-card); border-color: var(--ek-card); }
.ek-actions .ek-btn--quiet { background: transparent; color: var(--ek-on-accent); border-color: var(--ek-gold); }
.ek-actions .ek-btn--quiet:hover { background: var(--ek-accent); border-color: var(--ek-accent); }
.ek-actions .ek-btn:focus-visible { outline-color: var(--ek-gold); }
.ek-actions .ek-btn[aria-expanded="true"] { box-shadow: inset 0 0 0 2px var(--ek-on-accent); }

.ek-lead { margin-top: 20px; max-width: 640px; background: var(--ek-card); border: 1px solid var(--ek-rule); border-radius: var(--ek-radius-lg); padding: clamp(20px, 3vw, 32px); }
.ek-lead[hidden] { display: none; }
.ek-lead h3 { font-family: var(--ek-display); font-weight: 800; font-size: 1.35rem; color: var(--ek-deep); }
.ek-lead > p { margin-top: 8px; font-size: 0.9375rem; color: var(--ek-ink-2); }
.ek-lead-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ek-consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 0.9rem; color: var(--ek-ink-2); cursor: pointer; }
.ek-consent input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ek-accent); }
.ek-consent input:focus-visible { outline: 2px solid var(--ek-focus); outline-offset: 2px; }
.ek-consent a { color: var(--ek-accent); }
.ek-lead .ek-btn { margin-top: 20px; }
.ek-restart { margin-top: 28px; }

@media (max-width: 960px) {
  .ek-top { grid-template-columns: minmax(0, 1fr); }
  .ek-cards { grid-template-columns: minmax(0, 1fr); }
  .ek-actions, .ek-result-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .ek-opts { grid-template-columns: minmax(0, 1fr); }
  .ek-opts--row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ek-lead-grid { grid-template-columns: minmax(0, 1fr); }
  .ek-nav .ek-btn { flex: 1; }
  .ek-actions-btns .ek-btn { width: 100%; }
  .ek-card { padding: 24px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .ek-bar span, .ek-opt label, .ek-btn, .ek-field input { transition: none; }
}
.ek-top[hidden], .ek-result[hidden] { display: none; }
.ek-result:focus { outline: none; }
.ek-card-foot { margin-top: auto; padding-top: 16px; }
.ek-shop { width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-top: 12px; padding-bottom: 12px; }
