/* beregnkirkeskat.dk - håndskrevet CSS i sitets oprindelige look: creme, salviegrøn og guld, Fraunces + Nunito Sans */
:root {
  --cream: #fefbf6; --cream-soft: #f7f4ef; --mist: #eef4f0;
  --sage: #5c7f6a; --sage-deep: #3d5c4a; --sage-10: rgba(92,127,106,.10); --sage-20: rgba(92,127,106,.20);
  --gold: #c9a227; --gold-light: #e8c96a; --gold-30: rgba(201,162,39,.30);
  --ink: #2d3430; --ink-80: rgba(45,52,48,.82); --ink-65: rgba(45,52,48,.66); --ink-55: rgba(45,52,48,.58);
  --hvid: #fff; --rund: 16px; --rund-lille: 12px;
  --skygge: 0 1px 2px rgba(45,52,48,.05), 0 6px 18px rgba(45,52,48,.07);
  --skygge-stor: 0 10px 30px rgba(61,92,74,.25);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.65 var(--sans); color: var(--ink); background: var(--cream); -webkit-font-smoothing: antialiased; }
a { color: var(--sage-deep); text-decoration-color: rgba(201,162,39,.6); text-underline-offset: 2px; }
a:hover { color: var(--sage); }
img { max-width: 100%; }
.wrap { max-width: 1024px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 10px; box-shadow: var(--skygge); }
.ikon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none; }

/* ---------- Top ---------- */
.top { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-bottom: 1px solid var(--sage-10); }
.top-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.01em; }
.brand b { color: var(--sage); font-weight: 700; }
.brand img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.menu { display: flex; gap: 2px; }
.menu a { text-decoration: none; color: var(--ink-80); font-weight: 700; font-size: .95rem; padding: 7px 11px; border-radius: 10px; white-space: nowrap; }
.menu a:hover { background: var(--mist); color: var(--sage-deep); }
.menu a[aria-current] { background: var(--mist); color: var(--sage-deep); }
.menu .kun-mobil { display: none; }
.menu-knap { display: none; }
@media (max-width: 900px) {
  .menu-knap { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; background: var(--mist); border: 1px solid var(--sage-20); border-radius: 12px; cursor: pointer; flex: none; }
  .menu-knap span { display: block; height: 2px; border-radius: 2px; background: var(--sage-deep); transition: transform .25s ease, opacity .25s ease; }
  .menu-knap:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
  .top.menu-aaben .menu-knap span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .top.menu-aaben .menu-knap span:nth-child(2) { opacity: 0; }
  .top.menu-aaben .menu-knap span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu { display: none; position: absolute; top: calc(100% + 6px); right: 16px; width: 280px; max-width: calc(100vw - 32px); flex-direction: column; gap: 2px; padding: 8px; background: #fff; border: 1px solid var(--sage-10); border-radius: var(--rund); box-shadow: 0 14px 34px rgba(45,52,48,.16); z-index: 50; }
  .top.menu-aaben .menu { display: flex; }
  .menu a, .menu .kun-mobil { display: block; padding: 11px 14px; font-size: 1rem; }
}
@media (min-width: 640px) and (max-width: 900px) { .menu { right: 24px; } }
@media (max-width: 480px) { .menu { left: 16px; right: 16px; width: auto; max-width: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--sage-10); background: linear-gradient(135deg, var(--cream), var(--cream-soft) 50%, var(--mist)); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(48px); pointer-events: none; }
.hero::before { right: -96px; top: 40px; width: 256px; height: 256px; background: rgba(201,162,39,.15); }
.hero::after { left: -80px; bottom: 0; width: 288px; height: 288px; background: var(--sage-10); }
.hero .wrap { position: relative; padding-top: 48px; padding-bottom: 44px; }
@media (min-width: 640px) { .hero .wrap { padding-top: 64px; padding-bottom: 56px; } }
.pille { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 16px; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--sage); font-weight: 700; font-size: .9rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1px solid var(--sage-10); }
.pille .ikon { color: var(--gold); }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.1rem, 5.2vw, 3.25rem); line-height: 1.12; letter-spacing: -.02em; margin: 0; color: var(--ink); }
h1 em { font-style: normal; color: var(--sage); }
.ingress { margin: 18px 0 0; max-width: 680px; font-size: 1.12rem; color: var(--ink-80); }
.broedkrumme { margin: 0 0 12px; font-size: .9rem; color: var(--ink-65); }
.broedkrumme a { color: var(--ink-65); }

