/* FLOGVIT.musicstand — tokens copied from portal/design/tokens.css (STYLE.md),
   accent syrin (#9f1ab7, dark #de87ee), musicstand's in portal/STYLE.md.
   Copied from dedup's web/public/styles.css with its chrome. Chrome rules follow portal/SETTINGS.md: no px floors on chrome
   elements, min-width: 0 on rows, nowrap only on the wordmark itself. */

:root {
  --paper: #faf9f6;
  --surface: #ffffff;
  --ink: #1b1b18;
  --ink-2: #67665f;
  --line: #dcdacf;
  --bad: #c03b2e;
  --accent: #9f1ab7;
  --accent-dark: #de87ee;
  --radius: 10px;
  --radius-pill: 999px;
  --maxw: 1120px;
  /* The page's side gutter: 12 px, or the notch's inset where that is wider.
     The header, main, footer and every edge-to-edge strip that pulls itself
     back out of main all read these, so they cannot disagree. */
  --gutter-left: max(12px, env(safe-area-inset-left));
  --gutter-right: max(12px, env(safe-area-inset-right));
  --font-ui: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --well: color-mix(in oklab, var(--ink) 6%, var(--surface));
  --ink-soft: #46453f;
  --tint: #f1eee4;
  --hover: #f3f1ea;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-fv-theme="light"]) {
    --paper: #161614; --surface: #1e1e1b; --ink: #edece6; --ink-2: #99978d; --line: #2e2d29; --bad: #e0604f;
    --accent: var(--accent-dark);
    --ink-soft: #c4c2b8; --tint: #22211e; --hover: #1f1e1b;
  }
}
:root[data-fv-theme="dark"] {
  --paper: #161614; --surface: #1e1e1b; --ink: #edece6; --ink-2: #99978d; --line: #2e2d29; --bad: #e0604f;
  --accent: var(--accent-dark);
  --ink-soft: #c4c2b8; --tint: #22211e; --hover: #1f1e1b;
  color-scheme: dark;
}
/* A forced theme says so to the browser too, or date pickers, checkboxes and
   scroll bars are drawn in the OS's scheme on the other one's paper. The light
   colours need no block of their own: they are :root's, and the dark media
   query above already leaves a forced-light page alone. */
:root[data-fv-theme="light"] { color-scheme: light; }

/* min-width: 0 on everything, once (#94). The default, auto, means "never
   narrower than my content": a grid or flex child pushes its track out past
   the viewport as the text grows, and a <fieldset> carries min-content in the
   browser's own stylesheet without a single rule of ours. No rule below
   repeats it; a rule that needs a floor sets one. */
*, *::before, *::after { box-sizing: border-box; min-width: 0; }
/* No text-size-adjust on html: `100%` (or `none`) cuts the whole page loose
   from the phone's text size setting — Chrome on Android does not enlarge it
   (WCAG 1.4.4, flogvit-com-dedup#52). test/tilgjengelighet.test.ts says so. */
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px; line-height: 1.5;
  display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--accent); }
::selection { background: color-mix(in oklab, var(--accent) 25%, transparent); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.4em; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.7em, 5vw, 2.4em); font-weight: 800; }
h2 { font-size: 1.25em; font-weight: 700; }
p { margin: 0 0 1em; overflow-wrap: anywhere; }
img, svg { max-width: 100%; }

.skip-link { position: absolute; left: -999px; top: 0; padding: 8px 12px; background: var(--surface); color: var(--ink); }
.skip-link:focus { left: 8px; z-index: 100; }
/* A label a screen reader reads and an eye does not need: the field beside it
   already says what it is. Never `display: none` — that hides it from both. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding: calc(10px + env(safe-area-inset-top)) 0 10px;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr-row {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter-right) 0 var(--gutter-left);
  display: flex; align-items: center; gap: 0.75em; flex-wrap: wrap;
}
.hdr-nav { display: flex; gap: 0.1em; flex-wrap: wrap; }
.hdr-nav a {
  padding: 0.4em 0.7em; border-radius: var(--radius-pill);
  font-size: 0.9em; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.hdr-nav a.active, .hdr-nav a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }
.hdr-controls { margin-left: auto; display: flex; align-items: center; gap: 0.5em; }

/* Wordmark (STYLE.md): nowrap on the mark itself, never on the row. */
.wordmark { display: inline-flex; align-items: baseline; font-size: 1.05em; color: var(--ink); }
.wordmark a { color: var(--ink); text-decoration: none; }
.wordmark a:focus-visible, .fv-summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.wm-product { font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; white-space: nowrap; }
.wm-product-dot { color: var(--accent); font-family: var(--font-ui); font-weight: 800; }

