/* Verako: one stylesheet (docs/UX-SPEC-V2.md, revision 2 "Frisk"). Tokens, base, then components; phone rules sit in one block. No inline styles anywhere. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 500 800; font-display: swap; src: url(/static/bricolage-grotesque-v9-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; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/static/figtree-v9-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; }
:root {
  color-scheme: light dark;
  --bg: #ffffff; --surface: #f2f7ee; --card: #ffffff; --ink: #0f2a1d; --muted: #4a5d52; --line: #dce6da;
  --field: #6f8476;                       /* input and chip borders: >= 3:1 on --bg and --card */
  --brand: #0f2a1d; --brand-ink: #ffffff; --brand-soft: #eef6e3; --lime: #c9f26a; --lime-ink: #0f2a1d;
  --good: #1b7a3a;                        /* positive money, and the checks in the trust list */
  --warn: #8a5300;                        /* conditions and caveats */
  --danger: #b42318;                      /* errors only; a loss is ink */
  --av-1: #ffd6c7; --av-2: #ffe9a8; --av-3: #cfead0; --av-4: #cde7fa; --av-5: #e3d4f7; --av-6: #f9d0e6; --av-ink: #0f2a1d;
  --shadow: 0 1px 2px rgb(15 42 29 / 8%);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-card: 20px; --r-input: 12px; --r-pill: 999px; --tabbar: 64px;
  --display: "Bricolage Grotesque", system-ui, sans-serif; --body: "Figtree", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1611; --surface: #13211a; --card: #16261d; --ink: #e9f3ec; --muted: #a5b8ac; --line: #24372c;
    --field: #6d8576;
    --brand: #c9f26a; --brand-ink: #0f2a1d; --brand-soft: #1a2e22; --lime: #c9f26a; --lime-ink: #0f2a1d;
    --good: #8fe0a7; --warn: #e9b866; --danger: #f29c94;
    --av-1: #f2b7a3; --av-2: #ebd27d; --av-3: #a9d4ab; --av-4: #a6cfea; --av-5: #c9b5eb; --av-6: #e8a9cb; --av-ink: #0f2a1d;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.5 var(--body); font-variant-numeric: tabular-nums; }
