/* Cosara lab network shared design system.
   Fonts are self-hosted: no third-party requests, works under the tools' CSP
   (font-src 'self') and needs no consent banner. Paths are relative to this file, so the site works at / and
   under any sub-path. Class names are a public contract used by ~125 pages: extend, never rename. */

/* The standalone router also loads this sheet without the Gatsby font faces. */
@font-face {
  font-family: HelveticaNue;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("spicyverdict/fonts/HelveticaNeueLTPro-Lt-a6773656294a1d353561de456333b9ac.woff2") format("woff2");
}
@font-face {
  font-family: HelveticaNue;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("spicyverdict/fonts/HelveticaNeueLTPro-Bd-5c698a910bde2efd0d366ea067097612.woff2") format("woff2");
}
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f7f7;
  --surface-subtle: #f7f7f7;
  --surface-sunk: #ededf2;
  --border: #e5e5ea;
  --border-strong: #bcbcc3;
  --ink: #1d1d1f;
  --ink-secondary: #2c2c2e;
  --muted: #6e6e73;
  --accent: #ff4d54;
  --accent-hover: #ee2a52;
  --accent-ink: #b22642;
  --accent-soft: #fff5f5;
  --ok: #27633f;
  --ok-soft: #eef7f1;
  --warn: #3a3a3c;
  --warn-soft: #f7f7f7;
  --bad: #a8233e;
  --bad-soft: #fff5f5;
  --focus: #b22642;
  --sans: HelveticaNue, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --display: var(--sans);
  --serif: var(--sans);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 28px);
  --measure: 70ch;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 16px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  font-kerning: normal;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}
img, video, canvas { max-width: 100%; height: auto; }
svg { max-width: 100%; }
figure { margin: 0; }
figure > svg[viewBox], .data-figure svg[viewBox], .chart-card svg[viewBox] { display: block; width: 100%; height: auto; }
::selection { background: #ffd9dc; color: var(--ink); }

a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none; transition: top 120ms ease;
}
.skip:focus { top: 10px; color: #fff; }
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Top bar ---------- */
.site-topbar {
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
}
.site-topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 10px var(--gutter);
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.brand-mark {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-mark:hover { color: var(--ink); text-decoration: none; }
.top-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.top-links a {
  color: var(--ink-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
}
.top-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.3em; }
.top-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.45em; }
.site-topbar :focus-visible { outline-color: var(--focus); }

/* ---------- Layout ---------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px var(--gutter) 80px;
}

/* ---------- Type ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  font-weight: 600;
  margin-bottom: 10px;
}
h1, h2, h3, h4 { color: var(--ink); overflow-wrap: break-word; }
h1 {
  font-family: var(--display);
  font-size: clamp(30px, 4.2vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  text-wrap: balance;
}
h2 {
  font-family: var(--display);
  font-size: clamp(23px, 2.8vw, 29px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.006em;
  margin: 44px 0 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-wrap: balance;
}
h3 {
  font-size: 18px;
  line-height: 1.32;
  font-weight: 700;
  margin: 26px 0 8px;
  text-wrap: balance;
}
p { color: var(--ink-secondary); max-width: var(--measure); margin: 0 0 14px; text-wrap: pretty; }
li { text-wrap: pretty; }
small { font-size: 0.86em; }
sup { line-height: 0; }
sup a { text-decoration: none; font-weight: 600; font-size: 0.78em; }
abbr[title] { text-decoration: underline dotted; cursor: help; }
hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
code, kbd, samp { font-family: var(--mono); font-size: 0.9em; }
pre { font-family: var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote {
  margin: 20px 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--accent);
  font-family: var(--display); font-size: 1.15em; line-height: 1.45; color: var(--ink);
}

.meta-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--muted);
  margin: 16px 0 24px;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
  line-height: 1.5;
  background: var(--surface-subtle);
  color: var(--ink-secondary);
  white-space: nowrap;
  max-width: 100%;
}
/* Long badges (e.g. the Norwegian VOEC note) wrap on phones instead of pushing the page sideways.
   12px radius = the same full pill on a one-line badge, a soft rectangle on two lines. */
@media (max-width: 480px) {
  .badge { white-space: normal; border-radius: 12px; }
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }

/* ---------- Cards ---------- */
.card, .product-card, .tool-card, .chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(16px, 3vw, 24px);
  margin: 18px 0;
  min-width: 0;
}
.product-card.winner { border: 2px solid var(--accent); }
.product-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.product-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
}

