/* lavqrkode.dk - undersider. Samme rolige sort/hvide look som forsidens generator. */
:root { --sort: #000; --tekst: #111827; --graa: #4b5563; --svag: #6b7280; --linje: #e5e7eb; --bg: #fff; --flade: #f9fafb; --mint: #d1fae5; --mint-moerk: #047857; --roed: #b91c1c; --radius: 10px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--tekst); font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--sort); }
img { max-width: 100%; }
.wrap { max-width: 64rem; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 30; }

/* Top */
.top { border-bottom: 1px solid var(--linje); background: #fff; position: sticky; top: 0; z-index: 10; }
.top .wrap { max-width: 72rem; } /* 7 menupunkter kræver mere bredde end indholdet (64rem) */
.top-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sort); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.menu { display: flex; gap: 2px; flex-wrap: nowrap; }
.menu a { text-decoration: none; color: var(--graa); font-weight: 600; font-size: .93rem; padding: 7px 10px; border-radius: 8px; white-space: nowrap; }
.menu a:hover { background: var(--flade); color: var(--sort); }
.menu a[aria-current] { background: var(--sort); color: #fff; }
.menu-knap { display: none; }
@media (max-width: 1140px) {
  .menu-knap { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; background: #fff; border: 1px solid var(--linje); border-radius: 10px; cursor: pointer; }
  .menu-knap span { display: block; height: 2px; border-radius: 2px; background: var(--sort); transition: transform .25s ease, opacity .25s ease; }
  .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: 0; width: 280px; max-width: calc(100vw - 40px); flex-direction: column; padding: 8px; background: #fff; border: 1px solid var(--linje); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.12); z-index: 20; }
  .top.menu-aaben .menu { display: flex; }
  .menu a { padding: 11px 14px; font-size: 1rem; }
}
@media (max-width: 480px) { .menu { left: 0; right: 0; width: auto; max-width: none; } }

/* Indhold */
.hero { padding: 36px 0 8px; text-align: center; }
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.02em; }
.hero .ingress { color: var(--graa); font-size: 1.1rem; max-width: 46rem; margin: 0 auto; }
.kort { background: #fff; border: 1px solid var(--linje); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.06); padding: 24px; margin: 24px 0; }
.tekst { padding-bottom: 24px; }
.tekst h2 { font-size: 1.5rem; line-height: 1.25; margin: 1.6em 0 .5em; letter-spacing: -.01em; }
.tekst h3 { font-size: 1.15rem; margin: 1.3em 0 .4em; }
.tekst p, .tekst li { color: #374151; }
.tekst ul, .tekst ol { padding-left: 1.3em; }
.tekst li { margin: 4px 0; }
.illustration { margin: 6px 0 18px; }
.illustration img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--flade); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
@media (min-width: 761px) { .illustration { float: right; width: 40%; margin: 6px 0 16px 28px; } }
.kort, .tabel-wrap, .faq, .tekst h2.ryd { clear: both; }
.boks { display: flow-root; background: var(--flade); border: 1px solid var(--linje); border-radius: var(--radius); padding: 14px 18px; margin: 16px 0; }
.boks p { margin: 6px 0; }

/* Generator */
.gen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 760px) { .gen { grid-template-columns: minmax(0, 1fr); } }
.gen h2 { margin: 0 0 14px; font-size: 1.2rem; }
.felter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.felter.en { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 520px) { .felter { grid-template-columns: minmax(0, 1fr); } }
.felter > .felt { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 5px; margin-bottom: 14px; }
.felt > .etiket { font-weight: 700; font-size: .95rem; }
.felt > small { color: var(--svag); font-size: .85rem; line-height: 1.4; }
.felt > :nth-child(2) { align-self: end; }
input[type=text], input[type=url], input[type=email], input[type=tel], input[type=password], textarea, select { width: 100%; height: 48px; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: var(--tekst); }
textarea { height: auto; min-height: 96px; resize: vertical; }
select { -webkit-appearance: none; appearance: none; padding-right: 38px; cursor: pointer; background: #fff 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='%234b5563' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--sort); outline-offset: 1px; border-color: var(--sort); }
input[type=color] { width: 100%; height: 48px; padding: 4px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer; }
input[type=file] { width: 100%; height: 48px; font: inherit; font-size: .9rem; padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 10px; padding: 3px 10px; border: 1px solid #d1d5db; border-radius: 6px; background: var(--flade); cursor: pointer; }

/* Valg med flueben */
.valg { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.valg label { position: relative; cursor: pointer; }
.valg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.valg span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border: 2px solid var(--linje); border-radius: 10px; background: #fff; font-weight: 600; color: var(--graa); }
.valg span i { width: 18px; height: 18px; border: 2px solid #d1d5db; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.valg input:checked + span { border-color: var(--sort); color: var(--sort); }
.valg input:checked + span i { background: var(--sort); border-color: var(--sort); }
.valg input:checked + span i::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.valg input:focus-visible + span { outline: 2px solid var(--sort); outline-offset: 2px; }
.valg-titel { font-weight: 700; font-size: .95rem; display: block; margin-bottom: 2px; }
@media (max-width: 520px) { .valg { display: grid; grid-template-columns: 1fr; } .valg span { display: flex; } }

.knap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; font: inherit; font-weight: 700; font-size: .95rem; color: #fff; background: var(--sort); border: 0; border-radius: 8px; cursor: pointer; text-decoration: none; }
.knap:hover { background: #1f2937; }
.knap.lys { background: #fff; color: var(--sort); border: 1px solid #d1d5db; }
.knap.lys:hover { background: var(--flade); }
.knap:disabled { opacity: .5; cursor: default; }
.knapper { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.knap-stor { width: 100%; height: 48px; font-size: 1rem; }

.resultat { display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 260px; justify-content: center; background: var(--flade); border: 1px solid var(--linje); border-radius: 12px; padding: 20px; }
.resultat canvas, .resultat svg { max-width: 100%; height: auto; background: #fff; border-radius: 6px; }
.resultat .tom { color: var(--svag); text-align: center; margin: 0; }
.besked { font-size: .92rem; margin: 6px 0 0; }
.besked.fejl { color: var(--roed); font-weight: 600; }
.besked.ok { color: var(--mint-moerk); font-weight: 600; }
.lille { font-size: .88rem; color: var(--svag); }

/* Scanner */
.video-ramme { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; background: #111; border-radius: 12px; overflow: hidden; }
.video-ramme video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-ramme::after { content: ""; position: absolute; inset: 18%; border: 3px solid rgba(255,255,255,.85); border-radius: 14px; pointer-events: none; }
.fund { width: 100%; background: #fff; border: 1px solid var(--linje); border-radius: 10px; padding: 12px 14px; word-break: break-word; }

/* Tabeller */
.tabel-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 14px 0 20px; border: 1px solid var(--linje); border-radius: 10px;
  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(0,0,0,.18), transparent) left center / 10px 100% no-repeat scroll,
              radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.18), transparent) right center / 10px 100% no-repeat scroll;
  background-color: #fff; }
table.data { border-collapse: collapse; width: 100%; min-width: 100%; font-size: .95rem; background: transparent; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--linje); text-align: left; white-space: nowrap; }
table.data th { background: var(--flade); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
@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(--linje); } .tabel-wrap table.data thead th:first-child { background: var(--flade); } }

/* FAQ */
.faq details { border: 1px solid var(--linje); border-radius: 10px; padding: 12px 16px; margin: 0 0 10px; background: #fff; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 10px 0 2px; color: #374151; }

/* Bund */
.bund { border-top: 1px solid var(--linje); margin-top: 40px; padding: 24px 0 30px; text-align: center; color: var(--svag); font-size: .93rem; }
.bund nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-bottom: 12px; }
.bund a { color: var(--graa); text-decoration: none; }
.bund a:hover { color: var(--sort); text-decoration: underline; }

/* QR-kode som PNG: ternet baggrund viser gennemsigtighed */
.resultat canvas.gennemsigtig { background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.resultat .lille { margin: 0; text-align: center; }
