/* smart-varmtvannsbereder.no, on top of Pico CSS (jade theme) */
:root {
	--brand: #0b5f55;
	--brand-2: #0e7c6b;
	--accent: #f2994a;
	--accent-ink: #8a4a10;
	--surface: #f4f8f7;
	--surface-2: #e7f0ee;
	--ok: #1b7f4c;
	--ok-bg: #e2f4ea;
	--no: #9b2c2c;
	--no-bg: #fbe9e9;
	--part: #8a5a00;
	--part-bg: #fdf1d8;
	--radius: 14px;
	--shadow: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px rgb(11 95 85 / .08);
	--pico-font-family-sans-serif: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--pico-border-radius: 10px;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--brand: #3cc4ae;
		--brand-2: #2aa894;
		--accent: #f5a764;
		--accent-ink: #f8c08f;
		--surface: #18201f;
		--surface-2: #1f2a29;
		--ok: #6fd7a0;
		--ok-bg: #173226;
		--no: #f19a9a;
		--no-bg: #3a1d1d;
		--part: #f2c66d;
		--part-bg: #3a2e14;
		--shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
	}
}

html { scroll-behavior: smooth; }
body { background: var(--pico-background-color); }
img { height: auto; }
h1, h2, h3 { letter-spacing: -.01em; }
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; padding: .5rem 1rem; background: var(--brand); color: #fff; }
.skip-link:focus { left: 1rem; }
.muted { color: var(--pico-muted-color); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* Header */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--pico-background-color) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--pico-muted-border-color);
}
.site-header nav { padding-block: .25rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--pico-color); font-size: 1.05rem; }
.brand strong { color: var(--brand); }
.brand small { color: var(--pico-muted-color); font-size: .8em; }
.site-menu a[aria-current="page"] { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 2px; }
.menu-toggle { display: none; margin: 0; padding: .4rem .55rem; line-height: 0; }
@media (max-width: 860px) {
	.menu-toggle { display: inline-block; }
	.site-menu { display: none !important; width: 100%; flex-direction: column; align-items: stretch; margin: 0; padding-bottom: .5rem; }
	.site-menu.open { display: flex !important; }
	.site-menu li { padding: .15rem 0; }
	.site-menu a { display: block; padding: .6rem .25rem; }
}

/* Hero */
.hero {
	position: relative; overflow: hidden;
	background: linear-gradient(135deg, #0b5f55 0%, #0e7c6b 55%, #12937e 100%);
	color: #fff;
	padding: clamp(2.5rem, 7vw, 5rem) 0;
}
.hero::after {
	content: ""; position: absolute; right: -10%; top: -30%; width: 55%; aspect-ratio: 1;
	background: radial-gradient(circle, rgb(242 153 74 / .35), transparent 65%);
	pointer-events: none;
}
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.1; margin-bottom: 1rem; }
.hero p.lead { font-size: 1.15rem; color: rgb(255 255 255 / .9); max-width: 38rem; }
.hero .eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; background: rgb(255 255 255 / .14); padding: .3rem .7rem; border-radius: 99px; margin-bottom: 1rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero .actions a[role="button"] { margin: 0; }
.hero a.btn-ghost, .hero a.btn-ghost:is(:hover, :focus) { background: transparent; border: 1px solid rgb(255 255 255 / .75); color: #fff; }
.hero a.btn-ghost:hover { background: rgb(255 255 255 / .12); }
.hero a.btn-light, .hero a.btn-light:is(:hover, :focus) { background: #fff; border-color: #fff; color: #0b5f55; }
.hero-figure { margin: 0; }
.hero-figure img { border-radius: 20px; box-shadow: 0 20px 50px rgb(0 0 0 / .3); width: 100%; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 2rem; padding: 0; list-style: none; }
.hero-stats li { list-style: none; padding: 0; margin: 0; }
.hero-stats strong { display: block; font-size: 1.6rem; color: #fff; }
.hero-stats span { font-size: .85rem; color: rgb(255 255 255 / .8); }
@media (max-width: 860px) {
	.hero .container { grid-template-columns: 1fr; }
	.hero-figure { max-width: 420px; }
}

/* Sections */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section.alt { background: var(--surface); }
.section-head { max-width: 46rem; margin-bottom: 2rem; }
.section-head h2 { margin-bottom: .5rem; }
.page-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; background: var(--surface); border-bottom: 1px solid var(--pico-muted-border-color); }
.page-head h1 { margin-bottom: .5rem; }
.page-head p { max-width: 48rem; margin-bottom: 0; }
.page-head.slim { padding: 1rem 0 .25rem; }
.page-head.slim .breadcrumb { margin: 0; }
.breadcrumb { display: block; font-size: .85rem; margin-bottom: .75rem; color: var(--pico-muted-color); }
.breadcrumb a { color: var(--pico-muted-color); }

/* Grids and cards */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.card {
	background: var(--pico-card-background-color); border: 1px solid var(--pico-muted-border-color);
	border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); margin: 0;
	display: flex; flex-direction: column;
}
.card h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card .card-foot { margin-top: auto; padding-top: 1rem; }
.icon-badge { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); margin-bottom: .9rem; }
.icon-badge svg { width: 24px; height: 24px; }

