/* Nordprix — site styles. No external fonts or assets.
   Also used by /connector/ (header, .legal, .updated, footer): keep those classes. */

:root {
  --bg: #f8f7f3;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --text: #1b1a17;
  --muted: #5c5950;
  --border: #dedad0;
  --accent: #1d5c4b;
  --accent-hover: #164a3c;
  --accent-ink: #ffffff;
  --accent-soft: #e2efe9;
  --note-bg: #f9f1dc;
  --note-border: #e6d29d;
  --focus: #2563eb;
  --code-bg: #eeebe3;
  --shadow: 0 1px 2px rgba(27, 26, 23, 0.06), 0 8px 24px rgba(27, 26, 23, 0.05);
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131311;
    --surface: #1b1a18;
    --surface-2: #23221f;
    --text: #ecebe6;
    --muted: #a8a59b;
    --border: #34322c;
    --accent: #7fc9ae;
    --accent-hover: #9ad8c1;
    --accent-ink: #0c1f19;
    --accent-soft: #1b2e27;
    --note-bg: #2e2714;
    --note-border: #5a4a1e;
    --focus: #8ab4ff;
    --code-bg: #2a2925;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

code { font-family: var(--mono); font-size: 0.9em; background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.75rem); margin-top: 1.6em; }
h3 { font-size: 1.1rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: 0.4em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header ------------------------------------------------------------------ */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 60px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand span { font-size: 1.1rem; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Home ------------------------------------------------------------------- */
.hero { padding: 40px 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 42em; }
.band { padding: 32px 0; border-top: 1px solid var(--border); }
.band h2 { margin-top: 0; }

.cards { display: grid; gap: 16px; margin-top: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card h2, .card h3 { margin-top: 0; }
.card h2 { font-size: 1.25rem; }
.card p { color: var(--muted); }
.card .more { display: inline-block; font-weight: 600; margin-top: 4px; }
.card-list { list-style: none; padding: 0; margin: 12px 0 0; border-top: 1px solid var(--border); }
.card-list li { margin: 0; padding: 10px 0 0; }
.card-list .label { display: block; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.points { display: grid; gap: 16px; margin: 20px 0 0; padding: 0; list-style: none; }
.points li { margin: 0; padding-left: 16px; border-left: 3px solid var(--accent-soft); }
.points h3 { margin: 0 0 4px; font-size: 1.02rem; }
.points p { margin: 0; color: var(--muted); }

/* Page and article ---------------------------------------------------------- */
.page { padding: 28px 0 48px; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 4px; color: var(--border); }
.breadcrumb a { color: var(--muted); }
.updated, .page-meta { color: var(--muted); font-size: 0.95rem; }
.page-meta { margin-top: -0.3em; }
.byline { color: var(--muted); font-size: 0.95rem; margin-top: -0.6em; }

.answer { background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; margin: 20px 0 8px; }
.answer h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 6px; color: var(--accent); }
.answer p:last-child { margin-bottom: 0; }

.note { background: var(--note-bg); border: 1px solid var(--note-border); border-radius: 10px; padding: 12px 14px; margin: 16px 0; font-size: 0.95rem; }
.note p:last-child { margin-bottom: 0; }

.formula { font-family: var(--mono); font-size: 0.92rem; background: var(--code-bg); border-radius: 8px; padding: 10px 12px; overflow-x: auto; }

.table-wrap { width: 100%; overflow-x: auto; margin: 12px 0 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
caption { text-align: left; padding: 10px 12px; font-weight: 600; caption-side: top; }
th, td { text-align: left; padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: top; }
thead th { border-top: 0; background: var(--surface-2); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 600; background: var(--surface-2); }

.sources { font-size: 0.93rem; }
.sources li { margin-bottom: 8px; }
.sources .read { color: var(--muted); }
.changelog { font-size: 0.93rem; color: var(--muted); }

/* Calculator ----------------------------------------------------------------- */
.calc { margin: 20px 0 8px; }
.calc .fields { display: grid; gap: 14px; }
.calc label { display: block; font-weight: 600; margin-bottom: 4px; }
.calc .hint { display: block; font-weight: 400; font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.calc input, .calc select {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: 400 1rem/1.3 var(--font);
}
.calc .results { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.calc .results dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; }
.calc .results dt { color: var(--muted); }
.calc .results dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.calc .results .big { font-size: 1.35rem; }
.calc .basis { font-size: 0.88rem; color: var(--muted); margin: 12px 0 0; }

/* Legal and long text --------------------------------------------------------- */
.legal { padding-top: 36px; padding-bottom: 48px; }
.legal h2 { font-size: 1.3rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }

/* Footer --------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0 0 10px; max-width: 48em; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--muted); }
.footer-cols { display: grid; gap: 18px; margin-bottom: 18px; }
.footer-cols h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px; color: var(--muted); }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 0 0 6px; }
.footer-cols a { color: var(--text); text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }

@media (min-width: 720px) {
  .hero { padding: 56px 0 32px; }
  .band { padding: 48px 0; }
  .card { padding: 24px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .points { grid-template-columns: repeat(2, 1fr); }
  .calc .fields { grid-template-columns: 1fr 1fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

/* Calculator groups (two-appliance comparisons) -------------------------------- */
.calc fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 14px; margin: 14px 0 0; min-width: 0; }
.calc legend { font-weight: 700; padding: 0 6px; }
.calc .results dt.sub { font-weight: 700; color: var(--text); grid-column: 1 / -1; margin-top: 6px; }

/* Affiliate notice (FTC: near the top of the page and next to each shop link) -- */
.disclosure { font-size: 0.92rem; color: var(--muted); border-left: 3px solid var(--note-border); padding: 4px 0 4px 12px; margin: 12px 0 18px; }
.paid { font-size: 0.85rem; color: var(--muted); white-space: nowrap; }

[hidden] { display: none !important; }

@media (max-width: 719px) {
  .nav { gap: 2px 14px; font-size: 0.92rem; }
  .table-wrap caption { width: calc(100vw - 34px); }
  th, td { padding: 8px; }
  thead th.num { white-space: normal; }
}

/* Visuals (Oct 2026): versus banner, solo hero, lineup, card art, example products ---------------
   Markup: templates/*.html (VISUAL BANNER comment). Illustrations: /assets/illustrations/*.svg
   (own drawings, fixed colours, light mint disc, so they read the same in light and dark mode). */
:root {
  --vs-stage: #eef4f0;
  --vs-grid: rgba(29, 92, 75, 0.07);
  --vs-badge: #1d5c4b;
  --vs-badge-ink: #f8f7f3;
  --vs-badge-depth: #e9b949;
  --vs-glyph-shadow: #0e3a2f;
  --vs-name-bg: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --vs-stage: #17201c;
    --vs-grid: rgba(127, 201, 174, 0.07);
    --vs-badge: #2a7a63;
    --vs-badge-ink: #f8f7f3;
    --vs-badge-depth: #c99a2e;
    --vs-glyph-shadow: #123f33;
    --vs-name-bg: #1b1a18;
  }
}

.vs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "a mid b";
  align-items: start;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 18px 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--vs-stage);
  background-image:
    linear-gradient(var(--vs-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--vs-grid) 1px, transparent 1px);
  background-size: 14px 14px;
  background-position: center center;
  overflow: hidden;
}
.vs-a { grid-area: a; }
.vs-b { grid-area: b; }
.vs-mid { grid-area: mid; justify-self: center; align-self: center; filter: drop-shadow(3px 3px 0 var(--vs-badge-depth)); }
.vs-side { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.vs-art { display: block; width: 100%; max-width: 168px; height: auto; }
.vs-name {
  max-width: 100%; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--vs-name-bg); color: var(--text); text-align: center;
  font: 700 0.66rem/1.2 var(--mono); letter-spacing: 0.04em; text-transform: uppercase;
}
.vs-badge {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 12px 11px; background: var(--vs-badge); color: var(--vs-badge-ink);
  clip-path: polygon(0 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px,
    calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px),
    calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%,
    8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px));
}
.vs-glyph { display: block; width: 60px; height: auto; overflow: visible; }  /* whole pixels per cell: 12-cell glyph = 5 px */
.vs-glyph--narrow { width: 42px; }
.vs-glyph--square { width: 48px; }
.vs-glyph .px { fill: currentColor; }
.vs-glyph .px-shadow { fill: var(--vs-glyph-shadow); }
.vs-sub {
  max-width: 8.5em; text-align: center;
  font: 700 0.58rem/1.25 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
}

