/* Shared styles for the static pages (/slik-fungerer-det, /hvordan-lage-rebuslop) */
@font-face { font-family: 'Manrope'; font-style: normal; font-display: swap; font-weight: 200 800; src: url('/sider/manrope.woff2') format('woff2-variations'), url('/sider/manrope.woff2') format('woff2'); }
:root { --brand: #2563EB; --brand-soft: #EAF1FF; --ink: #0F172A; --muted: #5B6474; --bg: #F3F5F8; --surface: #FFFFFF; --line: #E3E8EF; --green: #16A34A; --warm: #F59E0B; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: var(--brand); }
header.top { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) 1rem 0.75rem; }
.top-inner { max-width: 64rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: 0.625rem; text-decoration: none; font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.logo-mark { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); display: flex; align-items: center; justify-content: center; }
.logo b { color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0 1.25rem; border-radius: 999px; font-weight: 800; font-size: 1rem; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-light { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
main { max-width: 64rem; margin: 0 auto; padding: 2rem 1rem 3rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 0.75rem; }
.hero p.lead { font-size: clamp(1.0625rem, 2.4vw, 1.25rem); color: var(--muted); margin: 0 0 1.5rem; max-width: 46rem; }
.film { background: #000; border-radius: 22px; overflow: hidden; box-shadow: 0 20px 50px rgba(15,23,42,0.18); }
.film video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
/* Portrait version of the film on a phone held upright, kept short enough to see the controls */
@media (orientation: portrait) and (max-width: 700px) {
    .film { width: min(100%, calc(80svh * 9 / 16)); margin-left: auto; margin-right: auto; }
    .film video { aspect-ratio: 9 / 16; }
}
/* /slik-fungerer-det: the two games, each with its own colour, and its film in a dialog */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; }
.game-card { display: flex; flex-direction: column; gap: 0.125rem; padding: 1rem 1.125rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent); text-decoration: none; color: var(--ink); }
.game-card b { font-size: 1.25rem; }
.game-card span:last-child { color: var(--muted); font-size: 0.9375rem; }
.kind { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.rebus { --accent: #2563EB; --accent-soft: #EAF1FF; }
.quiz { --accent: #7C3AED; --accent-soft: #F1EBFF; }
section.game { margin-top: 4rem; scroll-margin-top: 5rem; }
.game-head { background: var(--accent-soft); border-radius: 28px; padding: 1.5rem 1.5rem 1.25rem; }
.game-head h2 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0.25rem 0 0.5rem; color: var(--accent); }
.game-head p { margin: 0 0 1rem; max-width: 46rem; font-size: 1.0625rem; }
.film-btn { display: inline-flex; align-items: center; gap: 0.75rem; min-height: 56px; padding: 0.375rem 1.125rem 0.375rem 0.375rem; border: none; border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; box-shadow: 0 4px 14px rgba(15,23,42,0.08); }
.film-btn .play { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.film-btn b { display: block; font-size: 1rem; }
.film-btn small { display: block; color: var(--muted); font-size: 0.8125rem; }
section.game section.part { margin-top: 2.75rem; scroll-margin-top: 5rem; }
/* The three quiz modes: shortcuts under the purple box, and a note on what each suits */
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.625rem; margin-top: 0.75rem; }
.modes a { display: flex; align-items: center; gap: 0.75rem; min-height: 64px; padding: 0.625rem 1rem 0.625rem 0.625rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.modes a:hover { border-color: var(--accent); }
.modes b { display: block; font-size: 1.0625rem; }
.modes small { display: block; color: var(--muted); font-size: 0.875rem; }
.mode-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.mode-icon svg { width: 22px; height: 22px; }
.mode .part-label .num svg { display: block; }
section.part > p.good-for { color: var(--ink); background: var(--accent-soft, var(--brand-soft)); border-radius: 14px; padding: 0.625rem 0.875rem; font-size: 0.9375rem; margin-top: -0.75rem; }
@media (min-width: 34rem) { .step.wide { grid-column: span 2; } }
.step.wide img { aspect-ratio: 16 / 9; max-height: none; }
.film-dialog { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,0.92); display: flex; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top, 0px) + 4rem) 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem); }
.film-dialog[hidden] { display: none; }
.film-dialog video { display: block; width: 100%; max-width: 1100px; max-height: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #000; }
.film-dialog video.portrait { width: auto; height: min(100%, calc((100vw - 2rem) * 16 / 9)); aspect-ratio: 9 / 16; }
.film-close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 0.75rem); right: 0.75rem; width: 44px; height: 44px; border: none; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; font-size: 1.75rem; line-height: 1; cursor: pointer; }
.chapters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.chapters button { font: inherit; font-weight: 700; font-size: 0.9375rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; min-height: 44px; padding: 0 1rem; cursor: pointer; }
.chapters button span { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 0.375rem; }
section.part { margin-top: 3.5rem; }
.part-label { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent, var(--brand)); }
.part-label .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent, var(--brand)); color: #fff; display: inline-flex; align-items: center; justify-content: center; letter-spacing: 0; }
section.part h2, section.part h3 { font-size: clamp(1.625rem, 4vw, 2.25rem); line-height: 1.15; margin: 0.5rem 0 0.5rem; letter-spacing: -0.01em; }
section.part > p { color: var(--muted); margin: 0 0 1.5rem; max-width: 46rem; font-size: 1.0625rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.step img { display: block; width: 100%; height: auto; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); max-height: 26rem; }
.step h3, .step h4 { margin: 0; font-size: 1.125rem; line-height: 1.3; }
.step p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.faq { margin-top: 3.5rem; }
.faq h2 { font-size: clamp(1.625rem, 4vw, 2.25rem); margin: 0 0 1rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 0 1.125rem; margin-bottom: 0.625rem; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 1.0625rem; min-height: 56px; display: flex; align-items: center; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; margin-left: auto; padding-left: 1rem; font-size: 1.5rem; color: var(--muted); }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 1rem; color: var(--muted); }
.cta { margin-top: 3.5rem; background: var(--brand); color: #fff; border-radius: 28px; padding: 2rem 1.5rem; text-align: center; }
.cta h2 { margin: 0 0 0.5rem; font-size: clamp(1.625rem, 4vw, 2.25rem); }
.cta p { margin: 0 0 1.25rem; color: #DBE7FF; }
.cta .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
footer { text-align: center; color: var(--muted); font-size: 0.875rem; padding: 0 1rem calc(env(safe-area-inset-bottom, 0px) + 2rem); }
@media (max-width: 30rem) { .top-inner .btn { padding: 0 1rem; min-height: 44px; font-size: 0.9375rem; } .logo { font-size: 1.125rem; } }

/* Guide articles (e.g. /hvordan-lage-rebuslop) */
.article { max-width: 46rem; }
.article h2 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; margin: 2.75rem 0 0.75rem; letter-spacing: -0.01em; }
.article h3 { font-size: 1.1875rem; margin: 1.75rem 0 0.5rem; }
.article p, .article li { font-size: 1.0625rem; }
.article ul, .article ol { padding-left: 1.25rem; }
.article li { margin-bottom: 0.5rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.25rem; margin: 1.5rem 0; }
.toc strong { display: block; margin-bottom: 0.375rem; }
.toc ol { margin: 0; }
.toc li { margin-bottom: 0.25rem; font-size: 1rem; }
.howto-step { display: flex; gap: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.25rem; margin: 1rem 0; }
.howto-step .num { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.125rem; display: flex; align-items: center; justify-content: center; }
.howto-step h3 { margin: 0.375rem 0 0.375rem; }
.howto-step p { margin: 0 0 0.5rem; color: var(--muted); }
.howto-step p:last-child { margin-bottom: 0; }
.tip { background: var(--brand-soft); border-radius: 14px; padding: 0.75rem 1rem; margin-top: 0.75rem; color: var(--ink); font-size: 0.9375rem; }
.examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin: 1rem 0; padding: 0; list-style: none; }
.example { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.125rem; }
.example .kind { font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand); }
.example p { margin: 0.375rem 0 0; font-size: 1rem; }
.example .answer { color: var(--muted); font-size: 0.9375rem; }
.figure { margin: 1rem 0; display: flex; gap: 1rem; flex-wrap: wrap; }
.figure img { width: min(15rem, 100%); height: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.figure figcaption { flex: 1; min-width: 12rem; color: var(--muted); font-size: 0.9375rem; align-self: center; }
/* The text pages (/personvern, /vilkar) */
.doc { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.doc .updated { color: var(--muted); margin: 0 0 2rem; }
.doc h2 { font-size: 1.375rem; line-height: 1.25; margin: 2.25rem 0 0.5rem; }
.doc h3 { font-size: 1.125rem; line-height: 1.3; margin: 1.5rem 0 0.5rem; }
.doc p, .doc li { font-size: 1.0625rem; }
.doc p { margin: 0 0 0.875rem; }
.doc ul { margin: 0 0 0.875rem; padding-left: 1.375rem; }
.doc li { margin-bottom: 0.375rem; }
.doc .summary { background: var(--brand-soft); border-radius: 18px; padding: 1rem 1.25rem; }
.doc .summary p:last-child { margin-bottom: 0; }

/* /rebuslop and /quiz: the game's own page, where the heading of the game is the page's h1 */
.game-head h1 { font-size: clamp(2rem, 6vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; margin: 0.25rem 0 0.5rem; color: var(--accent); }
/* What the game suits (occasions) and the question bank's categories */
.uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.625rem; }
.uses li { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.875rem 1rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--accent, var(--brand)); }
.uses b { font-size: 1.0625rem; }
.uses span { color: var(--muted); font-size: 0.9375rem; }
section.part p a { color: var(--accent, var(--brand)); font-weight: 700; }
/* The link to the other game at the end of a game's page */
.games.related { margin-top: 3rem; }
/* /slik-fungerer-det: an overview of each game, with its film and a link to its own page */
.game-head .points { margin: 0 0 1.25rem; padding-left: 1.25rem; font-size: 1.0625rem; }
.game-head .points li { margin-bottom: 0.25rem; }
.overview-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.overview-actions .film-btn { margin: 0; }
/* A game's own page starts with the game: no gap above it */
main > section.game:first-child { margin-top: 0; }
/* /slik-fungerer-det: the questions are on each game's page; the overview only points to them */
.faq > p { color: var(--muted); font-size: 1.0625rem; margin: 0; }
.faq > p a { color: var(--brand); font-weight: 700; }
