/* ==========================================================================
   HemNät & Teknik — "Ink" designsystem
   Premiumlager som läggs sist över site.css / portal.css / expressive.css.
   Bläcksvart bas, hårfina linjer, ljusa primärknappar, Geist + Instrument Serif.
   ========================================================================== */

:root {
  /* ---- Bas & ytor ---- */
  --ink-0: #060709;
  --ink-1: #08090c;
  --ink-2: #0d0f14;
  --ink-3: #12151b;
  --ink-4: #181b23;
  --ink-5: #20242e;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .12);
  --line-3: rgba(255, 255, 255, .18);
  --text: #eef0f4;
  --text-2: #a3a9b6;
  --text-3: #6d7380;

  /* ---- Accent (används sparsamt) ---- */
  --acc: #a9b4ff;
  --acc-2: #6ee7d8;
  --acc-grad: linear-gradient(115deg, #b9c2ff 0%, #8ea2ff 38%, #6ee7d8 100%);
  --acc-soft: rgba(169, 180, 255, .1);
  --acc-line: rgba(169, 180, 255, .28);
  --ok: #7ee2b8;
  --warn: #f3c77a;
  --bad: #ff8f85;

  /* ---- Material-tokens mappas om ---- */
  --md-surface: var(--ink-1);
  --md-surface-dim: var(--ink-1);
  --md-surface-container-lowest: var(--ink-0);
  --md-surface-container-low: var(--ink-2);
  --md-surface-container: var(--ink-3);
  --md-surface-container-high: var(--ink-4);
  --md-surface-container-highest: var(--ink-5);
  --md-on-surface: var(--text);
  --md-on-surface-variant: var(--text-2);
  --md-outline: #3b404c;
  --md-outline-variant: var(--line);
  --md-primary: var(--acc);
  --md-on-primary: #0b0d14;
  --md-primary-container: #1a1f3a;
  --md-on-primary-container: #dfe3ff;
  --md-secondary-container: rgba(169, 180, 255, .12);
  --md-on-secondary-container: #e6e9ff;
  --md-tertiary: var(--ok);
  --md-tertiary-container: rgba(126, 226, 184, .12);
  --md-on-tertiary-container: #c6f5e1;
  --md-error: var(--bad);
  --md-error-container: rgba(255, 143, 133, .12);
  --md-on-error-container: #ffd3ce;
  --md-warning: var(--warn);
  --md-inverse-surface: #eef0f4;
  --md-inverse-on-surface: #0b0d12;

  /* ---- Form & typografi ---- */
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-serif: 'Instrument Serif', 'Times New Roman', serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --shape-xs: 6px; --shape-sm: 8px; --shape-md: 12px; --shape-lg: 16px; --shape-xl: 22px;
  --r-btn: 12px;
  --elev-1: 0 1px 2px rgba(0,0,0,.4);
  --elev-2: 0 8px 24px -8px rgba(0,0,0,.6);
  --elev-3: 0 24px 60px -20px rgba(0,0,0,.75);
  --glow: 0 0 0 1px var(--line), 0 30px 80px -40px rgba(0,0,0,.9);
  --spring: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Bas ---------- */
html { background: var(--ink-1); }
body {
  font-family: var(--font);
  font-feature-settings: 'ss01', 'cv11';
  letter-spacing: -.005em;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(110, 122, 255, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(110, 231, 216, .035), transparent 60%),
    var(--ink-1);
}
/* Fint brus för textur */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: rgba(169, 180, 255, .35); color: #fff; }
a { color: var(--acc); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* ---------- Ikoner: tunna linjer ---------- */
.msr { font-family: 'Material Symbols Outlined'; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24; }
.msr--fill { font-variation-settings: 'FILL' 1, 'wght' 300, 'GRAD' 0, 'opsz' 24; }

/* ---------- Typografi ---------- */
.display-l, .headline-l, .headline-s, .hero h1 {
  font-family: var(--font-display);
  font-variation-settings: normal;
  font-weight: 600;
  letter-spacing: -.045em;
  color: var(--text);
}
.display-l { font-size: clamp(2.75rem, 7vw, 5.25rem); line-height: .98; }
.headline-l { font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.04; letter-spacing: -.04em; }
.headline-s { font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.15; letter-spacing: -.03em; }
.title-l { font-variation-settings: normal; font-weight: 550; font-size: 1.1875rem; letter-spacing: -.02em; }
.title-m { font-weight: 550; letter-spacing: -.01em; }
.body-l { color: var(--text-2); font-size: 1.0625rem; line-height: 1.6; }
.body-m { color: var(--text-2); }

/* Kursiv serif för betonade ord */
.display-l em, .headline-l em, .hero h1 em, .gradient-text, .accent-serif {
  font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.02em;
  background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent !important;
  animation: none; padding-right: .06em;
}

/* Överrubrik: liten, spärrad, med linje */
.overline {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-variation-settings: normal;
  font-size: .75rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-2);
}
.overline .msr { display: none; }
.overline::before { content: ''; width: 22px; height: 1px; background: var(--acc-grad); }
.section__head--center .overline::after { content: ''; width: 22px; height: 1px; background: var(--acc-grad); }

/* ---------- Knappar ---------- */
.btn {
  border-radius: var(--r-btn);
  font-family: var(--font); font-weight: 550; letter-spacing: -.01em;
  min-height: 42px; padding: 0 18px;
  transition: transform 300ms var(--spring), box-shadow 200ms, background 200ms, border-color 200ms, color 200ms;
}
.btn::before { display: none; }
.btn:active { border-radius: var(--r-btn); transform: scale(.98); }
.btn--lg { min-height: 52px; padding: 0 24px; border-radius: 14px; font-size: .9375rem; }
.btn--lg:active { border-radius: 14px; }
.btn--sm { min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: .8125rem; }
.btn .msr { font-size: 18px; margin-left: -2px; }

.btn--filled {
  --btn-bg: #f2f3f7; --btn-fg: #0b0d12;
  background: linear-gradient(180deg, #ffffff 0%, #e6e8ef 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.4), 0 10px 30px -12px rgba(169, 180, 255, .45);
}
.btn--filled:hover { box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.4), 0 16px 40px -12px rgba(169, 180, 255, .65); transform: translateY(-1px); }
.btn--tonal, .btn--outlined {
  --btn-fg: var(--text);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.btn--tonal:hover, .btn--outlined:hover { background: rgba(255,255,255,.07); border-color: var(--line-3); }
.btn--text { --btn-fg: var(--text-2); padding: 0 10px; }
.btn--text:hover { --btn-fg: var(--text); background: rgba(255,255,255,.04); }
.btn--danger { color: var(--bad) !important; }
.btn--danger-filled { --btn-bg: var(--bad); --btn-fg: #1a0b0a; background: var(--bad); box-shadow: none; }
.icon-btn { border-radius: 12px; color: var(--text-2); }
.icon-btn::before { inset: 4px; border-radius: 10px; }

/* ---------- Ikonbehållare: hårfin ruta i stället för Google-former ---------- */
.service__icon, .kpi__icon, .quick-item__icon, .tile__icon, .auth__icon, .banner__icon, .price-card__icon,
.guide__opt-icon, .insight__icon, .hm__icon, .consent__icon, .palette__icon, .step__num {
  -webkit-mask: none !important; mask: none !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)) !important;
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  color: var(--acc) !important;
  transform: none !important;
}
.service__icon .msr, .kpi__icon .msr, .quick-item__icon .msr, .tile__icon .msr, .guide__opt-icon .msr, .insight__icon .msr { transform: none !important; }
.service__icon { width: 48px; height: 48px; }
.service__icon .msr { font-size: 24px; }
.kpi--error .kpi__icon, .insight--error .insight__icon { color: var(--bad) !important; }
.kpi--success .kpi__icon, .insight--success .insight__icon { color: var(--ok) !important; }
.hm--danger .hm__icon { color: var(--bad) !important; }
.step__num { width: 44px; height: 44px; font-family: var(--font-mono); font-size: .9375rem; font-weight: 500; color: var(--text) !important; }

/* ---------- Kort & ytor ---------- */
.card, .step, .faq__item, .tile, .quick-item, .table-card, .kpi, .insight, .guide__opt, .rate, .mini-kpis div,
.legal__toc, .legal-company, .seg-card, .tpl-card, .stripe-box, .pay-card, .rec-card, .onboarding {
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008)), var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.card, .step { border-radius: var(--shape-xl); }
.card--interactive { border-color: var(--line); }
.card--interactive:hover { transform: translateY(-2px); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.012)), var(--ink-2); border-color: var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--elev-3); }
.card--filled { background: var(--ink-3); }
.faq__item[open] { background: linear-gradient(180deg, rgba(169,180,255,.05), rgba(255,255,255,.01)), var(--ink-2); border-color: var(--acc-line); }
.faq__item summary { font-weight: 550; letter-spacing: -.01em; }
.faq__item summary::before { background: transparent; }

