:root {
  color-scheme: light dark;
  --bg: #f7f4ee; --surface: #fff; --text: #1d1b18; --muted: #5f5a52; --line: #d3ccbf;
  --accent: #17573f; --on-accent: #fff; --error: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614; --surface: #23211e; --text: #f1ede6; --muted: #b3ab9f; --line: #4a463f;
    --accent: #8fd6b4; --on-accent: #10231b; --error: #ffb4ab;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.0625rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
header, main, footer { max-width: 68rem; margin: 0 auto; padding: 1rem; }
/* The content sits in a white box with light grey around it. On a phone the box fills the width.
   --pad-x and --pad-top are its padding, so a part can reach out to its edges (the front page's hero, a row of chips). */
main { --pad-x: 1rem; --pad-top: 1rem; --radius: 0; padding: var(--pad-top) var(--pad-x) 2rem; border-radius: var(--radius); background: var(--surface); }
@media (min-width: 720px) {
  main { --pad-x: 2rem; --pad-top: 1.75rem; --radius: .75rem; width: calc(100% - 2rem); margin-top: .25rem; border: 1px solid var(--frame); }
}
header a { font-size: 1.25rem; font-weight: 700; text-decoration: none; }
footer { margin-top: 1rem; color: var(--muted); font-size: .9375rem; }
a { color: var(--accent); }

h1 { max-width: 40rem; margin: 1rem 0; font-size: clamp(1.75rem, 6vw, 2.75rem); line-height: 1.15; text-wrap: balance; }
h2 { margin: 2.5rem 0 1rem; font-size: 1.5rem; }
h3 { margin: 0; font-size: 1.125rem; }
p, details, dl, .field, .box { max-width: 40rem; }
.lead { font-size: 1.1875rem; }
.small, .hint { margin: .25rem 0; color: var(--muted); font-size: .9375rem; }

.steps { padding-left: 1.5rem; }
.steps li { margin-bottom: 1rem; padding-left: .25rem; }
.steps li::marker { color: var(--accent); font-size: 1.25rem; font-weight: 700; }
.steps p { margin: .25rem 0 0; }

fieldset {
  min-width: 0; margin: 0 0 1.5rem; padding: 1rem;
  border: 1px solid var(--line); border-radius: .75rem; background: var(--surface);
}
/* Floated, the legend sits inside the box instead of on its border. */
legend { float: left; width: 100%; margin-bottom: .5rem; padding: 0; font-size: 1.25rem; font-weight: 700; }
legend + * { clear: both; }
fieldset fieldset { margin: 1rem 0 0; padding: 0; border: 0; }
fieldset fieldset legend { margin: 0; font-size: inherit; font-weight: 600; }

.field { margin: 1rem 0; }
/* The nickname a listing is sold under, where the name field used to be. */
.seller-name { margin: 1rem 0; }
label { display: block; font-weight: 600; }
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"], [type="radio"]), select, textarea {
  display: block; width: 100%; min-height: 44px; margin-top: .25rem; padding: .5rem .75rem;
  border: 1px solid var(--muted); border-radius: .5rem; background: var(--surface); color: var(--text);
}
.check { display: flex; gap: .75rem; padding: .6rem 0; font-weight: 400; }
.check input { flex: none; width: 1.5rem; height: 1.5rem; margin: .1rem 0 0; accent-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.row .field { margin: .5rem 0; }
#orgnr-name { margin: .25rem 0; font-weight: 600; }

/* No :has() support means both stay visible, which still works. */
#provider-form:not(:has([name="model"][value="tiers"]:checked)) #tier-fields,
#provider-form:has([name="model"][value="tiers"]:checked) #per-m2-fields { display: none; }
/* Pris etter tilbud: only the hourly rate and call-out fee, never the price fields. */
#provider-form:not(:has([name="model"][value="quote"]:checked, input[type="hidden"][name="model"][value="quote"])) #quote-fields,
#provider-form:has([name="model"][value="quote"]:checked) :is(#per-m2-fields, #tier-fields, #unit-price-fields) { display: none; }

.error { margin: .25rem 0 0; color: var(--error); font-weight: 600; }
[aria-invalid="true"] { outline: 2px solid var(--error); }
.alert, .box {
  margin: 1rem 0; padding: .75rem 1rem;
  border: 2px solid var(--line); border-radius: .5rem; background: var(--surface);
}
.alert { border-color: var(--error); color: var(--error); font-weight: 600; }
.box p { margin: .25rem 0; }
.split > aside.cheapest-box { position: static; }
.cheapest-box > h2:first-child { margin-top: 0; }
.cheapest a { text-decoration: none; }
.cheapest a:hover, .cheapest a:focus-visible { text-decoration: underline; }
.cheapest { width: 100%; border-collapse: separate; border-spacing: 0 .35rem; margin: .25rem 0 1rem; font-size: .9rem; }
.cheapest caption { text-align: left; font-weight: 700; font-size: 1.15rem; padding: .5rem 0 .15rem; }
.cheapest th, .cheapest td { padding: .5rem; background: var(--soft); vertical-align: middle; text-align: left; font-weight: 400; }
.cheapest .rank { width: 1.75rem; text-align: center; font-weight: 700; color: var(--on-accent); background: var(--accent); border-radius: .5rem 0 0 .5rem; }
.cheapest td:last-child { border-radius: 0 .5rem .5rem 0; }
.cheapest .small { display: block; }
.cheapest .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cheapest .rate { font-weight: 700; font-size: 1.05rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

button, .button {
  display: block; width: 100%; max-width: 24rem; min-height: 48px; margin: 1.5rem 0 .5rem; padding: .75rem 1.5rem;
  border: 0; border-radius: .5rem; background: var(--accent); color: var(--on-accent);
  font-weight: 700; text-align: center; text-decoration: none; cursor: pointer;
}

.preview {
  margin: 0 0 1.5rem; padding: 1rem;
  border: 2px solid var(--accent); border-radius: .75rem; background: var(--surface);
}
.preview h2 { margin: 0 0 .75rem; font-size: 1.125rem; }
.bubble {
  width: fit-content; max-width: 90%; margin: 0 0 .75rem; padding: .6rem .9rem;
  border: 1px solid var(--line); border-radius: 1rem 1rem 1rem .25rem; background: var(--bg);
}
.ask {
  margin-left: auto; border-color: var(--accent); border-radius: 1rem 1rem .25rem 1rem;
  background: var(--accent); color: var(--on-accent);
}
#preview-list { margin: .5rem 0 0; padding: 0; list-style: none; }
#preview-list li + li { margin-top: .5rem; }
#preview-list strong { display: block; }

details { border-bottom: 1px solid var(--line); }
summary { padding: .75rem 0; font-weight: 600; cursor: pointer; }
details p { margin: 0 0 1rem; }

dt { margin-top: .75rem; font-weight: 600; }
dd { margin: 0; }
pre {
  overflow-x: auto; padding: .75rem; font-size: .875rem;
  border: 1px solid var(--line); border-radius: .5rem; background: var(--surface);
}

@media (min-width: 900px) {
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; column-gap: 2.5rem; align-items: start; }
  .split > * { grid-column: 1; }
  .split > aside { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 1rem; }
}

header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; }
header nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
/* /vilkar: one readable column, sections set apart by a thin line. */
.terms { max-width: 42rem; }
.terms section { padding: 1.1rem 0 .4rem; border-top: 1px solid var(--line); }
.terms h2 { margin: 0 0 .5rem; font-size: 1.125rem; }
.terms p { margin: 0 0 .75rem; }
/* The footer: the links, then a thin line and the small print, all centred. */
footer { text-align: center; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.5rem; margin: 1.5rem 0 1.25rem; }
footer nav a { color: var(--text); font-size: .875rem; text-decoration: none; }
footer nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal { max-width: 40rem; margin: 0 auto; padding: 1.25rem 0 .5rem; border-top: 1px solid var(--line); font-size: .8125rem; line-height: 1.6; }
.legal p { max-width: none; margin: 0 0 .35rem; }
.legal .company { letter-spacing: .01em; }
.legal .company strong { color: var(--text); font-weight: 600; }
.legal .company span { margin: 0 .5em; opacity: .6; }
.legal a { color: inherit; text-underline-offset: 2px; }
header nav a { font-size: 1rem; font-weight: 600; }

