/* Lys/mørk tilstand: følger systemet, medmindre der er valgt et tema med knappen (data-theme på <html>) */
:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef1f5;
    --text: #17191c;
    --muted: #5d636b;
    --border: #dde1e6;
    --accent: #0067c0;
    --accent-2: #0a84e0;
    --accent-text: #ffffff;
    --error: #dc1e28;
    --tint: #e2f5de;
    --selection: #cce4f7;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .10);
    --radius: 14px;
    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #161719;
        --surface: #202124;
        --surface-2: #2a2b2f;
        --text: #f0f0f0;
        --muted: #a4a8ae;
        --border: #36383d;
        --accent: #4cc2ff;
        --accent-2: #7dd3ff;
        --accent-text: #00131f;
        --error: #ff6363;
        --tint: #22342c;
        --selection: #005a9e;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #161719;
    --surface: #202124;
    --surface-2: #2a2b2f;
    --text: #f0f0f0;
    --muted: #a4a8ae;
    --border: #36383d;
    --accent: #4cc2ff;
    --accent-2: #7dd3ff;
    --accent-text: #00131f;
    --error: #ff6363;
    --tint: #22342c;
    --selection: #005a9e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 16px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
img { display: block; }
code {
    font-family: "Cascadia Code", Consolas, monospace;
    font-size: .9em;
    background: var(--surface-2);
    border-radius: 5px;
    padding: .1em .35em;
}

kbd {
    display: inline-block;
    min-width: 1.8em;
    padding: .05em .45em;
    font: 600 .85em/1.5 var(--font);
    text-align: center;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 6px;
}

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }

/* ---------- top */
.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--border);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none;
    font: 600 1.1rem var(--font-display);
}
.nav { display: flex; align-items: center; gap: 22px; }
.nav > a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav > a:not(.btn):hover { color: var(--text); }

/* sprogskift DA | EN */
.switch { display: inline-flex; align-items: stretch; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.switch a {
    display: inline-flex; align-items: center;
    padding: .3em .75em; font-size: .8rem; font-weight: 600; letter-spacing: .03em;
    color: var(--muted); text-decoration: none;
}
.switch a + a { border-left: 1px solid var(--border); }
.switch a:hover { color: var(--text); background: var(--surface-2); }
.switch a[aria-current="true"] { background: var(--surface-2); color: var(--text); }

/* temaknap: følg system → lyst → mørkt */
.theme-btn {
    display: inline-grid; place-items: center;
    width: 34px; height: 30px; padding: 0;
    border: 1px solid var(--border); border-radius: 9px;
    background: transparent; color: var(--muted); cursor: pointer;
}
.theme-btn:hover { color: var(--text); background: var(--surface-2); }
.theme-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: none; }
:root:not([data-theme]) .theme-btn .ic-auto,
:root[data-theme="light"] .theme-btn .ic-light,
:root[data-theme="dark"] .theme-btn .ic-dark { display: block; }

/* ---------- knapper */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--accent);
    color: var(--accent-text);
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    padding: .6em 1.1em;
    transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.btn:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--small { padding: .35em .9em; font-size: .9rem; }
.btn--big { font-size: 1.1rem; padding: .85em 1.5em; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- hero */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.eyebrow {
    display: inline-block; margin: 0 0 16px;
    font-size: .85rem; font-weight: 600; letter-spacing: .02em;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: .25em .8em; border-radius: 99px;
}
h1 {
    font: 700 clamp(2.1rem, 4.4vw, 3.4rem)/1.1 var(--font-display);
    letter-spacing: -.02em;
    margin: 0 0 20px;
}
.wavy {
    text-decoration: underline wavy var(--error);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}
.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 32px; max-width: 34em; }
.cta .meta { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }

/* telefoner og tablets: ingen download af .exe, men en besked om at bruge en pc */
.mobile-note { display: none; }
.is-mobile .dl-only { display: none; }
.is-mobile .mobile-note {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; max-width: 30em;
}
.mobile-note > svg {
    flex: none; width: 28px; height: 28px; margin-top: 2px; color: var(--accent);
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.mobile-note p { margin: 4px 0 12px; color: var(--muted); }
.mobile-note .btn { border: 0; font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; }

/* advarselssiden i download.php */
.notice { max-width: 34em; margin: 12vh auto; padding: 28px; background: var(--surface);
          border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.notice h1 { font-size: 1.6rem; margin: 0 0 12px; }
.notice p { color: var(--muted); margin: 0 0 22px; }
.notice .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn--ghost:hover { background: var(--surface-2); }

/* ---------- illustration af programmet */
.mock {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: .95rem;
}
.mock__bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.mock__title { margin-left: 8px; font-size: .85rem; color: var(--muted); }
.mock__tools { display: flex; gap: 8px; padding: 12px 14px 4px; align-items: center; }
.spacer { flex: 1; }
.chip {
    font-size: .8rem; padding: .25em .7em; border-radius: 8px;
    border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
    white-space: nowrap;
}
.chip--check { background: transparent; border-color: transparent; color: var(--muted); }
.mock__text {
    margin: 10px 14px 14px; padding: 16px 18px; min-height: 330px;
    background: var(--bg); border-radius: 10px; line-height: 1.9;
}
.err {
    text-decoration: underline wavy var(--error);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}
.caret { position: relative; }
.caret::after {
    content: ""; position: absolute; right: -2px; top: .2em; bottom: .2em; width: 2px;
    background: var(--text); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* forslagsboksen med to kolonner (som i programmet) */
.sug {
    position: absolute; left: 34px; top: 178px;
    display: flex; gap: 8px; padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
    font-size: .9rem;
    animation: pop .5s .3s both cubic-bezier(.2, .9, .3, 1.3);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
.sug__col { width: 168px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); }
.sug__col--long { background: var(--tint); align-self: flex-start; }
.sug__title { font-size: .72rem; color: var(--muted); padding: 4px 8px; border-bottom: 1px solid var(--border); }
.sug__row { display: flex; align-items: center; height: 28px; padding-right: 8px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.sug__col--long .sug__row { padding-left: 10px; }
.sug__col--long .sug__row:last-child { border-bottom: 0; }
.sug__row--hot { background: var(--selection); }
.sug__num {
    width: 26px; align-self: stretch; display: grid; place-items: center; margin-right: 8px;
    font-size: .75rem; color: var(--muted); background: var(--bg); border-right: 1px solid var(--border);
}
.sug__pager { text-align: center; font-size: .75rem; color: var(--muted); padding: 4px 0; }

/* ---------- sektioner */
.section { padding: 80px 0; }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }
h2 { font: 700 clamp(1.6rem, 3vw, 2.2rem)/1.2 var(--font-display); letter-spacing: -.01em; margin: 0 0 32px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__icon {
    width: 44px; height: 44px; display: grid; place-items: center;
    border-radius: 11px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 13%, transparent);
    margin-bottom: 14px;
}
.card__icon svg {
    width: 24px; height: 24px;
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.keys { width: 100%; border-collapse: collapse; }
.keys td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.keys tr:last-child td { border-bottom: 0; }
.keys td:first-child { white-space: nowrap; width: 1%; padding-right: 28px; }
.keys td:last-child { color: var(--muted); }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li {
    counter-increment: s; position: relative;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px 18px 66px; color: var(--muted);
}
.steps li::before {
    content: counter(s); position: absolute; left: 20px; top: 50%; translate: 0 -50%;
    width: 30px; height: 30px; display: grid; place-items: center;
    border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700;
}
.steps li > span:first-child { color: var(--text); font-weight: 600; }

details {
    border: 1px solid var(--border); border-radius: 12px;
    background: var(--bg); padding: 0 18px; margin-bottom: 10px;
}
summary {
    cursor: pointer; list-style: none; padding: 15px 0; font-weight: 600;
    display: flex; justify-content: space-between; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 1.3em; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { margin: 0 0 16px; color: var(--muted); }

.foot { padding: 28px 0 40px; color: var(--muted); font-size: .85rem; }
.foot__inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ---------- mindre skærme */
@media (max-width: 1100px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero { padding-top: 48px; }
    .hero__grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
    .nav { gap: 12px; }
    .nav > a:not(.btn) { display: none; }
    .grid { grid-template-columns: 1fr; }
    .mock__tools .chip:not(.chip--select) { display: none; }
    .sug { left: 14px; top: auto; bottom: 22px; }
    .mock__text { min-height: 420px; }
    .sug__col--long { display: none; }
    .keys td:first-child { white-space: normal; }
}
@media (max-width: 440px) {
    .brand span { display: none; }
}

/* matrix-overgang ved temaskift (assets/matrix.js) */
.matrix-rain {
    position: fixed; inset: 0; width: 100vw; height: 100vh;
    z-index: 1000; pointer-events: none;
    view-transition-name: matrix;
}
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(matrix) { display: none; }
::view-transition-new(matrix) { animation: none; }
::view-transition-group(matrix) { animation: none; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