.fv-menu { position: relative; display: inline-block; }
.fv-summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: baseline; gap: 0.3em;
  font-weight: 800; letter-spacing: -0.02em; white-space: nowrap;
}
.fv-summary::-webkit-details-marker { display: none; }
.fv-caret { color: var(--ink-2); transition: transform 0.15s ease-out; }
.fv-menu[open] .fv-caret { transform: rotate(180deg); }
/* `left: 0`, as in books — never a negative offset in `em`. The panel is
   absolutely positioned, so a pull to the left is measured against the header's
   12 px gutter, and an `em` grows with the text: -0.6em is 10 px at 100 % text
   and 15 px at 150 %, which puts the panel 3 px off the left edge of the screen
   in all eight languages. See test/chrome-meny.test.ts.
   The height is capped, and the panel scrolls itself: it hangs from a sticky
   header, so it never scrolls with the page, and what was below the bottom of
   the screen stayed there — "Account & settings" at 320 × 568 in every
   language, half the panel at 150 % text (#30). 5em is the header above the
   panel with room to spare, and it grows with the text as the header does. */
.fv-menu-panel {
  position: absolute; left: 0; top: calc(100% + 0.6em); z-index: 80;
  display: flex; flex-direction: column;
  min-width: min(14em, calc(100vw - 24px)); max-width: calc(100vw - 24px);
  max-height: calc(100vh - 5em - env(safe-area-inset-top));
  max-height: calc(100dvh - 5em - env(safe-area-inset-top));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 0.35em; white-space: normal;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.fv-item {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.8em; flex-wrap: wrap;
  padding: 0.5em 0.75em; border-radius: 6px;
  font-size: 0.95em; font-weight: 400; letter-spacing: 0; text-decoration: none; color: var(--ink);
}
.fv-item[aria-current] { background: var(--well); }
.fv-wm { display: inline-flex; align-items: baseline; white-space: nowrap; }
.fv-brand-b { font-weight: 800; letter-spacing: -0.02em; }
.fv-dot { font-weight: 800; color: var(--dot, var(--ink)); }
.fv-prod { font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; }
.fv-soon .fv-wm { opacity: 0.5; }
.fv-chip { font-family: var(--font-mono); font-size: 0.7em; color: var(--ink-2); }
/* Categories in the menu (portal/SETTINGS.md → «Kategoriene i FLOGVIT-menyen»):
   a 44 px summary, the label free to wrap. */
.fv-kat-sum {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 0.75em;
  min-height: 44px; padding: 0.4em 0.75em; border-radius: 6px;
  font-size: 0.8em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  overflow-wrap: anywhere; white-space: normal;
}
.fv-kat-sum::-webkit-details-marker { display: none; }
.fv-kat-sum:hover { background: var(--well); color: var(--ink); }
.fv-kat-sum:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fv-kat-caret { flex: none; opacity: 0.55; }
.fv-kat[open] > .fv-kat-sum .fv-kat-caret { transform: rotate(180deg); }
.fv-kat-liste { display: flex; flex-direction: column; gap: 2px; padding: 0 0 0.3em 0.6em; }
.fv-kontoitem { font-size: 0.85em; border-top: 1px solid var(--line); margin-top: 0.25em; padding-top: 0.6em; }
/* --dot and --dot-dark are set on each dot from src/ui/family-menu.json. */
@media (prefers-color-scheme: dark) {
  :root:not([data-fv-theme="light"]) .fv-dot { color: var(--dot-dark, var(--ink)); }
}
:root[data-fv-theme="dark"] .fv-dot { color: var(--dot-dark, var(--ink)); }

.account-chip {
  display: inline-flex; align-items: center; gap: 0.4em; min-height: 2.4em; max-width: 12em; padding: 0 0.8em;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface); color: var(--ink);
  font-size: 0.85em; font-weight: 600; text-decoration: none;
}
.account-chip:hover { border-color: var(--ink-2); }
.account-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-chip-plus {
  flex: none; padding: 0.1em 0.5em; border-radius: var(--radius-pill); background: var(--accent); color: var(--paper);
  font-family: var(--font-mono); font-size: 0.7em; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.settings-gear {
  display: inline-flex; align-items: center; justify-content: center; width: 2.4em; height: 2.4em;
  border-radius: 50%; color: var(--ink-2); text-decoration: none; font-size: 1em;
}
.settings-gear.active, .settings-gear:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 6%, transparent); }

