/* beregnkærlighed.dk - lykønskningstelegrammet: hindbærrødt felt, blegrosa blanket, klistrede papirstrimler */
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("/fonts/archivo-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --felt: #a3143f;        /* hindbær: forside-felt, knap, procent */
  --felt-moerk: #7d0f30;
  --paa-felt: #fff1f4;    /* tekst på feltet */
  --paa-felt-2: #ffd3dd;
  --papir: #fff7f8;       /* telegramblanketten */
  --grund: #e3eae5;       /* sidens bund under feltet: bleg salvie (fra stemplet) */
  --grund-2: #c9d7ce;     /* et trin dybere: spor, felter */
  --blaek: #2b1020;       /* aubergine-blæk */
  --blaek-2: #5e3446;
  --stempel: #1d6a4c;     /* flaskegrønt stempel */
  --strimmel: #ffffff;
  --side: clamp(16px, 4vw, 40px);
  --maal: 68ch;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--grund); color: var(--blaek); font: 400 1.125rem/1.55 "Archivo", system-ui, sans-serif; font-stretch: 100%; overflow-wrap: break-word; }
::selection { background: var(--felt); color: var(--paa-felt); }
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: var(--felt-moerk); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { color: var(--felt); }
:focus-visible { outline: 3px solid var(--stempel); outline-offset: 3px; border-radius: 2px; }
.felt :focus-visible { outline-color: var(--paa-felt); }
.felt .blanket :focus-visible { outline-color: var(--stempel); }
h1, h2, h3 { line-height: 1.02; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; font-stretch: 112%; margin: 0 0 0.5em; }
h3 { font-size: 1.25rem; font-weight: 750; letter-spacing: -0.01em; margin: 1.6em 0 0.4em; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
.skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Topbjælke: navnemærke + få links */
.top { background: var(--felt); color: var(--paa-felt); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 14px var(--side); }
.maerke { display: inline-flex; align-items: center; gap: 10px; color: var(--paa-felt); text-decoration: none; font-weight: 800; font-stretch: 110%; font-size: 1.125rem; letter-spacing: -0.01em; }
.maerke img { width: 34px; height: 34px; border-radius: 8px; outline: 2px solid var(--paa-felt); }
.maerke:hover { color: #fff; }
.menu { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; min-width: 0; max-width: 100%; }
.menu a { color: var(--paa-felt); text-decoration: none; font-weight: 550; font-size: 1rem; padding: 6px 0; min-height: 44px; display: inline-flex; align-items: center; border-bottom: 2px solid transparent; transition: border-color 0.2s; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--paa-felt); color: #fff; }

/* Feltet: H1 + blanket */
.felt { background: var(--felt); color: var(--paa-felt); padding: clamp(28px, 5vw, 72px) var(--side) clamp(48px, 7vw, 112px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.felt h1 { hyphens: manual; font-size: clamp(2.5rem, 5vw, 4.6rem); font-weight: 850; font-stretch: 118%; letter-spacing: -0.035em; line-height: 0.95; margin-bottom: 0.4em; }
.ingress { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.45; max-width: 34ch; }
.sjov { color: var(--paa-felt-2); font-size: 1rem; max-width: 40ch; }
.sjov strong { color: var(--paa-felt); }
.felt-billede { margin-top: clamp(20px, 3vw, 40px); max-width: 520px; }
.felt-billede img { width: 100%; border-radius: 4px; }

/* Telegramblanketten */
.blanket { position: relative; background: var(--papir); color: var(--blaek); padding: 34px clamp(18px, 3vw, 40px) 30px; border-radius: 2px; }
.blanket::before, .blanket::after { content: ""; position: absolute; left: 0; right: 0; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Ccircle cx='8' cy='0' r='5' fill='%23a3143f'/%3E%3C/svg%3E") repeat-x; }
.blanket::before { top: 0; }
.blanket::after { bottom: 0; transform: scaleY(-1); }
.blanket-hoved { display: flex; justify-content: flex-start; align-items: baseline; gap: 12px; font-stretch: 75%; font-weight: 650; font-size: 1rem; color: var(--blaek-2); padding-bottom: 14px; margin-bottom: 8px; border-bottom: 3px solid var(--grund-2); }
.blanket-hoved b { color: var(--felt); font-size: 1.25rem; font-weight: 800; letter-spacing: 0.01em; text-transform: uppercase; }
.linje { display: grid; grid-template-columns: 3.4em 1fr; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 2px dotted var(--grund-2); }
.linje > span { font-stretch: 75%; font-weight: 700; font-size: 1rem; color: var(--blaek-2); }
.linje input, .linje select { width: 100%; min-width: 0; font: inherit; font-size: 1.25rem; font-weight: 600; color: var(--blaek); background: transparent; border: 0; padding: 8px 2px; border-radius: 2px; caret-color: var(--felt); }
.linje select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235e3446' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 6px center; padding-right: 28px; cursor: pointer; }
.linje input::placeholder { color: #85566a; font-weight: 400; }
.linje input:focus, .linje select:focus { outline: none; background: var(--grund); }
.linje:focus-within > span { color: var(--felt); }
.knap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 750; font-stretch: 105%; font-size: 1.125rem; background: var(--felt); color: #fff; border: 0; border-radius: 2px; padding: 15px 26px; min-height: 52px; cursor: pointer; transition: background-color 0.2s, transform 0.12s var(--ease); text-decoration: none; }
.knap:hover { background: var(--felt-moerk); color: #fff; }
.knap:active { transform: translateY(1px) scale(0.98); }
.knap.lys { background: var(--grund-2); color: var(--blaek); }
.knap.lys:hover { background: #b6c7bc; color: var(--blaek); }
.send { width: 100%; margin-top: 22px; }
.fejl { color: var(--felt-moerk); font-weight: 650; margin: 12px 0 0; min-height: 0; }
.fejl:empty { display: none; }
.stempel { position: absolute; right: clamp(14px, 3vw, 30px); top: 22px; transform: rotate(-9deg); color: var(--stempel); border: 3px solid var(--stempel); border-radius: 6px; padding: 2px 10px 3px; font-weight: 850; font-stretch: 80%; font-size: 1rem; line-height: 1.2; text-align: center; opacity: 0.9; pointer-events: none; }
.stempel small { display: block; font-weight: 600; font-size: 0.8125rem; }

/* Resultatet: strimler klistret på blanketten */
.resultat { margin-top: 26px; padding-top: 6px; }
.strimmel { display: block; width: fit-content; max-width: 100%; background: var(--strimmel); color: var(--blaek); font-stretch: 66%; font-weight: 650; font-size: clamp(1.05rem, 2.6vw, 1.3rem); line-height: 1.25; text-transform: uppercase; letter-spacing: 0.02em; padding: 5px 12px 6px; margin: 0 0 10px; transform: rotate(var(--r, -0.6deg)); }
.strimmel:nth-of-type(2n) { --r: 0.5deg; margin-left: 6px; }
.procent { white-space: nowrap; overflow-wrap: normal; font-size: clamp(5rem, 27vw, 10.5rem); font-weight: 900; font-stretch: 125%; letter-spacing: -0.04em; line-height: 0.9; color: var(--felt); margin: 14px 0 12px; font-variant-numeric: tabular-nums; }
.procent small { font-size: 0.5em; font-weight: 800; letter-spacing: 0; margin-left: 0.08em; }
.bjaelke { height: 16px; background: var(--grund-2); border-radius: 2px; overflow: hidden; margin-bottom: 18px; }
.bjaelke span { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--felt); transform-origin: left; }
.resultat-tekst { font-size: 1.2rem; line-height: 1.45; margin: 4px 0 18px; }
.handlinger { display: flex; flex-wrap: wrap; gap: 10px; }
.handlinger .knap { flex: 1 1 180px; }
.delt { font-weight: 650; color: var(--stempel); margin: 10px 0 0; }
.delt:empty { display: none; }

/* Indholdet under feltet */
.indhold { padding: clamp(64px, 9vw, 160px) var(--side) 0; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.tekst { max-width: var(--maal); }
.tekst > p, .tekst li { font-size: 1.125rem; }
.tekst ul, .tekst ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.tekst li { margin-bottom: 0.4em; }
.tekst h2:not(:first-child) { margin-top: 1.6em; }
.side-kolonne { display: grid; gap: 28px; position: sticky; top: 24px; }
.side-kolonne figure { margin: 0; }
.side-kolonne img { width: 100%; border-radius: 4px; }
.side-kolonne figcaption { font-size: 0.98rem; color: var(--blaek-2); margin-top: 10px; }

/* Talpyramiden (sådan regnede vi) */
.regning { position: relative; background: var(--papir); padding: 30px clamp(16px, 3vw, 32px) 28px; border-radius: 2px; margin: 0 0 1.4em; }
.regning::before, .regning::after, .faq-papir::before, .faq-papir::after { content: ""; position: absolute; left: 0; right: 0; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Ccircle cx='8' cy='0' r='5' fill='%23e3eae5'/%3E%3C/svg%3E") repeat-x; }
.regning::before, .faq-papir::before { top: 0; }
.regning::after, .faq-papir::after { bottom: 0; transform: scaleY(-1); }
.regning p { margin-bottom: 0.6em; }
.ord { font-stretch: 70%; font-weight: 700; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.taelling { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.taelling li { display: grid; text-align: center; background: var(--grund); min-width: 2.3em; padding: 4px 6px; border-radius: 2px; font-variant-numeric: tabular-nums; margin: 0; font-size: 1rem; }
.taelling b { font-stretch: 70%; text-transform: uppercase; color: var(--blaek-2); font-weight: 650; }
.pyramide { display: grid; gap: 4px; justify-items: center; margin: 0; padding: 0; list-style: none; }
.pyramide li { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.25rem; letter-spacing: 0.28em; margin: 0; }
.pyramide li:last-child { color: var(--felt); font-size: 2rem; font-weight: 900; letter-spacing: 0.12em; }

/* Skala over intervaller */
.skala { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.skala { gap: 10px; }
.skala li { display: grid; grid-template-columns: 5.2em 1fr; gap: 12px; align-items: baseline; background: var(--strimmel); padding: 8px 14px 9px; margin: 0; font-stretch: 70%; font-weight: 650; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.125rem; transform: rotate(var(--r, -0.5deg)); width: fit-content; min-width: min(100%, 22em); }
.skala li:nth-child(2n) { --r: 0.4deg; margin-left: 6px; max-width: calc(100% - 6px); }
.skala li { max-width: 100%; }
.skala b { font-variant-numeric: tabular-nums; color: var(--felt); font-weight: 850; white-space: nowrap; }

/* Tabeller: én linje pr. celle, scroll i rammen, fast første kolonne */
.tabel-wrap { overflow-x: auto; margin: 0 0 1.4em; background: var(--papir); border-radius: 2px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; padding: 10px 14px; white-space: nowrap; border-bottom: 2px solid var(--grund); font-variant-numeric: tabular-nums; }
thead th { font-weight: 750; color: var(--blaek-2); background: var(--papir); }
tbody th { font-weight: 700; }
th:first-child, td:first-child { position: sticky; left: 0; background: var(--papir); }

/* FAQ */
.faq { padding: clamp(64px, 9vw, 160px) var(--side) 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); }
.faq-papir { position: relative; background: var(--papir); padding: 18px clamp(4px, 1.5vw, 16px); border-radius: 2px; }
.faq details { border-bottom: 2px dotted var(--grund-2); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.125rem; padding: 16px 48px 16px 18px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 16px; height: 10px; margin-top: -5px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10'%3E%3Cpath d='M2 2l6 6 6-6' stroke='%23a3143f' stroke-width='3' fill='none'/%3E%3C/svg%3E") no-repeat center; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { padding: 0 18px 16px; margin: 0; max-width: 64ch; }
.faq h2 { position: sticky; top: 24px; }

/* Flere tests: strimler som links */
.flere { padding: clamp(64px, 9vw, 160px) var(--side) clamp(64px, 9vw, 140px); }
.flere ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.flere a { display: block; color: var(--blaek); text-decoration: none; }
.flere img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; transition: transform 0.4s var(--ease); }
.flere a:hover img { transform: scale(1.02); }
.flere b { display: block; width: fit-content; background: var(--strimmel); font-stretch: 66%; font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.6rem); text-transform: uppercase; letter-spacing: 0.02em; padding: 8px 16px 9px; margin: -24px 0 8px 14px; position: relative; transform: rotate(var(--r, -1.2deg)); transition: background-color 0.2s, color 0.2s; }
.flere li:nth-child(2n) b { --r: 0.9deg; }
.flere li:nth-child(3n) b { --r: -0.4deg; }
.flere a:hover b { background: var(--felt); color: #fff; }
.flere span { display: block; font-size: 1.125rem; color: var(--blaek-2); margin-left: 14px; }

/* Bunden: navnet i fuld bredde */
.bund { background: var(--blaek); color: var(--paa-felt); padding: clamp(48px, 7vw, 96px) var(--side) 32px; }
.bund-navn { font-size: min(calc((100vw - 2 * var(--side)) / 12.2), 9rem); font-weight: 900; font-stretch: 100%; letter-spacing: -0.04em; line-height: 0.9; margin: 0 0 0.35em; color: var(--paa-felt); overflow-wrap: anywhere; }
.bund p { max-width: 60ch; color: var(--paa-felt-2); }
.bund a { color: var(--paa-felt); }
.bund nav { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 18px 0 26px; }
.bund nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Margeritten */
.blomst { display: block; width: min(100%, 340px); margin: 6px auto 4px; touch-action: manipulation; }
.blomst .blad { fill: #fff; stroke: #ecd2d9; stroke-width: 1.5; cursor: pointer; transform-box: view-box; transform-origin: 160px 160px; transition: transform 0.55s var(--ease), opacity 0.45s ease; }
.blomst .blad:hover { fill: #fff3f6; }
.blomst .blad.pluk { opacity: 0; transform: rotate(var(--v)) translateY(-150px) rotate(40deg); pointer-events: none; }
.blomst .midte { fill: var(--felt); }
.blomst .stilk { stroke: var(--stempel); stroke-width: 7; stroke-linecap: round; fill: none; }
.pluk-tal { text-align: center; font-weight: 650; color: var(--blaek-2); margin: 0 0 10px; }

/* FLAMES-bogstaver */
.flames-raekke { display: flex; gap: 6px; margin: 10px 0 14px; padding: 0; list-style: none; }
.flames-raekke li { flex: 1 1 0; min-width: 0; max-width: 2.4em; height: 2.4em; display: grid; place-items: center; background: var(--strimmel); font-weight: 850; font-stretch: 90%; font-size: 1.5rem; margin: 0; transition: opacity 0.3s, background-color 0.3s; }
.flames-raekke li.ud { opacity: 0.35; text-decoration: line-through 3px var(--felt); }
.flames-raekke li.valgt { background: var(--felt); color: #fff; }

/* Quiz */
.quiz fieldset { border: 0; margin: 0; padding: 14px 0; border-bottom: 2px dotted var(--grund-2); }
.quiz legend { font-weight: 750; font-size: 1.12rem; padding: 0; margin-bottom: 8px; }
.svar { display: flex; flex-wrap: wrap; gap: 6px; }
.svar label { position: relative; }
.svar input { position: absolute; opacity: 0; inset: 0; }
.svar span { display: block; padding: 9px 12px; background: var(--grund); border-radius: 2px; cursor: pointer; font-size: 1rem; transition: background-color 0.15s; }
.svar input:checked + span { background: var(--felt); color: #fff; }
.svar input:focus-visible + span { outline: 3px solid var(--stempel); outline-offset: 2px; }
.svar label:hover span { background: var(--grund-2); }
.svar input:checked:hover + span { background: var(--felt-moerk); }

/* Bevægelse: strimlerne klistres på, procenten tæller op */
@media (prefers-reduced-motion: no-preference) {
  .resultat.ind .strimmel, .resultat.ind .procent, .resultat.ind .bjaelke, .resultat.ind .resultat-tekst, .resultat.ind .handlinger, .resultat.ind .flames-raekke {
    animation: klistr 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms);
  }
  .resultat.ind .bjaelke span { animation: fyld 1.1s var(--ease) both; animation-delay: 0.35s; }
  .op { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .op.vist { opacity: 1; transform: none; }
}
@keyframes klistr { from { opacity: 0; transform: translateY(-14px) rotate(-4deg) scale(1.04); } }
@keyframes fyld { from { transform: scaleX(0); } }
@media (scripting: none) { .op { opacity: 1; transform: none; } }

/* Tablet og mobil */
@media (max-width: 960px) {
  .felt, .indhold, .faq { grid-template-columns: minmax(0, 1fr); }
  .side-kolonne, .faq h2 { position: static; }
  .felt-billede { display: none; }
  .felt-billede-mobil { display: block; margin: 0; }
  .felt-billede-mobil img { width: 100%; border-radius: 4px; }
}
@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .top { gap: 6px 16px; padding-top: 12px; padding-bottom: 12px; }
  .menu { margin-left: 0; width: 100%; gap: 0 16px; }
  .menu a { white-space: nowrap; padding: 5px 0; min-height: 44px; }
  .felt { padding-top: 22px; }
  .stempel { top: 20px; font-size: 0.95rem; }
  .top > * { min-width: 0; }
  .linje { grid-template-columns: 2.6em 1fr; gap: 8px; }
  .linje input, .linje select { font-size: 1.2rem; }
  .skala li { grid-template-columns: 4.6em 1fr; }
}
@media print { .top, .flere, .bund nav { display: none; } .felt { background: none; color: #000; } }
.procent.ordresultat { white-space: normal; overflow-wrap: normal; hyphens: none; font-size: clamp(2.6rem, 12vw, 4.4rem); font-stretch: 100%; letter-spacing: -0.035em; }
.find-tegn { display: grid; gap: 6px; margin-top: 16px; font-size: 1rem; color: var(--blaek-2); }
.find-tegn input { font: inherit; color: var(--blaek); background: var(--grund); border: 0; border-radius: 2px; padding: 10px 12px; max-width: 220px; }
.find-tegn output { color: var(--stempel); font-weight: 650; }
@media (min-width: 961px) { .felt-billede-mobil { display: none; } }
@media (max-width: 960px) { .flere ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .flere ul { grid-template-columns: minmax(0, 1fr); } }
.plukknapper .knap { flex-basis: 120px; white-space: nowrap; padding-left: 14px; padding-right: 14px; }