.choice-card { position: relative; padding: 1.8rem; }
.choice-card h3 { font-size: 1.35rem; }
.choice-card ul { padding-left: 1.1rem; }

/* Product cards */
.product-card { padding: 0; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-2px); }
.product-card .media { aspect-ratio: 4 / 3; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.product-card .media img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { margin-bottom: .25rem; font-size: 1.1rem; }
.product-card h3 a { text-decoration: none; color: var(--pico-color); }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; }
.product-card { position: relative; }
.product-card .maker { font-size: .85rem; color: var(--pico-muted-color); margin-bottom: .6rem; }
.product-card .price { font-weight: 700; color: var(--brand); margin: .5rem 0 0; }
.product-card .crit { margin-top: auto; padding-top: .75rem; display: grid; gap: .35rem; }
.product-card .crit > div { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.product-card .crit .v { min-width: 4.6rem; }

/* Illustration used when no free product photo exists */
.placeholder { width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 1rem; color: var(--brand); background: linear-gradient(160deg, var(--surface-2), var(--surface)); }
.placeholder svg { width: 72px; height: 72px; opacity: .85; }
.placeholder span { display: block; font-weight: 700; font-size: 1.1rem; margin-top: .5rem; color: var(--pico-color); }
.placeholder small { display: block; color: var(--pico-muted-color); font-size: .75rem; }

/* Chips and verdict badges */
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { display: inline-block; font-size: .75rem; line-height: 1.2; padding: .3rem .6rem; border-radius: 99px; background: var(--surface-2); color: var(--pico-color); white-space: nowrap; }
.chip.brand { background: var(--brand); color: #fff; }
.chip.accent { background: var(--accent); color: #1f1300; }
.v { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; padding: .2rem .55rem; border-radius: 6px; white-space: nowrap; }
.v::before { font-weight: 800; }
.v.yes { background: var(--ok-bg); color: var(--ok); }
.v.yes::before { content: "✓"; }
.v.no { background: var(--no-bg); color: var(--no); }
.v.no::before { content: "✕"; }
.v.part { background: var(--part-bg); color: var(--part); }
.v.part::before { content: "◐"; }
.v.unknown { background: var(--surface-2); color: var(--pico-muted-color); }
.v.unknown::before { content: "?"; }

/* Comparison tool */
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; padding: 1rem 1.25rem; background: var(--pico-card-background-color); border: 1px solid var(--pico-muted-border-color); border-radius: var(--radius); margin-bottom: 1rem; }
.filters fieldset { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .9rem; align-items: center; }
.filters legend { font-weight: 600; font-size: .85rem; margin-right: .5rem; float: left; padding: 0; }
.filters label { font-size: .9rem; margin: 0; }
.filters select { margin: 0; width: auto; padding-block: .4rem; font-size: .9rem; }
.filters .count { margin-left: auto; font-size: .9rem; color: var(--pico-muted-color); }
.seg { display: inline-flex; border: 1px solid var(--pico-muted-border-color); border-radius: 99px; overflow: hidden; }
.seg label { padding: .4rem .9rem; cursor: pointer; font-size: .9rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--brand); color: #fff; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--pico-muted-border-color); border-radius: var(--radius); background: var(--pico-card-background-color); -webkit-overflow-scrolling: touch; }
.compare-table { margin: 0; min-width: 980px; font-size: .9rem; }
.compare-table th, .compare-table td { vertical-align: top; padding: .7rem .8rem; }
.compare-table thead th { position: sticky; top: 0; background: var(--surface); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; z-index: 2; }
.compare-table thead th button { all: unset; cursor: pointer; display: inline-flex; gap: .25rem; align-items: center; }
.compare-table thead th button:focus-visible { outline: 2px solid var(--accent); }
.compare-table thead th[aria-sort="ascending"] button::after { content: "▲"; font-size: .65rem; }
.compare-table thead th[aria-sort="descending"] button::after { content: "▼"; font-size: .65rem; }
.compare-table tbody th { position: sticky; left: 0; background: var(--pico-card-background-color); z-index: 1; min-width: 230px; max-width: 260px; font-weight: 400; box-shadow: 1px 0 0 var(--pico-muted-border-color); }
.compare-table tbody th a { font-weight: 700; }
.compare-table tbody th .maker { display: block; font-size: .8rem; color: var(--pico-muted-color); }
.compare-table tr[hidden] { display: none; }
.compare-table .num { white-space: nowrap; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .85rem; margin-top: .75rem; color: var(--pico-muted-color); }

/* Product page */
.product-top { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2.5rem; align-items: start; }
.product-top figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; }
.product-top figure img { width: 100%; height: 100%; object-fit: cover; }
.product-top figcaption { font-size: .75rem; padding: .4rem .6rem; color: var(--pico-muted-color); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.25rem; margin: 1.25rem 0; }
.facts dt { font-weight: 600; color: var(--pico-muted-color); font-size: .9rem; }
.facts dd { margin: 0; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.pros-cons ul { padding-left: 0; }
.pros-cons li { list-style: none; padding-left: 1.6rem; position: relative; margin-bottom: .45rem; }
.pros li::before { content: "+"; position: absolute; left: 0; font-weight: 800; color: var(--ok); }
.cons li::before { content: "−"; position: absolute; left: 0; font-weight: 800; color: var(--no); }
.feature-table td:first-child { width: 45%; }
@media (max-width: 760px) {
	.product-top, .pros-cons { grid-template-columns: 1fr; }
}

/* Notes and callouts */
.note { border-left: 4px solid var(--brand); background: var(--surface); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem 0; }
.note.accent { border-color: var(--accent); }
.note > :last-child { margin-bottom: 0; }
.disclosure { font-size: .85rem; color: var(--pico-muted-color); border: 1px dashed var(--pico-muted-border-color); border-radius: var(--radius); padding: .8rem 1rem; margin: 1rem 0; }
.disclosure strong { color: var(--pico-color); }

/* Highlight band (our own product, clearly marked) */
.spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; background: var(--pico-card-background-color); border: 1px solid var(--pico-muted-border-color); border-radius: 20px; padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.spotlight img { border-radius: var(--radius); width: 100%; }
.spotlight .tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); font-weight: 700; }
@media (max-width: 760px) { .spotlight { grid-template-columns: 1fr; } }