/* One illustration (single-product calculators, calendar) */
.vs--solo { grid-template-columns: auto auto; grid-template-areas: "a mid"; justify-content: center; gap: 12px 28px; }
.vs--solo .vs-art { width: 140px; }

/* Section index: two small "teams" of four */
.vs-team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 176px; justify-self: center; }
.vs-team img { display: block; width: 100%; height: auto; }

@media (min-width: 720px) {
  .vs { gap: 16px; padding: 22px 28px 18px; }
  .vs-name { padding: 4px 10px; font-size: 0.7rem; letter-spacing: 0.08em; }
  .vs-glyph { width: 84px; }
  .vs-glyph--narrow { width: 48px; }
  .vs-glyph--square { width: 64px; }
  .vs-sub { font-size: 0.64rem; }
  .vs--solo .vs-art { width: 168px; }
  .vs-team { max-width: 210px; gap: 8px; }
}

@media (max-width: 359px) {
  .vs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "mid mid" "a b"; }
  .vs--solo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "mid"; }
}

@media (prefers-reduced-motion: no-preference) {
  .vs-a { animation: vs-in-left 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .vs-b { animation: vs-in-right 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .vs-mid { animation: vs-pop 0.32s steps(4, end) 0.3s both; }
}
@keyframes vs-in-left { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes vs-in-right { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes vs-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }

/* Home: small illustration at the top of each section card */
.card-art { display: block; width: 72px; height: 72px; margin: 0 0 12px; }

/* Example products (Open Icecat photos) and the licence notice */
.examples { margin: 28px 0 8px; }
.examples h2 { margin-top: 0; }
.examples-note { color: var(--muted); font-size: 0.93rem; }
.ex-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 12px 0 0; }
.ex-card { display: flex; flex-direction: column; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.ex-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; padding: 12px; background: #ffffff; }
.ex-card figcaption { padding: 10px 12px 12px; border-top: 1px solid var(--border); font-size: 0.9rem; line-height: 1.4; }
.ex-name { display: block; font-weight: 600; }
.ex-src { display: block; margin-top: 3px; color: var(--muted); font-size: 0.8rem; }
.credit { color: var(--muted); font-size: 0.85rem; }
@media (min-width: 720px) { .ex-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.ex-grid--one { grid-template-columns: minmax(0, 320px); }
.ex-grid--wide { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.ex-grid--wide img { aspect-ratio: 2 / 1; padding: 8px 12px; }
