:root {
    --bg: #F5F5F0;
    --fg: #1a1a2e;
    --line: #d1d5db;
}

* { box-sizing: border-box; }

/* hidden-attributten skal altid vinde over display:flex/grid nedenfor */
[hidden] { display: none !important; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > .home { flex: 1; }
.container { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.home { padding: 40px 0; }
.center { text-align: center; }

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 32px; }
.hero-icon { font-size: 72px; line-height: 1; }
.hero h1 { font-size: 48px; font-weight: 900; margin: 12px 0; line-height: 1.1; }
.lead { font-size: 24px; font-weight: 600; color: #374151; margin: 8px 0; }
.sub { font-size: 20px; color: #4b5563; max-width: 36rem; margin: 8px auto 0; }

/* ── Form ── */
#search-form { margin-bottom: 24px; }
#search-form label { display: block; font-size: 20px; font-weight: 700; margin-bottom: 12px; }
#search-form input[type=url] {
    width: 100%; font-size: 20px; color: #111827; background: #fff;
    border: 2px solid #9ca3af; border-radius: 12px; padding: 16px 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
#search-form input[type=url]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 4px #bfdbfe; }
#search-form input:disabled { background: #f3f4f6; cursor: not-allowed; }
.input-error { margin-top: 8px; font-size: 20px; color: #b91c1c; font-weight: 600; }
.honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: none; border-radius: 12px; cursor: pointer; font-weight: 700;
    text-decoration: none; transition: background-color .15s; font-family: inherit;
}
.btn-lg, .btn-block { width: 100%; min-height: 64px; font-size: 24px; font-weight: 900; margin-top: 16px; }
.btn-block { font-size: 20px; }
.btn-primary { background: #1d4ed8; color: #fff; box-shadow: 0 8px 15px -6px rgba(29,78,216,.6); }
.btn-primary:hover { background: #1e40af; }
.btn-orange { background: #f97316; color: #fff; }
.btn-orange:hover { background: #ea580c; }
.btn-indigo { background: #4338ca; color: #fff; }
.btn-indigo:hover { background: #3730a3; }
.btn-red { background: #b91c1c; color: #fff; }
.btn-red:hover { background: #991b1b; }
.btn-outline { background: #fff; color: #111827; border: 2px solid #9ca3af; }
.btn-outline:hover { background: #f3f4f6; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.link-btn { background: none; border: none; color: #6b7280; text-decoration: underline; cursor: pointer;
    font-size: 16px; font-family: inherit; }
.link-btn:hover { color: #374151; }

/* ── Features ── */
.features { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 24px 0; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    background: #fff; border: 2px solid #e5e7eb; border-radius: 12px; padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05); font-size: 20px; font-weight: 500; }
.feature span:first-child { font-size: 40px; }

/* ── Footer ── */
.site-footer { background: #0f172a; color: #fff; padding: 14px 0; margin-top: 80px; border-top: 1px solid #10b981; }
.site-footer .container { text-align: center; }
.site-footer h3 { font-size: 14px; margin: 0 0 4px; }
.site-footer p { font-size: 12px; color: #cbd5e1; margin: 4px 0; }
.site-footer .author { color: #fff; font-weight: 700; text-decoration: underline; text-decoration-color: #10b981; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; font-size: 12px; margin: 8px 0; }
.footer-meta a { color: #cbd5e1; text-decoration: underline; }
.footer-meta a:hover { color: #34d399; }
.site-footer .sep { color: #475569; }
.site-footer .disclaimer { max-width: 36rem; margin: 12px auto 0; }
.site-footer .copyright { color: #94a3b8; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.5); padding: 16px; }
.modal { background: #fff; border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,.3); width: 100%; max-width: 512px;
    max-height: 85vh; overflow-y: auto; }
.modal-header { position: sticky; top: 0; background: #fff; border-bottom: 1px solid #f3f4f6;
    display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; }
.modal-header h2 { font-size: 18px; margin: 0; }
.modal-close { background: none; border: none; font-size: 24px; color: #9ca3af; cursor: pointer; }
.modal-body { padding: 8px 24px 24px; font-size: 14px; }
.modal-body .muted { color: #6b7280; }
.lim { display: flex; gap: 12px; margin: 16px 0; }
.lim span[aria-hidden] { font-size: 24px; }
.lim strong { display: block; color: #1f2937; font-size: 14px; }
.lim p { color: #4b5563; font-size: 14px; margin: 4px 0 0; }
.fine { font-size: 14px; color: #6b7280; }
.fine.italic { font-style: italic; }

/* ── Result card ── */
.result-card { width: 100%; max-width: 680px; margin: 24px auto 0; border-radius: 16px; overflow: hidden;
    border: 2px solid var(--line); box-shadow: 0 20px 40px -12px rgba(0,0,0,.25); background: #fff; }
.banner { color: #fff; padding: 28px 32px; text-align: center; }
.banner-green { background: #15803d; }
.banner-yellow { background: #f59e0b; }
.banner-red { background: #991b1b; }
.banner-title { font-size: 34px; font-weight: 900; margin: 0; line-height: 1.15; }
.banner-sub { font-size: 20px; margin: 8px 0 0; opacity: .92; }
.result-body { background: var(--bg); padding: 32px; display: flex; flex-direction: column; gap: 20px; }

.score-row { display: flex; align-items: center; gap: 24px; }
.score-label { font-size: 24px; font-weight: 900; margin: 0; }
.score-value { font-size: 20px; color: #4b5563; margin: 4px 0 0; }
.score-value strong { color: #111827; }
.hint { font-size: 14px; color: #6b7280; margin: -12px 0 0; }

/* Trafiklys */
.traffic-light { display: flex; flex-direction: column; gap: 12px; background: #111827; border-radius: 18px;
    padding: 20px; flex-shrink: 0; }
.tl-lamp { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    opacity: .18; color: #fff; font-size: 28px; font-weight: 900; }
.tl-red { background: #b91c1c; }
.tl-yellow { background: #b45309; }
.tl-green { background: #15803d; }
.tl-lamp.on { opacity: 1; }
.tl-red.on { box-shadow: 0 0 22px 8px rgba(185,28,28,.6); }
.tl-yellow.on { box-shadow: 0 0 22px 8px rgba(180,83,9,.6); }
.tl-green.on { box-shadow: 0 0 22px 8px rgba(21,128,61,.6); }

/* Bokse */
.box { border-radius: 16px; padding: 20px 24px; border: 2px solid; }
.box-title { font-size: 22px; font-weight: 900; margin: 0 0 8px; }
.box-amber { border-color: #fbbf24; background: #fffbeb; color: #92400e; }
.box-green { border-color: #22c55e; background: #f0fdf4; color: #166534; }
.box-orange { border-color: #fdba74; background: #fff7ed; }
.box-plain { border-color: var(--line); background: #fff; }
.box-blue { border-color: #93c5fd; background: #eff6ff; color: #1e3a8a; }
.blue { color: #1e3a8a; }
.check-list, .reason-list, .subscore-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; align-items: center; gap: 12px; font-size: 20px; margin: 8px 0; }
.reason-list li { display: flex; align-items: flex-start; gap: 16px; margin: 16px 0; }
.warn-icon { font-size: 24px; }
.reason-title { font-size: 20px; font-weight: 700; margin: 0; }
.reason-friendly { font-size: 18px; color: #374151; margin: 4px 0 0; }

/* ── Tryghedssektion ── */
.tryghed { background: #fff; border-top: 2px solid #e5e7eb; }
.tryghed-head { background: #334155; padding: 24px 32px; }
.tryghed-title { font-size: 24px; font-weight: 900; color: #fff; margin: 0; }
.tryghed-sub { font-size: 18px; color: #cbd5e1; margin: 4px 0 0; }
.tryghed-note { display: flex; gap: 12px; margin: 16px; }
.tryghed-note p { margin: 0; }

.cat { border-bottom: 2px solid #f3f4f6; }
.cat-head, .item-head { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    background: #fff; border: none; cursor: pointer; padding: 20px 24px; min-height: 80px; font-family: inherit; }
.cat-head:hover, .item-head:hover { background: #f9fafb; }
.cat-head.open { background: #f1f5f9; }
.cat-icon { font-size: 30px; flex-shrink: 0; }
.cat-main, .item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cat-title { font-size: 20px; font-weight: 900; }
.cat-subtitle { font-size: 16px; color: #6b7280; }
.cat-summary { align-self: flex-start; margin-top: 4px; font-size: 14px; font-weight: 700;
    padding: 4px 12px; border-radius: 999px; }
.sum-warn { color: #c2410c; background: #ffedd5; }
.sum-notice { color: #ea580c; background: #fff7ed; }
.sum-ok { color: #15803d; background: #f0fdf4; }
.sum-none { color: #4b5563; background: #f3f4f6; }
.chevron { font-size: 22px; color: #9ca3af; flex-shrink: 0; transition: transform .2s; }
.open > .chevron { transform: rotate(180deg); }

.cat-body { background: #f9fafb; border-left: 4px solid #cbd5e1; padding: 12px; display: flex;
    flex-direction: column; gap: 8px; }
.item { border: 2px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; }
.item-head { min-height: 68px; padding: 16px; }
.item-head.open { background: #f1f5f9; }
.item-icon { font-size: 24px; }
.item-label { font-size: 18px; font-weight: 700; color: #111827; }
.item-status { font-size: 16px; font-weight: 500; }
.st-warning { color: #c2410c; }
.st-notice { color: #f97316; }
.st-ok { color: #15803d; }
.st-na { color: #d97706; }
.st-limited { color: #1d4ed8; }
.item-body { padding: 16px; border-top: 2px solid #e2e8f0; display: flex; flex-direction: column; gap: 12px; }
.item-desc { font-size: 18px; color: #4b5563; margin: 0; }
.item-friendly { font-size: 18px; color: #1f2937; background: #fff7ed; border: 2px solid #fed7aa;
    border-radius: 12px; padding: 16px 20px; margin: 0; }
.subscore-list li { display: flex; align-items: center; gap: 8px; font-size: 18px; color: #b91c1c; margin: 8px 0; }
.maps-link { color: #1d4ed8; font-weight: 600; text-decoration: underline; }

/* ── Report / promise / disclaimer ── */
.report-section { border-top: 1px solid #bfdbfe; background: #eff6ff; padding: 32px; color: #1e3a8a;
    display: flex; flex-direction: column; gap: 16px; }
.report-section p { margin: 0; }
.report-link { display: flex; align-items: center; gap: 20px; min-height: 72px; padding: 16px 24px;
    border-radius: 12px; background: #1d4ed8; color: #fff; text-decoration: none; border: none;
    cursor: pointer; text-align: left; font-family: inherit; font-size: 18px; }
.report-link:hover { background: #1e40af; }
.report-flag { background: #475569; width: 100%; }
.report-flag:hover { background: #334155; }
.report-link small { font-weight: 400; opacity: .9; }
.report-thanks { color: #166534; background: #dcfce7; border: 1px solid #86efac; border-radius: 12px;
    padding: 16px; text-align: center; }

.feedback-ask p { margin: 0 0 12px; font-size: 20px; }
.feedback-thanks { font-size: 20px; font-weight: 600; color: #374151; text-align: center; }

.promise { background: #eff6ff; border-top: 2px solid #bfdbfe; padding: 28px 32px; text-align: center; }
.promise-title { font-size: 24px; font-weight: 900; color: #1e3a8a; margin: 0 0 8px; }
.promise p { color: #1e40af; max-width: 36rem; margin: 0 auto; font-size: 18px; }

.footer-disclaimer { padding: 24px 32px; border-top: 2px solid #fcd34d; background: #fffbeb; text-align: center; }
.footer-disclaimer p { margin: 2px 0; }
.footer-disclaimer .strong { font-size: 18px; font-weight: 700; color: #92400e; }

/* ── Error / spinner ── */
.error-box { border: 2px solid #f87171; background: #fef2f2; border-radius: 12px; padding: 24px;
    font-size: 20px; color: #991b1b; font-weight: 500; margin-top: 24px; }
.error-box p { margin: 0; }

.spinner-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 40px 0; text-align: center; }
.spinner { width: 64px; height: 64px; border: 4px solid #bfdbfe; border-top-color: #2563eb; border-radius: 50%;
    animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-icon { font-size: 40px; margin: 0; }
.spinner-text { font-size: 20px; font-weight: 600; color: #374151; margin: 0; }
.spinner-sub { font-size: 18px; color: #6b7280; margin: 0; }

@media print { body { font-size: 14px; } }
