/* Købsomkostninger.dk – Professional Danish property finance tool */
:root {
  --bg: #f4f1eb;
  --surface: #ffffff;
  --surface-warm: #faf8f4;
  --surface-soft: #eee9df;
  --text: #1a1612;
  --text-secondary: #5c5347;
  --muted: #7d7265;
  --border: #ddd6ca;
  --border-soft: #e8e3d9;
  --primary: #1a3a2a;
  --primary-strong: #0f2a1c;
  --accent: #2d7a5e;
  --accent-warm: #3d8f6e;
  --accent-soft: #e8f5ef;
  --accent-glow: rgba(45, 122, 94, .12);
  --gold: #b8860b;
  --gold-soft: #faf3e0;
  --warning: #fff8e6;
  --warning-border: #e8d59a;
  --error: #c0392b;
  --shadow-sm: 0 1px 3px rgba(26, 22, 18, .06);
  --shadow: 0 4px 24px rgba(26, 22, 18, .08);
  --shadow-lg: 0 12px 48px rgba(26, 22, 18, .10);
  --shadow-glow: 0 8px 32px rgba(45, 122, 94, .12);
  --radius: 12px;
  --radius-lg: 20px;
  --max: 1100px;
  --font-display: ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: .2s cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
  transition: color var(--transition);
}
a:hover { color: var(--primary); }
p { margin-bottom: .85em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip-link {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  background: var(--primary); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 241, 235, .92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.05rem; letter-spacing: -.02em;
}
.brand-mark {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary);
  color: #fff; font-family: var(--font-display); font-weight: 900; font-size: .95rem;
  box-shadow: 0 2px 8px rgba(26, 58, 42, .25);
}
.primary-nav { display: flex; align-items: center; gap: 4px; }
.primary-nav a {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 6px 14px;
  border-radius: 8px; color: var(--text-secondary);
  text-decoration: none; font-weight: 500; font-size: .925rem;
  transition: all var(--transition);
}
.primary-nav a[aria-current="page"],
.primary-nav a:hover {
  background: var(--accent-soft); color: var(--primary);
}
.nav-toggle { display: none; }

.breadcrumbs {
  margin-top: 20px; padding: 8px 0;
  color: var(--muted); font-size: .875rem;
}
.breadcrumbs a { color: var(--muted); font-weight: 500; }
.breadcrumbs a:hover { color: var(--accent); }
.separator { margin: 0 6px; color: var(--border); }

.hero {
  padding: 52px 0 36px;
  background:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(45, 122, 94, .08), transparent),
    radial-gradient(ellipse 40% 60% at 85% 30%, rgba(184, 134, 11, .06), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px; align-items: start;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -.04em; color: var(--primary);
}
.lead {
  max-width: 640px; margin-top: 16px;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.65;
}
.eyebrow {
  margin-bottom: 10px;
  color: var(--gold); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  font-size: .75rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 22px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: #fff;
  text-decoration: none; font-family: var(--font-body);
  font-weight: 700; font-size: .925rem;
  cursor: pointer; transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(45, 122, 94, .2);
}
.button:hover { background: #246b50; color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.button:active { transform: translateY(0); }
.button-secondary { background: var(--primary); box-shadow: 0 2px 8px rgba(26, 58, 42, .2); }
.button-secondary:hover { background: var(--primary-strong); }
.button-ghost {
  background: var(--surface); color: var(--primary);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.button-ghost:hover { background: var(--surface-warm); color: var(--primary-strong); border-color: var(--accent); }
.button-wide { width: 100%; }

.trust-card, .content-card, .calculator-card, .result-card,
.info-box, .step-card, .expense-grid article, .related-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.trust-card {
  padding: 24px; position: relative;
  border-left: 4px solid var(--gold);
}
.trust-card strong {
  display: block; font-family: var(--font-display);
  font-size: 1.15rem; margin-bottom: 8px; color: var(--primary);
}
.trust-card p { color: var(--muted); margin-bottom: 12px; font-size: .925rem; line-height: 1.6; }
.trust-card small, .small { color: var(--muted); font-size: .875rem; }

.trust-strip {
  background: var(--surface-warm);
  border-block: 1px solid var(--border-soft);
}
.trust-strip-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; padding-block: 16px;
  color: var(--primary); font-weight: 700; font-size: .85rem;
  text-align: center;
}
.trust-strip-grid span::before {
  content: "✓ "; color: var(--accent); font-weight: 900;
}

.section { padding: 48px 0; }
.section-heading { max-width: 720px; margin-bottom: 28px; }
.section-heading h2, .section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -.03em; color: var(--primary);
  margin-bottom: 10px;
}
.section-heading p { color: var(--muted); font-size: 1.02rem; }