header, main, footer { max-width: 44rem; margin: 0 auto; padding: 0 var(--s4); }
.wide header, .wide main, .wide footer { max-width: 72rem; }
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
main { padding-bottom: var(--s5); overflow-wrap: break-word; }  /* a long typed word never widens the page */
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: 1.75rem; line-height: 1.1; margin: var(--s5) 0 var(--s2); }
h2 { font-size: 1.25rem; line-height: 1.2; margin: var(--s6) 0 var(--s3); }
h3 { font-size: 1.0625rem; margin: var(--s4) 0 var(--s2); }
@media (min-width: 48rem) { h1 { font-size: 2.25rem; } h2 { font-size: 1.375rem; } }
a { color: var(--ink); text-underline-offset: 3px; }
p { margin: var(--s2) 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.small { font-size: 0.875rem; color: var(--muted); }
.lead { color: var(--muted); margin: 0 0 var(--s5); }
.warn { color: var(--warn); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
a, .button, .chip span, .tile { transition: background-color 120ms, border-color 120ms, color 120ms; }

/* header: the wordmark (the top bar on a phone), then the category nav */
.home { display: inline-flex; align-items: center; gap: var(--s2); min-height: 56px; font: 800 1.5rem/1 var(--display); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.home svg { color: var(--brand); }
.home svg path { stroke: var(--brand-ink); }
.preview { flex: 1 1 100%; margin: var(--s2) 0 0; padding: var(--s2) var(--s3); border: 2px solid var(--warn); border-radius: var(--s3); font-size: 0.875rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav .ico { display: grid; place-items: center; }

/* illustrations and confetti: flat shapes in forest, white and lime, so they read the same in both themes */
.il .f { fill: var(--lime-ink); } .il .l { fill: var(--lime); } .il .w { fill: #ffffff; } .il .s { stroke: var(--lime-ink); }
.il { flex: none; }
.il.calm .l { fill: var(--card); }      /* a loan is never lime (F10) */

/* home: a lime welcome band, the category cards and the trust list */
.welcome { margin: 0 calc(-1 * var(--s4)); padding: var(--s2) var(--s5) var(--s5); border-radius: 0 0 28px 28px; background: var(--lime); color: var(--lime-ink); }
.welcome h1 { margin: var(--s4) 0 var(--s2); font-size: 2.25rem; }
.welcome .lead { margin: 0; color: var(--lime-ink); font-size: 1.125rem; }
@media (min-width: 48rem) { .welcome { margin: var(--s4) 0 0; padding: var(--s6); border-radius: 28px; } .welcome h1 { margin-top: 0; font-size: 2.75rem; } }
.tiles { list-style: none; padding: 0; margin: var(--s5) 0; display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 40rem) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; align-items: center; gap: var(--s3); min-height: 72px; height: 100%; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--ink); }
.tile .ic { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); }
.tile .txt { flex: 1; min-width: 0; }
.tile strong { display: block; font-size: 1.125rem; font-weight: 800; }
.tile .txt span { color: var(--muted); font-size: 0.9375rem; line-height: 1.35; }
.tile .go { flex: none; color: var(--muted); }
@media (min-width: 64rem) { .tile { position: relative; flex-direction: column; align-items: flex-start; padding: var(--s4); } .tile .go { position: absolute; top: var(--s4); right: var(--s4); } }
.trust { list-style: none; padding: 0; margin: var(--s5) 0; display: grid; gap: var(--s3); }
.trust li { display: flex; gap: var(--s3); align-items: flex-start; }
.trust svg { flex: none; color: var(--good); margin-top: 2px; }

/* forms: the start page is one question card */
.form-card { margin-top: var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: var(--s5) var(--s4); }
.form-card h1 { margin: var(--s3) 0 var(--s2); font-size: 2rem; }
label, .label { display: block; margin: var(--s4) 0 var(--s1); font-weight: 600; }
input, select, button { font: inherit; }
::placeholder { color: var(--muted); opacity: 1; }
input[type="text"], input:not([type]), select { display: block; width: 100%; min-height: 56px; padding: var(--s2) var(--s4); border: 1px solid var(--field); border-radius: var(--r-input); background: var(--bg); color: var(--ink); font-size: 1.125rem; }
.form-card input { min-height: 64px; font-size: 1.5rem; font-weight: 600; }
.more-options input, .summary input { min-height: 56px; font-size: 1.125rem; font-weight: 400; }
input[aria-invalid="true"] { border: 2px solid var(--danger); }
.field-unit { position: relative; display: block; }
.field-unit input { padding-right: 3.75rem; }
.field-unit .unit { position: absolute; right: var(--s4); top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; pointer-events: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--s1); min-height: 48px; padding: var(--s2) var(--s5); border: 2px solid var(--brand); border-radius: var(--r-pill); background: var(--brand); color: var(--brand-ink); font-weight: 800; cursor: pointer; text-decoration: none; margin-top: var(--s4); }
.button.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
form > .button { width: 100%; min-height: 56px; margin-top: var(--s5); font-size: 1.125rem; }
@media (min-width: 40rem) { form > .button { width: auto; min-width: 12rem; } }
.chips { border: 0; padding: 0; margin: var(--s4) 0 0; min-width: 0; }
.chips legend { font-weight: 600; margin: 0 0 var(--s1); padding: 0; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
label.chip { display: inline-block; margin: 0; font-weight: 600; position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; padding: var(--s2) var(--s4); border: 1px solid var(--field); border-radius: var(--r-pill); background: var(--bg); cursor: pointer; }
.chip input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); font-weight: 800; }
.chip input:checked + span::before { content: "✓ "; }
.chip input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 2px; }
.more-options { margin: var(--s4) 0 0; border-top: 1px solid var(--line); }
.more-options > summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; font-weight: 700; list-style: none; }
.more-options > summary::-webkit-details-marker, .card details > summary::-webkit-details-marker, .answer-more > summary::-webkit-details-marker, .sources-fold > summary::-webkit-details-marker { display: none; }
.more-options > summary::before, .card details > summary::before, .answer-more > summary::before, .sources-fold > summary::before { content: "▸"; content: "▸" / ""; width: 1.25rem; }
.more-options[open] > summary::before, .card details[open] > summary::before, .answer-more[open] > summary::before, .sources-fold[open] > summary::before { content: "▾"; content: "▾" / ""; }
.sources-fold > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; list-style: none; }
.field-error { display: flex; gap: 6px; align-items: flex-start; color: var(--danger); font-size: 0.875rem; margin: var(--s1) 0; }
.field-error svg { flex: none; margin-top: 2px; }
.error { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--danger); border-radius: var(--r-input); padding: var(--s3) var(--s4); margin: var(--s4) 0; }
.error strong { display: block; }
.error:focus { outline: none; }
.error, .hero { scroll-margin-block: var(--s5); }

