:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-tint: #eff6ff;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  /* Denne grå er AA på både hvid og tonet blå flade. */
  --text-muted: #5f6b7a;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --positive: #047857;
  --positive-soft: #ecfdf5;
  --positive-border: #a7f3d0;
  --negative: #b91c1c;
  --negative-soft: #fef2f2;
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --radius: 12px;
  --pill-radius: 999px;
  --header-bg: rgba(255, 255, 255, .96);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, .05), 0 4px 12px rgba(15, 23, 42, .06);
  --shadow-card-hover: 0 6px 18px rgba(15, 23, 42, .10);
  --text-on-accent: #ffffff;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .55em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h2 { font-size: 1.32rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 10px; background: var(--footer-bg);
  color: var(--footer-text); font-weight: 800; font-size: .88rem; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; }
.brand-text strong { font-size: 1.05rem; }
.brand-text small { color: var(--text-muted); font-size: .74rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav-link { color: var(--text-muted); padding: 9px 12px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 8px; font-size: .93rem; }
.nav-link:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-link.is-active { color: var(--text); background: var(--bg-soft); }
.nav-cta { color: var(--text-on-accent); background: var(--accent); font-weight: 600; }
.nav-cta:hover { color: var(--text-on-accent); background: var(--accent-hover); }

main { padding: 34px 0 60px; }

.hero {
  margin: 0 0 30px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bg-tint), var(--bg-soft));
}
.hero .lead { color: var(--text-muted); }
.lead { color: var(--text-muted); font-size: 1.06rem; max-width: 68ch; }
.stats { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 22px; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: 1.65rem; color: var(--text); }
.stats span { color: var(--text-muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
.layout > *, .column, .sidebar { min-width: 0; }
@media (max-width: 940px) { .layout { grid-template-columns: minmax(0, 1fr); } .sidebar { order: 2; } }

.block {
  margin-bottom: 34px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.block:nth-of-type(even) { background: var(--bg); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.block-head h2 { margin: 0; }
.more { font-size: .88rem; white-space: nowrap; }
.page-head { margin-bottom: 26px; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: .74rem; color: var(--text-muted); margin: 0 0 6px; }
.eyebrow + h1 { margin-top: 0; }

.cards { display: grid; gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-card); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-card-hover); }
.card-meta { display: flex; justify-content: space-between; gap: 12px; font-size: .78rem; color: var(--text-muted); margin-bottom: 7px; }
.card-meta .source { color: var(--text-muted); font-weight: 600; }
.card-title { margin: 0 0 .4em; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent-hover); }
.card-summary { color: var(--text-muted); font-size: .92rem; margin: 0 0 .6em; }
.car-figure { margin: 0 0 12px; min-width: 0; }
.car-figure img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.car-figure figcaption { color: var(--text-muted); font-size: .76rem; line-height: 1.45; overflow-wrap: anywhere; }
.car-figure figcaption a { text-decoration: underline; }
.car-image-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  width: 100%; aspect-ratio: 16 / 9; margin: 0 0 12px; padding: 12px;
  overflow: hidden; border: 1px solid var(--border); border-radius: 8px;
  background: linear-gradient(145deg, var(--bg-soft), var(--bg-tint)); color: var(--text-muted);
  text-align: center;
}
.car-image-placeholder__icon { color: var(--accent); font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1; }
.car-image-placeholder__label { max-width: 100%; overflow: hidden; color: var(--text); font-size: .9rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.car-image-placeholder__note { font-size: .72rem; }
.deal-model .car-figure, .deal-model .car-image-placeholder { width: min(180px, 100%); }
.car-card { min-width: 0; }
.brand-cars { width: 100%; }
.card-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tag {
  font-size: .73rem; padding: 3px 9px; border-radius: var(--pill-radius);
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text-muted);
}
.tag-brand { color: var(--text); border-color: var(--border-strong); background: var(--bg-soft); }
.tag-price { color: var(--text); border-color: var(--border-strong); }
.tag-deal { color: var(--text); background: var(--bg-soft); border-color: var(--border-strong); font-weight: 600; }
.tag-season { color: var(--text); border-color: var(--accent); font-weight: 600; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; margin-bottom: 18px; box-shadow: var(--shadow-card);
}
.panel h2 { font-size: 1.05rem; }
.panel ul { margin: 0; padding-left: 18px; color: var(--text-muted); }
.panel li { margin-bottom: 5px; }
.sidebar .panel:first-child { margin-top: 0; }
.link-list { list-style: none; padding: 0; }
.link-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.link-list li:last-child { border-bottom: 0; }
.count { color: var(--text-muted); font-size: .85rem; }