.calculator-section { background: var(--surface-warm); border-radius: 0; padding: 48px 0; }
.calculator-layout {
  display: grid; grid-template-columns: 1fr 400px;
  gap: 24px; align-items: start;
}
.calculator-card, .result-card { padding: 28px; }
.calculator-card { border-top: 3px solid var(--accent); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label, fieldset { display: grid; gap: 6px; font-weight: 600; font-size: .925rem; color: var(--text-secondary); border: none; }
legend { font-weight: 800; margin-bottom: 10px; color: var(--text); font-size: 1rem; }
input, select {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input::placeholder { color: var(--border); }
input:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px;
}
.toggle-grid {
  margin: 20px 0; padding: 18px;
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  background: var(--surface-warm);
}
.toggle-grid label {
  display: flex; align-items: center; gap: 10px;
  min-height: 38px; font-weight: 500; cursor: pointer;
}
.toggle-grid input[type="checkbox"] {
  width: 18px; height: 18px; min-height: auto;
  accent-color: var(--accent); cursor: pointer;
}

.result-card {
  position: sticky; top: 90px;
  background: linear-gradient(180deg, var(--surface), var(--surface-warm));
  border-top: 3px solid var(--gold);
}
.result-card h2 { font-size: 1.35rem; }
.result-summary { display: grid; gap: 0; margin: 18px 0; }
.result-line {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border-soft);
  font-size: .925rem;
}
.result-line span:first-child { color: var(--muted); }
.result-line strong { text-align: right; font-weight: 700; white-space: nowrap; }
.result-total {
  margin: 18px 0 12px; padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft));
  border: 1px solid rgba(45, 122, 94, .15);
}
.result-total span { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.result-total strong {
  display: block; font-family: var(--font-display);
  font-size: 1.5rem; line-height: 1.2; color: var(--primary);
}
.notice {
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--warning); border: 1px solid var(--warning-border);
  font-size: .925rem; color: var(--text-secondary);
}

.ad-slot {
  display: grid; place-items: center;
  min-height: 100px; margin: 28px auto; max-width: var(--max);
  border-radius: var(--radius);
  text-align: center;
  position: relative;
  overflow: hidden; contain: layout paint;
}
/* Placeholder styling (before ads load or when no slot ID) */
.ad-slot:not([data-ads-rendered="true"]) {
  border: 1px dashed var(--border);
  background: var(--surface-warm);
  color: var(--muted); font-weight: 600;
  min-height: 280px;
}
/* Clean styling when real ads are rendered */
.ad-slot[data-ads-rendered="true"] {
  border: none; background: transparent;
  min-height: auto;
}
.ad-slot .ad-label {
  position: absolute; top: 6px; left: 10px; z-index: 1;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(0,0,0,.04); color: var(--muted);
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: .06em; font-weight: 700;
  pointer-events: none;
}
/* Prevent CLS from AdSense auto-sized ads */
.ad-slot ins.adsbygoogle { min-height: 90px; width: 100%; }
.ad-slot small { display: block; max-width: 30rem; margin-top: 6px; font-size: .82rem; color: var(--muted); }
.ad-slot-inline { min-height: 90px; margin: 20px 0; }

.next-steps { padding-top: 28px; }
.step-grid, .expense-grid, .related-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.step-card, .expense-grid article, .related-card, .content-card, .info-box {
  padding: 24px;
}
.step-card { transition: transform var(--transition), box-shadow var(--transition); }
.step-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.step-card h3, .expense-grid h3 {
  font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 800; margin: 10px 0 8px; color: var(--primary);
}
.step-card p, .expense-grid p, .content-card p, .info-box p {
  color: var(--text-secondary); font-size: .925rem; line-height: 1.65;
}
.content-card h2 {
  font-family: var(--font-display); font-weight: 800; color: var(--primary);
  font-size: 1.25rem; margin-bottom: 12px;
}
.icon-circle {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  font-weight: 900; font-size: 1.1rem;
}
.sponsored-label {
  display: inline-flex; margin-right: 6px;
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,.2);
  font-size: .7em; text-transform: uppercase; letter-spacing: .04em;
}
.affiliate-note { margin-top: 18px; color: var(--muted); font-size: .875rem; font-style: italic; }

