/* Scenario 2 (medium), style F "Veiviseren": warm, question-led, mobile first (docs/designretninger.pdf pp. 13–14).
   Sand, forest green and peach; Fraunces for headings, Figtree for text (both self-hosted, OFL). Light and dark
   themes: the system's choice, or the reader's (data-theme on <html>, scenario2.js). */

/* ---------- Fonts ---------- */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: italic; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-wght-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: italic; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-ext-wght-italic.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(fonts/fraunces-latin-wght-italic.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #F5F1EA;          /* sand */
  --surface: #FFFFFF;
  --surface-2: #F9F6F0;
  --ink: #23302B;         /* tekst */
  --muted: #5B6862;
  --line: #E6DFD3;
  --green: #2E6B57;       /* skoggrønn: buttons, accents */
  --green-ink: #2E6B57;   /* links and green text */
  --green-hover: #23584A;
  --sage: #DCE8E1;        /* salvie */
  --peach: #F2B48C;       /* fersken */
  --peach-soft: #FBE6D6;
  --sage-ink: #2E6B57;
  --peach-ink: #94461C;
  --sun-soft: #F7EDC9;
  --sun-ink: #77580B;
  --lilac-soft: #E7E5F6;
  --lilac-ink: #4A4694;
  --sky-soft: #DCEAF2;
  --sky-ink: #285A76;
  --dark: #23302B;
  --on-dark: #F5F1EA;
  --on-dark-muted: #C9D2CC;
  --hero: #2E6B57;
  --hero-circle: #3A7D67;
  --mark: #F9D3B4;
  --focus: #C2571F;
  --shadow: 0 1px 2px rgba(35, 48, 43, .05), 0 10px 30px -18px rgba(35, 48, 43, .28);
  --radius: 18px;
  --radius-s: 12px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 72px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121815; --surface: #1A221E; --surface-2: #1F2924; --ink: #E6ECE8; --muted: #A3B1AA; --line: #2C3832;
    --green: #2E6B57; --green-ink: #8FD0B5; --green-hover: #367C65; --sage: #22362D; --peach-soft: #3B2B20;
    --sage-ink: #9ED4BC; --peach-ink: #F5C3A1; --sun-soft: #352E17; --sun-ink: #EBCB72; --lilac-soft: #2A2940;
    --lilac-ink: #C3BFF5; --sky-soft: #1D313D; --sky-ink: #A1CDE8; --dark: #0B100E; --on-dark-muted: #B5C1BA;
    --hero: #1E4A3C; --hero-circle: #27594A; --mark: #6B4326; --focus: #F2B48C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -18px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121815; --surface: #1A221E; --surface-2: #1F2924; --ink: #E6ECE8; --muted: #A3B1AA; --line: #2C3832;
  --green: #2E6B57; --green-ink: #8FD0B5; --green-hover: #367C65; --sage: #22362D; --peach-soft: #3B2B20;
  --sage-ink: #9ED4BC; --peach-ink: #F5C3A1; --sun-soft: #352E17; --sun-ink: #EBCB72; --lilac-soft: #2A2940;
  --lilac-ink: #C3BFF5; --sky-soft: #1D313D; --sky-ink: #A1CDE8; --dark: #0B100E; --on-dark-muted: #B5C1BA;
  --hero: #1E4A3C; --hero-circle: #27594A; --mark: #6B4326; --focus: #F2B48C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -18px rgba(0, 0, 0, .6);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* hidden wins over any display below; hidden="until-found" (folded answers) is left to the browser. */
[hidden]:not([hidden="until-found"]) { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--sans); overflow-wrap: break-word; }
a { color: var(--green-ink); text-underline-offset: 2px; }
a:hover { color: var(--green-hover); }
:root[data-theme="dark"] a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
h1, h2, h3, h4 { line-height: 1.2; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--dark); color: var(--on-dark); border-radius: 0 0 12px 12px; }
.skip-link:focus { top: 0; }
.eyebrow { margin: 0 0 10px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.text-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

/* Buttons, pills, tiles */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 0; border-radius: 999px; font-weight: 650; font-size: .9375rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button .icon { width: 18px; height: 18px; }
.button-dark { background: var(--dark); color: var(--on-dark); }
.button-dark:hover { background: var(--green); color: #fff; }
:root[data-theme="dark"] .button-dark, :root:not([data-theme]) .button-dark { box-shadow: inset 0 0 0 1px var(--line); }
.button-peach { background: var(--peach); color: #23302B; }
.button-peach:hover { background: #EDA273; color: #23302B; }
.button-quiet { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.button-quiet:hover { color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green-ink); }
.pill { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 13px; border-radius: 999px; font-size: .875rem; font-weight: 500; text-decoration: none; line-height: 1.3; }
.pill-peach { background: var(--peach-soft); color: var(--ink); }
.pill-peach:hover { background: var(--peach); color: #23302B; }
.tile { display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; font: 700 1.05rem/1 var(--serif); }
.tile .icon { width: 19px; height: 19px; }
.tile-sage { background: var(--sage); color: var(--sage-ink); }
.tile-peach { background: var(--peach-soft); color: var(--peach-ink); }
.tile-lilac { background: var(--lilac-soft); color: var(--lilac-ink); }
.tile-sun { background: var(--sun-soft); color: var(--sun-ink); }
.tile-sky { background: var(--sky-soft); color: var(--sky-ink); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.icon-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; justify-content: center; padding: 8px 10px; border: 0; border-radius: 999px; background: none; color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 500; cursor: pointer; }
.icon-button:hover, .icon-button.is-current { background: var(--surface); color: var(--green-ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; }
.brand-name { font: 650 1.375rem/1 var(--serif); letter-spacing: -.01em; }
.brand-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--sage); color: var(--sage-ink); font: 700 .6875rem/1.5 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.site-menu { display: flex; align-items: center; gap: 24px; flex: 1; }
.main-nav { display: flex; gap: 4px; }
.main-nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .9375rem; font-weight: 500; }
.main-nav a:hover { background: var(--surface); color: var(--green-ink); }
.main-nav a[aria-current="page"] { background: var(--sage); color: var(--sage-ink); }
.header-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-tools .button { margin-left: 8px; }
.menu-button { display: none; margin-left: auto; }
.theme-button .icon-sun { display: none; }
.theme-button[aria-pressed="true"] .icon-sun { display: inline; }
.theme-button[aria-pressed="true"] .icon-moon { display: none; }
@media (max-width: 1099px) { .icon-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media (max-width: 899px) {
  .js .menu-button { display: inline-flex; }
  .js .site-menu { display: none; }
  .js .site-menu.is-open { display: flex; }
  .site-menu { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 4px 0 16px; }
  .main-nav { flex-direction: column; }
  .main-nav a { padding: 12px; }
  .header-tools { margin-left: 0; flex-wrap: wrap; }
  .header-tools .icon-button-label { position: static; width: auto; height: auto; clip: auto; }
  .header-tools .button { margin: 8px 0 0; width: 100%; }
}

/* ---------- Home ---------- */
.hero { position: relative; overflow: hidden; margin: 8px 0 0; padding: 40px 20px 32px; border-radius: 28px; background: var(--hero); color: #fff; isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; top: -140px; right: -120px; border-radius: 50%; background: var(--hero-circle); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; bottom: -120px; right: 10%; border-radius: 50%; background: var(--peach); opacity: .9; }
.hero-inner { max-width: 640px; }
.hero-title { margin: 0 0 14px; font: 600 clamp(2.25rem, 6vw, 3.75rem)/1.04 var(--serif); letter-spacing: -.02em; max-width: 12ch; }
.hero-lead { margin: 0 0 28px; font-size: 1.125rem; color: rgba(255, 255, 255, .9); max-width: 34em; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 22px 0 0; font-size: .875rem; }
.popular-label { color: rgba(255, 255, 255, .85); margin-right: 4px; }
.popular .pill { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.popular .pill:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.popular .pill-quiet { background: none; text-decoration: underline; box-shadow: none; }
@media (min-width: 700px) { .hero { padding: 64px 56px 52px; } }

.search-form { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 44px; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); color: var(--ink); }
.search-form:focus-within { box-shadow: var(--shadow), inset 0 0 0 2px var(--green-ink); }
.search-form-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-form input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; outline: none; font-size: 1rem; }
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.search-form-big { padding: 8px 8px 8px 50px; }
.search-form-big .search-form-icon { left: 20px; }
.search-form-big input { font-size: 1.0625rem; min-height: 48px; }
.hero .search-form { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35); }
@media (max-width: 520px) { .search-form input::placeholder { font-size: .875rem; } }

.section { margin-top: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 20px; }
.section-title { margin: 0; font: 600 clamp(1.75rem, 3.5vw, 2.25rem)/1.1 var(--serif); letter-spacing: -.01em; }
.section-lead { margin: 0; color: var(--muted); max-width: 44em; }

.chapter-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 1100px) { .chapter-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.chapter-card-more { background: var(--peach-soft); box-shadow: none; }
.chapter-card { display: flex; flex-direction: column; gap: 12px; height: 100%; padding: 18px 18px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.chapter-card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--green-ink); }
.chapter-card-title { font-weight: 650; line-height: 1.35; }
.chapter-card-count { margin-top: auto; font-size: .8125rem; color: var(--muted); }

.toc-columns { columns: 1; column-gap: 16px; }
@media (min-width: 900px) { .toc-columns { columns: 2; } }
.toc-chapter { break-inside: avoid; margin: 0 0 16px; padding: 20px 22px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.toc-chapter:target { box-shadow: var(--shadow), inset 0 0 0 2px var(--green-ink); }
.toc-chapter-title { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; font: 600 1.1875rem/1.25 var(--serif); }
.toc-section-title { margin: 16px 0 4px; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc-list { margin: 0; padding: 0; list-style: none; }
.toc-list a { display: block; padding: 7px 8px; margin: 0 -8px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.toc-list a:hover { background: var(--surface-2); color: var(--green-ink); }
.toc-list .toc-entry { display: grid; grid-template-columns: 6.6em minmax(0, 1fr); column-gap: 8px; }
.toc-n { color: var(--green-ink); font-size: .875rem; font-weight: 600; padding-top: 1px; white-space: nowrap; }

.home-cards { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); margin-bottom: 16px; }
@media (min-width: 900px) { .home-cards { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); } }
.about-card { padding: 24px; }
.about-title { margin: 0 0 8px; font: 600 1.375rem/1.2 var(--serif); }
.about-lead { color: var(--muted); font-size: .9375rem; }
.home-links { display: grid; gap: 16px; }
.link-card { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; padding: 20px; color: var(--ink); text-decoration: none; }
.link-card:hover { color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--green-ink); }
.link-card-title { font-weight: 700; }
.link-card-text { grid-column: 2; color: var(--muted); font-size: .9375rem; }

.advice-card { padding: 22px 22px 24px; border-radius: var(--radius); background: var(--dark); color: var(--on-dark); }
.advice-card .eyebrow { color: var(--peach); }
.advice-card p { margin: 0 0 16px; color: var(--on-dark-muted); font-size: .9375rem; }

/* ---------- Article ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 16px; padding-bottom: 32px; align-items: start; }
.article-main { min-width: 0; }
@media (min-width: 900px) { .article-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; } }
@media (min-width: 1240px) {
  .article-layout { grid-template-columns: 260px minmax(0, 1fr) 290px; }
  .article-layout.is-comparing { grid-template-columns: minmax(0, 1fr) 290px; }
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; font-size: .875rem; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.breadcrumb a { color: var(--green-ink); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.article-label { margin: 0 0 2px; color: var(--green-ink); font-weight: 700; }
.article-title { margin: 0 0 18px; font: 600 clamp(2rem, 4.6vw, 3rem)/1.08 var(--serif); letter-spacing: -.015em; }
.article-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.tool { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: .875rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.tool .icon { width: 18px; height: 18px; }
.tool:hover { color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green-ink); }
.tool[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: none; }
.print-button { margin-left: auto; }
@media (max-width: 559px) {
  .article-tools .prev-next-top { display: none; }
  .print-button { font-size: 0; gap: 0; padding: 7px 11px; }
}
.prev-next { display: flex; gap: 8px; }
.pn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-size: .875rem; font-weight: 600; }
.pn:hover { color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green-ink); }
.pn .icon { width: 18px; height: 18px; }
.pn-dir { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.prev-next-bottom { justify-content: space-between; margin-top: 24px; }
.prev-next-bottom .pn { min-height: 56px; padding: 10px 20px; }
.prev-next-bottom .pn-dir { position: static; width: auto; height: auto; clip: auto; display: block; font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.prev-next-bottom .pn-next { margin-left: auto; text-align: right; }

.onpage-chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 16px; padding: 2px 16px 6px; scrollbar-width: none; }
.onpage-chips a { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: .875rem; font-weight: 600; text-decoration: none; }
.onpage-chips a.is-current { background: var(--sage); color: var(--sage-ink); box-shadow: none; }
@media (min-width: 900px) { .onpage-chips { display: none; } }

/* The questions */
.q { margin: 0 0 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.q-heading { margin: 0; }
.q-button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 18px 18px; border: 0; border-radius: var(--radius); background: none; text-align: left; cursor: pointer; }
.q-title { font: 600 1.3125rem/1.25 var(--serif); letter-spacing: -.005em; }
.q-meta { margin-left: auto; padding-left: 8px; font: 400 .8125rem/1.3 var(--sans); color: var(--muted); text-align: right; }
.q-chevron { color: var(--muted); transition: transform .2s ease; }
.q-button[aria-expanded="true"] .q-chevron { transform: rotate(180deg); }
.q-button:hover .q-title { color: var(--green-ink); }
html:not(.js) .q-chevron { display: none; }
.q-body { padding: 0 18px 22px; }
.q-intro { margin: 0 0 12px; color: var(--muted); font-size: .9375rem; }
@media (min-width: 700px) {
  .q-button { padding: 20px 24px; gap: 16px; }
  .q-title { font-size: 1.5rem; }
  .q-body { padding: 0 28px 28px 76px; }
}
@media (max-width: 520px) { .q-meta { display: none; } }
.sub-heading { margin: 24px 0 8px; font: 700 .8125rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sub-heading:first-of-type { margin-top: 4px; }

/* "Hva står i loven?": one text at a time, or two or three side by side */
.law-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 34px; padding: 5px 13px; border: 0; border-radius: 999px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font-size: .875rem; font-weight: 600; cursor: pointer; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--green-ink); color: var(--green-ink); }
.chip[aria-pressed="true"] { background: var(--green); color: #fff; box-shadow: none; }
.law[data-mode="compare"] .chip[aria-pressed="true"]::before { content: "✓ "; }
html:not(.js) .law-tools { display: none; }
.compare-toggle { margin-left: auto; }
.compare-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: -4px 0 12px; font-size: .875rem; color: var(--muted); }
.compare-hint { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--green); }
.law-pane + .law-pane { margin-top: 28px; }
.law-pane-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 6px; }
.law-pane-head h3 { margin: 0; font: 700 .8125rem/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.compare-country { font-size: .875rem; }
.compare-country summary { color: var(--green-ink); font-weight: 600; cursor: pointer; }
.compare-country ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 2px 12px; margin: 8px 0 12px; padding: 12px 14px; list-style: none; background: var(--surface-2); border-radius: var(--radius-s); }
.js .law[data-mode="single"] .law-pane + .law-pane { margin-top: 0; }
.law[data-mode="compare"] .law-panes { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: 16px; }
.law[data-mode="compare"] .law-pane { margin: 0; padding: 14px 14px 0; border-radius: var(--radius-s); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.law[data-mode="compare"] .law-pane-head h3 { color: var(--green-ink); }
.law[data-mode="compare"] .law-text { max-height: min(72vh, 760px); overflow-y: auto; padding-right: 8px; font-size: .9375rem; overscroll-behavior: contain; }
@media (max-width: 759px) { .law[data-mode="compare"] .law-panes { grid-template-columns: minmax(0, 1fr); } .law[data-mode="compare"] .law-text { max-height: 60vh; } }

/* Legal text and commentary */
.prose { line-height: 1.68; }
.prose p { margin: 0 0 .85em; }
.prose p:empty { display: none; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .3em; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { padding: 6px 8px; border: 1px solid var(--line); vertical-align: top; }
.law-text > p:first-of-type strong:only-child { color: var(--green-ink); }
.commentary h1 { margin: 28px 0 10px; font: 600 1.25rem/1.25 var(--serif); }
.commentary h1:first-child { margin-top: 4px; }
.commentary h1 strong { font-weight: 600; }
.commentary h2 { margin: 24px 0 8px; font: 600 1.125rem/1.3 var(--serif); }
.commentary h3 { position: relative; margin: 24px 0 8px; font-size: 1.0625rem; line-height: 1.35; }
.commentary h4 { margin: 18px 0 6px; font-size: 1rem; }
.commentary a { word-break: break-word; }
.commentary .art-ref { font-weight: 600; text-decoration-style: dotted; }
.recitals p { padding-left: 2px; }
[id]:target, .is-target { background: var(--mark); border-radius: 6px; box-shadow: 0 0 0 6px var(--mark); }
.q:target, .law-pane:target, .toc-chapter:target, .letter-group:target { background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 2px var(--green-ink); }
.law-pane:target { background: transparent; box-shadow: none; }
.anchor-link { position: absolute; left: -1.6em; top: 0; width: 1.4em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; text-align: center; }
.recitals p { position: relative; }
:is(h3, p):hover > .anchor-link, .anchor-link:focus { opacity: 1; }
.note { padding: 12px 16px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--muted); font-size: .9375rem; }
.note p:last-child { margin-bottom: 0; }
.contents-box { margin: 0 0 20px; padding: 14px 18px; border-radius: var(--radius-s); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: .875rem; }
.contents-box h2 { margin: 0 0 4px; font: 700 .75rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contents-box h3 { margin: 8px 0 2px; font-size: .875rem; }
.contents-box ul { margin: 0; padding-left: 1.1em; }
.contents-box ul ul { padding-left: 1em; }
.contents-box li { margin: 2px 0; }

/* Sidebar: all articles */
.sidenav { font-size: .875rem; }
.sidenav-head { display: flex; align-items: center; justify-content: space-between; }
.sidenav-head .eyebrow { margin: 0; }
.sidenav-close { display: none; }
.sidenav-chapter { border-bottom: 1px solid var(--line); }
.sidenav-chapter summary { display: flex; gap: 6px; align-items: flex-start; padding: 10px 4px; font-weight: 650; line-height: 1.35; cursor: pointer; list-style: none; }
.sidenav-chapter summary::-webkit-details-marker { display: none; }
.sidenav-chevron { width: 16px; height: 16px; margin-top: 2px; color: var(--muted); transform: rotate(-90deg); transition: transform .15s ease; }
.sidenav-chapter[open] .sidenav-chevron { transform: none; }
.sidenav-section { margin: 8px 0 2px 22px; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sidenav-list { margin: 0 0 8px; padding: 0 0 0 16px; list-style: none; }
.sidenav-list a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.sidenav-list a:hover { background: var(--surface); color: var(--green-ink); }
.sidenav-list a[aria-current="page"] { background: var(--sage); color: var(--sage-ink); font-weight: 650; }
.sidenav .toc-n { display: block; font-size: .75rem; color: var(--muted); }
.sidenav a[aria-current="page"] .toc-n { color: var(--sage-ink); }
/* On wide screens the sidebar sits left of the article; otherwise (with JS) it is a drawer, and without JS it follows
   the article. */
@media (min-width: 1240px) {
  .sidenav { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
  .article-layout.is-comparing .sidenav { display: none; }
  .js .article-layout.is-comparing .sidenav { display: block; }
}
@media (max-width: 1239px) { html:not(.js) .sidenav { order: 3; } }
.js .sidenav.is-drawer { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: min(360px, 90vw); max-height: none; padding: 16px 18px 32px; overflow-y: auto; background: var(--bg); box-shadow: 0 0 40px rgba(0, 0, 0, .25); transform: translateX(-105%); visibility: hidden; }
.js .sidenav.is-drawer.is-open { transform: none; visibility: visible; }
/* Animated only once set up (scenario2.js adds is-ready), so the drawer doesn't slide away on load. */
.js .sidenav.is-drawer.is-ready { transition: transform .2s ease, visibility 0s linear .2s; }
.js .sidenav.is-drawer.is-ready.is-open { transition: transform .2s ease; }
.js .sidenav.is-drawer .sidenav-close { display: inline-flex; }
.sidenav-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(15, 22, 19, .45); }

/* Rail: on this page, related, keywords, advice */
.rail { display: grid; gap: 14px; }
@media (min-width: 900px) { .rail { position: sticky; top: calc(var(--header-h) + 12px); max-height: calc(100vh - var(--header-h) - 24px); overflow-y: auto; scrollbar-width: thin; } }
.rail-card { padding: 18px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.onpage ol { margin: 0; padding: 0; list-style: none; }
.onpage a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: .9375rem; }
.onpage a:hover { color: var(--green-ink); }
.onpage a.is-current { border-left-color: var(--green-ink); color: var(--ink); font-weight: 650; }
@media (max-width: 899px) { .onpage { display: none; } }
.related-list { margin: 0; padding: 0; list-style: none; }
.related-list li + li { border-top: 1px solid var(--line); }
.related-list a { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; color: var(--ink); text-decoration: none; font-size: .9375rem; line-height: 1.35; }
.related-list a:hover { color: var(--green-ink); }
.art-pill { flex: none; padding: 2px 8px; border-radius: 8px; background: var(--sage); color: var(--sage-ink); font-size: .8125rem; font-weight: 700; }
.keyword-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

/* ---------- Other pages ---------- */
.page-head { padding-top: 24px; padding-bottom: 8px; }
.page-title { margin: 0 0 10px; font: 600 clamp(2rem, 5vw, 3rem)/1.08 var(--serif); letter-spacing: -.015em; }
.page-intro { margin: 0 0 20px; color: var(--muted); font-size: 1.0625rem; max-width: 40em; }
.back-link { margin: 24px 0; }
.article-cards { display: grid; gap: 10px; margin: 8px 0 0; padding: 0; list-style: none; }
.article-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; padding: 16px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.article-card:hover { color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--green-ink); }
.article-card-label { color: var(--green-ink); font-size: .875rem; font-weight: 700; }
.article-card-title { grid-column: 1; font: 600 1.125rem/1.3 var(--serif); }
.article-card-arrow { grid-column: 2; grid-row: 1 / span 2; color: var(--muted); }

.keyword-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 16px; }
.filter-box { position: relative; display: flex; align-items: center; flex: 1 1 280px; max-width: 420px; }
.filter-box .search-form-icon { left: 14px; }
.filter-box input { width: 100%; min-height: 46px; padding: 8px 16px 8px 42px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.filter-box input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--green-ink); }
.filter-status { margin: 0; color: var(--muted); font-size: .9375rem; }
.letter-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.letter-nav a { display: inline-grid; place-items: center; min-width: 36px; height: 36px; border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 650; text-decoration: none; }
.letter-nav a:hover { background: var(--green); color: #fff; }
.keyword-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; padding-bottom: 24px; align-items: start; }
.letter-group { padding: 16px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.letter { margin: 0 0 6px; font: 600 1.75rem/1 var(--serif); color: var(--green-ink); }
.keyword-list { margin: 0; padding: 0; list-style: none; }
.keyword-list a { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--line); }
.keyword-list li:last-child a { border-bottom: 0; }
.keyword-list a:hover .keyword-name { color: var(--green-ink); text-decoration: underline; }
.keyword-count { flex: none; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--peach-soft); color: var(--ink); font-size: .75rem; font-weight: 700; text-align: center; line-height: 22px; }