/* ---------- Sektioner og typografi ---------- */
.sektion { padding: 44px 0; }
@media (min-width: 640px) { .sektion { padding: 60px 0; } }
.sektion.hvid { background: #fff; border-top: 1px solid var(--sage-10); }
.sektion.blod { background: var(--cream-soft); border-top: 1px solid var(--sage-10); }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.55rem, 3.4vw, 2rem); line-height: 1.2; margin: 0 0 18px; color: var(--ink); }
h2.med-ikon { display: flex; align-items: center; gap: 12px; }
.ikon-boks { width: 40px; height: 40px; border-radius: 12px; background: var(--sage); color: #fff; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--skygge); flex: none; font-size: 1.15rem; }
h3 { font-family: var(--display); font-weight: 700; font-size: 1.3rem; margin: 32px 0 10px; color: var(--ink); }
.tekst p, .tekst li { color: var(--ink-80); }
.tekst p { margin: 0 0 16px; }
.tekst ul, .tekst ol { padding-left: 1.3em; margin: 0 0 16px; }
.tekst li { margin: 4px 0; }
.lille { font-size: .92rem; color: var(--ink-65); }
.note { margin: 24px 0 0; font-size: .95rem; color: var(--ink-65); max-width: 760px; }
.boks { border-radius: var(--rund-lille); background: rgba(238,244,240,.7); border: 1px solid var(--sage-10); padding: 14px 18px; margin: 16px 0; color: var(--ink-80); display: flow-root; }
.boks.guld { background: #fffaf0; border-color: var(--gold-30); }

/* Illustration: hele billedet, til højre for teksten fra 761px */
.illustration { margin: 4px 0 18px; }
.illustration img { display: block; width: 100%; height: auto; border-radius: var(--rund); box-shadow: var(--skygge); background: var(--mist); }
@media (min-width: 761px) { .illustration { float: right; width: 40%; margin: 6px 0 16px 32px; } }
.tabel-wrap, .kort-grid, .faq, h2 { clear: both; }

/* ---------- Beregner ---------- */
.beregner { display: grid; gap: 24px; }
@media (min-width: 1000px) { .beregner { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; } }
.input { background: #fff; border-radius: var(--rund); padding: 24px; box-shadow: var(--skygge); border: 1px solid var(--sage-10); }
@media (min-width: 640px) { .input { padding: 30px; } }
.felter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px 20px; }
@media (min-width: 560px) { .felter.to { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Etiket, felt og hjælpetekst deler rækker på tværs af kolonnerne, så felterne altid står på linje */
.felter > .felt { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 6px; margin: 0; }
.felt > .etiket { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: .95rem; color: var(--ink); align-self: end; }
.felt > .etiket .ikon { color: var(--sage); }
.felt small { display: block; color: var(--ink-55); font-size: .84rem; line-height: 1.45; }
.enhed { position: relative; display: block; }
.enhed input { padding-right: 52px; }
.enhed i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--ink-55); pointer-events: none; font-size: .95rem; }
input[type=text], select { width: 100%; height: 52px; font: inherit; font-size: 1.05rem; padding: 0 14px; border: 1px solid var(--sage-20); border-radius: var(--rund-lille); background: var(--cream-soft); color: var(--ink); box-shadow: inset 0 1px 2px rgba(45,52,48,.05); }
select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer; text-overflow: ellipsis;
  background: var(--cream-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%233d5c4a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
input:focus, select:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(92,127,106,.25); }
.info-linje { margin: 22px 0 0; font-size: .92rem; line-height: 1.55; color: var(--ink-80); border-radius: var(--rund-lille); background: rgba(238,244,240,.7); border: 1px solid var(--sage-10); padding: 12px 16px; display: flex; gap: 8px; }
.info-linje .ikon { color: var(--sage); margin-top: 3px; }
.resultat { display: flex; flex-direction: column; gap: 16px; }
.resultat-indhold { display: flex; flex-direction: column; gap: 16px; }
.res-hoved { border-radius: var(--rund); padding: 24px; color: #fff; background: linear-gradient(135deg, var(--sage), var(--sage-deep)); box-shadow: var(--skygge-stor); }
.res-etiket { margin: 0; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.86); }
.res-tal { margin: 6px 0 0; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 6vw, 2.6rem); line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-linje { margin: 10px 0 0; font-size: .95rem; color: rgba(255,255,255,.92); }
.res-kort { border-radius: var(--rund); padding: 18px 20px; background: #fff; border: 1px solid var(--gold-30); box-shadow: var(--skygge); }
.res-lille-etiket { margin: 0; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); }
.res-mellem { margin: 4px 0 0; font-family: var(--display); font-size: 1.45rem; font-weight: 700; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.res-note { margin: 4px 0 0; font-size: .86rem; color: var(--ink-65); }
.udregning { border-radius: var(--rund); background: #fff; border: 1px solid var(--sage-10); padding: 14px 18px; box-shadow: var(--skygge); }
.udregning summary { cursor: pointer; font-weight: 700; color: var(--sage-deep); }
.udregning dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; margin: 12px 0 2px; font-size: .95rem; }
.udregning dt { color: var(--ink-80); }
.udregning dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.udregning .sum { font-weight: 800; color: var(--ink); border-top: 1px solid var(--sage-10); padding-top: 4px; }

/* Lave/høje satser (kort) */
.kort-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 20px 0; }
.kort { display: flex; flex-direction: column; border-radius: var(--rund); background: #fff; padding: 18px 20px; box-shadow: var(--skygge); border: 1px solid var(--sage-10); text-decoration: none; color: var(--ink); }
a.kort:hover { border-color: var(--sage-20); box-shadow: 0 8px 22px rgba(45,52,48,.1); }
.kort .kort-etiket { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--sage); display: flex; align-items: center; gap: 6px; }
.kort .kort-etiket.guld { color: var(--gold); }
.kort strong { display: block; margin-top: 6px; font-family: var(--display); font-size: 1.25rem; color: var(--ink); }
.kort .kort-tal { font-size: 1.15rem; font-weight: 800; color: var(--sage-deep); font-variant-numeric: tabular-nums; }
.kort span.lille { margin-top: 4px; }

/* ---------- Tabeller: én linje pr. celle, sidelæns scroll i rammen med skygge, fast første kolonne på mobil ---------- */
.tabel-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 16px 0 24px; border-radius: var(--rund-lille); border: 1px solid var(--sage-10); box-shadow: var(--skygge);
  background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat local,
              linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat local,
              radial-gradient(farthest-side at 0 50%, rgba(45,52,48,.18), transparent) left center / 10px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(45,52,48,.18), transparent) right center / 10px 100% no-repeat scroll;
  background-color: #fff; }
table.data { border-collapse: collapse; width: 100%; min-width: 100%; background: transparent; font-size: .95rem; }
table.data th, table.data td { padding: 10px 14px; border-bottom: 1px solid var(--sage-10); text-align: left; white-space: nowrap; }
table.data th { background: var(--mist); font-weight: 800; color: var(--sage-deep); font-size: .9rem; }
table.data td.tal, table.data th.tal { text-align: right; font-variant-numeric: tabular-nums; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tr.fremhaev td { background: #fffaf0; font-weight: 700; }
table.data .op { color: #b45309; font-weight: 700; }
table.data .ned { color: var(--sage-deep); font-weight: 700; }
th button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
th button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; border-radius: 4px; }
th .pil { position: relative; display: inline-block; width: 8px; height: 12px; }
th .pil::before, th .pil::after { content: ""; position: absolute; left: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; }
th .pil::before { top: 0; border-bottom: 5px solid rgba(61,92,74,.3); }
th .pil::after { bottom: 0; border-top: 5px solid rgba(61,92,74,.3); }
th[aria-sort="ascending"] .pil::before { top: 3px; border-bottom-color: var(--sage-deep); }
th[aria-sort="ascending"] .pil::after { display: none; }
th[aria-sort="descending"] .pil::after { bottom: 3px; border-top-color: var(--sage-deep); }
th[aria-sort="descending"] .pil::before { display: none; }
@media (max-width: 480px) { table.data { font-size: .88rem; } table.data th, table.data td { padding: 8px 10px; } }
@media (max-width: 760px) {
  .tabel-wrap table.data th:first-child, .tabel-wrap table.data td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--sage-10); }
  .tabel-wrap table.data thead th:first-child { background: var(--mist); }
  .tabel-wrap table.data tr.fremhaev td:first-child { background: #fffaf0; }
}

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.faq details { border-radius: var(--rund); background: #fff; padding: 18px 22px; box-shadow: var(--skygge); border: 1px solid var(--sage-10); display: flow-root; }
.faq summary { cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 1.12rem; color: var(--ink); }
.faq details p { margin: 10px 0 0; color: var(--ink-80); }

/* ---------- Links til andre sider ---------- */
.link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 16px 0; }
.link-grid a { display: block; padding: 12px 16px; border-radius: var(--rund-lille); background: #fff; border: 1px solid var(--sage-10); text-decoration: none; color: var(--sage-deep); font-weight: 700; box-shadow: var(--skygge); }
.link-grid a:hover { border-color: var(--sage-20); }
.link-grid a span { display: block; font-weight: 600; font-size: .86rem; color: var(--ink-65); }

/* ---------- Kilder og bund ---------- */
.kilder { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--sage-10); font-size: .9rem; color: var(--ink-65); }
.kilder ul { margin: 6px 0 0; padding-left: 1.2em; }
.bund { border-top: 1px solid rgba(92,127,106,.15); background: #fff; padding: 36px 0 26px; }
.bund-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .bund-grid { grid-template-columns: 1fr; gap: 14px; } }
.bund h2 { font-family: var(--sans); font-size: 1rem; margin: 0 0 8px; }
.bund ul { list-style: none; padding: 0; margin: 0; }
.bund li { margin: 5px 0; }
.bund a { color: var(--ink-80); text-decoration: none; }
.bund a:hover { color: var(--sage-deep); text-decoration: underline; }
.bund p { color: var(--ink-65); font-size: .93rem; margin: 10px 0 0; }
.bund .kilde { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--sage-10); }
.stort-404 { font-family: var(--display); font-size: 5rem; font-weight: 700; color: var(--sage); margin: 0; }
.ingen-top { margin-top: 0; }