/* summary bar (refine): a pill after an answer, the form when opened */
.summary { margin: var(--s3) 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.summary > summary { cursor: pointer; padding: var(--s3) var(--s4); min-height: 44px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.summary > summary::-webkit-details-marker { display: none; }
.summary > summary .edit { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; white-space: nowrap; }
.summary > summary > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.summary form { padding: 0 var(--s4) var(--s4); }

/* results: one column on a phone; at 64rem the summary is a sidebar (still a closed <details>) */
@media (min-width: 64rem) {
  .results { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; grid-template-rows: auto auto 1fr; grid-template-areas: "head side" "answer side" "method side"; column-gap: var(--s6); }
  .results > h1 { grid-area: head; }
  .results > .summary { grid-area: side; align-self: start; margin-top: var(--s5); position: sticky; top: var(--s4); }
  .results > #answer { grid-area: answer; min-width: 0; }
  .results > section { grid-area: method; }
}
.results > h1 { font-size: 1.5rem; }
@media (min-width: 48rem) { .results > h1 { font-size: 1.75rem; } }

/* the answer card: lime for good news, soft green for the rest (never lime for a loan) */
@keyframes pop { from { transform: scale(0.96); } to { transform: none; } }
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: var(--s3); padding: var(--s5) var(--s5) var(--s2); border-radius: 28px; background: var(--brand-soft); }
.hero[data-tone="good"] { --ink: var(--lime-ink); --muted: var(--lime-ink); --brand: var(--lime-ink); --brand-ink: var(--lime); --line: rgb(15 42 29 / 25%); background: var(--lime); color: var(--ink); }
.hero:focus { outline: none; }
.hero .il { position: absolute; z-index: -1; pointer-events: none; }
.hero .art { top: var(--s4); right: var(--s4); }
.hero .cf { top: 0; right: 0; }
.hero-top { display: flex; min-height: 72px; padding-right: 88px; }
.verdict { align-self: flex-start; display: inline-block; max-width: 100%; padding: var(--s1) var(--s3); border: 1.5px solid var(--ink); border-radius: 14px; font: 800 0.9375rem/1.3 var(--display); color: var(--ink); }
.verdict[data-tone="good"] { background: var(--lime-ink); border-color: var(--lime-ink); color: var(--lime); }
.hero .big { margin: var(--s2) 0 0; font: 800 clamp(2.5rem, 15vw, 3.5rem)/1 var(--display); letter-spacing: -0.03em; overflow-wrap: anywhere; transform-origin: left center; animation: pop 300ms ease-out; }
.hero[data-gain] .big::before { content: "+"; }
.hero .big .unit { display: block; margin-top: var(--s2); font: 700 1.125rem/1.3 var(--body); letter-spacing: 0; }
.hero .headline { font-size: 1.0625rem; font-weight: 500; margin: var(--s3) 0 var(--s2); }
.hero .cover { margin: 0 0 var(--s4); }
.hero .jump { margin: 0; }
.hero .jump .button { margin: 0; padding-inline: var(--s6); }
.answer-more { margin-top: var(--s3); border-top: 1px solid var(--line); }
.answer-more > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; list-style: none; }
.notice { display: flex; gap: var(--s2); align-items: flex-start; margin: var(--s4) 0; font-size: 0.875rem; color: var(--muted); }
.notice svg { flex: none; margin-top: 2px; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s3); margin: var(--s6) 0 var(--s2); }
.list-head h2 { margin: 0; }
.list-head a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.swipe { flex: 1 1 100%; margin: 0 0 var(--s1); font-weight: 600; }

