/* The merge of v2b (light) and v2b-dark into the main site (2026-11-20, status/website.md "Merge: v2b light and dark").
   What neither variant had: the theme switch, the programme search in v2b's look, the comparison table with four plans
   on a phone (v7's stacked rows), the newsletter section on the forside, and the fixes for v2b's two layout faults.
   Loaded after v2b.css and before dark.css; the dark-only lines for these parts are at the end of this file. */

/* ---------------------------------------------------------------- the theme switch (footer legal row, every page) */
.kv-theme { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; font: 400 var(--t-small)/1.2 var(--font-text); }
.kv-theme[hidden] { display: none; }
.kv-theme__h { color: var(--muted); margin-right: 6px; }
.kv-theme button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--ink) 45%, transparent);
  background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.kv-theme button:hover { border-color: var(--ink); }
.kv-theme button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kv-theme button:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (pointer: coarse) { .kv-theme button { min-height: 44px; } }
.footer__legal { flex-wrap: wrap; row-gap: var(--s-3); }

/* ---------------------------------------------------------------- the programme search (#uddannelser) */
.kv-find__head { align-content: start; }
.kv-find__head > p:not([class]) { color: var(--muted); max-width: 44ch; }
.kv-find__field { display: grid; gap: 8px; }
.kv-find__field label { font: 500 15px/1.2 var(--font-text); color: var(--ink); }
.kv-find__field input { width: 100%; height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid color-mix(in oklab, var(--ink) 55%, transparent);
  background: var(--bg); color: var(--ink); font: 400 17px/1 var(--font-text); -webkit-appearance: none; appearance: none; }
.kv-find__field input::placeholder { color: var(--muted); opacity: 1; }
/* the field's clear button: an ink cross instead of the browser's blue one */
.kv-find__field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; cursor: pointer; background-color: var(--ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9M12.5 3.5l-9 9' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9M12.5 3.5l-9 9' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.kv-find__field input:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.kv-find__status { font: 400 14px/1.4 var(--font-text); color: var(--muted); min-height: 1.4em; }
/* the list is a drawn sheet, like the matrices and charts on the page */
.kv-find__list { display: grid; gap: var(--s-4); align-content: start; min-width: 0; padding: 20px 22px; border-radius: 8px; background: var(--kv-sheet); color: var(--kv-ink);
  border: 1px solid rgb(17 17 17 / .08); box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 16px 36px -24px rgb(0 0 0 / .3); }
.kv-progs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--kv-rule); }
.kv-prog { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 8px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--kv-rule); }
.kv-prog[hidden] { display: none; }
.kv-prog__name { font: 500 16px/1.35 var(--font-text); color: var(--kv-ink); overflow-wrap: anywhere; hyphens: auto; }
.kv-prog.is-featured .kv-prog__name { width: fit-content; box-shadow: inset 0 -.42em 0 color-mix(in oklab, var(--kv-mark) 80%, transparent); }
.kv-prog__cut { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.kv-prog__k { font: 400 13px/1 var(--font-text); color: var(--kv-muted); }
.kv-prog__cut b { font: 600 24px/1 var(--font-mono); color: var(--kv-ink); }
.kv-ruler { grid-column: 1 / -1; position: relative; display: block; height: 8px; border-bottom: 1px solid var(--kv-grey);
  background: repeating-linear-gradient(90deg, var(--kv-grey) 0 1px, transparent 1px calc(100% / 6)) bottom / 100% 6px no-repeat; }
.kv-ruler__pass { position: absolute; left: calc(25 / 60 * 100%); bottom: 0; height: 8px; border-left: 1.5px dashed var(--kv-muted); }
.kv-ruler__cut { position: absolute; left: calc(var(--c) / 60 * 100%); bottom: -4px; width: 3px; height: 16px; margin-left: -1px; background: var(--kv-ink); }
.kv-prog.is-featured .kv-ruler__cut { box-shadow: 0 0 0 3px var(--kv-mark); }
.kv-prog__more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; font: 400 14px/1.35 var(--font-text); color: var(--kv-muted); }
.kv-prog__more > div { display: flex; gap: 6px; }
.kv-prog__more dd { margin: 0; font-family: var(--font-mono); color: var(--kv-ink); }
.kv-rulerkey { position: relative; display: flex; justify-content: space-between; height: 16px; margin: 0 0 -8px; font: 400 12px/16px var(--font-mono); color: var(--kv-muted); }
.kv-rulerkey__pass { position: absolute; left: calc(25 / 60 * 100%); padding-left: 6px; border-left: 1.5px dashed var(--kv-muted); white-space: nowrap; }
.kv-find__more { font: 400 14px/1.4 var(--font-text); color: var(--kv-ink); }
.kv-find__more[hidden] { display: none; }
.kv-find__src { font: 400 13px/1.45 var(--font-text); color: var(--kv-muted); }
@media (hover: hover) and (pointer: fine) {
  .kv-prog { transition: background-color .15s ease; }
  .kv-prog:hover { background-color: color-mix(in oklab, var(--kv-mark) 16%, var(--kv-sheet)); box-shadow: -10px 0 0 color-mix(in oklab, var(--kv-mark) 16%, var(--kv-sheet)), 10px 0 0 color-mix(in oklab, var(--kv-mark) 16%, var(--kv-sheet)); }
}
@media (prefers-reduced-motion: no-preference) {
  /* a hit's cut mark slides in from 0 (transform only, so a frozen animation clock leaves it in place, never hidden) */
  .kv-prog:not([hidden]) .kv-ruler__cut { animation: kv-cut .5s cubic-bezier(.22, 1, .36, 1) both; }
  .kv-ruler { container-type: inline-size; }
  @keyframes kv-cut { from { translate: calc(var(--c) / -60 * 100cqw) 0; } }
}
@media (max-width: 1023px) { .kv-find__list { grid-column: 1 / -1; margin-top: var(--s-5); } }
@media (max-width: 639px) {
  .kv-find__list { padding: 16px 14px; }
  .kv-prog__more { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 13px; }
  .kv-prog__more > div { display: grid; gap: 2px; }
}

