/* Tokens */
:root {
  --ink: #1B2559;        /* indigo, main text and headings */
  --paper: #FFFFFF;
  --mist: #EEF1F7;       /* page background bands */
  --line: #D5DAE6;
  --muted: #586083;
  --tag: #F2B705;        /* marigold price tag, the one bold thing */
  --tag-ink: #2A2100;
  --good: #0E7A55;
  --warn: #A8261C;
  --focus: #3355FF;
  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: clamp(2.25rem, 5vw + 1rem, 3.5rem);
  --radius: 10px;
  --gutter: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E4E8F7; --paper: #161B33; --mist: #1D2342; --line: #2F375E;
    --muted: #A6ADCB; --good: #4CC79A; --warn: #FF8A7F; --focus: #8FA4FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E4E8F7; --paper: #161B33; --mist: #1D2342; --line: #2F375E;
  --muted: #A6ADCB; --good: #4CC79A; --warn: #FF8A7F; --focus: #8FA4FF;
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--font);
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--muted); }
.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }

/* Header and footer */
.site-head { border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font-weight: 800; font-size: var(--step-1); text-decoration: none; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 22px; height: 14px; background: var(--tag); clip-path: polygon(30% 0, 100% 0, 100% 100%, 30% 100%, 0 50%); }
.site-nav { display: flex; gap: 16px; font-size: .95rem; white-space: nowrap; }
@media (max-width: 480px) { .site-nav { gap: 12px; font-size: .88rem; } }
.site-nav a { text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav { align-items: center; }
.install { font: inherit; font-weight: 700; font-size: .88rem; color: var(--tag-ink); background: var(--tag); border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.install:hover { text-decoration: underline; }
@media (max-width: 480px) { .site-head:has(#install:not([hidden])) .nav-extra { display: none; } }
.site-foot { margin-top: 64px; background: var(--mist); padding: 32px 0 48px; font-size: .92rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 16px; }

/* Hero calculator */
.hero { padding: 40px 0 32px; }
.hero-lede { font-size: var(--step-1); color: var(--muted); max-width: 48ch; }
.calc-grid { display: grid; gap: 28px; margin-top: 28px; }
@media (min-width: 860px) {
  .calc-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .result { position: sticky; top: 24px; }
}

.calc { display: grid; gap: 22px; }
.field > span, .calc legend { display: block; font-weight: 700; margin-bottom: 8px; }
.calc fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  min-height: 48px;
}
select:hover { border-color: var(--muted); }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.choice { position: relative; display: block; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; background: var(--paper); }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice strong { display: block; font-weight: 700; }
.choice small { display: block; color: var(--muted); font-size: .84rem; line-height: 1.35; margin-top: 2px; }
.choice:hover { border-color: var(--muted); }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }

/* The price tag */
.result { display: grid; gap: 14px; }
.tag {
  position: relative;
  background: var(--tag); color: var(--tag-ink);
  padding: 26px 24px 24px 64px;
  clip-path: polygon(40px 0, 100% 0, 100% 100%, 40px 100%, 0 50%);
  border-radius: 0 var(--radius) var(--radius) 0;
  transform-origin: 8px 50%;
}
.tag::before {
  content: ""; position: absolute; left: 22px; top: 50%; width: 14px; height: 14px;
  margin-top: -7px; border-radius: 50%; background: var(--paper);
}
.tag-label { display: block; font-weight: 700; font-size: .95rem; }
.tag-price { display: block; white-space: nowrap; font-size: clamp(1.6rem, 1.6vw + 1.1rem, 2.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 6px; }
.tag-note { display: block; font-size: .9rem; }
.tag.swing { animation: swing .5s ease-out; }
@keyframes swing {
  0% { transform: rotate(-3deg); }
  45% { transform: rotate(1.5deg); }
  100% { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .tag.swing { animation: none; } }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn:hover { text-decoration: underline; }
.result-fine { font-size: .88rem; color: var(--muted); margin: 0; }

@media (max-width: 859px) {
  .result.sticky-mobile { position: sticky; bottom: 0; background: var(--paper); padding: 12px 0; border-top: 1px solid var(--line); z-index: 5; }
}

/* Sections */
.band { background: var(--mist); padding: 40px 0; margin-top: 40px; }
.section { margin-top: 48px; }
.crumbs { font-size: .9rem; color: var(--muted); margin: 20px 0 0; }
.crumbs a { color: inherit; }

/* Brand lists */
.brand-group { margin-bottom: 32px; }
.price-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.price-list li { border-bottom: 1px solid var(--line); }
.price-list a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 2px; text-decoration: none; }
.price-list a:hover .pl-name { text-decoration: underline; }
.pl-name { font-weight: 600; }
.pl-price { white-space: nowrap; color: var(--muted); }
@media (min-width: 860px) { .brand-cols { columns: 2; column-gap: 48px; } .brand-group { break-inside: avoid; } }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .95rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { background: var(--mist); font-weight: 700; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 700; }
caption { caption-side: bottom; text-align: left; padding: 10px 14px; color: var(--muted); font-size: .9rem; }

/* Facts and notices */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0; border-top: 1px solid var(--line); margin: 0 0 8px; }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .88rem; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.notice { border-left: 4px solid var(--tag); background: var(--mist); padding: 14px 16px; border-radius: 0 var(--radius) var(--radius) 0; max-width: 72ch; }
.notice p:last-child { margin-bottom: 0; }
.safety { padding-left: 1.2em; max-width: 68ch; }
.safety li { margin-bottom: 8px; }
.safety strong { color: var(--warn); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; max-width: 72ch; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 0; }
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--step-2); margin-top: 1.6em; }
.formula { font-size: 1.05rem; background: var(--mist); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; }

/* Sell it form */
.sell { margin-top: 36px; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 22px 20px 24px; display: grid; gap: 16px; }
.sell-head h2 { font-size: var(--step-2); margin-bottom: .3em; }
.sell-head p { margin: 0; }
.sell-form { display: grid; gap: 16px; }
.sell-summary { margin: 0; padding: 10px 14px; background: var(--mist); border-radius: var(--radius); font-weight: 600; }
.sell-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.sell-grid .field { min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.sell input[type=text], .sell input[type=tel] {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 11px 13px; min-height: 48px; }
.sell input[aria-invalid="true"] { border-color: var(--warn); }
.consent { align-items: flex-start; font-weight: 400; font-size: .92rem; max-width: 72ch; }
.consent input { margin-top: 3px; flex: none; }
.sell-error { margin: 0; color: var(--warn); font-weight: 600; }
.sell-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.sell-fine { font-size: .88rem; }
.sell-done h3 { font-size: var(--step-1); margin-bottom: .3em; }
.sell-done:focus { outline: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; }
button.btn:disabled { opacity: .6; cursor: progress; }