.lab-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.lab-cell {
  background: var(--surface-subtle);
  border-radius: 8px;
  padding: 9px 12px;
  min-width: 0;
}
.lab-cell span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.lab-cell strong {
  font-family: var(--mono);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn-cta, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
  font-family: var(--sans);
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 80ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-cta {
  background: var(--accent);
  color: var(--ink) !important;
  font-weight: 700;
  font-size: 15px;
  padding: 11px 20px;
  border-radius: 9px;
  border: 1px solid transparent;
}
.btn-cta:hover { background: var(--accent-hover); text-decoration: none; }
.btn-secondary {
  background: var(--surface);
  color: var(--ink) !important;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-subtle); border-color: var(--ink-secondary); text-decoration: none; }
.btn-cta:active, .btn-secondary:active { transform: translateY(1px); }
.btn-secondary.is-copied, .btn-secondary[data-state="copied"] {
  background: var(--ok-soft); border-color: var(--ok); color: var(--ok) !important;
}
button { font: inherit; }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  margin: 18px 0;
  max-width: 100%;
}
.table-wrap:focus-visible { outline-offset: 0; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
th, td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
thead th {
  background: var(--surface-subtle);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-secondary);
  vertical-align: bottom;
  text-transform: none;   /* never uppercase: keeps dBA, mm, mmHg, IPX7 legible */
}
tbody th { font-weight: 600; color: var(--ink); }
tbody tr:hover > * { background: var(--surface-subtle); }
tr:last-child > td, tr:last-child > th { border-bottom: 0; }
.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.95em;
}

/* ---------- Table of contents ---------- */
.toc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 18px 0;
}
.toc-box ol { margin: 8px 0 0; padding-left: 22px; columns: 2; column-gap: 28px; }
.toc-box li { margin-bottom: 6px; font-size: 14.5px; break-inside: avoid; }
.toc-box a { color: var(--ink-secondary); text-decoration: none; }
.toc-box a:hover, .toc-box a[aria-current="true"] { color: var(--accent-ink); text-decoration: underline; }

/* ---------- FAQ / details ---------- */
.faq-item {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 10px;
}
.faq-item > summary {
  list-style: none;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  padding: 14px 46px 14px 18px;
  position: relative;
  border-radius: var(--radius);
}
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after {
  content: "";
  position: absolute; right: 20px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}
.faq-item[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item > summary:hover { background: var(--surface-subtle); }
.faq-item > :not(summary) { margin-left: 18px; margin-right: 18px; }
.faq-item > :last-child:not(summary) { margin-bottom: 16px; }
.faq-item p { margin: 4px 0 12px; }

/* ---------- Embed / cite box ---------- */
.embed-box {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
}
.embed-box h2, .embed-box h3 { margin-top: 0; padding-top: 0; border-top: 0; }
.embed-box label { display: block; font-size: 13.5px; font-weight: 600; margin: 0 0 6px; color: var(--ink-secondary); }
.embed-box textarea {
  display: block;
  width: 100%;
  min-height: 84px;
  max-height: 260px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--ink-secondary);
  margin-bottom: 10px;
}
.embed-box textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.embed-status, [data-copy-status] { font-size: 13.5px; color: var(--ok); margin-left: 8px; font-weight: 600; }

/* ---------- Forms (tools, router) ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px;
  margin: 14px 0;
}
.form-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 5px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  font-family: var(--sans);
  font-size: 16px;   /* 16px stops iOS zoom-on-focus */
  background: #fff;
  color: var(--ink);
}
.form-field input:hover, .form-field select:hover { border-color: var(--ink-secondary); }
input[type="range"] { accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.result-banner {
  background: var(--surface-subtle);
  border-left: 4px solid var(--accent);
  padding: 16px 18px;
  border-radius: 8px;
  margin-top: 16px;
}

/* ---------- Footer ---------- */
footer.site-footer {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--muted);
}
footer.site-footer a { color: var(--ink-secondary); }