.split {
  display: grid; grid-template-columns: 1fr minmax(280px, 420px);
  gap: 28px; align-items: start;
}
.info-box {
  background: var(--surface-warm);
  border-left: 3px solid var(--gold);
}
.info-box h3 {
  font-family: var(--font-display); font-weight: 800;
  color: var(--primary); margin-bottom: 10px;
}

.check-list { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.check-list li { position: relative; padding-left: 28px; font-size: .95rem; color: var(--text-secondary); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  color: var(--accent); font-weight: 900;
}

.content-stack { display: grid; gap: 20px; }
.source-note { font-size: .875rem; color: var(--muted); font-style: italic; }

.rates-table {
  width: 100%; border-collapse: collapse;
  font-size: .925rem; margin: 16px 0;
}
.rates-table th, .rates-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border-soft);
}
.rates-table th {
  font-weight: 700; color: var(--primary);
  background: var(--surface-warm); font-size: .85rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.rates-table td { color: var(--text-secondary); }
.rates-table tr:hover td { background: var(--accent-soft); }

.faq-list { display: grid; gap: 10px; }
details {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 0 20px;
  transition: border-color var(--transition);
}
details[open] { border-color: var(--accent); }
summary {
  min-height: 56px; display: flex; align-items: center;
  cursor: pointer; font-weight: 700; font-size: .975rem;
  color: var(--text); list-style: none;
  padding: 4px 0;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; margin-left: auto; font-size: 1.3rem;
  color: var(--accent); font-weight: 400; transition: transform var(--transition);
}
details[open] summary::after { content: "−"; }
details div {
  color: var(--text-secondary); padding-bottom: 18px;
  font-size: .95rem; line-height: 1.7;
}

.related-card {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 120px; text-decoration: none; color: var(--text);
  transition: all var(--transition);
}
.related-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.related-card span { font-weight: 600; font-size: .95rem; }
.related-card strong { color: var(--accent); margin-top: auto; font-size: .875rem; }

.example-box {
  background: var(--gold-soft);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.example-box h3 {
  font-family: var(--font-display); font-weight: 800;
  color: var(--primary); margin-bottom: 14px;
}
.example-box .example-total {
  margin-top: 14px; padding-top: 14px;
  border-top: 2px solid rgba(184, 134, 11, .3);
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.15rem; color: var(--primary);
}

.site-footer {
  margin-top: 48px; padding: 48px 0 24px;
  background: var(--primary-strong); color: #c7d4cc;
}
.site-footer a { color: #c7d4cc; text-decoration: none; transition: color var(--transition); }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 28px;
}
.footer-grid > div { display: grid; align-content: start; gap: 8px; }
.footer-brand { color: #fff !important; }
.footer-title {
  margin-bottom: 8px; color: #fff;
  font-family: var(--font-display); font-size: .9rem;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: #8fa898; font-size: .85rem;
}

.cookie-banner {
  position: fixed; z-index: 1000;
  left: 16px; right: 16px; bottom: 16px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 18px; align-items: center;
  max-width: 960px; margin: 0 auto; padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner strong { font-family: var(--font-display); }
.cookie-banner p { margin: 4px 0; color: var(--muted); font-size: .9rem; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.legal h2 { margin-top: 28px; font-family: var(--font-display); color: var(--primary); }
.legal p, .legal li { color: var(--text-secondary); }
.contact-line { font-size: 1.05rem; font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid, .calculator-layout, .split, .footer-grid { grid-template-columns: 1fr; }
  .result-card { position: static; }
  .step-grid, .expense-grid, .related-grid { grid-template-columns: 1fr 1fr; }
  .trust-strip-grid { grid-template-columns: 1fr 1fr; }
  .cookie-banner { grid-template-columns: 1fr; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .button { width: 100%; }
}
@media (max-width: 720px) {
  .header-inner { min-height: 60px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 8px 14px;
    border: 1px solid var(--border); border-radius: 8px;
    background: var(--surface); font: inherit; font-weight: 700;
    font-size: .875rem; color: var(--text); cursor: pointer;
  }
  .primary-nav {
    position: absolute; left: 16px; right: 16px; top: 68px;
    display: none; flex-direction: column; align-items: stretch;
    padding: 12px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { justify-content: center; min-height: 44px; }
  .hero { padding: 32px 0 24px; }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  .form-grid, .step-grid, .expense-grid, .related-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .ad-slot:not([data-ads-rendered="true"]) { min-height: 250px; }
  .trust-strip-grid { grid-template-columns: 1fr; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .cookie-banner, .ad-slot,
  .hero-actions, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .result-card { position: static; break-inside: avoid; }
}

/* Dynamiske beregnerforklaringer */
.type-note,
.result-note {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 1px solid rgba(45, 122, 94, .16);
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.55;
}
.result-divider {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.toggle-grid label.is-disabled {
  opacity: .62;
  cursor: not-allowed;
}
.toggle-grid label.is-disabled input {
  cursor: not-allowed;
}
.term-grid,
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.term-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.term-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 8px;
}
.term-card p {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
}
.ad-slot[hidden] { display: none !important; }
@media (max-width: 800px) {
  .term-grid,
  .glossary-grid { grid-template-columns: 1fr; }
}


/* Layout hardening: prevents sections, cards, ads and long labels from going outside the viewport. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

main,
section,
.container,
.hero-grid,
.calculator-layout,
.form-grid,
.split,
.step-grid,
.expense-grid,
.related-grid,
.term-grid,
.glossary-grid,
.content-stack,
.calculator-card,
.result-card,
.content-card,
.info-box,
.step-card,
.related-card,
.term-card,
.trust-card,
.example-box,
.cookie-banner,
.site-footer,
.footer-grid {
  min-width: 0;
}

p,
li,
a,
span,
strong,
summary,
h1,
h2,
h3,
.result-line,
.notice,
.type-note,
.result-note {
  overflow-wrap: anywhere;
}

/* Several generated subpages use direct children inside .section instead of a .container wrapper. */
.section.split,
.section > .section-heading,
.section > .content-stack,
.section > .content-card,
.section > .calculator-layout,
.section > .step-grid,
.section > .expense-grid,
.section > .related-grid,
.section > .faq-list,
.section > .affiliate-note,
.section > .ad-slot {
  width: min(100% - 40px, var(--max));
  margin-left: auto;
  margin-right: auto;
}

.section > .section-heading {
  max-width: 720px;
}

.section.calculator-section > .calculator-layout {
  width: min(100% - 40px, var(--max));
}

.ad-slot {
  width: min(100% - 40px, var(--max));
}

.ad-slot[data-ads-rendered="true"] {
  min-height: 250px;
}

.button,
.primary-nav a,
.related-card,
.step-card a {
  min-width: 0;
  white-space: normal;
  text-align: center;
}

.button {
  flex-wrap: wrap;
}

input,
select,
textarea {
  max-width: 100%;
  min-width: 0;
}

.rates-table {
  min-width: 620px;
}

.checklist-section .info-box .button {
  margin-top: 14px;
}

@media (max-width: 520px) {
  .container,
  .section.split,
  .section > .section-heading,
  .section > .content-stack,
  .section > .content-card,
  .section > .calculator-layout,
  .section > .step-grid,
  .section > .expense-grid,
  .section > .related-grid,
  .section > .faq-list,
  .section > .affiliate-note,
  .section > .ad-slot,
  .ad-slot {
    width: min(100% - 24px, var(--max));
  }

  .section,
  .calculator-section {
    padding: 34px 0;
  }

  .calculator-card,
  .result-card,
  .content-card,
  .info-box,
  .step-card,
  .expense-grid article,
  .related-card,
  .term-card,
  .trust-card,
  .example-box {
    padding: 18px;
    border-radius: 16px;
  }

  .brand {
    gap: 8px;
    font-size: .94rem;
    line-height: 1.1;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    flex: 0 0 32px;
  }

  .hero-actions,
  .cookie-actions {
    width: 100%;
  }

  .hero-actions .button,
  .step-card .button,
  .cookie-actions .button {
    width: 100%;
  }

  .result-line {
    display: grid;
    gap: 3px;
  }

  .result-line strong {
    text-align: left;
    white-space: normal;
  }

  .result-total strong {
    font-size: 1.28rem;
  }

  .primary-nav {
    left: 12px;
    right: 12px;
    top: 64px;
  }

  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px;
  }
}

@media (max-width: 360px) {
  .brand span:last-child {
    max-width: 190px;
  }

  .button {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 700px) {
  .rates-table {
    min-width: 0;
    display: block;
    width: 100%;
  }

  .rates-table thead {
    display: none;
  }

  .rates-table tbody,
  .rates-table tr,
  .rates-table td {
    display: block;
    width: 100%;
  }

  .rates-table tr {
    margin: 0 0 12px;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
  }

  .rates-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
  }

  .rates-table td:last-child {
    border-bottom: 0;
  }

  .rates-table td::before {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .rates-table td:nth-child(1)::before { content: "Afgiftstype"; }
  .rates-table td:nth-child(2)::before { content: "Fast afgift"; }
  .rates-table td:nth-child(3)::before { content: "Variabel afgift"; }
  .rates-table td:nth-child(4)::before { content: "Afrunding"; }
}


/* Trust, source, commerce and consent improvements */
.section-tight { padding: 28px 0; }
.editorial-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 16px; color: var(--muted); font-size: .86rem;
}
.editorial-meta span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border: 1px solid var(--border-soft);
  border-radius: 999px; background: rgba(255,255,255,.62);
}
.source-grid, .method-grid, .commercial-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px;
}
.method-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.source-box, .commercial-panel, .partner-disclosure, .comparison-table-wrap {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 24px;
}
.source-box h2, .commercial-panel h3 { font-family: var(--font-display); color: var(--primary); line-height: 1.15; margin-bottom: 8px; }
.source-box-muted { background: linear-gradient(180deg, var(--surface), var(--surface-warm)); border-left: 4px solid var(--gold); }
.compact-list { gap: 6px; margin-top: 12px; }
.commercial-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center;
  margin-top: 22px; border-left: 4px solid var(--accent);
}
.commercial-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.ad-label-static, .commercial-label {
  display: inline-flex; align-items: center; margin-bottom: 8px;
  padding: 3px 9px; border-radius: 999px;
  background: var(--gold-soft); color: var(--primary);
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.partner-disclosure { background: var(--gold-soft); border-color: var(--warning-border); box-shadow: none; }
.partner-disclosure p { color: var(--text-secondary); }
.comparison-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.comparison-table th, .comparison-table td { padding: 13px 14px; border-bottom: 1px solid var(--border-soft); text-align: left; vertical-align: top; }
.comparison-table th { color: var(--primary); background: var(--surface-warm); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.comparison-table td { color: var(--text-secondary); }
.footer-link-button {
  border: 0; background: transparent; color: #c7d4cc; cursor: pointer; font: inherit; font-size: .85rem;
  text-decoration: underline; text-underline-offset: .2em; padding: 0;
}
.footer-link-button:hover { color: #fff; }
.cookie-copy { min-width: 0; }
.cookie-preferences {
  display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.cookie-preferences label { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text-secondary); }
.cookie-preferences input { width: 18px; height: 18px; min-height: auto; accent-color: var(--accent); }
@media (max-width: 980px) {
  .method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .commercial-panel { grid-template-columns: 1fr; }
  .commercial-actions { justify-content: stretch; }
  .commercial-actions .button { flex: 1 1 180px; }
}
@media (max-width: 700px) {
  .source-grid, .method-grid, .commercial-grid { grid-template-columns: 1fr; }
  .commercial-actions .button { width: 100%; }
  .editorial-meta span { width: 100%; }
  .comparison-table, .comparison-table thead, .comparison-table tbody, .comparison-table tr, .comparison-table td { display: block; width: 100%; }
  .comparison-table thead { display: none; }
  .comparison-table tr { border: 1px solid var(--border-soft); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; background: var(--surface); }
  .comparison-table td::before { display: block; margin-bottom: 2px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
  .comparison-table td:nth-child(1)::before { content: "Punkt"; }
  .comparison-table td:nth-child(2)::before { content: "Se efter"; }
  .comparison-table td:nth-child(3)::before { content: "Hvorfor"; }
}