/* ---------- page ---------- */
.page {
  flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 1.5em var(--gutter-right) 3em var(--gutter-left);
}
.hero { padding: 1em 0 1.5em; }
.hero--center { text-align: center; padding-top: 3em; }
.lead { font-size: 1.1em; color: var(--ink-2); max-width: 40em; }
.hero--center .lead { margin-inline: auto; }
.eyebrow { font-family: var(--font-mono); font-size: 0.85em; color: var(--accent); margin: 0; }
.empty { color: var(--ink-2); }

/* A section's name, with the rule drawn NEXT to it rather than under it: the
   heading stays one text node, which is what the sweeps read. */
.section-head {
  display: flex; align-items: center; gap: 0.7em;
  margin-top: 1.6em;
  font-family: var(--font-mono); font-size: 0.8em; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: 0.7em;
}
.section-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }


.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2em; margin: 0 0 1em; }
.card p:last-child { margin-bottom: 0; }

.btn {
  display: inline-block; padding: 0.6em 1.1em; border-radius: var(--radius-pill); border: 1px solid var(--accent);
  background: var(--accent); color: var(--paper); text-decoration: none; cursor: pointer; font: inherit; font-weight: 600;
}
.btn--outline { background: transparent; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5em; }
.chip {
  padding: 0.4em 0.9em; border-radius: var(--radius-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; cursor: pointer;
  text-decoration: none;
}
.chip--on { border-color: var(--accent); color: var(--accent); font-weight: 600; }



/* ---------- the pages ---------- */
.page > section { margin-bottom: 2.5em; }
strong.ui { font-weight: 700; color: var(--ink); }
.btn--big { font-size: 1.1em; padding: 0.75em 1.4em; }
.btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Front page: the text, and beside it on a wide screen the two iPads. */
.hero--home { display: grid; gap: 1.5em 3em; align-items: center; grid-template-columns: minmax(0, 1fr); padding-top: 1.5em; }
.hero--home h1 { font-size: clamp(1.9em, 5.2vw, 3.1em); line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 0.45em; }
.cta { margin: 1.4em 0 0.6em; }
.cta-note { font-size: 0.95em; color: var(--ink-2); max-width: 36em; }
.book { display: block; width: 100%; max-width: 36em; height: auto; margin: 0 auto; }
@media (min-width: 52em) {
  .hero--home { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); }
}

.for h2, .also h2 { font-size: 1.25em; }
.for-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6em; grid-template-columns: repeat(auto-fill, minmax(min(24em, 100%), 1fr)); }
.for-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9em 1em; line-height: 1.5; }

/* The pictures of the app: two by two on a wide screen, one at a time on a
   phone, each to the edge of the screen there (a picture carries no margin). */