.report-body { color: var(--text-muted); min-width: 0; overflow-x: auto; }
.report-body strong { color: var(--text); }
.report-body h3 { color: var(--text); margin-top: 1.2em; font-size: .98rem; }
.report-body table { width: 100%; border-collapse: collapse; margin: .6em 0 1em; font-size: .9rem; }
.report-body th, .report-body td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.report-body th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
.report-body ul { padding-left: 18px; }
.report-body .meta { font-size: .82rem; }
.article { max-width: 78ch; }
.meta { color: var(--text-muted); font-size: .84rem; }

.ad {
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 22px; color: var(--text-muted);
  background: var(--bg-tint);
}
.ad-house { display: flex; flex-direction: column; gap: 4px; }
.ad-house strong { color: var(--text); }
.ad-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-muted); }
.sidebar .ad { margin-bottom: 18px; }

/* Annoncer mellem tekststykker. Højden er reserveret på forhånd, så indholdet
   ikke hopper, når en rigtig annonce først indlæses — samme princip som de
   faste pladsformater på almindelige danske mediesider. */
.ad-inline { margin: 30px 0; min-height: 250px; display: flex; flex-direction: column; justify-content: center; gap: 6px; }

/* Egne artikler */
.article-head h1 { margin-bottom: .4em; }
.article-body { font-size: 1.02rem; }
.article-section { margin-bottom: 28px; }
.article-section h2 { font-size: 1.2rem; margin-bottom: .5em; }
.article-body p { margin: 0 0 1em; }
.article-body ul { margin: 0 0 1em; padding-left: 20px; }
.article-body li { margin-bottom: 6px; }
.article-body table {
  display: block; width: 100%; overflow-x: auto; border-collapse: collapse;
  margin: .4em 0 1.2em; font-size: .92rem;
}
.article-body th, .article-body td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.article-body th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
.article-sources .source-list { list-style: none; padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 18px; border-radius: 10px; border: 0;
  background: var(--accent); color: var(--text-on-accent); font-weight: 700; cursor: pointer; font-size: .95rem;
}
.btn:hover { background: var(--accent-hover); color: var(--text-on-accent); text-decoration: none; }
form label { display: block; font-size: .88rem; color: var(--text-muted); margin-bottom: 6px; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.form-row input {
  flex: 1 1 240px; min-height: 44px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: .95rem;
}
.form-row input:focus { outline: 3px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.consent { display: flex; gap: 9px; align-items: flex-start; margin: 14px 0 6px; font-size: .84rem; }
.consent input { margin-top: 4px; }
.form-status { font-size: .9rem; color: var(--positive); min-height: 1.2em; }

.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 26px 0; color: var(--text-muted); font-size: .9rem; }

footer { border-top: 1px solid var(--footer-bg); background: var(--footer-bg); color: var(--footer-text); margin-top: 40px; padding: 34px 0 18px; }
footer a { color: var(--footer-text); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--bg); }
footer a:focus-visible { outline-color: var(--footer-text); }
footer .footer-inner h4, footer .footer-inner p, footer .copyright { color: var(--footer-text); }
footer .copyright { border-color: var(--border-strong); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 26px; }
@media (max-width: 780px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-inner h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); }
.footer-inner ul { list-style: none; padding: 0; margin: 0; }
.footer-inner li { margin-bottom: 6px; }
.footer-inner p { color: var(--text-muted); font-size: .9rem; max-width: 46ch; }
.copyright { color: var(--text-muted); font-size: .82rem; padding-top: 16px; margin-top: 22px; border-top: 1px solid var(--border); }

.offer-listing { padding: 18px; }
.offer-sort { margin: 0 0 14px; color: var(--text-muted); font-size: .86rem; }
.offer-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px;
  list-style: none; margin: 0; padding: 0;
}
.offer-grid > li { min-width: 0; }
@media (min-width: 640px) { .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .offer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.offer-card {
  display: flex; flex-direction: column; min-width: 0; height: 100%; padding: 16px;
  overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.offer-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.offer-card .car-figure { margin: 0 0 14px; }
.offer-card .car-figure img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover;
}
.offer-card .car-image-placeholder { width: 100%; height: auto; aspect-ratio: 16 / 9; margin: 0 0 14px; object-fit: cover; }
.offer-title { display: flex; flex-direction: column; min-width: 0; margin: 0 0 8px; }
.offer-title span { color: var(--text-muted); font-size: .82rem; font-weight: 600; }
.offer-title strong { overflow-wrap: anywhere; font-size: 1.18rem; }
.offer-price { margin: 0 0 14px; font-size: 1.9rem; font-weight: 800; line-height: 1.15; }
.offer-price span { margin-left: 4px; color: var(--text-muted); font-size: .48em; font-weight: 500; }
.offer-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  margin: 0 0 14px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.offer-facts div { min-width: 0; }
.offer-facts dt { color: var(--text-muted); font-size: .72rem; line-height: 1.35; }
.offer-facts dd { margin: 3px 0 0; font-size: .83rem; font-weight: 650; overflow-wrap: anywhere; }
.offer-provider { margin: 0 0 10px; color: var(--text-muted); font-size: .86rem; }
.offer-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
  margin-top: auto; padding: 10px 14px; border-radius: 8px;
  background: var(--accent); color: var(--bg);
  font-size: .92rem; font-weight: 600; letter-spacing: .01em; text-align: center;
}
.offer-link:hover { background: var(--accent-hover); color: var(--bg); text-decoration: none; }
.offer-credit { margin: 12px 0 0; color: var(--text-muted); font-size: .68rem; line-height: 1.4; }
.offer-credit a { display: inline; min-height: 0; text-decoration: underline; }
.card-deal .deal-price-big { font-size: 1.65rem; font-weight: 800; color: var(--text); margin: .2em 0 .6em; }
.card-deal .deal-price-big span { font-size: .6em; color: var(--text-muted); font-weight: 400; }
.card-deal { border-color: var(--border-strong); }
.card-deal:hover { border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) {
  .offer-card { transition: none; }
  .offer-card:hover { transform: none; }
}