/* ---------------------------------------------------------------- the comparison table on a phone (v7's rows)
   Four plans don't fit five columns under 768 px: each row's name gets its own line, the four marks sit under it in
   four columns, and the plan names ride along under the menu bar. */
@media (max-width: 767px) {
  .kv-cmp { display: block; table-layout: auto; font-size: 15px; }
  .kv-cmp thead, .kv-cmp tbody { display: block; }
  .kv-cmp thead { position: sticky; top: var(--nav); z-index: 2; background: var(--bg); }
  .kv-cmp tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 6px; }
  .kv-cmp thead th:first-child { position: absolute; width: 1px !important; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; border: 0; }
  .kv-cmp thead th { width: auto !important; padding: 10px 2px; text-align: center; border-bottom: 1px solid var(--ink); }
  .kv-cmp tbody th { grid-column: 1 / -1; width: auto !important; padding: 14px 0 2px; border-bottom: 0; hyphens: manual; overflow-wrap: normal; }
  .kv-cmp td { width: auto !important; padding: 4px 2px 14px; text-align: center; hyphens: auto; overflow-wrap: normal; }   /* "6 måne-der fra betalin-gen" at 320, by the Danish dictionary */
  .kv-cmp .kv-soon { display: inline-block; width: auto; margin: 4px 0 0; }
}
@media (max-width: 379px) { .kv-cmp td { font-size: 13px; } .kv-cmp thead th { font-size: 13px; hyphens: manual; overflow-wrap: normal; } }
/* the fourth plan column under the pointer (v2b lit three) */
.kv-cmp[data-col="4"] tr > :nth-child(5) { background-color: color-mix(in oklab, var(--accent) 22%, transparent); }
.kv-cmp[data-col="4"] thead th:nth-child(5) { color: var(--ink); }
@media (prefers-reduced-motion: no-preference) { html.kv-rv [data-rv="cmp"] td:nth-child(5) { transition-delay: .55s; } }