.search-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; margin: 16px 0 0; }
.search-filters label { display: grid; gap: 4px; flex: 1 1 220px; min-width: 0; font-size: .8125rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.search-filters select { width: 100%; min-width: 0; min-height: 44px; padding: 8px 12px; border: 0; border-radius: var(--radius-s); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: .9375rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); }
.search-status { margin: 16px 0 8px; color: var(--muted); }
.search-results { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.result { display: block; padding: 16px 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.result:hover { color: var(--ink); box-shadow: var(--shadow), inset 0 0 0 1.5px var(--green-ink); }
.result-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.result-title { font: 600 1.0625rem/1.3 var(--serif); }
.tag { flex: none; padding: 2px 10px; border-radius: 999px; background: var(--sage); color: var(--sage-ink); font-size: .75rem; font-weight: 700; }
.result-excerpt { display: block; margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.result-excerpt mark { background: var(--mark); color: var(--ink); border-radius: 3px; padding: 0 2px; }
.more-row { text-align: center; margin: 20px 0; }

.about-body { display: grid; gap: 24px; padding-bottom: 24px; }
.international { padding: 24px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.international .countries-wrapper { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 8px 0 24px; }
.international .country-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.international .country-link:hover { color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green-ink); }
.international .country-link img { width: 24px; height: auto; border-radius: 2px; }
.international .main-title { margin-top: 0; font: 600 1.5rem/1.2 var(--serif); }
/* Two image-only banners: their images (inline background-image) are not in the snapshot, so they get a caption. */
.international .-card-annonce { display: block; margin: 0 0 12px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--peach-soft); color: var(--ink); font-weight: 650; text-decoration: none; }
.international .-card-annonce:hover { background: var(--peach); color: #23302B; }
.international .-card-annonce .card-picture { display: none; }
.international .-card-annonce::after { content: "IT IP Law Group Europe →"; }
.international .-card-annonce[href$=".pdf"]::after { content: "Last ned kommentaren «Commentaire transversal» (PDF, 24. mars 2017) →"; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 48px; padding-top: 8px; background: var(--dark); color: var(--on-dark-muted); font-size: .9375rem; }
.site-footer a { color: var(--on-dark); }
.site-footer a:hover { color: var(--peach); }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 40px; padding-bottom: 24px; }
@media (min-width: 800px) { .footer-inner { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); } }
.footer-brand { margin: 0 0 8px; color: var(--on-dark); font: 650 1.25rem/1.2 var(--serif); }
.footer-about p { margin: 0 0 8px; max-width: 30em; }
.footer-heading { margin: 0 0 8px; color: var(--on-dark); font-weight: 700; }
.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin: 0 0 6px; }
.footer-copy { padding-bottom: 24px; font-size: .8125rem; }
.footer-copy p { margin: 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .12); }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  @page { margin: 16mm 14mm; }
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --muted: #333; --line: #bbb; --green-ink: #1d4d3e; --shadow: none; }
  body { font-size: 10.5pt; }
  .site-header, .site-footer, .skip-link, .sidenav, .sidenav-backdrop, .rail, .article-tools, .onpage-chips, .law-tools, .compare-bar, .prev-next, .compare-country, .q-chevron, .anchor-link, .hero .popular, .search-form { display: none !important; }
  .article-layout { display: block; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .q { box-shadow: none; border-top: 1px solid #999; border-radius: 0; break-inside: auto; }
  .q-button { padding: 14px 0 6px; }
  .q-body { padding: 0 0 12px; display: block !important; }
  .q-body[hidden], .law-pane[hidden] { display: block !important; content-visibility: visible !important; }
  .law-panes { display: block !important; }
  .law-pane { padding: 0 !important; background: none !important; box-shadow: none !important; margin-top: 18px !important; }
  .law-text { max-height: none !important; overflow: visible !important; }
  .law-pane-head h3 { color: #000; }
  .q-title, .article-title { color: #000; }
  .commentary a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; color: #444; word-break: break-all; }
  [id]:target { background: none; box-shadow: none; }
}