.market-overview { max-width: 920px; }
.market-heading { margin: 0 0 24px; }
.market-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 22px 0 16px; }
.market-stat { min-width: 0; padding: 15px 13px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.market-stat span, .market-stat small { display: block; color: var(--text-muted); }
.market-stat span { font-size: .78rem; }
.market-stat strong { display: block; margin: 5px 0; font-size: clamp(1rem, 2vw, 1.35rem); overflow-wrap: anywhere; }
.market-stat small { font-size: .72rem; line-height: 1.4; }
.market-cta { margin: 18px 0 28px; }
.market-section { margin: 0 0 22px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-card); }
.market-section h2 { margin-bottom: 14px; }
.chart-wrap { width: 100%; min-width: 0; }
.market-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-axis, .chart-date { fill: var(--text-muted); font: 12px sans-serif; }
.chart-line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-cheapest { stroke: var(--accent); }
.chart-median { stroke: var(--text-muted); stroke-dasharray: 6 4; }
.chart-series-point { stroke: var(--surface); stroke-width: 2; }
.chart-series-point.chart-cheapest { fill: var(--accent); }
.chart-series-point.chart-median { fill: var(--text-muted); }
.chart-day-marker { fill: transparent; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 8px; color: var(--text-muted); font-size: .86rem; }
.chart-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 7px; border-radius: 50%; background: var(--accent); }
.chart-legend .legend-median::before { background: var(--text-muted); }
.provider-list { list-style: none; padding: 0; margin: 0; }
.provider-row { margin: 0 0 13px; }
.provider-label { display: block; margin-bottom: 5px; overflow-wrap: anywhere; font-size: .9rem; }
.provider-track { display: block; height: 9px; overflow: hidden; border-radius: var(--pill-radius); background: var(--bg-soft); }
.provider-bar { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: var(--accent); }
.price-movements { margin: 0; padding-left: 20px; }
.market-news { background: var(--bg-soft); }
.market-news a { min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 780px) { .market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .market-stat { padding: 12px 9px; } .market-stat small { font-size: .68rem; } .market-section { padding: 15px; } }

@media (max-width: 600px) {
  .wrap { padding-right: 16px; padding-left: 16px; }
  main { padding-top: 24px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .layout > *, .column, .sidebar, .block, .cards, .card { min-width: 0; }
  .block { padding: 16px; }
  .block-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .more { white-space: normal; }
  .card-meta { flex-wrap: wrap; }
  .car-figure figcaption { font-size: .82rem; }
  .lead, .card-summary, .report-body, .meta, .panel, .article,
  .footer-inner p { font-size: 1rem; }
  a, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .card-title a { display: flex; }
  .form-row { flex-direction: column; }
  .form-row input, .form-row .btn { width: 100%; min-width: 0; font-size: 1rem; }
  .form-row .btn { min-height: 44px; }
  /* Tabeller i artikler scroller i deres egen boks på telefonen — siden må ikke
     scrolle vandret. Mindre skrift og mindre polstring giver færre skub. */
  .article-body table { font-size: .84rem; }
  .article-body th, .article-body td { padding: 6px; }
  .article-body { font-size: 1rem; }
}

/* Samtykke og annoncer. Annoncescriptet står i head, fordi det også leverer
   Googles godkendte samtykkebesked; annoncerne mærkes og har reserveret højde. */
.btn-quiet { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border-strong); }
.btn-quiet:hover { background: var(--bg-tint); color: var(--text); }

/* En annonceplads uden indhold må ikke klappe sammen: så hopper teksten, når
   annoncen først indlæses. */
.ad-adsense { min-height: 100px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.ad-adsense.ad-inline { min-height: 250px; }