/* offer cards: a swipeable carousel on a phone (not on "Vis hele listen"), a grid from 48rem */
.offers { position: relative; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 48rem) { .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .swipe { display: none; } }
.card { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow); overflow-wrap: anywhere; scroll-margin-top: var(--s4); }
.card.recommended { border: 2px solid var(--brand); padding: 15px; }
.card .top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.card .rank { flex: none; min-width: 28px; padding: 0 var(--s2); border-radius: var(--r-pill); background: var(--ink); color: var(--bg); font: 800 0.875rem/28px var(--display); text-align: center; }
.who { display: flex; align-items: center; gap: var(--s3); }
.av { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--av-ink); font: 800 1rem/1 var(--display); }
.av-1 { background: var(--av-1); } .av-2 { background: var(--av-2); } .av-3 { background: var(--av-3); } .av-4 { background: var(--av-4); } .av-5 { background: var(--av-5); } .av-6 { background: var(--av-6); }
.card h3 { margin: 0; font-size: 1.125rem; font-weight: 800; line-height: 1.25; }
.figs { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); }
.fig { margin: 0; }
.fig .key { font: 800 1.75rem/1.1 var(--display); letter-spacing: -0.02em; }
.fig .small { display: block; }
.card .meta, .card .cmp, .card .tags { margin: 0; }
.cmp { font-weight: 700; }
.cmp[data-tone="good"] { align-self: flex-start; padding: var(--s1) var(--s3); border-radius: var(--r-pill); background: var(--lime); color: var(--lime-ink); }
.note { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.note svg { flex: none; margin-top: 2px; }
.card details > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 700; list-style: none; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: var(--s1) var(--s3); margin: 0 0 var(--s2); font-size: 0.875rem; }
.card dt { color: var(--muted); }
.card dd { margin: 0; text-align: right; }
.card details ul { margin: 0; padding-left: var(--s4); font-size: 0.875rem; }
.card .link { margin: auto 0 0; padding-top: var(--s2); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); }
.card .link .button { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: var(--s1); }
.badge { display: inline-block; padding: 1px var(--s2); border: 1px solid var(--warn); border-radius: var(--r-pill); color: var(--warn); font-size: 0.8125rem; line-height: 1.4; }
.badge.info { border-color: var(--field); color: var(--muted); }
.badge.own { border-color: var(--ink); color: var(--ink); }
.badge.more { border-style: dashed; }
.badge.pick { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); font-weight: 800; }
.badge.pick.calm { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.badge.pick.calm { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.card.recommended:has(.badge.pick.calm) { border-color: var(--ink); }
.card .top .badge { padding: 3px var(--s3); font-weight: 800; }
.more a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* offer pages */
.crumb { margin: var(--s4) 0 0; font-size: 0.875rem; }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.key-panel { margin: var(--s4) 0; padding: var(--s4) var(--s5); border-radius: var(--r-card); background: var(--brand-soft); }
.key-fact { margin: 0; font: 800 clamp(1.75rem, 8vw, 2.25rem)/1.15 var(--display); letter-spacing: -0.02em; }
.key-panel .small { margin: var(--s1) 0 0; }
.bands { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.bands th, .bands td { padding: var(--s3) var(--s2); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.bands thead th { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.bands tbody th { font-weight: 400; }
.bands td.num, .bands th.num { text-align: right; white-space: nowrap; }
.bands td .small, .bands th .small { display: block; }
.scroll { overflow-x: auto; }
.bank-link { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.bank-link .button { margin: 0; }

/* footer: links big enough to tap */
footer { margin-top: var(--s7); padding-top: var(--s2); padding-bottom: var(--s5); border-top: 1px solid var(--line); }
footer ul { list-style: none; padding: 0; margin: 0; }
footer a { display: inline-block; padding-block: var(--s3); }
footer .links { display: flex; gap: var(--s5); margin: 0; }

/* from 48rem: the nav is a row next to the wordmark, the answer is a rounded card, the cards are a grid */
@media (min-width: 48rem) {
  .nav { display: flex; gap: var(--s1); }
  .nav a { padding: var(--s2) var(--s4); min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r-pill); }
  .nav .ico, .nav a[href="/"] { display: none; }
  .nav a[aria-current="page"] { background: var(--lime); color: var(--lime-ink); font-weight: 800; }
}

/* phones: a top bar with the wordmark, a tab bar fixed to the bottom, an edge-to-edge answer, swipeable cards */
@media (max-width: 47.99rem) {
  html { scroll-padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 5rem); }  /* the bars never cover a focused field */
  body { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }
  .nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding: 0 var(--s1) env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--line); }
  .nav a { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 0.75rem; line-height: 1.2; font-weight: 600; color: var(--muted); }
  .nav a:focus-visible { outline-offset: -3px; border-radius: var(--s3); }
  .nav .ico { width: 56px; height: 32px; border-radius: 16px; }
  .nav a[aria-current="page"] { color: var(--ink); font-weight: 800; }
  .nav a[aria-current="page"] .ico { background: var(--lime); color: var(--lime-ink); }
  .hero { margin-inline: calc(-1 * var(--s4)); border-radius: 0 0 28px 28px; }
  .offers:not(.all) { display: flex; gap: var(--s3); margin-inline: calc(-1 * var(--s4)); padding: var(--s1) var(--s4) var(--s4); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--s4); scrollbar-width: none; }
  .offers:not(.all)::-webkit-scrollbar { display: none; }
  .offers:not(.all):focus-visible { outline-offset: -3px; }
  .offers:not(.all) > li { flex: 0 0 min(86vw, 24rem); scroll-snap-align: start; }
  form > .button { position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + var(--s2)); z-index: 5; box-shadow: 0 6px 16px rgb(15 42 29 / 25%); }
}
@media (max-width: 47.99rem) and (max-height: 31.25rem) {
  form > .button { position: static; box-shadow: none; }
  .form-card > .il { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; scroll-behavior: auto !important; transition: none !important; } }
