/* tangle.dk - "nøglen i mørket": natblå flade, tre snore i rød, gul og mynte; Commissioner hele vejen */
@font-face { font-family: "Commissioner"; src: url("/assets/fonts/commissioner.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --nat: #141826;
  --nat-2: #1d2235;
  --nat-3: #283048;
  --lys: #eceae2;
  --daemp: #a9adbd;
  --roed: #ff6b57;
  --gul: #ffd166;
  --mynte: #6ad1c0;
  --linje: #2f3650;
  --skrift: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mal: 66ch;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
body { margin: 0; background: var(--nat); color: var(--lys); font-family: var(--skrift); font-size: 1.0625rem; line-height: 1.65; }
img, svg { max-width: 100%; }
a { color: var(--gul); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--mynte); outline-offset: 3px; }
.ramme { width: min(1100px, 100% - 32px); margin-inline: auto; }
.spring { position: absolute; left: -9999px; }
.spring:focus { left: 16px; top: 12px; background: var(--gul); color: var(--nat); padding: 8px 12px; z-index: 10; }

h1, h2, h3 { line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 850; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 750; margin-top: 1.5em; }
h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.3em; }
p, li { max-width: var(--mal); }
.indledning { font-size: clamp(1.1rem, 2vw, 1.28rem); color: #cfd1da; font-weight: 350; }

.knude path { fill: none; stroke-width: 4.5; stroke-linecap: round; }
.knude .s1 { stroke: var(--roed); } .knude .s2 { stroke: var(--gul); } .knude .s3 { stroke: var(--mynte); }
.knude-lille { width: 34px; height: 34px; }

/* Sidehoved */
.top { border-bottom: 1px solid var(--linje); }
.top-ind { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 14px 0; }
.ordmaerke { display: inline-flex; align-items: center; gap: 10px; color: var(--lys); text-decoration: none; font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.ordmaerke b { color: var(--roed); font-weight: 800; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.menu a { color: var(--lys); text-decoration: none; font-weight: 500; padding: 4px 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--mynte); }

/* Forside */
.helt { padding: clamp(40px, 8vw, 100px) 0 clamp(36px, 6vw, 72px); }
.helt-ind { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; }
.helt h1 span { color: var(--gul); }
.helt-fig svg { display: block; width: 100%; height: auto; }
.helt-fig path { fill: none; stroke-width: 9; stroke-linecap: round; }

.knapper { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.knap { display: inline-block; background: var(--gul); color: var(--nat); text-decoration: none; font-weight: 700; padding: 12px 22px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.knap:hover { background: #ffe199; }
.knap-lys { background: var(--nat-3); color: var(--lys); }
.knap-lys:hover { background: #36405e; }

.sektion { padding: clamp(36px, 6vw, 72px) 0; border-top: 1px solid var(--linje); }
.sektion h2:first-child { margin-top: 0; }
.tre { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tre a { display: flex; flex-direction: column; gap: 8px; padding: 24px 22px; background: var(--nat-2); border-radius: 18px; color: var(--lys); text-decoration: none; }
.tre a:hover { background: var(--nat-3); }
.tre svg { width: 54px; height: 54px; }
.tre svg path { fill: none; stroke-width: 4; stroke-linecap: round; }
.tre b { font-size: 1.25rem; }
.tre span { color: var(--daemp); }
.fakta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }

/* Tekstsider */
.tekstside { padding: clamp(32px, 6vw, 64px) 0 72px; }
.side-top { padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--linje); }
.artikel { max-width: 760px; }
.artikel ul, .artikel ol { padding-left: 1.3em; }
.artikel li { margin-bottom: .5em; }
.artikel li::marker { color: var(--mynte); font-weight: 700; }
.notat { background: var(--nat-2); border-radius: 14px; padding: 18px 22px; margin: 28px 0; }
.notat p { margin: 0; }
.trinfig { margin: 24px 0; }
.trinfig svg { display: block; width: 100%; max-width: 640px; height: auto; }
.trinfig figcaption { color: var(--daemp); font-size: .95rem; margin-top: 8px; }

/* Spillet */
.spil { background: var(--nat-2); border-radius: 22px; padding: clamp(14px, 2.4vw, 26px); margin: 24px 0; }
.spil-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 12px; }
.spil-status { display: flex; flex-wrap: wrap; gap: 8px 18px; font-variant-numeric: tabular-nums; }
.spil-status b { color: var(--gul); }
.bane { display: block; width: min(100%, 72vh); height: auto; aspect-ratio: 1 / 1; margin-inline: auto; background: var(--nat); border-radius: 16px; touch-action: none; user-select: none; -webkit-user-select: none; }
.bane .k { stroke: #8890aa; stroke-width: 3; stroke-linecap: round; }
.bane .k.kryds { stroke: var(--roed); }
.bane .p { fill: var(--gul); stroke: var(--nat); stroke-width: 3; cursor: grab; }
.bane .p.aktiv { fill: var(--mynte); cursor: grabbing; }
.bane.loest .k { stroke: var(--mynte); }
.spil-besked { min-height: 1.6em; margin: 12px 0 0; font-weight: 600; }
.spil-knapper { display: flex; flex-wrap: wrap; gap: 10px; }

/* Sidefod */
.bund { background: #0d1019; color: var(--daemp); padding: 40px 0 48px; margin-top: 40px; border-top: 1px solid var(--linje); }
.bund-ind { display: grid; gap: 10px; }
.bund-navn { font-weight: 800; font-size: 1.3rem; color: var(--lys); margin: 0; }
.bund-tekst { margin: 0 0 8px; }
.bund nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.bund a { color: var(--gul); }

@media (max-width: 860px) {
  .helt-ind { grid-template-columns: 1fr; gap: 24px; }
  .helt-fig { max-width: 320px; }
  .tre { grid-template-columns: 1fr; }
  .fakta { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