/* Steps */
.steps { counter-reset: step; padding: 0; }
.steps li { list-style: none; counter-increment: step; position: relative; padding-left: 3.2rem; margin-bottom: 1.25rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -.1rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 700; }

/* FAQ */
details.faq { border-bottom: 1px solid var(--pico-muted-border-color); padding: .5rem 0; margin: 0; }
details.faq summary { font-weight: 600; }
details.faq[open] summary { margin-bottom: .5rem; }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
.calc output { display: block; }
.lookup { background: var(--surface); border: 1px solid var(--pico-muted-border-color); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.lookup > p:first-child { margin-bottom: .75rem; }
.lookup > :last-child { margin-bottom: 0; }
.result-box { background: linear-gradient(135deg, #0b5f55, #12937e); color: #fff; border-radius: 20px; padding: 1.75rem; position: sticky; top: 5rem; }
.result-box h2, .result-box h3, .result-box p, .result-box dd, .result-box output { color: #fff; }
.result-big { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 800; line-height: 1; margin: .25rem 0 1rem; }
.result-box dl { display: grid; grid-template-columns: 1fr auto; gap: .4rem 1rem; margin: 0; }
.result-box dt { color: rgb(255 255 255 / .85); }
.result-box dd { margin: 0; font-weight: 700; text-align: right; }
.range-row { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.range-row output { font-weight: 700; color: var(--brand); }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } .result-box { position: static; } }

/* Footer */
.site-footer { background: #0a2724; color: #cfe3df; padding: 3rem 0 1.5rem; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: .75rem; }
.site-footer ul { padding: 0; }
.site-footer li { list-style: none; margin-bottom: .35rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr; gap: 2rem; }
.footer-brand { display: flex; align-items: center; gap: .5rem; color: #fff; }
.footer-small { font-size: .8rem; color: #9fbdb7; border-top: 1px solid rgb(255 255 255 / .12); padding-top: 1rem; margin: 2rem 0 0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* PWA install banner */
.install-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60; max-width: 560px; margin: 0 auto; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--pico-card-background-color); border: 1px solid var(--pico-muted-border-color); border-radius: var(--radius); box-shadow: 0 10px 40px rgb(0 0 0 / .2); padding: 1rem 1.25rem; }
.install-banner[hidden] { display: none; }
.install-banner p { margin: 0; font-size: .9rem; flex: 1 1 240px; }
.install-banner div { display: flex; gap: .5rem; }
.install-banner button { margin: 0; padding: .45rem .9rem; font-size: .9rem; }

.offline-badge { position: fixed; top: .5rem; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--accent); color: #1f1300; padding: .3rem .9rem; border-radius: 99px; font-size: .8rem; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.product-card { transition: none; }
}
@media print {
	.site-header, .site-footer, .install-banner, .filters { display: none !important; }
	.table-wrap { overflow: visible; border: 0; }
}