/* ---------- Charts given a readable minimum width on phones (see network.js) ---------- */
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scrollbar-width: thin; }
.chart-scroll.is-overflowing:not(.at-end) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent);
}
.chart-scroll:focus-visible { outline-offset: 2px; }
.chart-scroll-hint { display: none; margin: 6px 0 2px; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.chart-scroll.is-overflowing + .chart-scroll-hint { display: block; }
.chart-scroll-hint::before { content: "\2194\00a0"; }

/* ---------- Full-bleed chart figures on phones: every value stays visible at the largest possible size ---------- */
@media (max-width: 600px) {
  html body figure.data-figure, html body .report figure, html body figure.chart-figure {
    margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    padding-left: 0; padding-right: 0;
    border-left: 0; border-right: 0; border-radius: 0;
  }
  html body figure.data-figure > :not(svg):not(.chart-scroll), html body .report figure > :not(svg):not(.chart-scroll), html body figure.chart-figure > :not(svg):not(.chart-scroll) {
    padding-left: 16px; padding-right: 16px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-grid img { height: 220px; }
  .toc-box ol { columns: 1; }
  h2 { margin-top: 36px; padding-top: 18px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding-top: 22px; padding-bottom: 56px; }
  th, td { padding: 10px 11px; }
  .top-links { gap: 2px 14px; }
  .btn-cta { width: 100%; }
}

/* ---------- Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .site-topbar, .embed-box, .skip, .btn-cta, .btn-secondary, nav { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .table-wrap { overflow: visible; border: 0; }
  a { color: inherit; }
  h2, h3 { break-after: avoid; }
  figure, table, .card { break-inside: avoid; }
}

.hub-hero > *, .vs-grid > *, .calc-grid > *, .dossier > *, .lead-layout > * { min-width: 0; }

/* Shared surfaces for the original network templates. The scoped selectors
   retain their palette when a page loads its own component CSS after this file. */
.sv-editorial-wrap :is(.card, .stat-card, .calc-card, .hub-sheet, .country-card) {
  min-width: 0;
  padding: clamp(16px, 2.4vw, 24px);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(29, 29, 31, 0.06);
}
.sv-editorial-wrap .hub-sheet {
  border-top: 3px solid var(--accent);
}
.sv-editorial-wrap .hub-sheet:is(:hover, :focus-visible) {
  border-color: var(--accent);
}
.sv-editorial-wrap .hub-sheet.is-primary {
  background: var(--surface);
  border-color: var(--border);
  border-top-color: var(--accent);
  color: var(--ink);
}
.sv-editorial-wrap .hub-sheet.is-primary :is(strong, .arrow) { color: var(--ink); }
.sv-editorial-wrap .hub-sheet.is-primary .k { color: var(--accent-ink); }
.sv-editorial-wrap .hub-sheet.is-primary .d { color: var(--muted); }
.sv-editorial-wrap .callout {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink-secondary);
  background: var(--accent-soft);
}
.sv-editorial-wrap .hero {
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
  border-color: var(--border);
}
.sv-editorial-wrap .vs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  background: var(--surface);
  color: var(--ink);
}
@media (max-width: 680px) {
  .sv-editorial-wrap .vs-grid { grid-template-columns: minmax(0, 1fr); }
}
.sv-editorial-wrap :is(input:not([type]), input[type="text"], input[type="number"],
  input[type="search"], input[type="date"], select) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background-color: var(--surface);
  font-family: var(--sans);
  font-size: 16px;
}
.sv-editorial-wrap button:where(:not([class]), .action) {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: 700 16px/1.3 var(--sans);
  cursor: pointer;
}
.sv-editorial-wrap button:where(:not([class]), .action):hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