.shots h2 { font-size: 1.25em; }
.shot-grid { display: grid; gap: 1.5em 2em; grid-template-columns: repeat(auto-fill, minmax(min(22em, 100%), 1fr)); }
.shot { margin: 0; min-width: 0; }
.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.shot figcaption { margin-top: 0.5em; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 40em) {
  .shot img { border-radius: 0; border-inline: 0; margin-left: calc(-1 * var(--gutter-left)); width: calc(100% + var(--gutter-left) + var(--gutter-right)); max-width: none; }
}

.feature-grid { display: grid; gap: 1.8em 2.5em; grid-template-columns: repeat(auto-fill, minmax(min(20em, 100%), 1fr)); }
.feature { scroll-margin-top: 5em; }
.feature h3 { font-size: 1.15em; margin: 0 0 0.35em; }
.feature h3::before { content: ""; display: inline-block; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--accent); margin-right: 0.5em; vertical-align: 0.15em; }
.feature p { margin: 0; color: var(--ink-soft); line-height: 1.55; }

.also ul { margin: 0; padding-left: 1.2em; columns: 2 18em; column-gap: 2.5em; }
.also li { margin: 0 0 0.45em; break-inside: avoid; line-height: 1.5; }

.closing { border-top: 1px solid var(--line); padding-top: 1.5em; }
.help { color: var(--ink-2); }

/* How-to: a contents list, then numbered sections. */
.toc ol { margin: 0; padding-left: 1.4em; columns: 2 16em; column-gap: 2em; }
.toc li { margin: 0 0 0.3em; break-inside: avoid; }
.howto { max-width: 44em; }
.step { margin: 0 0 2.4em; scroll-margin-top: 5em; }
.step h2 { display: flex; align-items: baseline; gap: 0.5em; font-size: 1.35em; }
.step-n {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em;
  border-radius: 50%; background: var(--accent); color: var(--paper); font-family: var(--font-mono); font-size: 0.75em; font-weight: 600;
}
.steps, .choices { margin: 0 0 1em; padding-left: 1.4em; line-height: 1.55; }
.steps li, .choices li { margin: 0 0 0.5em; overflow-wrap: anywhere; }
.note { border-left: 3px solid var(--accent); padding-left: 0.8em; color: var(--ink-soft); line-height: 1.55; }

/* The privacy policy: one column of text. */
.policy { max-width: 44em; padding-top: 1em; }
.policy h1 { font-size: clamp(1.8em, 5vw, 2.6em); line-height: 1.1; letter-spacing: -0.02em; margin: 0.2em 0 0.3em; }
.policy .eyebrow { margin-bottom: 1em; }
.policy h2 { font-size: 1.15em; margin: 1.6em 0 0.35em; }
.policy p { line-height: 1.6; }

/* The accessibility statement (/<lang>/tilgjengelighet): the shared page from
   src/lib/tilgjengelighet.ts, in this site's own type. */
.statement { max-width: 44em; padding: 1em 0 1.5em; }
.statement h1 { font-size: clamp(2em, 5vw, 3.2em); line-height: 1.05; letter-spacing: -0.02em; margin: 0.3em 0 0.6em; overflow-wrap: anywhere; }
.statement h2 { font-size: 1.2em; margin: 1.6em 0 0.4em; }
.statement p, .statement li { line-height: 1.55; overflow-wrap: anywhere; }
.statement ul { padding-left: 1.2em; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); }
.footer-row {
  max-width: var(--maxw); margin: 0 auto; padding: 1.5em var(--gutter-right) 1.5em var(--gutter-left);
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.6em 1.2em; font-size: 0.85em; color: var(--ink-2);
}
.footer-extra { padding-bottom: 0; }
.footer-row a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.footer-row a:hover { color: var(--accent); }
.footer-row a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.footer-wm { display: inline-flex; align-items: baseline; white-space: nowrap; color: var(--ink); }
.footer-wm-brand { font-weight: 800; letter-spacing: -0.02em; color: var(--ink) !important; }
.footer-wm-prod { font-family: var(--font-mono); font-weight: 500; font-size: 0.95em; color: var(--ink) !important; }
.footer-wm-dot { color: var(--accent); font-family: var(--font-ui); font-weight: 800; }
.footer-copy { margin-left: auto; }

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