/* ---------------------------------------------------------------- the upgrade prices: whole on a phone */
@media (max-width: 639px) {
  .kv-upgrades ul { display: grid; gap: var(--s-3); }
  .kv-upgrades li { display: grid; gap: 2px; }
  .kv-upgrades li > span:first-child { margin-right: 0; }
}

/* ---------------------------------------------------------------- the newsletter (forside section and footers)
   v2b's field edge (ink 55 %, 4:1) for the real form; on the forside the section heading names it, so the form's own
   heading and lead are left to screen readers' labelledby only */
.kv-nl .field input:not([type="checkbox"]) { border-color: color-mix(in oklab, var(--ink) 55%, transparent); }
.kv-nl-in .kv-nl { max-width: 56ch; }
.kv-nl-in .kv-nl h3, .kv-nl-in .kv-nl__lead { display: none; }
.kv-nl-in .kv-nl .btn { min-width: 10em; }

/* ---------------------------------------------------------------- v2b's two faults (and one the main site had)
   1. faq at 1440: the last answer ran 78 px past its one-screen section into the footer band. The main site's legal
      pages did the same, worse: at 1440 the terms ran 1.487 px and the privacy text 589 px into the next section, so
      the paragraphs lay on top of each other. A section of running text (the faq answers, the legal text) keeps its
      screen as a minimum and grows to fit its text. */
main > .section:is(:has(.faq), :has(.kv-legal)) { height: auto; min-height: calc(var(--h, 1) * 100svh); }
/*    The same from 1280 px up for every section (owner 2026-11-23, from the impeccable preview): at 1440x900 #priser
      holds about 1,990 px in its 1,800, so »Har du allerede en pakke?« and the upgrade prices ran under the newsletter
      heading. A section keeps its screens as a minimum and grows with its content. One built around a .fill (the app
      window in #proevesaet) keeps its fixed screen, since the fill takes what the screen leaves under the heading. */
@media (min-width: 1280px) {
  main > :is(section, .section):not(.hero, .section--hero):not(:has(> .wrap > .fill)) { height: auto; min-height: calc(var(--h, 1) * 100svh); }
  main > :is(section, .section):not(.hero, .section--hero):not(:has(> .wrap > .fill)) > :is(.wrap, .container) { height: auto; }
}
/* 2. the app frame: once a figure is picked the explanation opens beside the matrix and the grid's rows stretched,
      so the matrix cells left empty bands between them. The matrix keeps its own height; the row aligns to the top. */
.app .kv-q__body { align-items: start; align-content: start; }
.app .kv-q__body .kv-matrix { align-self: start; grid-auto-rows: max-content; align-content: start; height: auto; }

/* 3. the app frame on a tablet (640 to 1023 px): the category list sits above the question, and a 900 px screen left
      the matrix 24 px (before the fix above: squeezed) or 90 px (after it: whole, but cut by the frame) short. There
      the section and the frame take the height of their content instead of the screen's. */
@media (min-width: 640px) and (max-width: 1023px) {
  #proevesaet { height: auto; min-height: calc(var(--h, 1) * 100svh); }
  #proevesaet .app.fill { flex: none; height: auto; }
}

/* 4. the generator cards from 640 to about 1100 px (two cards side by side): the figure's 230 px column left the
      statement beside it 0 px wide, so the trapezium task's question and its answer box stood outside the card,
      cut by the panel. A sheet narrower than 480 px lays its row out as a phone does: the figure, without the
      statement column. */
.kv-card-sheet { container-type: inline-size; }
@container (max-width: 479px) {
  .kv-card-row { grid-template-columns: minmax(0, 1fr); }
  .kv-card-row > :last-child { display: none; }
}