.estimate {
  max-width: 40rem; margin: 0 0 1rem; padding: 1rem;
  border: 1px solid var(--line); border-radius: .75rem; background: var(--surface);
}
.estimate h2 { margin: 0; font-size: 1.25rem; }
.estimate p { margin: .25rem 0; }
.estimate .button { margin: 1rem 0 0; }
.price { font-size: 1.5rem; font-weight: 700; }
code { overflow-wrap: anywhere; }

/* ---- Torg. First the palette, which the whole site picks up; then the marketplace components. ---- */
:root {
  /* Light grey around a white box for the content (main). --soft is for boxes with no border, which white would
     hide; --frame is the box's own edge. */
  --bg: #EEF0ED; --surface: #FFFFFF; --soft: #F2F5F1; --frame: #E0E4DE; --text: #18201B; --muted: #56615B; --line: #D3D9D1;
  --accent: #1E5A42; --on-accent: #FFFFFF; --error: #B3261E;
  --accent-soft: #DCEAE2;
  --display: 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111613; --surface: #1A201C; --soft: #222A25; --frame: #2D3631; --text: #E7ECE8; --muted: #9BA6A0; --line: #2D3631;
    --accent: #7CC9A0; --on-accent: #0D1A13; --error: #F2867E;
    --accent-soft: #1F3329;
  }
}
h1, h2, h3 { font-family: var(--display); letter-spacing: -.015em; overflow-wrap: break-word; }