/* Accentkort (gradientkant) */
.hero__panel, .guide__result, .cta-band__inner, .banner, .service--feature, .hero-card, .calc__result {
  position: relative; isolation: isolate;
  background: radial-gradient(120% 90% at 100% 0%, rgba(122, 138, 255, .16), transparent 55%), radial-gradient(90% 80% at 0% 100%, rgba(110, 231, 216, .07), transparent 60%), var(--ink-2) !important;
  border: 1px solid transparent !important;
  color: var(--text) !important;
}
.hero__panel::before, .guide__result::before, .cta-band__inner::before, .banner::before, .service--feature::before, .hero-card::before, .calc__result::before {
  content: ''; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, rgba(185, 194, 255, .45), rgba(255,255,255,.06) 35%, rgba(255,255,255,.04) 65%, rgba(110, 231, 216, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  pointer-events: none;
}
.hero__panel::after { display: none; }
.banner h2, .banner h3, .banner p, .hero-card p, .calc__result .calc__sub { color: inherit !important; }
.banner p, .hero-card p { color: var(--text-2) !important; }
.banner .btn--filled, .hero-card .btn--filled, .calc__result .btn { --btn-fg: #0b0d12; }
.banner__facts span { background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.hero-card--ok { background: radial-gradient(120% 90% at 100% 0%, rgba(126, 226, 184, .16), transparent 55%), var(--ink-2) !important; }

/* ---------- Chips, etiketter ---------- */
.chip { border-radius: 10px; border-color: var(--line-2); color: var(--text-2); font-weight: 500; }
.chip.is-selected, .chip:has(input:checked) { border-radius: 10px; background: #eef0f4; color: #0b0d12; border-color: transparent; }
.chip::before { display: none; }
.assist-chip { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text-2); border-radius: 8px; }
.pill { border-radius: 8px; height: 24px; font-size: .75rem; font-weight: 550; border: 1px solid transparent; }
.pill--neutral { background: rgba(255,255,255,.05); color: var(--text-2); border-color: var(--line); }
.pill--info { background: var(--acc-soft); color: #cfd5ff; border-color: rgba(169,180,255,.22); }
.pill--success { background: rgba(126,226,184,.1); color: var(--ok); border-color: rgba(126,226,184,.22); }
.pill--error { background: rgba(255,143,133,.1); color: var(--bad); border-color: rgba(255,143,133,.24); }
.status-chip { border-radius: 999px; border-color: var(--line-2); background: rgba(255,255,255,.03); font-family: var(--font-mono); font-size: .75rem; letter-spacing: .02em; }
.status-chip.is-open { color: var(--ok); border-color: rgba(126,226,184,.3); background: rgba(126,226,184,.06); }
.status-chip.is-open .status-chip__dot { background: var(--ok); }
.segmented { border-color: var(--line-2); border-radius: 12px; background: rgba(255,255,255,.03); padding: 3px; gap: 3px; }
.segmented button { border-radius: 9px; height: 36px; border: 0 !important; color: var(--text-2); }
.segmented button[aria-pressed="true"] { background: #eef0f4; color: #0b0d12; }
.segmented button::before { display: none; }
kbd { font-family: var(--font-mono); border-radius: 6px; background: rgba(255,255,255,.05); border-color: var(--line-2); }

/* ---------- Fält ---------- */
.field__input, .line input, .line select, .inline-edit input, .inline-edit select {
  border-radius: 12px; border-color: var(--line-2); background: rgba(255,255,255,.02); color: var(--text);
}
.field__input:hover { border-color: var(--line-3); }
.field__input:focus, .line input:focus, .line select:focus, .inline-edit input:focus, .inline-edit select:focus {
  border-color: var(--acc); box-shadow: 0 0 0 4px rgba(169,180,255,.14); background: rgba(169,180,255,.03);
}
.field__label { color: var(--text-3); background: var(--field-bg, var(--ink-2)); }
.search, .menu__search { background: rgba(255,255,255,.03); border: 1px solid var(--line-2); border-radius: 14px; }
.search:focus-within { box-shadow: 0 0 0 4px rgba(169,180,255,.14); border-color: var(--acc); }
.switch:checked { background: #eef0f4; border-color: #eef0f4; }
.switch:checked::before { background: #0b0d12; }
.slider::-webkit-slider-runnable-track { background: linear-gradient(to right, #b9c2ff var(--p), rgba(255,255,255,.08) var(--p)); height: 6px; }
.slider::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px rgba(169,180,255,.18); }
.slider::-moz-range-track { height: 6px; background: rgba(255,255,255,.08); }
.slider::-moz-range-progress { height: 6px; background: #b9c2ff; }
.slider::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; }

/* ---------- Varningsrutor ---------- */
.alert { border-radius: 14px; border: 1px solid var(--line); }
.alert--success { background: rgba(126,226,184,.08); color: #c6f5e1; border-color: rgba(126,226,184,.22); }
.alert--error { background: rgba(255,143,133,.08); color: #ffd3ce; border-color: rgba(255,143,133,.25); }

/* ==========================================================================
   Webbplats
   ========================================================================== */
/* Toppmeny: flytande kapsel */
.top-app-bar { background: transparent !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; transition: padding 300ms var(--spring); }
.top-app-bar__inner {
  margin-top: 10px; height: 48px;
  border-radius: 16px; border: 1px solid transparent;
  transition: background 300ms, border-color 300ms, box-shadow 300ms, max-width 400ms var(--spring);
}
.top-app-bar.is-scrolled .top-app-bar__inner {
  background: rgba(13, 15, 20, .72); border-color: var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  box-shadow: 0 20px 40px -24px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.05);
}
@media (min-width: 1000px) { .top-app-bar__inner { padding-inline: 10px 10px !important; } }
.brand { font-weight: 600; letter-spacing: -.03em; font-size: 1.0625rem; }
.brand__amp { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.15em; background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand__logo { border-radius: 9px; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.nav-tab { height: 36px; padding: 0 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.nav-tab:hover { background: rgba(255,255,255,.05); color: var(--text); }
.nav-tab.is-active { background: rgba(255,255,255,.08); color: var(--text); border-radius: 10px; }
.top-app-bar__actions .btn--tonal { background: #eef0f4; color: #0b0d12; border: 0; --btn-fg: #0b0d12; }

/* Mobilmeny */
.drawer { background: var(--ink-2); border-right: 1px solid var(--line); }
.drawer__item { border-radius: 12px; height: 50px; }
.drawer__item.is-active { background: rgba(255,255,255,.07); color: var(--text); }

/* Hero */
.hero { padding-top: clamp(40px, 8vw, 96px); }
.hero--aurora .aurora { opacity: .35; filter: blur(90px); }
.hero--aurora .aurora span:nth-child(1) { background: radial-gradient(circle, #3b46a8 0%, transparent 65%); }
.hero--aurora .aurora span:nth-child(2) { background: radial-gradient(circle, #135a54 0%, transparent 65%); }
.hero--aurora .aurora span:nth-child(3) { background: radial-gradient(circle, #2b2f63 0%, transparent 65%); }
.hero--aurora::after {
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 20%, transparent 75%);
}
.hero h1 { margin-bottom: 24px; }
.hero .body-l { font-size: 1.1875rem; max-width: 52ch; }
.hero__trust { color: var(--text-3); font-size: .8125rem; }
.hero__trust .msr { color: var(--ok); font-size: 18px; }
.hero__panel { border-radius: 24px; padding: 24px; box-shadow: var(--elev-3); }
.hero__panel .title-l { font-size: 1.0625rem; }
.quick-item { border-radius: 14px; padding: 12px 14px; }
.quick-item:hover { border-color: var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01)), var(--ink-3); }
.quick-item__icon { width: 38px; height: 38px; }
.rate { border-radius: 14px; }
.rate small { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .1em; }
.rate strong { font-weight: 600; letter-spacing: -.03em; }

/* Nyckeltal */
.stats { border-radius: 20px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--ink-1); padding: 24px 26px; }
.stat dt { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.stat dd { font-family: var(--font-display); font-variation-settings: normal; font-weight: 600; letter-spacing: -.04em; font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
.stat dd span { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 1.1rem; letter-spacing: 0; color: var(--text-2); }

/* Löpband med tjänster */
.marquee { position: relative; overflow: hidden; margin-top: 56px; padding: 18px 0; border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; width: max-content; gap: 48px; animation: marquee 40s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .9375rem; white-space: nowrap; }
.marquee__item .msr { color: var(--text-3); font-size: 20px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Sektioner */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--surface { background: linear-gradient(180deg, transparent, rgba(255,255,255,.012) 30%, transparent); }
.section--surface::before { background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.section__head { margin-bottom: clamp(40px, 5vw, 64px); }
.section__head .headline-l { margin-top: 14px; }

/* Tjänster (bento) */
.service { padding: 28px; gap: 14px; }
.service .title-l { font-size: 1.1875rem; }
.service--feature .title-l { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -.035em; }
.wifi-art { color: #b9c2ff; }
.service .chip-set { margin-top: auto; }

/* Steg */
.steps--line::before { background: linear-gradient(90deg, transparent, var(--line-2) 15%, var(--line-2) 85%, transparent); }
.step { padding: 32px 28px; }

/* Snabbguide */
.guide__opt { border-radius: 14px; min-height: 60px; font-weight: 500; }
.guide__opt:hover { border-color: var(--line-2); }
.guide__opt.is-active { background: linear-gradient(180deg, rgba(169,180,255,.12), rgba(169,180,255,.04)), var(--ink-2); border-color: var(--acc-line); border-radius: 14px; color: var(--text); }
.guide__opt.is-active .guide__opt-icon { background: #eef0f4 !important; color: #0b0d12 !important; border-color: transparent; }
.guide__result { border-radius: 24px; }
.guide__steps li::before { background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: var(--text); font-family: var(--font-mono); font-weight: 500; }
.guide__price { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 16px; }
.guide__price strong { font-family: var(--font-display); font-variation-settings: normal; font-weight: 600; letter-spacing: -.035em; }

/* Prissida */
.price-card { border-radius: 20px; }
.price-card__foot { border-top-color: var(--line); }
.price { font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em; color: var(--text); }
.badge-popular { background: rgba(169,180,255,.1); color: #cfd5ff; border: 1px solid rgba(169,180,255,.25); border-radius: 8px; }
.calc__result { border-radius: 24px; }
.calc__total { font-family: var(--font-display); font-weight: 600; letter-spacing: -.045em; }

/* Kontakt */
.contact__form { border-radius: 24px; }
.tile { border-radius: 16px; }

/* CTA-band */
.cta-band__inner { border-radius: 28px; padding: clamp(36px, 6vw, 72px); }
.cta-band .headline-l { font-size: clamp(2rem, 4.5vw, 3.4rem); }

/* Sidfot med stort ordmärke */
.footer { background: var(--ink-0); border-top: 1px solid var(--line); position: relative; overflow: hidden; }
.footer::after {
  content: 'HemNät & Teknik'; position: absolute; left: 50%; bottom: -0.18em; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.06em; white-space: nowrap;
  font-size: clamp(3.5rem, 13vw, 12rem); line-height: 1; color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,.05); pointer-events: none;
}
.footer > .container { position: relative; z-index: 1; padding-bottom: clamp(40px, 9vw, 140px); }
.footer__title { font-family: var(--font-mono); font-size: .6875rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.footer__list a:hover { color: var(--text); text-decoration: none; }
.footer__bottom { border-top-color: var(--line); color: var(--text-3); font-family: var(--font-mono); font-size: .75rem; }

/* FAB */
.fab { background: #eef0f4; color: #0b0d12; border-radius: 16px; box-shadow: var(--elev-3), 0 10px 30px -10px rgba(169,180,255,.5); }

/* Snackbar */
.snackbar { background: #eef0f4; color: #0b0d12; border-radius: 12px; font-weight: 550; }

/* Juridiska sidor */
.legal__doc.is-active { background: rgba(255,255,255,.07); color: var(--text); }
.legal__num { background: transparent; border: 1px solid var(--line-2); color: var(--text-2); font-family: var(--font-mono); font-weight: 500; }

/* Samtycke & modaler */
.consent, .hm, .palette, .menu {
  background: rgba(18, 21, 27, .92); -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line-2); box-shadow: 0 30px 80px -24px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.05);
}
.consent { border-radius: 22px; }
.hm { border-radius: 22px; }
.hm__title { font-weight: 600; letter-spacing: -.03em; font-size: 1.375rem; }
.menu { border-radius: 14px; padding: 6px; }
.menu__item { border-radius: 10px; height: 42px; }
.palette { border-radius: 20px; }
.palette__item { border-radius: 12px; }
.palette__item.is-sel { background: rgba(255,255,255,.07); color: var(--text); border-radius: 12px; }

/* ==========================================================================
   Kundportal
   ========================================================================== */
.p-bar { background: rgba(8, 9, 12, .78); border-bottom: 1px solid var(--line); }
.p-search { background: rgba(255,255,255,.03) !important; border: 1px solid var(--line-2) !important; border-radius: 12px !important; height: 40px !important; }
.p-bar__role { display: none !important; }
.avatar, .sb__avatar { background: linear-gradient(135deg, #3b46a8, #135a54); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.15); }

/* Sidomeny */
@media (min-width: 840px) {
  .sb__panel { background: var(--ink-1) !important; border-right: 1px solid var(--line); border-radius: 0 !important; }
  html:not(.rail-x) .sb__panel { background: var(--ink-1) !important; }
  .sb__cta { background: linear-gradient(180deg, #fff, #e6e8ef); color: #0b0d12; border-radius: 12px; height: 44px; box-shadow: inset 0 1px 0 #fff, 0 10px 30px -12px rgba(169,180,255,.45); font-weight: 600; margin-bottom: 20px; }
  html.rail-x .sb__cta { width: calc(100% - 8px); justify-content: center; }
  html:not(.rail-x) .sb__cta { width: 48px; height: 44px; }
  .sb__heading { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-left: 14px; }
  .sb__item { height: 40px; border-radius: 10px; padding: 0 12px; font-weight: 500; color: var(--text-2); }
  .sb__item.is-active { background: rgba(255,255,255,.07); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
  .sb__item.is-active .sb__icon { color: var(--acc); }
  html:not(.rail-x) .sb__item.is-active { background: none; box-shadow: none; }
  html:not(.rail-x) .sb__item.is-active .sb__icon { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--acc); }
  .sb__group + .sb__group { border-top-color: var(--line) !important; }
  .sb__foot { border-top-color: var(--line); }
  .sb__badge { font-family: var(--font-mono); font-size: .75rem; color: var(--text-3); }
  .sb__badge--error { color: var(--bad); }
}
@media (max-width: 839px) {
  .sb__panel { background: rgba(13,15,20,.92) !important; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--line); }
  .sb__item.is-active .sb__icon { background: rgba(255,255,255,.08); color: var(--text); }
}

/* Översikt */
.p-head .headline-l { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
.kpi { border-radius: 18px; padding: 22px; }
.kpi--error, .kpi--success { background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008)), var(--ink-2); }
.kpi__label { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.kpi__value { font-family: var(--font-display); font-variation-settings: normal; font-weight: 600; letter-spacing: -.04em; font-size: clamp(1.5rem, 2.4vw, 2rem); }
.kpi__spark polyline { stroke: #b9c2ff; filter: drop-shadow(0 4px 10px rgba(169,180,255,.4)); }
.insight { border-radius: 14px; }
.bars__bar { background: linear-gradient(180deg, #b9c2ff, rgba(169,180,255,.15)); border-radius: 8px 8px 3px 3px; }
.progress span { background: var(--acc-grad); }
.hero-card { border-radius: 22px; }
.hero-card__amount { font-family: var(--font-display); font-variation-settings: normal; font-weight: 600; letter-spacing: -.045em; }

/* Tabeller */
.table-card { border-radius: 18px; }
.dtable th { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .12em; color: var(--text-3); background: rgba(255,255,255,.015); }
.dtable td { border-bottom-color: var(--line); }
.dtable tbody tr:hover { background: rgba(255,255,255,.025); }
.dtable .num, .row__end, .totals dd, .copy-list strong { font-family: var(--font-mono); font-size: .875rem; letter-spacing: -.01em; }
.totals__grand dd { font-family: var(--font-display); font-weight: 600; letter-spacing: -.03em; color: var(--text); font-size: 1.625rem; }

/* Inställningar */
.settings__tab { border-radius: 12px !important; }
.settings__tab.is-active { background: rgba(255,255,255,.06); border-color: var(--line) !important; color: var(--text); }
.settings__tab.is-active strong { color: var(--text); }
.save-bar { background: rgba(18, 21, 27, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-color: var(--line-2); border-radius: 16px; }
.code-block, code { font-family: var(--font-mono); background: rgba(255,255,255,.05); border: 1px solid var(--line); }

/* Inloggning */
.auth { background: radial-gradient(800px 500px at 20% 0%, rgba(59,70,168,.25), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(19,90,84,.2), transparent 60%), var(--ink-1); }
.auth__card { background: rgba(13, 15, 20, .8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid var(--line-2); border-radius: 24px; box-shadow: var(--elev-3), inset 0 1px 0 rgba(255,255,255,.05); }

@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* Meddelandebanner (styrs från portalen) */
.site-banner {
  position: relative; z-index: 95; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px;
  margin: calc(var(--bar-h) + 6px) auto -40px; max-width: min(1180px, calc(100% - 32px));
  padding: 10px 18px; border-radius: 14px; font-size: .875rem; text-align: center;
  background: rgba(169,180,255,.08); border: 1px solid rgba(169,180,255,.22); color: #dfe3ff;
}
.site-banner .msr { font-size: 18px; }
.site-banner a { color: inherit; font-weight: 600; }
.site-banner--warning { background: rgba(243,199,122,.08); border-color: rgba(243,199,122,.28); color: #f8dfb0; }
.site-banner--success { background: rgba(126,226,184,.08); border-color: rgba(126,226,184,.25); color: #c6f5e1; }
.brand__amp { font-family: var(--font); font-style: normal; font-weight: 400; font-size: 1em; background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--acc); }

/* Sidomeny: kompakt "Ny faktura" på samma rad som fäll-knappen */
@media (min-width: 840px) {
  .sb__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 16px 0; margin: 0 0 4px; }
  .sb__toggle { width: 36px; height: 36px; }
  .sb .sb__cta, html.rail-x .sb .sb__cta {
    width: auto; height: 34px; margin: 0; padding: 0 12px 0 8px; gap: 6px;
    border-radius: 10px; font-size: .8125rem; font-weight: 600; justify-content: center;
    box-shadow: inset 0 1px 0 #fff, 0 6px 18px -10px rgba(169,180,255,.55);
  }
  .sb .sb__cta .msr { font-size: 18px; }
  html:not(.rail-x) .sb__head { flex-direction: column; gap: 10px; padding: 0 0 12px; }
  html:not(.rail-x) .sb .sb__cta { width: 40px; height: 40px; padding: 0; border-radius: 12px; }
  html:not(.rail-x) .sb .sb__cta .msr { font-size: 20px; }
}
/* ---------- Sidomeny: premium-finish (samma färger som resten av sidan) ---------- */
@media (min-width: 840px) {
  /* Panelen: exakt som toppraden – bläcksvart, halvgenomskinlig, hårfin linje */
  .sb__panel, html:not(.rail-x) .sb__panel {
    background: rgba(8, 9, 12, .78) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
    border-right: 1px solid var(--line) !important; box-shadow: none;
  }

  /* Gruppetiketter med utdragen hårfin linje */
  .sb__heading { display: flex; align-items: center; gap: 10px; margin: 16px 12px 6px; font-size: .6875rem; letter-spacing: .16em; color: var(--text-3); }
  .sb__heading::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
  .sb__group + .sb__group { border-top: 0 !important; margin-top: 2px; padding-top: 0; }

  /* Menyval */
  .sb__item { position: relative; height: 40px; gap: 12px; border-radius: var(--shape-md); color: var(--text-2);
    transition: background .25s ease, color .2s ease, box-shadow .25s ease; }
  .sb__item .sb__icon .msr { font-size: 21px; transition: transform .35s var(--spring), color .2s ease; }
  .sb__item:hover { background: rgba(255,255,255,.04); color: var(--text); }
  .sb__item:hover .sb__icon .msr { transform: translateX(1px) scale(1.06); }
  .sb__item:focus-visible { outline: 2px solid var(--acc-line); outline-offset: 2px; }

  /* Aktivt val: samma stil som valda kort på sajten (accentton + hårfin accentkant) */
  html.rail-x .sb__item.is-active {
    color: var(--text);
    background: linear-gradient(180deg, rgba(169,180,255,.12), rgba(169,180,255,.04)), var(--ink-2);
    box-shadow: inset 0 0 0 1px var(--acc-line), inset 0 1px 0 rgba(255,255,255,.05);
  }
  html.rail-x .sb__item.is-active::before {
    content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
    background: var(--acc-grad);
  }
  .sb__item.is-active .sb__icon .msr { color: var(--acc); }

  /* Siffermärken som små piller i sajtens statusfärger */
  .sb__badge { min-width: 22px; height: 20px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px;
    font-size: .6875rem; font-weight: 600; color: var(--text-2); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); }
  .sb__badge--info { color: var(--md-on-secondary-container); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); }
  .sb__badge--error { color: var(--md-on-error-container); background: var(--md-error-container); box-shadow: inset 0 0 0 1px rgba(255,143,133,.3); }
  .sb__dot { box-shadow: 0 0 0 2px var(--ink-1); }

  /* Fäll-knappen och "Ny faktura" */
  .sb__toggle { border-radius: 10px; color: var(--text-3); transition: background .2s, color .2s; }
  .sb__toggle:hover { background: rgba(255,255,255,.06); color: var(--text); }
  .sb .sb__cta { transition: transform .25s var(--spring), box-shadow .25s ease; }
  .sb .sb__cta:hover { transform: translateY(-1px); }

  /* Användarkortet längst ned – som sajtens kort */
  .sb__foot { border-top: 0 !important; padding-top: 10px; }
  html.rail-x .sb__user { padding: 6px; border-radius: var(--shape-lg);
    background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008)), var(--ink-2);
    box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.04); }
  html.rail-x .sb__user-link { height: 48px; padding: 0 8px; border-radius: var(--shape-md); }
  html.rail-x .sb__user-link:hover { background: rgba(255,255,255,.04); }
  .sb__avatar { position: relative; }
  .sb__avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--ok); box-shadow: 0 0 0 2px var(--ink-2); }
  .sb__user-text strong { color: var(--text); }
  .sb__user-text small { color: var(--text-3); }
  .sb__icon-btn { border-radius: 10px; color: var(--text-3); }
  .sb__icon-btn:hover { background: var(--md-error-container); color: var(--bad); }

  /* Infällt läge (rail) */
  html:not(.rail-x) .sb__item { color: var(--text-2); }
  html:not(.rail-x) .sb__item:hover { background: none; }
  html:not(.rail-x) .sb__item:hover .sb__icon { background: rgba(255,255,255,.05); }
  html:not(.rail-x) .sb__item.is-active .sb__icon {
    background: linear-gradient(180deg, rgba(169,180,255,.12), rgba(169,180,255,.04)), var(--ink-2) !important;
    box-shadow: inset 0 0 0 1px var(--acc-line) !important;
  }
  html:not(.rail-x) .sb__item.is-active { color: var(--text); }
  html:not(.rail-x) .sb__heading { display: none; }
}
/* Mobilens bottenmeny: samma glasyta som toppraden */
@media (max-width: 839px) {
  .sb__panel { background: rgba(8, 9, 12, .78) !important; border-top: 1px solid var(--line); }
  .sb__item.is-active .sb__icon { background: linear-gradient(180deg, rgba(169,180,255,.12), rgba(169,180,255,.04)), var(--ink-2) !important;
    box-shadow: inset 0 0 0 1px var(--acc-line); color: var(--acc) !important; }
}

/* Ny logga: märket i sidhuvud, portal och mobilmeny */
.brand__logo {
  width: 34px !important; height: 34px !important; flex-shrink: 0;
  background: url(../assets/logo-mark.svg) center / cover no-repeat !important;
  border-radius: 10px !important;
  box-shadow: 0 6px 16px -8px rgba(110, 122, 255, .7), 0 0 0 1px rgba(255,255,255,.08) !important;
}
@media (min-width: 768px) { .brand__logo { width: 36px !important; height: 36px !important; } }
/* Menyer ska alltid ligga överst (t.ex. "Lägg till artikel" över fakturaraderna) */
.menu-anchor { position: relative; z-index: 40; }
.menu { z-index: 120; }
.card:has(.menu:not([hidden])) { z-index: 50; position: relative; }
/* Fältetiketter: alltid en rad (avkortas snyggt), hjälptext får radbrytas */
.field__label { max-width: calc(100% - 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field__input:focus + .field__label, .field__input:not(:placeholder-shown) + .field__label, .field__label--fixed { max-width: calc((100% - 28px) / .75); }
.field__support { flex-wrap: wrap; gap: 2px 8px; white-space: normal; line-height: 1.4; }
/* Stripe-knappen: egen lila stil med vit text (premium-knappen är annars ljus) */
.stripe-pay .btn--filled {
  --btn-fg: #fff; color: #fff;
  background: linear-gradient(180deg, #7a73ff 0%, #5b53f0 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 28px -12px rgba(99,91,255,.8);
}
.stripe-pay .btn--filled:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 14px 34px -12px rgba(99,91,255,.95); }
/* Färgade knappar med egen bakgrund ska aldrig få ljus premiumgradient */
.btn--danger-filled { background: var(--bad) !important; color: #1a0b0a !important; }
/* Fix: ikoner inuti "chip"-rader fick chipens ram/bakgrund (t.ex. Säker förpackning) */
.banner__facts span .msr, .banner__facts .msr {
  background: none !important; border: 0 !important; padding: 0 !important; height: auto !important;
  box-shadow: none !important; border-radius: 0 !important; font-size: 18px; color: var(--acc);
}
.banner__facts > span { gap: 8px; padding: 0 14px 0 10px; }
/* Bifoga bilder */
.upload { margin: 4px 0 20px; }
.upload__drop {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer;
  border: 1.5px dashed var(--line-3, rgba(255,255,255,.18)); border-radius: 14px; background: rgba(255,255,255,.02);
  transition: border-color .2s, background .2s;
}
.upload__drop:hover, .upload.is-drag .upload__drop { border-color: var(--acc, #a9b4ff); background: rgba(169,180,255,.06); }
.upload__drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload__drop:focus-within { outline: 2px solid var(--acc, #a9b4ff); outline-offset: 3px; }
.upload__icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line-2, rgba(255,255,255,.12)); color: var(--acc, #a9b4ff); }
.upload__text { font-size: .9375rem; line-height: 1.35; }
.upload__text span { color: var(--text-2, #a3a9b6); font-size: .8125rem; }
.upload__text small { display: block; margin-top: 2px; color: var(--text-3, #6d7380); font-size: .8125rem; }
.upload__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.upload__list:empty { display: none; }
.upload__item { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 8px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line, rgba(255,255,255,.075)); animation: fadeDown .25s ease; }
.upload__thumb { width: 44px; height: 44px; flex-shrink: 0; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--text-2); }
.upload__thumb img { width: 100%; height: 100%; object-fit: cover; }
.upload__meta { flex: 1; min-width: 0; }
.upload__meta strong { display: block; font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload__meta small { font-size: .75rem; color: var(--text-3, #6d7380); }
.upload__del { width: 36px; height: 36px; }
.upload__error { margin: 8px 0 0; color: var(--bad, #ff8f85); font-size: .8125rem; }
.upload.is-invalid .upload__drop { border-color: var(--bad, #ff8f85); }
/* ==========================================================================
   Responsivt: inget får bli bredare än skärmen (ned till 320 px)
   ========================================================================== */
html { overflow-x: clip; }
.price-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.price-grid > *, .guide__grid > *, .guide__options > * { min-width: 0; }
.price-card__head { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 600px) { .guide__options { grid-template-columns: repeat(2, minmax(0, 1fr)); } .guide__opt span { min-width: 0; overflow-wrap: anywhere; } }
h1, h2, h3, .display-l, .display-m, .headline-l, .headline-m { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 400px) { .display-l { font-size: clamp(1.9rem, 10.5vw, 2.75rem); } }

/* ==========================================================================
   Utskrift av publika sidor (villkor, ångerblankett m.m.)
   Marginal 0 på sidan => webbläsaren skriver inte ut eget sidhuvud/sidfot
   (datum, titel, adress, sidnummer). Marginalen läggs i innehållet i stället.
   ========================================================================== */
@media print {
  @page { size: A4; margin: 0; }
  body:not(.portal):not(:has(.invoice-layout .doc)) { padding: 14mm 16mm !important; }
  .cta-band, .consent, .banner, .site-banner, .fab, .breadcrumbs, .crumbs, .no-print, .skip-link { display: none !important; }
}
[hidden] { display: none !important; }
button.drawer__item { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }

/* ==========================================================================
   Motion – mjuka animationer (endast när besökaren inte valt "minska rörelse")
   ========================================================================== */
:root { --ease-expo: cubic-bezier(.16, 1, .3, 1); }

/* Knappar: mjuk tryckkänsla */
.btn { transition: transform 260ms var(--ease-expo), background-color 200ms, border-color 200ms, color 200ms, box-shadow 260ms; }
.btn:active { transform: scale(.97); }
.btn .msr { transition: transform 320ms var(--ease-expo); }
.btn:hover .msr--nudge, a:hover > .msr--nudge { transform: translateX(3px); }

/* Löpande band pausar när man pekar på det */
.marquee:hover .marquee__track { animation-play-state: paused; }

/* Scroll-förlopp högst upp (publika sidor) */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 200; pointer-events: none;
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, rgba(168,200,255,.0), rgba(168,200,255,.9) 30%, #c9b6ff); }

@media (prefers-reduced-motion: no-preference) {
  /* ---- Startsidans hero: elementen glider in i tur och ordning ---- */
  .js .hero .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .js .hero__grid > .reveal > * { animation: riseIn 1s var(--ease-expo) both; }
  .js .hero__grid > .reveal > :nth-child(1) { animation-delay: 60ms; }
  .js .hero__grid > .reveal > :nth-child(2) { animation: none; }
  .js .hero__grid > .reveal > :nth-child(3) { animation-delay: 420ms; }
  .js .hero__grid > .reveal > :nth-child(4) { animation-delay: 540ms; }
  .js .hero__grid > .reveal > :nth-child(5) { animation-delay: 660ms; }
  .js .hero__panel { animation: panelIn 1.2s var(--ease-expo) 380ms both; }
  .js .hero .stats .stat { animation: riseIn .9s var(--ease-expo) both; }
  .js .hero .stats .stat:nth-child(2) { animation-delay: 80ms; }
  .js .hero .stats .stat:nth-child(3) { animation-delay: 160ms; }
  .js .hero .stats .stat:nth-child(4) { animation-delay: 240ms; }
  .js .aurora { animation: auroraIn 2.4s ease-out both; }

  /* Rubriken: ord för ord */
  .split-word, .hero h1 em.split-word { display: inline-block; white-space: pre; animation: wordIn .9s var(--ease-expo) both; animation-delay: calc(120ms + var(--i, 0) * 55ms); }
  .hero h1 em.split-word { animation-duration: 1.1s; }

  /* Sidhuvud på undersidor */
  .js .page-head .container > *, .js .legal__head > * { animation: riseIn .9s var(--ease-expo) both; }
  .js .page-head .container > :nth-child(2), .js .legal__head > :nth-child(2) { animation-delay: 90ms; }
  .js .page-head .container > :nth-child(3), .js .legal__head > :nth-child(3) { animation-delay: 180ms; }
  .js .page-head .container > :nth-child(4) { animation-delay: 270ms; }

  /* ---- Scroll-reveal: mjukare, med lätt oskärpa som klarnar ---- */
  .js .reveal { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(5px);
    transition: opacity .9s var(--ease-expo), transform 1s var(--ease-expo), filter .9s var(--ease-expo); }
  .js .reveal.is-in { opacity: 1; transform: none; filter: none; }
  .js .reveal--left { transform: translateX(-24px); }
  .js .reveal--right { transform: translateX(24px); }
  .js .reveal--zoom { transform: scale(.94); }

  /* Steg: siffran "poppar" och linjen ritas */
  .js .step.reveal .step__num { transform: scale(.6); opacity: 0; transition: transform .7s var(--spring) .15s, opacity .5s ease .15s; }
  .js .step.reveal.is-in .step__num { transform: none; opacity: 1; }

  /* Rubrikernas överrad: ikonen tonar in */
  .js .section__head.reveal .overline .msr { transform: rotate(-30deg) scale(.6); opacity: 0; transition: transform .8s var(--spring) .2s, opacity .5s ease .2s; }
  .js .section__head.reveal.is-in .overline .msr { transform: none; opacity: 1; }

  /* FAQ: mjuk höjdanimation (moderna webbläsare) */
  @supports (interpolate-size: allow-keywords) {
    :root { interpolate-size: allow-keywords; }
    .faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size .45s var(--ease-expo), content-visibility .45s allow-discrete; }
    .faq__item[open]::details-content { block-size: auto; }
  }
  .faq__item summary .msr:last-child { transition: transform .45s var(--ease-expo); }

  /* Kort: ljuskägla som följer muspekaren */
  body:not(.portal) .card--interactive, body:not(.portal) .price-card, body:not(.portal) a.tile { position: relative; isolation: isolate; }
  body:not(.portal) .card--interactive::after, body:not(.portal) .price-card::after, body:not(.portal) a.tile::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(168,200,255,.09), transparent 60%);
    transition: opacity .5s ease;
  }
  body:not(.portal) .card--interactive:hover::after, body:not(.portal) .price-card:hover::after, body:not(.portal) a.tile:hover::after { opacity: 1; }
  .card--interactive, .price-card { transition: transform .6s var(--ease-expo), border-color .4s, background .4s, box-shadow .6s var(--ease-expo); }

  /* Prisfilter: korten tonar in när filtret byts */
  .price-card.is-filtered-in { animation: riseIn .5s var(--ease-expo) both; }

  /* Bilagor och snackbar */
  .snackbar { transition: transform .5s var(--ease-expo), opacity .3s; }
}

@keyframes riseIn { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em) rotate(2deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes panelIn { from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes auroraIn { from { opacity: 0; transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .split-word { animation: none !important; }
}
/* ==========================================================================
   Små skärmar & PWA (app-läge): safe areas, "Mer"-meny, tillbaka-knapp
   ========================================================================== */
:root {
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --bar-h: calc(64px + var(--safe-t));   /* toppfältet växer under statusraden i app-läge */
}
*, *::before, *::after { box-sizing: border-box; }
.top-app-bar { padding-top: var(--safe-t); padding-left: var(--safe-l); padding-right: var(--safe-r); }
.top-app-bar__inner { height: 48px; }
.p-bar { padding-top: var(--safe-t); padding-left: calc(16px + var(--safe-l)); padding-right: calc(12px + var(--safe-r)); }
.drawer { padding-top: calc(12px + var(--safe-t)); padding-bottom: calc(12px + var(--safe-b)); padding-left: calc(12px + var(--safe-l)); }
.p-main { padding-left: max(16px, var(--safe-l)); padding-right: max(16px, var(--safe-r)); }
@media (min-width: 840px) { .p-main { padding-left: calc(var(--rail-w) + 32px + var(--safe-l)); padding-right: calc(32px + var(--safe-r)); } }
@media (max-width: 839px) { .sb__panel { padding-left: var(--safe-l) !important; padding-right: var(--safe-r) !important; } }

/* Tillbaka-knapp: bara i app-läge där webbläsarens bakåtknapp saknas */
.p-back { display: none !important; margin-left: -8px; }
html.is-app .p-back { display: inline-grid !important; }
@media (display-mode: standalone) { .p-back { display: inline-grid !important; } }

/* Smalt toppfält: inget får trängas ut */
.p-bar { min-width: 0; }
.p-bar .brand { min-width: 0; }
@media (max-width: 419px) {
  .p-bar { gap: 6px; }
  .p-bar .brand__text, .p-bar__home { display: none !important; }
  .p-timer { padding: 0 10px; font-size: .8125rem; }
}
@media (max-width: 359px) { .p-timer .msr { display: none; } }

/* "Mer"-knappen finns bara i mobilens bottenmeny */
.sb__more { border: 0; background: none; font-family: inherit; color: inherit; cursor: pointer; }
@media (max-width: 839px) { .sb__more { font-size: .75rem; font-weight: 500; color: var(--md-on-surface-variant); } .sb__more.is-active { color: var(--md-on-surface); } }
a.chip { text-decoration: none; }
@media (min-width: 840px) { .sb__more { display: none !important; } }

/* Bottensheet med alla sidor */
.msheet { position: fixed; inset: auto 0 0 0; margin: 0; padding: 0; border: 0; width: 100%; max-width: 640px; margin-inline: auto;
  max-height: 88dvh; background: transparent; color: inherit; overflow: visible; }
.msheet[open] { display: block; }
.msheet::backdrop { background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.msheet__panel { max-height: 88dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l));
  background: var(--ink-2, #12151b); border: 1px solid var(--line, rgba(255,255,255,.08)); border-bottom: 0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.8); transition: transform .25s ease; }
.msheet[open] .msheet__panel { animation: sheetUp .38s cubic-bezier(.16,1,.3,1); }
.msheet.is-closing .msheet__panel { transform: translateY(105%); transition: transform .22s ease-in; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.msheet__grab { width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.22); margin: 4px auto 10px; }
.msheet__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.msheet__user { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; color: inherit; }
.msheet__user strong, .msheet__user small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msheet__user small { color: var(--text-3, #8d93a3); font-size: .8125rem; }
.msheet__user > span:last-child { min-width: 0; }
.msheet__quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 6px; }
.msheet__q { display: grid; justify-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; text-decoration: none; color: inherit; font-size: .75rem; font-weight: 600; text-align: center;
  background: linear-gradient(180deg, #fff, #e6e8ef); color: #0b0d12; }
.msheet__q .msr { font-size: 22px; }
.msheet__heading { margin: 16px 4px 8px; font-family: var(--font-mono, monospace); font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3, #8d93a3); }
.msheet__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.msheet__item { display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 4px 10px; border-radius: 16px; text-decoration: none; color: var(--text-2, #c5c9d4);
  font-size: .8125rem; font-weight: 500; text-align: center; border: 1px solid var(--line, rgba(255,255,255,.08)); background: rgba(255,255,255,.02); min-width: 0; }
.msheet__item > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msheet__item.is-active { background: rgba(169,180,255,.12); border-color: rgba(169,180,255,.4); color: var(--text, #fff); }
.msheet__icon { position: relative; display: grid; place-items: center; width: 44px; height: 32px; border-radius: 12px; }
.msheet__item.is-active .msheet__icon { color: var(--acc, #a9b4ff); }
.msheet__badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center;
  font-size: .6875rem; font-weight: 700; background: var(--md-primary, #a8c8ff); color: #0b0d12; }
.msheet__badge--error { background: var(--md-error, #ffb4ab); }
.msheet__badge--neutral { background: rgba(255,255,255,.2); color: #fff; }
.msheet__foot { display: grid; gap: 2px; margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line, rgba(255,255,255,.08)); }
.msheet__foot form { margin: 0; }
.msheet__row { display: flex; align-items: center; gap: 14px; width: 100%; height: 48px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; font-size: .9375rem; text-decoration: none; cursor: pointer; text-align: left; }
.msheet__row:active { background: rgba(255,255,255,.06); }
.msheet__row--danger { color: var(--md-error, #ffb4ab); }
html.sheet-open, html.sheet-open body { overflow: hidden; }
@media (min-width: 840px) { .msheet { display: none !important; } }

/* Bottenmeny: fem val ryms även på 320 px */
@media (max-width: 839px) {
  .sb__icon { width: min(64px, 100%); }
  .sb__item { padding: 0 2px; }
}
@media (max-width: 359px) { .sb__label { font-size: .6875rem; } }

/* Rapporttabeller och breda tabeller scrollar i sidled på smal skärm */
@media (max-width: 720px) {
  .report { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .chip-set { flex-wrap: wrap; }
  .period-bar .field { min-width: 0; flex: 1 1 140px; }
}
.msheet .sb__avatar { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; font-weight: 600; font-size: 1rem; }

/* Publika toppfältet: knappar krymper aldrig (48 px tryckyta), namnet får ge vika */
.top-app-bar__inner > .icon-btn, .top-app-bar__actions, .top-app-bar__actions > * { flex-shrink: 0; }
.top-app-bar__menu { width: 48px; min-width: 48px; }
.top-app-bar .brand { min-width: 0; flex-shrink: 1; overflow: hidden; }
.top-app-bar .brand__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 374px) {
  .top-app-bar__inner { padding-inline: 4px 8px !important; gap: 4px; }
  .top-app-bar .brand { gap: 8px; }
  .top-app-bar .brand__text { font-size: .9375rem; }
  .top-app-bar .brand__logo { width: 30px !important; height: 30px !important; }
  .top-app-bar__menu { margin-left: 0 !important; }
}

/* ==========================================================================
   Optimering för alla skärmar (mobil, surfplatta, dator)
   ========================================================================== */
/* Läsbarhet: inga etiketter under 12 px */
.rate small, .stat dt, .footer__title { font-size: .75rem; }

/* Långa ord bryts vid stavelse – inte mitt i ordet ("Säkerhetskopier-a") */
.guide__opt > span:last-child, .title-m, .title-l, .headline-s, .headline-l, .display-l {
  overflow-wrap: break-word; word-break: normal; -webkit-hyphens: auto; hyphens: auto; }

/* Pekskärmar: klickytor minst 44 px (WCAG 2.5.8 / Apple & Google riktlinjer) */
@media (pointer: coarse) {
  .footer__list { gap: 0; }
  .footer__list a, .footer__linkbtn, .footer__top { display: inline-flex; align-items: center; min-height: 44px; }
  .footer__list li { min-height: 44px; }
  .chip { min-height: 40px; }
  .hero__trust a { min-height: 44px; }
  .top-app-bar .btn--sm, .top-app-bar .icon-btn { min-height: 44px; min-width: 44px; }
  .contact__form a, .consent a { display: inline-block; padding-block: 6px; }
  .breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
  .segmented button, .btn--sm { min-height: 44px; }
  /* Hover-ljuskäglan har ingen nytta på touch – spara GPU */
  body:not(.portal) .card--interactive::after, body:not(.portal) .price-card::after, body:not(.portal) a.tile::after { display: none; }
}

/* Mobil: lättare scroll-animation (ingen oskärpa = mjukare på svagare telefoner) */
@media (prefers-reduced-motion: no-preference) and (max-width: 720px) {
  .js .reveal { filter: none; transform: translateY(14px);
    transition: opacity .5s var(--ease-expo), transform .55s var(--ease-expo); }
  .hero--aurora .aurora { filter: blur(56px); }
}

/* Mobil hero: knapparna "Få hjälp nu / Se priser" syns direkt utan att scrolla */
@media (max-width: 600px) {
  .hero .body-l { font-size: 1.0625rem; line-height: 1.55; }
  .hero__actions .btn--lg { flex: 1 1 0; min-width: 0; padding-inline: 16px; }
}

/* Tabeller på mobil (t.ex. cookielistan): varje rad blir ett kort i stället för sidscroll */
@media (max-width: 600px) {
  .legal-table--stack table, .legal-table--stack tbody, .legal-table--stack tr, .legal-table--stack td { display: block; width: 100%; }
  .legal-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-table--stack tr { padding: 12px 14px; border: 1px solid var(--line, rgba(255,255,255,.08)); border-radius: 14px; margin-bottom: 10px; }
  .legal-table--stack td { border: 0 !important; padding: 3px 0 !important; }
  .legal-table--stack td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3, #8d93a3); font-size: .8125rem; }
  .legal-table--stack td:first-child::before { content: none; }
}

/* Mycket breda skärmar: läsbar radlängd */
.page-head .body-l, .section__head .body-l { max-width: 68ch; }
.section__head--center .body-l { margin-inline: auto; }
/* ==========================================================================
   Kundportal – premium-lager (samma formspråk som hemsidan)
   ========================================================================== */
/* Mjukt ljusskimmer överst, som hemsidans hero */
body.portal::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 520px; z-index: -1; pointer-events: none;
  background: radial-gradient(700px 320px at 72% -8%, rgba(110,122,255,.10), transparent 70%),
              radial-gradient(520px 260px at 18% -12%, rgba(110,231,216,.05), transparent 70%);
}
/* Sidrubrik: kursiv serif-accent som på hemsidan ("Hej, *Manfred*") */
.p-head .headline-l { letter-spacing: -.035em; font-weight: 600; }
.p-head .headline-l em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
  background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.p-head .body-m { color: var(--text-2); }

/* Kort: hemsidans kortyta + ljuskägla som följer muspekaren */
.portal .card, .portal .kpi, .portal .table-card, .portal .insight, .portal .c-action {
  background: linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.008)), var(--ink-2);
  border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.portal .kpi, .portal a.insight, .portal .c-action { position: relative; isolation: isolate; overflow: hidden;
  transition: transform .5s var(--spring), border-color .3s, box-shadow .5s var(--spring); }
.portal .kpi::after, .portal a.insight::after, .portal .c-action::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(168,200,255,.10), transparent 60%);
  transition: opacity .4s ease;
}
.portal .kpi:hover, .portal a.insight:hover, .portal .c-action:hover {
  transform: translateY(-2px); border-color: var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), var(--elev-3);
}
.portal .kpi:hover::after, .portal a.insight:hover::after, .portal .c-action:hover::after { opacity: 1; }

/* Nyckeltal */
.kpi__value { font-variant-numeric: tabular-nums; }
.kpi__icon { box-shadow: inset 0 0 0 1px var(--line-2); }
.kpi--error .kpi__value { color: #ffd3ce; }
.kpi--success .kpi__value { background: linear-gradient(115deg, #eef0f4, #c6f5e1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; opacity: 0; transition: opacity .4s;
  background: linear-gradient(90deg, transparent, rgba(169,180,255,.55), transparent); }
.kpi:hover::before { opacity: 1; }
.kpi--error::before { background: linear-gradient(90deg, transparent, rgba(255,143,133,.55), transparent); }
.kpi--success::before { background: linear-gradient(90deg, transparent, rgba(126,226,184,.55), transparent); }

/* Insikter: tonfärgad markering till vänster */
.insight { position: relative; }
.insight::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 0 2px 2px 0; background: var(--line-2); }
.insight--info::before { background: var(--acc); }
.insight--error::before { background: var(--bad); }
.insight--success::before { background: var(--ok); }
.insight__go { transition: transform .3s var(--spring); }
a.insight:hover .insight__go { transform: translateX(3px); }

/* Korthuvud */
.card__head .title-l { letter-spacing: -.02em; }

/* Listor & rader */
.row, .checklist a, .c-todo a { transition: background .2s ease, transform .3s var(--spring); }
.row:hover, .checklist a:hover { background: rgba(255,255,255,.035); }
.row__end { font-variant-numeric: tabular-nums; color: var(--text); }
.c-todo a { background: rgba(255,255,255,.025); box-shadow: inset 0 0 0 1px var(--line); }
.c-todo a:hover { background: rgba(255,255,255,.045); transform: translateX(2px); }

/* Tabeller */
.dtable thead th { border-bottom: 1px solid var(--line); }
.dtable tbody tr { transition: background .2s ease; }
.dtable tbody tr:hover { background: linear-gradient(90deg, rgba(169,180,255,.06), rgba(255,255,255,.015) 40%); }
.dtable tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--acc); }
.dtable .num { font-variant-numeric: tabular-nums; }
.dtable__link { font-weight: 600; color: var(--text); }

/* Staplar: hemsidans accentgradient, senaste månaden framhävd */
.bars__bar { background: linear-gradient(180deg, rgba(185,194,255,.55), rgba(169,180,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.bars__col:last-child .bars__bar { background: linear-gradient(180deg, #c9d0ff, #8ea2ff 55%, rgba(110,231,216,.35)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 30px -10px rgba(142,162,255,.6); }
.bars__col:last-child .bars__val, .bars__col:last-child .bars__label { color: var(--text); }
.bars__val, .bars__label { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .04em; color: var(--text-3); }

/* Förloppsindikator och tidslinje */
.progress { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); }
.progress span { box-shadow: 0 0 14px rgba(142,162,255,.5); }
.timeline__dot { background: var(--acc); box-shadow: 0 0 0 4px rgba(169,180,255,.12), 0 0 12px rgba(169,180,255,.5); }

/* Tomt läge: ikon i glödande ring */
.empty-state { border-color: var(--line-2); background: rgba(255,255,255,.012); }
.empty-state > .msr { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; font-size: 30px;
  color: var(--acc); background: radial-gradient(circle at 50% 30%, rgba(169,180,255,.16), rgba(169,180,255,.03)); box-shadow: inset 0 0 0 1px var(--acc-line); }
.empty-state--sm > .msr { width: 52px; height: 52px; font-size: 24px; }

/* Snabbval (kundens översikt) */
.c-action .msr { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); }

/* Formulär och meddelanden */
.portal .field__input:focus { box-shadow: 0 0 0 4px rgba(169,180,255,.12); }
.p-flash { box-shadow: var(--elev-2); }

/* Statuspiller: hårfin kant i samma ton */
.pill { box-shadow: inset 0 0 0 1px currentColor; --pill-ring: .22; }
.pill { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .portal .kpi, .portal a.insight, .portal .c-action, .row, .c-todo a { transition: none; }
  .portal .kpi:hover, .portal a.insight:hover, .portal .c-action:hover, .c-todo a:hover { transform: none; }
}
/* Mobil: belopp i nyckeltal bryts aldrig */
.kpi__value { white-space: nowrap; }
@media (max-width: 600px) { .kpi__value { font-size: clamp(1.125rem, 5.6vw, 1.5rem); } }

/* ==========================================================================
   Inloggning – premium (samma formspråk som hemsidans hero)
   ========================================================================== */
.auth { position: relative; isolation: isolate; overflow: hidden; }
.auth .aurora { position: absolute; inset: -30% -10% auto; height: 130%; z-index: -1; pointer-events: none; filter: blur(80px); opacity: .5; }
.auth__card { position: relative; border-radius: 26px; padding: 40px 32px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.012)), rgba(13,15,20,.72);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 40px 120px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(0,0,0,.4); }
.auth__card::before { content: ""; position: absolute; inset: 0 24px auto; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(169,180,255,.6), rgba(110,231,216,.4), transparent); }
.auth__card .headline-s { font-size: 1.75rem; letter-spacing: -.03em; font-weight: 600; }
.auth__em { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em;
  background: var(--acc-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.auth__card .btn--filled.btn--lg { height: 52px; margin-top: 4px; }
.auth__secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; font-size: .75rem; color: var(--text-3); }
.auth__secure .msr { font-size: 15px; color: var(--ok); }
.auth__foot { border-top-color: var(--line) !important; }
.auth__legal a { color: var(--text-3) !important; }

/* Delad layout på större skärmar: varumärkespanel till vänster, formulär till höger */
.auth__aside { display: none; }
@media (min-width: 960px) {
  /* Text och formulär hålls ihop i mitten (inte utspridda till kanterna på breda skärmar) */
  .auth--split { display: grid !important; grid-template-columns: minmax(0, 500px) minmax(380px, 430px); justify-content: center; align-content: center;
    gap: clamp(48px, 6vw, 96px); align-items: center; padding: 48px 32px !important; min-height: 100dvh; }
  .auth--split .auth__card { max-width: none; width: 100%; }
  .auth--split .auth__brand--card { display: none; }
  .auth__aside { display: block; max-width: 560px; }
  .auth__aside .auth__brand { display: flex; width: max-content; margin-bottom: 56px; }
  .auth__aside .overline { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); margin: 0 0 18px; }
  .auth__aside .overline .msr { font-size: 16px; color: var(--acc); }
  .auth__aside .display-l { font-size: clamp(2.75rem, 5vw, 4.25rem); line-height: 1.02; letter-spacing: -.045em; margin: 0 0 18px; }
  .auth__aside .body-l { color: var(--text-2); max-width: 44ch; margin: 0 0 36px; }
  .auth__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
  .auth__perks li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; max-width: 420px;
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.008)); box-shadow: inset 0 0 0 1px var(--line); }
  .auth__perks .msr { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; font-size: 20px;
    color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px var(--acc-line); }
  .auth__perks strong { display: block; font-size: .9375rem; color: var(--text); }
  .auth__perks small { display: block; font-size: .8125rem; color: var(--text-3); margin-top: 2px; }
}
@media (prefers-reduced-motion: no-preference) {
  .auth__aside > * { animation: riseIn .9s var(--ease-expo, cubic-bezier(.16,1,.3,1)) both; }
  .auth__aside > :nth-child(2) { animation-delay: 60ms; } .auth__aside > :nth-child(3) { animation-delay: 120ms; }
  .auth__aside > :nth-child(4) { animation-delay: 180ms; } .auth__aside > :nth-child(5) { animation-delay: 260ms; }
  .auth__card { animation: panelIn 1s var(--ease-expo, cubic-bezier(.16,1,.3,1)) 120ms both; }
}
/* Inloggning: fält i samma ton som kortet (etiketten får ingen avvikande ruta) */
.auth__card { --field-bg: #15171c; }
.auth__card .field__input { background: var(--field-bg); }

/* Inloggning: etiketter ovanför fälten (inga flytande etiketter med rutor) */
.auth__card .field { display: flex; flex-direction: column-reverse; margin-bottom: 16px; }
.auth__card .field__label { position: static; transform: none !important; top: auto !important; max-width: none;
  padding: 0 0 7px 2px; background: none !important; font-size: .8125rem; font-weight: 500; line-height: 18px; color: var(--text-2); transition: color .2s; }
.auth__card .field__input { min-height: 50px; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255,255,255,.03); }
.auth__card .field__input::placeholder { color: var(--text-3); opacity: .7; }
.auth__card .field__input:hover { border-color: rgba(255,255,255,.2); }
.auth__card .field__input:focus { border-color: var(--acc); box-shadow: 0 0 0 4px rgba(169,180,255,.14); background: rgba(255,255,255,.045); }
.auth__card .field__input:focus + .field__label { color: var(--text); }
.auth__card .field--pw { position: relative; }
.auth__card .field--pw .field__toggle { top: auto; bottom: 5px; right: 5px; }
.auth__card .field__input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #16181e inset; -webkit-text-fill-color: var(--text); }
/* Kom ihåg mig + glömt lösenord på samma rad */
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 18px; }
.auth__remember { display: inline-flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--text-2); cursor: pointer; user-select: none; }
.auth__remember input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 1px solid var(--line-3, rgba(255,255,255,.25));
  background: rgba(255,255,255,.03); display: grid; place-items: center; cursor: pointer; transition: background .2s, border-color .2s; }
.auth__remember input::after { content: ""; width: 9px; height: 5px; border: 2px solid #0b0d12; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .2s var(--spring); }
.auth__remember input:checked { background: var(--acc-grad); border-color: transparent; }
.auth__remember input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.auth__remember input:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.auth__forgot { font-size: .875rem; color: var(--acc); text-decoration: none; }
.auth__forgot:hover { text-decoration: underline; }