/* ---------------------------------------------------------------- dark */
html[data-theme="dark"] .kv-find__list { border-color: transparent; box-shadow: none; }
html[data-theme="dark"] .kv-find__field input { background: var(--p-surface); }
html[data-theme="dark"] .kv-find__list :focus-visible { outline-color: #0e1217; }
html[data-theme="dark"] .kv-cmp[data-col="4"] tr > :nth-child(5) { background-color: color-mix(in oklab, var(--ink) 6%, transparent); }
html[data-theme="dark"] .kv-cmp[data-col="4"] thead th:nth-child(5) { color: var(--accent); }
html[data-theme="dark"] .kv-nl .field input:not([type="checkbox"]) { border-color: color-mix(in oklab, var(--ink) 55%, transparent); }

/* ---------------------------------------------------------------- refer a friend (referral session, 2026-11-20)
   The card a friend's link (?ven=) opens: fixed at the bottom right, a bottom sheet on phones, the page usable behind it.
   The plan card on priser for the friend's tier gets one more line under its price. Theme tokens only, so dark follows. */
.kv-ven { position: fixed; z-index: 60; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); width: min(380px, calc(100vw - 40px)); box-sizing: border-box; display: grid; gap: 10px;
  padding: 18px 20px 20px; border-radius: 10px; background: var(--surface); color: var(--ink); border: 1px solid color-mix(in oklab, var(--ink) 18%, transparent);
  padding-left: 26px; box-shadow: inset 6px 0 0 var(--accent), 0 18px 40px -18px rgb(0 0 0 / .45); font: 400 16px/1.45 var(--font-text); }
.kv-ven[hidden] { display: none; }
.kv-ven p { margin: 0; }
.kv-ven__h { font: var(--display-weight) 24px/1.15 var(--font-display); letter-spacing: var(--display-tracking); padding-right: 32px; }
.kv-ven__h:focus { outline: none; }
.kv-ven__text { color: var(--ink); max-width: 40ch; }
.kv-ven__buy { justify-self: start; }
.kv-ven__buy[hidden] { display: none; }
.kv-ven__x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink);
  font: 400 26px/1 var(--font-text); cursor: pointer; }
.kv-ven__x:hover { background: color-mix(in oklab, var(--ink) 8%, transparent); }
.kv-ven__x:focus-visible, .kv-ven__buy:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
@media (max-width: 559px) {
  .kv-ven { right: 0; bottom: 0; width: 100%; border-radius: 12px 12px 0 0; border-width: 1px 0 0;
    padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: inset 0 6px 0 var(--accent), 0 -10px 30px -18px rgb(0 0 0 / .45); }
  .kv-ven__h { font-size: 21px; }
}
.kv-ven-price { display: block; margin-top: 8px; width: fit-content; font: 600 15px/1.3 var(--font-text); color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.kv-ven-price[hidden] { display: none; }
html[data-theme="dark"] .kv-ven { box-shadow: inset 6px 0 0 var(--accent); border-color: color-mix(in oklab, var(--ink) 30%, transparent); }
@media (max-width: 559px) { html[data-theme="dark"] .kv-ven { box-shadow: inset 0 6px 0 var(--accent); } }

/* ---------------------------------------------------------------- the loops' pause disc: hidden until the pointer is on it
   Owner 2026-11-20 ("hide until hover exactly above", via manager 9). Every .loop-pause / .ui-pause (ui.js, motion.js,
   backgrounds.js) keeps its place and its 44px hit area but is invisible until the pointer is over the button itself, or
   it has keyboard focus (WCAG 2.2.2 stays met). Once a loop is paused the disc stays shown, so it can be restarted.
   Phones too: the owner chose this on 2026-11-20 knowing touch screens can't hover, so on a phone the disc shows only
   once it is tapped (the tap pauses the loop) or has keyboard focus.
   !important beats dark.css's opacity: 1 on the hero disc. Reduced motion: no disc at all, as before (base.css). */
button:is(.ui-pause, .loop-pause) { opacity: 0 !important; transition: opacity 160ms ease, border-color 200ms ease; }
button:is(.ui-pause, .loop-pause):is(:hover, :focus-visible, .is-paused, [aria-pressed="true"], [aria-label^="Play"]) { opacity: 1 !important; }
/* partner card (affiliate session, 2026-11-20): the same card as the friend link, with a smaller note line */
.kv-pt .kv-pt__small { font-size: 14px; line-height: 1.4; }
.kv-pt .kv-pt__small[hidden], .kv-pt .kv-ven__buy[hidden] { display: none; }