/* One row that scrolls sideways on a phone, out to the screen edges. Wraps when there is room. */
.chips { display: flex; gap: .5rem; margin: 1rem calc(-1 * var(--pad-x)); padding: .5rem var(--pad-x); overflow-x: auto; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem .9rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
}
.chip:hover { background: var(--accent-soft); }
.chip[aria-current="page"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
@media (min-width: 640px) { .chips { flex-wrap: wrap; } }

/* The front page. The hero fills the top of the white box, out to its edges, with its content lined up with main's. */
body.front { overflow-x: clip; }
.bleed { margin-inline: calc(-1 * var(--pad-x)); padding-inline: var(--pad-x); }
.hero {
  position: relative; margin-top: calc(-1 * var(--pad-top)); padding-block: clamp(1.5rem, 4vw, 2.75rem);
  border-radius: var(--radius) var(--radius) 0 0; background: var(--accent); color: var(--on-accent);
}
/* In dark mode the accent is light; a deep green keeps the hero calm. */
@media (prefers-color-scheme: dark) { .hero { background: var(--accent-soft); color: var(--text); } }
/* The launch banner: a dark strip across the very top of the page, white text on one line.
   On a narrow screen the line is cut with «…» rather than wrapped; the two links are first to go, the start stays. */
.launch {
  max-width: none; margin: 0; padding: .55rem 1rem; overflow: hidden;
  background: #1d1b18; color: #fff; font-size: .875rem; text-align: center; text-overflow: ellipsis; white-space: nowrap;
}
.launch a { color: inherit; font-weight: 700; }
/* The cookie question (public/ga.js): a small card over the bottom of the page until it is answered. The two answers
   look the same, so neither is the easier one. Under the chat when that fills the screen. */
.consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50; max-width: 30rem; margin: 0 auto; padding: 1rem 1.1rem;
  border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); box-shadow: 0 6px 24px rgba(0, 0, 0, .14);
  font-size: .9375rem; line-height: 1.5;
}
.consent p { margin: 0 0 .75rem; }
.consent div { display: flex; gap: .5rem; }
.consent button { flex: 1; min-height: 44px; margin: 0; padding: .5rem 1rem; }
/* /toppliste: rank, seller and count, with the numbers right-aligned under each other. */
.board-table { width: 100%; max-width: 36rem; margin: .5rem 0 2rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board-table th, .board-table td { padding: .55rem .75rem; border-bottom: 1px solid var(--line); text-align: left; }
.board-table th { color: var(--muted); font-size: .8125rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.board-table th:first-child, .board-table td:first-child { width: 3.5rem; padding-left: 0; color: var(--muted); }
.board-table th:last-child, .board-table td:last-child { width: 6rem; padding-right: 0; text-align: right; }
.board-table tbody tr:nth-child(-n+3) td:first-child { color: var(--accent); font-weight: 700; }
/* The front page's last row: the top list and the AI box, half the width each and the same height. One column on a phone. */
.front-pair { display: grid; gap: 1rem; margin: 2rem 0 0; }
@media (min-width: 640px) { .front-pair { grid-template-columns: 1fr 1fr; } }
.mini { display: flex; flex-direction: column; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: .75rem; font-size: .875rem; }
.mini h2 { margin: 0 0 .6rem; font-size: 1rem; line-height: 1.3; }
.mini p { margin: 0 0 .5rem; }
.mini p:last-child { margin: auto 0 0; padding-top: .25rem; }
/* The top five: rank, name, and the count to the right, one thin line between rows. */
.board { margin: 0 0 .75rem; padding: 0; list-style: none; counter-reset: rank; }
.board li { display: flex; gap: .6rem; align-items: baseline; padding: .3rem 0; border-top: 1px solid var(--line); counter-increment: rank; }
.board li:first-child { border-top: 0; }
.board li::before { content: counter(rank); min-width: 1.1rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.board a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board span { color: var(--muted); font-variant-numeric: tabular-nums; }
/* Variant C (17 Nov 2026): a green line icon before each heading, the top three marked (soft green since
   19 Nov 2026; gold, silver and bronze before), and the AI box as a short chat. */
.mini-head { display: flex; gap: .5rem; align-items: flex-start; margin: 0 0 .6rem; color: var(--accent); }
.mini-head svg { flex: none; width: 20px; height: 20px; margin-top: .05rem; }
.mini .mini-head h2 { margin: 0; color: var(--text); }
.front-pair .board li { align-items: center; }
.front-pair .board a { color: var(--text); text-decoration: none; }
.front-pair .board a:hover, .front-pair .board a:focus-visible { color: var(--accent); text-decoration: underline; }
.front-pair .board li::before { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; min-width: 0; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.front-pair .board li:nth-child(-n+3)::before { background: var(--accent-soft); color: var(--accent); }
.bubbles { display: flex; flex-direction: column; gap: .4rem; margin: .25rem 0 .75rem; }
.bubble { align-self: flex-end; max-width: 85%; padding: .4rem .7rem; border-radius: .9rem .9rem .2rem .9rem; background: var(--accent); color: var(--on-accent); }
.bubble.ai { align-self: flex-start; border-radius: .9rem .9rem .9rem .2rem; background: var(--soft); color: var(--text); }
.chat-note { align-self: center; padding: .1rem .6rem; border-radius: 1rem; background: var(--accent-soft); color: var(--accent); font-size: .75rem; font-weight: 600; }
/* A window of fixed height onto the chat, newest line at the bottom; older lines slide out at the top, faded.
   public/chat.js plays it once it scrolls into view, an AI line first showing three dots. Without the script,
   or with reduced motion, the window shows the end of the chat. */
.bubbles { justify-content: flex-end; height: 11rem; overflow: hidden; mask-image: linear-gradient(transparent, #000 2.5rem); }
.bubbles.play > :not(.on) { display: none; }
.bubbles.play > .on { animation: bubble-in .6s ease-out; }
@keyframes bubble-in { from { opacity: 0; transform: translateY(.4rem); } }
.bubble { position: relative; }
.bubble.typing > span { visibility: hidden; }
.bubble.typing::after { content: '•••'; position: absolute; left: .7rem; top: .4rem; letter-spacing: .15em; animation: typing 1s infinite; }
@keyframes typing { 50% { opacity: .3; } }
/* The AI box on a soft green ground; the AI's lines and the note turn white so they still stand out. */
.ai-box { border-color: transparent; background: var(--accent-soft); }
.ai-box .bubble.ai, .ai-box .chat-note { background: var(--surface); }
/* Until anyone has listings, our own ad holds the top list's place: green like the hero, a white button. */
.self-ad { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.mini.self-ad .mini-head, .mini.self-ad .mini-head h2 { color: inherit; }
.self-ad .self-ad-big { margin: .25rem 0 .75rem; font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.self-ad .button { background: var(--on-accent); color: var(--accent); }
@media (prefers-color-scheme: dark) { .self-ad { background: var(--accent-soft); color: var(--text); } }
.hero-kicker { margin: 0 0 .5rem; font-size: .875rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hero-head { max-width: 14ch; margin: 0 0 1.25rem; font-size: clamp(2.2rem, 8vw, 4.25rem); line-height: 1.08; letter-spacing: -.035em; }
.bigsearch { display: flex; gap: .5rem; max-width: 38rem; margin: 0 0 1.25rem; }
.bigsearch input { flex: 1; min-height: 3rem; margin: 0; border-color: transparent; font-size: 1.0625rem; }
.bigsearch button { flex: none; width: auto; margin: 0; background: var(--on-accent); color: var(--accent); }
/* The hero's right side (owner 20 Nov 2026): a photo of a smiling woman, one of three heroes rotated as a test
   (public/hero.js counts it). A, the main one: the photo fills the right side out to the edges, a straight cut.
   B: framed, the newest listing on a small white card over its corner. C: in an arch, the live count at its foot.
   On a phone there is no photo: the hero is the text and the search. */
.hero-grid { display: grid; gap: 1.5rem; }
.hero-grid .bigsearch { margin-bottom: 0; }
.hero-sell { margin: .9rem 0 0; font-size: .9375rem; opacity: .9; }
.hero-sell a { color: inherit; font-weight: 600; }
.hero-photo { display: none; position: relative; }
.hero-photo > img { display: block; width: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) 20rem; gap: 3rem; align-items: center; }
  .hero-photo { display: block; }
  .hero-a { display: grid; align-content: center; min-height: 25rem; overflow: hidden; }
  .hero-a .hero-grid { grid-template-columns: 54%; }
  .hero-a .hero-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 40%; }
  .hero-a .hero-photo > img { height: 100%; object-position: 42% 30%; }
  .hero-c .hero-grid { grid-template-columns: minmax(0, 1fr) 17.5rem; }
}
.hero-b .hero-photo > img { aspect-ratio: 1 / 1.08; object-position: 50% 25%; border-radius: .75rem; }
.hero-pin {
  position: absolute; left: -3rem; bottom: 1.25rem; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: .7rem; align-items: center;
  width: 15.5rem; padding: .65rem .8rem; border-radius: .6rem; background: var(--surface); color: var(--text); text-decoration: none;
  box-shadow: 0 .75rem 2rem rgb(0 0 0 / .22);
}
.hero-pin img { width: 3rem; height: 3rem; object-fit: cover; border: 1px solid var(--line); border-radius: .4rem; }
.hero-pin > span > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-pin small { color: var(--muted); font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hero-pin span span { font-size: .875rem; }
.hero-pin:hover span span, .hero-pin:focus-visible span span { color: var(--accent); text-decoration: underline; }
.hero-pin strong { font-size: .9375rem; }
.hero-c .hero-photo { padding-bottom: .9rem; }
.hero-c .hero-photo > img { aspect-ratio: 5 / 6; object-position: 50% 20%; border-radius: 999px 999px .75rem .75rem; }
.hero-count {
  position: absolute; left: 50%; bottom: 0; display: flex; gap: .5rem; align-items: center; padding: .45rem .95rem; transform: translateX(-50%);
  border-radius: 999px; background: var(--surface); color: var(--text); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / .18);
  font-size: .875rem; font-weight: 600; white-space: nowrap;
}
.hero-count::before { content: ''; width: .5rem; height: .5rem; border-radius: 50%; background: #2fa36b; }

/* The main categories in one card on a soft surface, a thin green line icon over each name, six to a row
   (variant A of five, chosen 17 Nov 2026). On a phone all of them show, smaller, three to a row, no scrolling (17 Nov 2026). */
.markets-card { margin: 1.5rem 0 0; padding: .5rem; border-radius: .75rem; background: var(--soft); }
.markets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .25rem; }
.market {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .9rem .5rem; border-radius: .5rem;
  color: var(--text); font-size: .875rem; font-weight: 500; line-height: 1.3; text-align: center; text-decoration: none;
}
.market:hover { background: var(--surface); }
.market-icon { display: grid; color: var(--accent); }
.market-icon svg { width: 40px; height: 40px; stroke-width: 1.25; }
@media (max-width: 559px) {
  .markets { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .market { gap: .3rem; padding: .55rem .25rem; font-size: .75rem; }
  .market-icon svg { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: no-preference) { .market { transition: background .15s; } }

/* finn.no's price beside ours, as till receipts with a torn, zigzag bottom edge. */
.receipts { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); margin: 0; padding: 0; list-style: none; }
.receipts a {
  --tooth: 14px;
  display: flex; flex-direction: column; gap: .35rem; height: 100%; padding: 1.25rem 1.25rem 2rem;
  background: var(--soft); color: var(--text); text-decoration: none;
  font: .9375rem/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--tooth) 100%;
}
/* The mask would cut an outline on the outside, so the focus ring sits inside. */
.receipts a:focus-visible { outline-offset: -10px; }
.receipt-name { margin-bottom: .5rem; font: 700 1.1875rem/1.2 var(--display); }
.receipt-line { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.receipt-line s { color: var(--muted); }
.receipt-line strong { color: var(--accent); }
.receipt-cta { margin-top: auto; padding-top: .75rem; color: var(--accent); font-weight: 700; }
.receipt-cta::after { content: " →"; }
.receipts a:hover .receipt-cta { text-decoration: underline; }

.filters { margin: 1rem 0 1.5rem; padding: .5rem 1rem 1rem; border-radius: .75rem; background: var(--soft); }
.filters .field, .filters fieldset { margin: .5rem 0; }
.filters fieldset { padding: 0; border: 0; }
.filters legend { margin: 0; font-size: inherit; }
.checks { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.actions { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 .5rem; }
.actions button { margin: 0; }
.actions a { flex: none; }
.filters details { max-width: none; border: 0; }
.filters summary { padding: .5rem 0; color: var(--accent); }
/* Wide: the search field and the button share a row, and the opened filters sit side by side under them. */
@media (min-width: 860px) {
  .filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 1.5rem; align-items: end; }
  .filters details { grid-column: 1 / -1; order: 1; }
  .filters details[open] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.5rem; align-items: end; }
  .filters summary { grid-column: 1 / -1; }
}

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem .9rem; margin: 1.5rem 0; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* The front page's twelve newest listings: four by three, and three to a row on a phone. The cards are small,
   so on a phone the title gets two lines, the details are left to the listing, and the price and the heart shrink. */
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem .75rem; }
.grid.four .ad h3 { font-size: .9375rem; }
@media (max-width: 559px) {
  .grid.four { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem .5rem; }
  .grid.four .ad h3 {
    display: -webkit-box; overflow: hidden; font-size: .8125rem;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  }
  .grid.four .ad-text { margin-top: .45rem; }
  .grid.four .meta { display: none; }
  .grid.four .tag { font-size: .875rem; }
  .grid.four .fav { top: 4px; right: 4px; width: 32px; height: 32px; font-size: 1rem; }
}
.ad { position: relative; }
/* A job ad's logo, or the first letter of the employer. In a grid of listings it fills the photo's place. */
.job-logo {
  display: grid; place-items: center; aspect-ratio: 1; overflow: hidden;
  border: 1px solid var(--line); border-radius: 6px; background: var(--surface);
  color: var(--accent); font-weight: 700; font-size: 1.75rem;
}
.job-logo img { width: 100%; height: 100%; object-fit: contain; }
/* The start of the ad's text belongs to the job list; in a grid the card is as short as the others. */
.job-snippet { display: none; }
/* Jobb: finn.no's job list. One row per ad: a logo box, the title, the employer, place and date, the facts,
   the start of the text, the badge, and the heart. */
.job-list .grid.jobs { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 0 1rem; }
.job-list .grid.jobs .ad {
  display: grid; grid-template-columns: 80px minmax(0, 1fr); column-gap: 1rem;
  padding: 1.1rem 2.5rem 1.1rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none;
}
.job-list .grid.jobs .job-logo { width: 80px; height: 80px; }
.job-list .grid.jobs .ad-text { grid-column: 2; min-width: 0; margin-top: 0; align-self: start; }
.job-list .grid.jobs h3 { margin: 0 0 .2rem; font-size: 1.0625rem; line-height: 1.3; }
.job-list .grid.jobs .meta { font-size: .9375rem; }
.job-list .grid.jobs .job-employer { font-weight: 600; }
.job-list .grid.jobs .job-facts { margin-top: .25rem; }
.job-list .grid.jobs .job-snippet {
  display: -webkit-box; margin: .35rem 0 0; overflow: hidden; color: var(--muted); font-size: .9375rem;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
.job-list .grid.jobs .job-badge { margin: .5rem 0 0; }
.job-list .grid.jobs .job-badge span {
  display: inline-block; padding: .15rem .5rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent);
  font-size: .8125rem; font-weight: 600;
}
.job-list .grid.jobs .fav { top: 1rem; right: 0; }
@media (max-width: 759px) {
  .job-list .grid.jobs .ad { grid-template-columns: 64px minmax(0, 1fr); padding-right: 2.5rem; }
  .job-list .grid.jobs .job-logo { width: 64px; height: 64px; font-size: 1.375rem; }
  .job-list .grid.jobs h3 { font-size: 1rem; }
}
/* The frame keeps a product photo on a white background from floating on the white page. */
.ph { position: relative; display: grid; place-items: center; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 6px; }
/* Behind a photo that does not fill its box, and behind the emoji: one calm tone (a tint per category until 19 Nov 2026). */
.ph, .post-photos { background: var(--soft); }
/* A listing with no photo shows its category's emoji, grey and faint, more a watermark than a picture. */
.emoji { font-size: clamp(40px, 9vw, 56px); line-height: 1; filter: grayscale(1); opacity: .4; }
.detail .emoji, .post-photos .emoji { font-size: clamp(64px, 16vw, 96px); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.ad-text { margin-top: .65rem; }
.ad h3 { margin: 0 0 .1rem; font-size: 1rem; line-height: 1.3; }
/* Under a price the title steps back to plain weight. */
.tag + h3 { margin-top: .1rem; font-weight: 400; }
.ad-link { color: inherit; text-decoration: none; }
/* The link covers the whole card, so the photo can be clicked too. */
.ad-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 6px; }
.ad-link:focus-visible { outline: none; }
.ad-link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 4px; }
.ad:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.meta { margin: 0; color: var(--muted); font-size: .875rem; }

/* The price: first under the photo, in the text colour, the photo left clean («Klassisk», variant A of five,
   chosen 19 Nov 2026; a yellow paper tag on the photo before). */
.tag { display: block; font: 700 1.0625rem/1.4 var(--display); }
/* On the listing's own page it stands alone under the title. */
.tag.big { display: inline-block; font-size: 1.75rem; line-height: 1.2; }

/* A listing, in finn.no's order: photos, title and price at the top, then the facts. On a phone the side column
   with the seller comes right after the price; wide, it stays in view beside everything. */
.detail { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.4rem; margin: 1rem 0; }
/* On a phone the cards of the side column are rows of their own: the seller's card after the price, then the
   facts, then the cards marked «later». */
.detail .side { display: contents; }
.ad-body { order: 1; }
.side-card.later { order: 2; }
@media (min-width: 860px) {
  .detail { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: "top side" "body side"; gap: 0 2.25rem; align-items: start; }
  .ad-top { grid-area: top; }
  .ad-body { grid-area: body; }
  /* The column scrolls with the page; the owner asked on 19 Nov 2026 that it not stay put (sticky). */
  .detail .side { grid-area: side; display: grid; gap: 1rem; }
}
.crumbs ol { display: flex; flex-wrap: wrap; gap: .25rem .4rem; margin: .5rem 0 0; padding: 0; list-style: none; font-size: .9375rem; }
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--muted); }
.ad-head { margin-top: 1.25rem; }
.ad-head h1 { margin: 0; font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
.ad-kicker, .ad-place { margin: 0; color: var(--muted); }
.ad-kicker { margin-bottom: .3rem; font-weight: 600; }
.ad-place { margin-top: .35rem; }
.ad-price { margin-top: 1rem; }
.ad-price p { margin: 0; }
.ad-price .ad-price-label { margin-bottom: .4rem; color: var(--muted); font-size: .9375rem; }
.ad-price .small { margin-top: .5rem; }
.ad-top .loan { margin-top: 1rem; border-bottom: 0; }
/* Label over value, in as many columns as fit: the key facts, and what a home costs. */
.keyinfo { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 1rem 1.5rem; max-width: none; margin: 1.25rem 0 0; }
.keyinfo div { min-width: 0; }
.keyinfo dt { margin: 0; color: var(--muted); font-size: .875rem; font-weight: 400; }
.keyinfo dd { margin: .1rem 0 0; font-weight: 700; overflow-wrap: anywhere; }
.ad-section { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.ad-section h2 { margin: 0 0 .75rem; font-size: 1.25rem; }
.ad-section .keyinfo { margin-top: 0; }
.ad-section > p:last-child { margin-bottom: 0; }
.ad-map { margin: .75rem 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.ad-map iframe { display: block; width: 100%; height: 320px; border: 0; }
/* An exact address: a red dot in the middle of a map that holds still (public/map.js). */
.ad-map.exact { position: relative; }
.ad-map.exact iframe { pointer-events: none; }
.map-dot {
  position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px;
  border: 4px solid #FFFFFF; border-radius: 50%; background: #E3211B;
  box-shadow: 0 0 0 9px rgba(227, 33, 27, .3), 0 2px 8px rgba(0, 0, 0, .5);
}
.specs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: 40rem; margin: 0; }
.specs dt, .specs dd { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.specs dt { padding-right: 1rem; color: var(--muted); font-weight: 400; }
.specs dd { font-weight: 600; overflow-wrap: anywhere; }
.checklist { columns: 12rem 3; column-gap: 1.5rem; max-width: none; margin: 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding: .25rem 0 .25rem 1.6rem; break-inside: avoid; }
.checklist li::before { content: "✓"; position: absolute; left: .1rem; color: var(--accent); font-weight: 700; }
.viewing { font-weight: 600; }
.ad-meta { margin-top: 1.75rem; color: var(--muted); font-size: .875rem; }
/* The side column: one card per subject, as finn.no's ads have them. */
.side-card { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.side-card h2 { margin: 0 0 .6rem; font-size: 1.0625rem; }
.side-card h3 { margin: 1rem 0 .5rem; font-size: .9375rem; }
.side-card > :first-child { margin-top: 0; }
.side-card > :last-child { margin-bottom: 0; }
.side-card .keyinfo { grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: .75rem 1rem; margin: 0 0 .75rem; }
.side-card .keyinfo .wide { grid-column: 1 / -1; }
.side-card .receipt-line { margin: 0; }
.side-card .row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.side-card .row input { width: 100%; }
.side-deadline { font-weight: 700; }
.side-links { margin: 0; padding: 0; list-style: none; }
.side-links li + li { margin-top: .6rem; }
.side-links .small { display: block; margin: 0; }
.side-actions { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .9375rem; }
.chat { display: grid; gap: .5rem; margin-top: 1rem; }
.chat label { font-weight: 600; }
.chat textarea { width: 100%; }
.bid { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.bid label { font-weight: 600; width: 100%; }
.bid input { flex: 1; min-width: 6rem; }
.was { color: #666; margin-left: .5rem; }
.batch { list-style: none; padding: 0; display: grid; gap: 1rem; }
.batch-item { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; align-items: start; border-bottom: 1px solid #ddd; padding-bottom: 1rem; }
.batch-item .ph { aspect-ratio: 1; }
.detail .ph { aspect-ratio: 4 / 3; border-radius: 10px; }
/* The whole photo, never cropped: a tall or wide one gets the tint round it. */
.detail .ph img { object-fit: contain; }
.detail p:first-child { margin-top: 0; }
.desc { white-space: pre-line; overflow-wrap: anywhere; }

/* The file input is see-through and fills the box: it takes clicks, dropped files and keyboard focus.
   ponytail: without listing.js a chosen file gives no visible sign. Show the input itself if that matters. */
.photo {
  position: relative; display: grid; place-items: center; max-width: 28rem; aspect-ratio: 4 / 3; overflow: hidden;
  margin: 1rem 0 .5rem; border: 2px dashed var(--muted); border-radius: 16px; background: var(--surface);
}
.photo:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.photo:has([aria-invalid="true"]) { border-color: var(--error); }
.photo input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo span { position: relative; padding: .4rem 1rem; border-radius: 999px; background: var(--surface); color: var(--accent); }

button.danger { border: 2px solid var(--error); background: none; color: var(--error); }

/* ---- Favourites and saved searches. ---- */
:root { --heart: #D23F3F; }
@media (prefers-color-scheme: dark) { :root { --heart: #F07070; } }

/* The heart sits over the card's link (z-index 1), in the top right corner of the photo. */
.fav {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center;
  width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text);
  font-size: 1.125rem; line-height: 1;
}
.fav[aria-pressed="true"] { color: var(--heart); }
.fav [data-fav-text] { color: var(--text); }
/* A ring in the surface colour inside the outline, so the focus shows on any photo. */
.fav:focus-visible { box-shadow: 0 0 0 2px var(--surface); }
/* On a listing's own page: a pill in the text, with a label after the heart. */
.fav.wide {
  position: static; display: inline-flex; align-items: center; gap: .5rem; width: auto; height: 44px; padding: 0 1.1rem;
  font-size: 1rem; font-weight: 600;
}

.alert-signup { max-width: 40rem; margin: 2rem 0; padding: 1rem; border-radius: 1rem; background: var(--soft); }
.alert-signup h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
.alert-signup button { margin-top: .5rem; }

/* ---- Accounts, conversations and extra photos. ---- */
/* A long e-mail address or name is broken instead of pushing the page sideways. This holds for every page. */
p { overflow-wrap: break-word; }

/* A conversation: the product and its photo at the top, the messages in the main column, the bid in a column of
   its own on the right, so it is never mixed into the messages. On a phone the messages come before the bid. */
.thread-page { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "side"; gap: 1.4rem; margin: 1rem 0; }
.thread-head { grid-area: head; display: flex; gap: 1rem; align-items: flex-start; }
.thread-head h1 { margin: 0 0 .5rem; }
.thread-head p { margin: .25rem 0; }
.thread-thumb { flex: none; display: block; width: 4.5rem; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.thread-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thread-body { grid-area: body; min-width: 0; }
.thread-page .side { grid-area: side; }
@media (min-width: 860px) {
  .thread-page { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); grid-template-areas: "head side" "body side"; gap: 0 2.25rem; align-items: start; }
}
/* A conversation. The shape comes from .bubble further up; mine sit to the right in the accent colour. */
.thread { display: flex; flex-direction: column; gap: .6rem; max-width: 40rem; margin: 1.5rem 0; }
/* One message with its time above it, as «Spør om annonsen» shows the time (the .ask-time style further down). */
.thread-msg { display: flex; flex-direction: column; gap: .1rem; }
.thread-msg.me { align-items: flex-end; }
.thread-msg.them { align-items: flex-start; }
.bubble.me, .bubble.them { max-width: 85%; overflow-wrap: anywhere; }
.bubble.me {
  margin-left: auto; border-color: var(--accent); border-radius: 1rem 1rem .25rem 1rem;
  background: var(--accent); color: var(--on-accent);
}
.bubble.them { background: var(--surface); }
.bubble .desc { margin: 0; }
.bubble.me .small { color: inherit; }
/* Read by screen readers only: who wrote the message. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Square thumbnails. On the photo page each one has its remove button under it. */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; max-width: 40rem; margin: 1rem 0; }
.gallery a, .gallery img { display: block; }
.gallery img { width: 100%; aspect-ratio: 1; border-radius: .5rem; object-fit: cover; }
/* Narrow padding, so the button fits under a thumbnail on a phone. */
.gallery button { min-height: 44px; margin: .5rem 0 0; padding: .25rem; font-size: .9375rem; }

/* Min side: one row per listing, conversation or alert, with its link to the right. */
.rows { max-width: 40rem; margin: 1rem 0; padding: 0; list-style: none; }
.rows li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .75rem 0; }
.rows li + li { border-top: 1px solid var(--line); }
.rows div { min-width: 0; overflow-wrap: anywhere; }
.rows li > a { flex: none; }
.rows p { margin: .25rem 0 0; }
.bank-offers li { margin-inline: -.75rem; padding-inline: .75rem; border-radius: .5rem; transition: background-color .15s; }
.bank-offers li:hover { background: var(--soft); }

/* Trygg betaling */
.ratings { list-style: none; padding: 0; margin: 0 0 1rem; }
.ratings li { margin: .25rem 0; }
.quotes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); max-width: 40rem; }
.quotes h2 { margin: 0 0 .5rem; font-size: 1rem; }
.quote { border-collapse: collapse; width: 100%; max-width: 24rem; margin: .5rem 0 1rem; }
.quote td, .quote th { padding: .3rem 0; border-bottom: 1px solid var(--line); text-align: left; }
.quote td:last-child, .quote th:last-child { text-align: right; }
button.secondary { background: var(--surface); color: inherit; border: 2px solid var(--line); }

/* ---- The feed: the listings one under the other, each as a post, the way people know it from Instagram. ---- */
.feed { max-width: 30rem; margin: 1.5rem auto; }
.post { margin-bottom: 1.25rem; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.post-head { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; }
.post-head p { min-width: 0; margin: 0; line-height: 1.3; }
.post-head a { color: inherit; font-weight: 700; text-decoration: none; }
.avatar { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; font-weight: 700; }
.post-media { position: relative; }
/* The photos stand side by side and snap into place, so a finger swipes through them with no script. */
.post-photos {
  display: flex; aspect-ratio: 1; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; touch-action: manipulation;
}
.post-photos::-webkit-scrollbar { display: none; }
.post-photos > * { flex: none; width: 100%; height: 100%; scroll-snap-align: start; }
.post-photos img { object-fit: cover; }
.post-photos .emoji { display: grid; place-items: center; }
@media (prefers-reduced-motion: no-preference) { .post-photos { scroll-behavior: smooth; } }
/* Added by feed.js when a post has several photos: a dot for each, and arrows where there is a mouse. */
.post-dots { position: absolute; inset: auto 0 .6rem; display: flex; justify-content: center; gap: .3rem; pointer-events: none; }
.post-dots i { width: .4rem; height: .4rem; border-radius: 50%; background: rgb(255 255 255 / .55); box-shadow: 0 0 2px rgb(0 0 0 / .5); }
.post-dots .on { background: #fff; }
.post-step {
  position: absolute; top: 50%; width: 2rem; height: 2rem; min-height: 0; margin: -1rem 0 0; padding: 0;
  border-radius: 50%; background: rgb(255 255 255 / .85); color: #111; line-height: 1;
}
.post-step.prev { left: .5rem; }
.post-step.next { right: .5rem; }
@media (hover: none) { .post-step { display: none; } }
.post-actions { display: flex; align-items: center; padding: .15rem .25rem 0; }
.icon {
  display: grid; place-items: center; width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0;
  border-radius: 50%; background: none; color: var(--text);
}
.icon[hidden] { display: none; }
.icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon[aria-pressed="true"] { color: var(--heart); }
.icon[aria-pressed="true"] svg { fill: currentColor; }
.post-body { padding: 0 .75rem .75rem; }
.post-body p { margin: .15rem 0; }
.post-body h3 { font-size: 1rem; }
.post-body h3 a { color: inherit; text-decoration: none; }
.post-price { font-weight: 700; }
/* On a phone the posts go out to the screen edges. */
@media (max-width: 32rem) {
  .feed { margin-inline: -1rem; }
  .post { border-inline: 0; border-radius: 0; }
}

/* /forslag: the vote button sits where the other row lists have their link; the one you voted for is filled. */
.suggestions button { width: auto; min-width: 4rem; min-height: 44px; margin: .5rem 0 0; padding: .25rem 1rem; white-space: nowrap; }
.suggestions [aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.comments { margin-top: 1.5rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.comment { border-top: 1px solid var(--line); padding: .5rem 0; }
.comment .desc { margin: .25rem 0; }
.comment.by-seller { background: var(--soft); border-left: 3px solid var(--accent); padding-left: .5rem; padding-right: .5rem; }
.comment-actions { display: flex; gap: .75rem; align-items: baseline; }
.comment-actions form { margin: 0; }
button.link { display: inline; width: auto; min-height: 0; margin: 0; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; font-weight: normal; }
.seller-mark { font-size: .8125rem; font-weight: 600; color: var(--accent); border: 1px solid var(--accent); border-radius: .25rem; padding: 0 .3rem; }

/* ---- The photo viewer (public/viewer.js), as on finn.no: always dark, whatever the theme. ---- */
.viewer {
  width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0;
  border: 0; background: #1c1b20; color: #fff;
}
.viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.viewer::backdrop { background: #1c1b20; }
.viewer button { width: auto; min-height: 44px; margin: 0; border: 0; border-radius: 0; background: none; color: inherit; cursor: pointer; }
.viewer-bar { display: flex; align-items: center; gap: .5rem; padding: .25rem 1rem; }
.viewer-tabs { display: flex; flex: 1; gap: 1.5rem; overflow-x: auto; }
.viewer-tabs button { padding: .5rem 0; border-bottom: 3px solid transparent; color: #c9c6cf; font: inherit; font-weight: 600; }
.viewer-tabs [aria-pressed="true"] { border-color: #fff; color: #fff; }
.viewer .viewer-icon { display: grid; place-items: center; width: 44px; padding: 0; border-radius: 50%; background: #3a3940; }
.viewer svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viewer-body { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 1rem; min-height: 0; padding: 0 1rem 1rem; }
.viewer-thumbs { display: flex; flex-direction: column; gap: .75rem; overflow-y: auto; padding-right: .75rem; border-right: 1px dashed #55535c; }
.viewer-thumbs button { flex: none; padding: 0; border: 2px solid transparent; border-radius: .5rem; }
.viewer-thumbs [aria-current="true"] { border-color: #fff; }
.viewer-thumbs img { display: block; width: 100%; aspect-ratio: 3 / 2; border-radius: .35rem; object-fit: cover; }
.viewer-stage { position: relative; margin: 0; border-radius: .75rem; background: #000; overflow: hidden; }
.viewer-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer .viewer-arrow {
  position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center;
  width: 44px; padding: 0; border-radius: 50%; background: rgb(40 39 45 / .8);
}
.viewer-prev { left: 1rem; }
.viewer-next { right: 1rem; }
.viewer-caption, .viewer-count { position: absolute; bottom: 1rem; margin: 0; padding: .35rem .6rem; border-radius: .25rem; background: rgb(40 39 45 / .85); }
.viewer-caption { left: 1rem; max-width: calc(100% - 7rem); }
.viewer-count { right: 1rem; }
@media (max-width: 47.99rem) {
  .viewer-body { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .viewer-thumbs { display: none; }
  .viewer-stage { border-radius: 0; }
}
/* The admin panel. */
.admin-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 1rem; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { text-align: left; padding: .25rem .5rem; border-bottom: 1px solid var(--line); }
.ai-costs { font-size: .95rem; }
.ai-costs th, .ai-costs td { vertical-align: top; }
.ai-costs ul { margin: 0; padding-left: 1rem; }
.ai-costs label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ai-costs th .small { font-weight: normal; }
.ai-costs td { white-space: nowrap; }
.ai-costs td.small, .ai-costs td:nth-child(2) { white-space: normal; }
input.ai-cap { width: 5.5rem; display: inline-block; margin: 0; }
@media (max-width: 700px) {
  .ai-costs thead { display: none; }
  .ai-costs tr { display: block; padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .ai-costs th, .ai-costs td { display: block; border: 0; }
  .ai-costs td[data-label]:not(:empty)::before { content: attr(data-label) ': '; font-weight: 600; }
}
.admin-table th a { color: inherit; }
.admin-scroll .admin-table th, .admin-scroll .admin-table td { white-space: nowrap; }
/* A wide admin table scrolls sideways on its own, so the page does not. */
.admin-scroll { overflow-x: auto; }

/* The front page's «Populære» / «Nyeste» switch, beside the heading. */
.tabs-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.tabs { display: flex; gap: .5rem; }

/* Google's sign-in button, as its branding guidelines draw it: white, grey border, the four-colour G. */
.gsi { display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border: 1px solid #747775; border-radius: 4px; background: #fff; color: #1f1f1f; font: 500 14px/1 Roboto, Arial, sans-serif; text-decoration: none; }
.gsi:hover { background: #f8f9fa; box-shadow: 0 1px 2px rgb(60 64 67 / .3); }
.gsi:focus-visible { outline: 2px solid #4285f4; outline-offset: 2px; }

/* ---- Min side: a head with the address, then a card per part, after finn.no/my-page (17 Nov 2026). ---- */
.account-head { display: flex; align-items: center; gap: 1rem; margin: 0 0 1.5rem; }
.account-head p { flex: 1; max-width: none; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.account-head form { margin: 0; }
.account-head button { margin: 0; padding: .4rem .9rem; border: 1px solid var(--frame); background: var(--surface); color: var(--text); font-size: .875rem; }
.account-head button:hover { border-color: var(--accent); }
.avatar {
  display: grid; place-items: center; flex: none; width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 1.5rem; font-weight: 700;
}
.hub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 0 0 2.5rem; }
.hub-card {
  display: flex; flex-direction: column; gap: .35rem; min-height: 10rem; padding: 1.5rem; border-radius: .75rem;
  background: var(--surface); color: var(--text); text-decoration: none; line-height: 1.35;
  box-shadow: 0 0 0 1px var(--frame), 0 2px 6px rgb(0 0 0 / .06); transition: box-shadow .15s;
}
.hub-card:hover { box-shadow: 0 0 0 1px var(--accent), 0 4px 12px rgb(0 0 0 / .1); }
.hub-card strong { margin-top: .5rem; font-size: 1.25rem; }
.hub-card span { color: var(--muted); }
.hub-icon { display: grid; color: var(--accent) !important; }
.hub-count { margin-top: auto; padding-top: .5rem; font-size: .875rem; font-weight: 600; color: var(--accent) !important; }
#annonser, #meldinger, #varsler, #bedrift, #ai { scroll-margin-top: 1rem; }
@media (max-width: 759px) { .hub { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; } .hub-card { padding: 1rem; min-height: 0; } }
@media (max-width: 419px) { .hub { grid-template-columns: 1fr; } }

/* A course's sign-up box on its page (src/courses.ts). */
.signup { margin: 1rem 0; padding: 1rem; border-radius: 1rem; background: var(--soft); }
.signup h2 { margin-top: 0; font-size: 1.125rem; }
.signups { padding-left: 1.25rem; }
.signups li { margin: .25rem 0; }

/* The map in the listing form where a course's place is clicked (public/pick.js). */
.map-pick { margin: .5rem 0 0; }
.map-pick-view { position: relative; height: 280px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); cursor: crosshair; touch-action: none; }
.map-pick-tiles img { position: absolute; width: 256px; height: 256px; user-select: none; }
.map-pick-pin { position: absolute; width: 18px; height: 18px; margin: -18px 0 0 -9px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; background: var(--accent); transform: rotate(-45deg); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); pointer-events: none; }
.map-pick-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: .35rem; }
.map-pick-bar [data-zoom] { min-width: 2rem; font-size: 1.25rem; font-weight: 700; }
.map-pick-bar .small { margin-left: auto; }
.attr.online-only { display: none; }

/* «Spør om annonsen» in the side column (public/ask.js). */
/* «Spør om annonsen»: a chat the seller's wiki answers from. It is its own panel, marked with the accent colour so
   it is not taken for the seller's message box below it, and tall enough that an answer is read without scrolling. */
.ask-box { margin: 1rem 0 1.25rem; padding: 0; overflow: hidden; border: 2px solid var(--accent); border-radius: 1rem; background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .10); }
.ask-head { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; background: var(--accent); color: var(--on-accent); }
.ask-head h2 { margin: 0; font-size: 1.1875rem; }
/* The listing's name is shown in the heading only when the chat is a window of its own, where the ad is not around it. */
.ask-title { display: none; }
.ask-box[data-max] .ask-title { display: inline; }
.ask-box[data-max] .ask-sub { display: none; }
.ask-sub { margin: .1rem 0 0; font-size: .875rem; opacity: .9; }
.ask-badge { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: .6rem; background: color-mix(in srgb, var(--on-accent) 18%, transparent); }
.ask-badge svg { width: 1.25rem; height: 1.25rem; }
/* «Maksimer» sits in the head and is shown by public/ask.js: without the script there is no window to open. */
.ask-max { display: grid; place-items: center; flex: none; width: 2.25rem; max-width: none; height: 2.25rem; min-height: 0; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: .5rem; background: transparent; color: inherit; cursor: pointer; }
.ask-max[hidden] { display: none; }
.ask-max:hover, .ask-max:focus-visible { background: color-mix(in srgb, var(--on-accent) 20%, transparent); }
.ask-max-close { display: none; }
.ask-box[data-max] .ask-max-open { display: none; }
.ask-box[data-max] .ask-max-close { display: block; }
/* The whole chat as one window over the page, the log filling whatever height is left. Escape or the same button closes it. */
body.ask-maxed { overflow: hidden; }
body.ask-maxed::before { content: ''; position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); }
.ask-box[data-max] { position: fixed; inset: 1rem; z-index: 61; display: flex; flex-direction: column; margin: 0; max-width: none; }
.ask-box[data-max] .ask-body { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.ask-box[data-max] .ask-log { flex: 1; min-height: 0; max-height: none; }
@media (max-width: 600px) {
  .ask-box[data-max] { inset: 0; border: 0; border-radius: 0; }
}
.ask-body { display: grid; gap: .5rem; padding: .75rem 1rem 1rem; }
.ask-body > .small { margin: 0; }
.ask-suggest { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.ask-suggest .chip { width: auto; margin: 0; padding: .3rem .75rem; font-size: .8125rem; }
.ask-log { display: flex; flex-direction: column; gap: .4rem; min-height: 16rem; max-height: 30rem; padding: .75rem; overflow-y: auto; border: 1px solid var(--line); border-radius: .75rem; background: var(--bg); }
/* A message with the time it was sent under it: the question to the right, the answer to the left. */
.ask-msg { display: flex; flex-direction: column; gap: .1rem; }
.ask-msg-q { align-items: flex-end; }
.ask-msg-a { align-items: flex-start; }
.ask-time { padding: 0 .25rem; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
/* Before the first question: a bubble in the empty window, so it reads as a chat and not as a broken box. */
.ask-empty { display: grid; place-items: center; gap: .4rem; margin: auto; padding: .5rem; color: var(--muted); font-size: .9375rem; text-align: center; }
.ask-empty svg { width: 2.25rem; height: 2.25rem; opacity: .5; }
.ask-log p { margin: 0; padding: .5rem .75rem; border-radius: .75rem; }
.ask-q { align-self: flex-end; max-width: 85%; background: var(--accent); color: var(--on-accent); }
.ask-a { align-self: flex-start; max-width: 95%; background: var(--surface); border: 1px solid var(--line); }
.ask-a.muted { color: var(--muted); }
/* The question on its own line, the button under it, so the text has the whole width of the column. */
.ask-form { display: flex; flex-direction: column; gap: .5rem; margin: 0; }
.ask-form input { width: 100%; margin: 0; }
.ask-form button { align-self: flex-end; width: auto; margin: 0; padding-inline: 1.5rem; }
/* In the window of its own there is room for the button beside the field, as in a chat. */
.ask-box[data-max] .ask-form { flex-direction: row; align-items: center; }
.ask-box[data-max] .ask-form button { align-self: auto; }
.ask-login { margin: 0; font-size: .875rem; }
.ask-login a { font-weight: 600; }
.ask-link a { font-weight: 600; }
/* Min side: the wiki a listing's chat answers from, picked in the same row as «Endre». */
.row-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.wiki-pick { display: flex; gap: .4rem; align-items: center; margin: 0; }
.wiki-pick select { width: auto; max-width: 12rem; margin: 0; padding: .3rem .5rem; font-size: .875rem; }
.wiki-pick button { width: auto; min-height: 0; margin: 0; padding: .3rem .7rem; font-size: .875rem; }
.ask-link { margin: 0 0 .25rem; font-size: .875rem; }
/* A job ad's facts under the title: pills with what the ad and Enhetsregisteret say. */
.fact-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 0; padding: 0; list-style: none; }
.fact-chips li { padding: .2rem .65rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .875rem; }

/* The list page: the filters sit in a left sidebar, the listings to the right. On a phone they stay above the list. */
.list-layout { display: grid; gap: 1.5rem; margin-top: 1rem; }
.list-main { min-width: 0; }
@media (min-width: 900px) {
  /* finn.no's proportions at every width (owner, 24 Nov 2026): 160 : 17 : 337 px, the filters a third. */
  .list-layout { grid-template-columns: minmax(0, 160fr) minmax(0, 337fr); column-gap: 3.3%; align-items: start; }
  .list-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; }
  /* Kurs shows the whole column and scrolls with the page (owner, 23 Nov 2026). */
  .list-side.whole { position: static; max-height: none; overflow: visible; }
}
/* The form was made for the full width of the page; in the sidebar its fields sit one under another. */
.list-side .filters { display: block; margin: 0; padding: .75rem 1.15rem 1rem; }
.list-side .filters details[open] { display: block; }
.list-side .filters .row { grid-template-columns: 1fr; }
.list-side .filters details { margin-top: .25rem; }
.list-side .filters .field:first-of-type { margin-top: 0; }

/* The heading sits in the sidebar, so the listings can start at the top of the page. */
.side-head { padding: 1rem 1.15rem 0; }
.side-head h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.1; }
.side-head .small { margin: .3rem 0 .5rem; }
.side-head .button { margin: .5rem 0 .25rem; }
.side-head > p:last-child { margin-top: .25rem; }

/* The category tree: links, not filters. The current category and subcategory are marked. */
.side-cats { margin: 0; padding: 0 1.15rem .9rem; border-bottom: 1px solid var(--line); }
.side-cats > summary { padding: .6rem 0; font-weight: 600; cursor: pointer; color: var(--text); }
.side-cats ul { margin: 0; padding: 0; list-style: none; }
.side-cats li { margin: .1rem 0; }
.side-cats a {
  display: flex; justify-content: space-between; gap: .6rem; align-items: baseline;
  padding: .3rem .45rem; border-radius: .5rem; color: inherit; text-decoration: none;
}
.side-cats a:hover { background: var(--soft); }
.side-cats a[aria-current="page"] { background: var(--soft); font-weight: 600; }
.side-cats .n { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }

/* One folded section per filter, as finn.no's searches have them: a count on each box. */
.filters .facet-group { border-top: 1px solid var(--line); }
.filters .facet-group > summary { padding: .55rem 0; font-weight: 600; cursor: pointer; color: var(--text); }
.filters .facet-group .checks { flex-direction: column; flex-wrap: nowrap; gap: .15rem; padding: 0 0 .6rem .1rem; }
.filters .facet-group .checks .check { display: flex; gap: .5rem; align-items: flex-start; }
.filters .facet-group .checks.tall { max-height: 17rem; overflow-y: auto; }
.filters .facet-group .row { margin: .2rem 0 .6rem; }
.filters .facet-group .field { margin: .4rem 0; }

@media (max-width: 899px) {
  .list-side { margin-bottom: .5rem; }
  .side-cats > summary, .filters .facet-group > summary { padding: .7rem 0; }
}

/* «Vis alle» under the long job filter lists (Stilling, Bransje). */
.job-filters .more { margin: 0 0 .5rem; }
.job-filters .more > summary { padding: .25rem 0; font-size: .875rem; font-weight: 600; cursor: pointer; }

/* finn.no's pager under a job search. */
.pager { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 1.5rem 0 .5rem; }
.pager a, .pager span {
  min-width: 2.25rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 8px;
  text-align: center; text-decoration: none;
}
.pager span[aria-current="page"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 600; }

/* Jobb's own front page (/jobb), after finn.no/job (owner, 23 Nov 2026). The top is the front page's hero in the
   soft green: the search with «Alle stillinger» beside it, then shortcuts with counts. On a phone the two fields
   are rows of their own and the two buttons share the last one. */
.job-hero { background: var(--accent-soft); color: var(--text); }
.job-hero .hero-kicker { color: var(--accent); }
.job-hero .hero-head { max-width: none; margin-bottom: .5rem; font-size: clamp(2rem, 6vw, 3.25rem); }
.job-lead { margin: 0 0 1.25rem; font-size: 1.0625rem; }
.job-search { flex-wrap: wrap; max-width: 52rem; margin-bottom: 0; }
.job-search input { flex: 1 1 100%; border-color: var(--line); }
.job-search button, .job-search .button { flex: 1 1 0; width: auto; max-width: none; margin: 0; white-space: nowrap; }
.job-search button { background: var(--accent); color: var(--on-accent); }
.job-search .button { border: 1px solid var(--accent); background: var(--surface); color: var(--accent); }
@media (min-width: 640px) {
  .job-search input { flex: 2 1 12rem; }
  .job-search #job-omrade { flex-grow: 1; }
  .job-search button, .job-search .button { flex: none; }
}
.job-hero .chips { margin-bottom: 0; padding-bottom: 0; }
.chip .n, .job-families .n, .job-places .n { color: var(--muted); font-size: .8125rem; font-weight: 400; font-variant-numeric: tabular-nums; }
/* The job families in the front page's market card, the count under each name: seven to a row, four on a
   tablet, three on a phone. The drawings are made in a 64 box, so the line is wider to look as thin as the others. */
.job-families { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.job-families .market { gap: .35rem; }
.job-families .market-icon { margin-bottom: .15rem; }
.job-families .market-icon svg { stroke-width: 3.2; }
@media (max-width: 899px) { .job-families { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 559px) { .job-families { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The newest ads as cards, three to a row as finn.no's recommendations: a small logo box, the title, the employer,
   place and date, and the start of the text. */
.job-front .tabs-head { align-items: baseline; }
.job-front .grid.jobs { grid-template-columns: minmax(0, 1fr); gap: .75rem; margin: 0; }
@media (min-width: 640px) { .job-front .grid.jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .job-front .grid.jobs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Nine ads fill three rows of three; two to a row, the ninth would sit alone, and a phone shows six under each other. */
@media (min-width: 640px) and (max-width: 999.98px) { .job-front .grid.jobs .ad:nth-child(9) { display: none; } }
@media (max-width: 639.98px) { .job-front .grid.jobs .ad:nth-child(n+7) { display: none; } }
.job-front .grid.jobs .ad {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: .85rem; align-content: start;
  padding: 1rem 3rem 1rem 1rem; border: 1px solid var(--line); border-radius: .5rem;
}
.job-front .grid.jobs .ad:hover { border-color: var(--accent); }
.job-front .grid.jobs .job-logo { width: 48px; height: 48px; font-size: 1.25rem; }
.job-front .grid.jobs .ad-text { min-width: 0; margin-top: 0; }
.job-front .grid.jobs .job-employer { color: var(--text); font-weight: 600; }
.job-front .grid.jobs .job-facts, .job-front .grid.jobs .job-badge { display: none; }
.job-front .grid.jobs .job-snippet {
  display: -webkit-box; margin: .4rem 0 0; overflow: hidden; color: var(--muted); font-size: .875rem;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
/* The counties, as finn.no's «Steder»: a list in columns, the count at the right of each. */
.job-places { columns: 2; column-gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .job-places { columns: 3; } }
@media (min-width: 960px) { .job-places { columns: 4; } }
.job-places li { break-inside: avoid; }
.job-places a {
  display: flex; justify-content: space-between; gap: .6rem; align-items: baseline;
  padding: .4rem .5rem; border-radius: .5rem; color: inherit; text-decoration: none;
}
.job-places a:hover { background: var(--soft); }
