:root {
  --bg: #F3F4F0;
  --card: #FFFFFF;
  --ink: #121614;
  --ink-2: #3B423E;
  --ink-3: #4A524D;
  --ink-4: #5B635E;
  --on-dark: #B9C2BC;
  --line: #E6E8E3;
  --dark-line: #2A302C;
  --accent: #22D07B;
  --ok-bg: #DDF3E7;
  --ok-fg: #0B5B3B;
  --prop-bg: #FFE2B8;
  --prop-fg: #5A3A10;
  --prop-box: #FFF4E5;
  --over: #F2945E;
  --over-text: #FFD3B8;
  --shadow: 0 1px 2px rgba(18, 22, 20, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
  position: relative;
  overflow-x: hidden;
}

a { color: #0B6B45; }
a:hover { color: #064A2F; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid #0B6B45; outline-offset: 2px; }

.page {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 18px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Hjørnet: kvart cirkel i viewportens hjørne */
.corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: var(--accent);
  border-bottom-left-radius: 150px;
  padding: 22px 22px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--ink);
  z-index: 0;
}
.corner__no { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; }
.corner__code { font-size: 30px; line-height: 1; font-weight: 900; letter-spacing: -0.04em; }

/* Logomærket: fire kvarte cirkler i hinanden */
.mark { position: absolute; top: 0; right: 0; width: 200px; height: 200px; z-index: 0; }
.mark span { position: absolute; top: 0; right: 0; }
.mark span:nth-child(1) { width: 200px; height: 200px; background: #FF8A66; border-bottom-left-radius: 200px; }
.mark span:nth-child(2) { width: 156px; height: 156px; background: #8FA8FF; border-bottom-left-radius: 156px; }
.mark span:nth-child(3) { width: 112px; height: 112px; background: #FFC233; border-bottom-left-radius: 112px; }
.mark span:nth-child(4) { width: 68px; height: 68px; background: #22D07B; border-bottom-left-radius: 68px; }

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 4px 0;
  max-width: 210px;
}
.logo {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { color: var(--ink); }
.logo span { color: var(--ink-4); }
.updated { font-size: 12px; color: var(--ink-4); }

h1 {
  position: relative;
  z-index: 1;
  margin: 60px 4px 2px;
  padding-right: 40px;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.card {
  position: relative;
  z-index: 1;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 99px;
  background: var(--ok-bg);
  color: var(--ok-fg);
  white-space: nowrap;
}
.badge--proposed { background: var(--prop-bg); color: var(--prop-fg); }

/* Resultatboks */
.result {
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: var(--ink);
  color: #FFFFFF;
  border-radius: 24px;
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.result__corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-bottom-left-radius: 64px;
}
.result__state { display: flex; flex-direction: column; gap: 14px; }
.result__state[hidden] { display: none; }
.result__state--empty { gap: 10px; padding-right: 56px; }
.result__label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--on-dark); font-weight: 500; }
.result__small { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-right: 56px; font-size: 13px; color: var(--on-dark); }
.result__small strong { color: #FFFFFF; font-weight: 700; }
.result__rule { height: 1px; background: var(--dark-line); }
.amount { display: flex; align-items: baseline; gap: 8px; }
.amount__num { font-size: 40px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; color: var(--accent); }
.amount__num--big { font-size: 52px; }
.amount__kr { font-size: 18px; font-weight: 600; color: var(--on-dark); }
.amount__num--big + .amount__kr { font-size: 20px; }
.result__hint { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--on-dark); }
.result__hint svg { flex-shrink: 0; }
.result__over { margin: 0; font-size: 14px; line-height: 1.45; color: var(--over-text); }
.bar { height: 10px; background: var(--dark-line); border-radius: 99px; overflow: hidden; }
.bar__fill { height: 10px; width: 0; background: var(--accent); border-radius: 99px; transition: width 0.25s ease; }
.bar__fill.is-over { background: var(--over); }
.bar-legend { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12.5px; color: var(--on-dark); }
.proposal-hint {
  align-self: flex-start;
  min-height: 44px;
  margin: -6px 0 -10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.proposal-hint[hidden] { display: none; }
.proposal-hint__dot { width: 8px; height: 8px; border-radius: 99px; background: #FFC233; }
.proposal-hint__text { text-decoration: underline; text-underline-offset: 3px; }

/* Input-kort */
.inputs { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.years {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  background: var(--bg);
  padding: 4px;
  border-radius: 14px;
  margin-top: 2px;
}
.years button {
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.years button[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; font-weight: 700; }
.money {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 12px 16px;
}
.money:focus-within { box-shadow: 0 0 0 4px rgba(34, 208, 123, 0.35); }
.money input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding: 0;
  font-variant-numeric: tabular-nums;
}
.money input:focus { outline: none; }
.money input::placeholder { color: #9AA19C; }
.money__kr { font-size: 18px; font-weight: 600; color: var(--ink-4); }
.field__help { font-size: 12.5px; color: var(--ink-4); line-height: 1.4; }

/* Sammenfoldede rækker */
.folds { border-radius: 20px; overflow: hidden; }
.fold__btn {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.fold__btn svg { flex-shrink: 0; transition: transform 0.2s ease; }
.fold__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.fold__body { padding: 2px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.fold__body[hidden] { display: none; }
.folds__rule { height: 1px; background: var(--line); margin: 0 18px; }

.calc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.calc-row span:last-child { font-weight: 600; white-space: nowrap; }
.calc-row__label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.calc-row--minus { color: var(--ink-2); }
.calc-row--total { font-size: 16px; font-weight: 800; }
.calc-row--total span:last-child { font-weight: 800; }
.calc-rule { height: 1px; background: var(--ink); }
.note { font-size: 12.5px; color: var(--ink-4); line-height: 1.4; margin: 0; }
.proposal {
  background: var(--prop-box);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.proposal p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--prop-fg); }
.proposal button {
  align-self: flex-start;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 99px;
  border: 1.5px solid var(--prop-fg);
  background: transparent;
  color: var(--prop-fg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.proposal[hidden] { display: none; }

.faq { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.faq li { display: flex; gap: 12px; }
.faq__dot { flex-shrink: 0; width: 8px; height: 8px; margin-top: 7px; border-radius: 0 0 0 8px; background: var(--accent); }
.faq h3 { margin: 0 0 3px; font-size: 14.5px; font-weight: 700; }
.faq p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 4px 0;
  font-size: 12.5px;
  color: var(--ink-4);
  line-height: 1.45;
}
.site-footer p { margin: 0; }
.more-link { font-size: 15px; font-weight: 600; text-decoration: none; }

/* Forsiden */
.home-intro { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; margin: 92px 4px 12px; }
.home-intro h1 { margin: 0; padding: 0; font-size: 34px; line-height: 1.05; letter-spacing: -0.035em; }
.home-intro p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--ink-3); }
.area { overflow: hidden; padding: 20px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.area__corner {
  position: absolute;
  top: 0;
  right: 0;
  width: 92px;
  height: 92px;
  background: var(--accent);
  border-bottom-left-radius: 92px;
  padding: 14px 14px 0 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.area__corner .corner__no { font-size: 9.5px; }
.area__corner .corner__code { font-size: 19px; }
.area h2 { margin: 4px 4px 14px; padding-right: 90px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.tool-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}
.tool-link:hover { color: var(--ink); background: #E9EBE5; }
.tool-link__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tool-link__title { font-size: 15px; font-weight: 700; }
.tool-link__desc { font-size: 13px; color: var(--ink-3); }
.home-intro + .area { margin-top: 0; }

@media (min-width: 720px) {
  .page { padding-top: 32px; }
  .site-header { max-width: none; }
  .home-intro { margin-top: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
