/* The new design (Figma "QTES — Engine — Website Concept", page type v2). Sizes are the Figma's at its two reference
   widths, 390 px (phone) and 1440 px (desktop); between them margins, headings and the code grow with the window
   (clamp). Grid: 4 columns below 768 px, 12 from there, 24 px gutters; the content stops growing at 1296 px. */

/* Inter 4 (SIL OFL, /fonts/LICENSE-Inter.txt) at its text optical size, as the Figma sets it: the older
   qtes-inter-* files run about 8 % wider */
@font-face { font-family: "QTES Inter Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/qtes-inter-text-400-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: "QTES Inter Text"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/qtes-inter-text-ext-400-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; }
/* Geist Mono 1.7.2 (SIL OFL, /fonts/LICENSE-Geist-Mono.txt): Latin, punctuation, arrows, blocks and shapes */
@font-face { font-family: "QTES Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/qtes-geist-mono-400-normal.woff2") format("woff2"); }

:root {
  --v2-ink: #171719;
  --v2-paper: #fafaf8;
  --v2-line: #e4e4e1;
  --v2-muted: #717176;
  --v2-surface: #f0f0ed;
  --v2-white: #fff;
  --v2-accent: #00bfff;
  /* the Figma's buttons: "keyboard focus uses violet outline" (no value given) */
  --v2-focus: #7b61ff;
  /* video player */
  --v2-night: #101012;
  --v2-night-line: #353538;
  --v2-night-edge: #626266;
  --v2-night-muted: #a2a2a7;

  --v2-sans: "QTES Inter Text", "Inter", system-ui, sans-serif;
  --v2-mono: "QTES Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --v2-ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* 390 px → 1440 px: 24 → 72 margins, 24 → 48 above the header, 38 → 68 h1, 24 → 28 h2, 24 → 27 wordmark,
     21 → 27 films title, 13 → 18 code comments, 12 → 27 code */
  --v2-margin: clamp(24px, 6.17px + 4.571vw, 72px);
  /* the space above the header: 48 px on desktop instead of the margin's 72 (Dmytro, 3 Nov 2026, with Fynn's
     note that Home's first screen sits too low); phones keep 24 */
  --v2-margin-top: clamp(24px, 15.09px + 2.286vw, 48px);
  /* from 768 px: the small heading above a page title, the same on every page (Fynn, 4 Nov 2026: closer; the
     Figma since Dmytro's update of 4 Nov: 32 on Home, About Us and Login, was 48). Phones keep the Figma's 24 */
  --v2-kicker-gap: 32px;
  --v2-h1: clamp(2.375rem, 1.679rem + 2.857vw, 4.25rem);
  --v2-h2: clamp(1.5rem, 1.407rem + 0.381vw, 1.75rem);
  --v2-wordmark: clamp(1.5rem, 1.43rem + 0.286vw, 1.6875rem);
  --v2-films-title: clamp(1.3125rem, 1.173rem + 0.571vw, 1.6875rem);
  --v2-code-comment: clamp(0.8125rem, 0.696rem + 0.476vw, 1.125rem);
  --v2-code: clamp(0.75rem, 0.402rem + 1.429vw, 1.6875rem);
  --v2-login-h1: clamp(2.375rem, 1.957rem + 1.714vw, 3.5rem);
}

/* in-page links (Home's "↓ VIDEOS") glide to their section instead of jumping; not for visitors who ask their
   system for less motion. The browser still moves the Tab position to the section, as with a jump. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body.v2 {
  margin: 0;
  background: var(--v2-paper);
  color: var(--v2-ink);
  font: 400 1.0625rem/1.5 var(--v2-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
.v2 :focus-visible { outline: 2px solid var(--v2-focus); outline-offset: 2px; }
.v2-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }

/* ---- frame */
.v2-page {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: calc(1296px + 2 * var(--v2-margin));
  margin-inline: auto;
  padding: var(--v2-margin-top) var(--v2-margin) var(--v2-margin);
}
.v2-main { flex: 1 0 auto; }
.v2-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 46px; }
.v2-wordmark { color: var(--v2-ink); font: 400 var(--v2-wordmark)/1.5 var(--v2-mono); letter-spacing: -0.06em; text-decoration: none; }
.v2-nav { display: flex; align-items: center; gap: 18px; }
.v2-nav__link { color: var(--v2-muted); font: 400 12px/1.5 var(--v2-mono); text-decoration: none; transition: color 0.2s; }
/* "← Home" (About Us, Imprint, 404): light blue on hover and on keyboard focus (Fynn, 8 Nov 2026) */
.v2-nav__link:is(:hover, :focus-visible) { color: var(--v2-accent); }
.v2-button {
  display: inline-block;
  box-sizing: border-box;
  padding: 13px 20px;
  border: 1px solid var(--v2-line);
  border-radius: 0;
  background: var(--v2-paper);
  color: var(--v2-ink);
  font: 400 12px/1.5 var(--v2-mono);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s, background-color 0.25s, border-color 0.25s, translate 0.25s;
}
/* motion reference: the colours swap and the button lifts by 2 px */
@media (hover: hover) {
  .v2-button:hover { border-color: var(--v2-ink); background: var(--v2-ink); color: var(--v2-white); translate: 0 -2px; }
  .v2-button[aria-disabled="true"]:hover { border-color: var(--v2-line); background: var(--v2-paper); color: var(--v2-ink); translate: none; }
}
/* the arrows of the films row: 44 px squares, dimmed at either end of the row (the Figma since 4 Nov) */
.v2-button--step { width: 44px; padding: 12px 0; text-align: center; }
.v2-button[aria-disabled="true"] { opacity: 0.25; cursor: default; }
.v2-footer { display: flex; justify-content: flex-end; border-top: 1px solid var(--v2-line); padding-top: 24px; }
.v2-footer__line { margin: 0; color: var(--v2-muted); font: 400 11px/1.5 var(--v2-mono); }
.v2-footer__line a { color: inherit; text-decoration: none; transition: color 0.2s; }
.v2-footer__line a:hover { color: var(--v2-ink); }

/* ---- text */
.v2-label { margin: 0; color: var(--v2-muted); font: 400 10px/1.5 var(--v2-mono); }
.v2-label--micro { font-size: 9px; }
.v2-label.is-accent { color: var(--v2-accent); }
.v2-h1 { margin: 0; font: 400 var(--v2-h1)/1.5 var(--v2-sans); letter-spacing: -0.05em; }
/* a page title of several sentences (Home's "One Engine. Every On-Chain Asset."): its lines break only between
   sentences, so on phones (and tablets upright) each sentence has a line of its own (Fynn, 4 Nov 2026) and on a
   desktop the title stays one line; it gets smaller where its longest sentence would not fit a line.
   --v2-h1-fit is that sentence's width in em (V2Blocks.astro, lib/headline.ts); 100cqi is the hero's width */
.v2-hero { container-type: inline-size; }
.v2-h1.is-split { font-size: min(var(--v2-h1), 100cqi / var(--v2-h1-fit)); }
.v2-h1__line { display: inline-block; }
.v2-h2 { margin: 0; font: 400 var(--v2-h2)/1.5 var(--v2-sans); letter-spacing: -0.05em; }
.v2-lead { margin: 0; color: var(--v2-muted); }
/* the "About QTES" link on Home: light blue, underlined (Patrik's card of 12 Nov 2026: in the text's grey it was
   barely visible; until then grey with a light blue hover, Fynn, 3 Nov 2026); dark on hover, as the footer's links */
.v2-lead a { color: var(--v2-accent); text-decoration: underline; text-decoration-thickness: from-font; text-underline-position: from-font; transition: color 0.2s; }
.v2-lead a:hover { color: var(--v2-ink); }
.v2-body { margin: 0; color: var(--v2-muted); }

/* ---- page heading (with the typed code on Home) */
.v2-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-block: 72px 48px; }
.v2-hero.has-lead { padding-bottom: 72px; }

.v2-code { align-self: stretch; overflow: hidden; padding-block: 48px 16px; font-family: var(--v2-mono); }
.v2-code__stage { display: grid; }
/* the second block is typed in the place of the first */
.v2-code__seq { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 24px; }
.v2-code__seq + .v2-code__seq { visibility: hidden; }
.v2-code__comment { margin: 0; color: var(--v2-muted); font-size: var(--v2-code-comment); line-height: 1.5; }
.v2-code__lines { display: flex; flex-direction: column; gap: 8px; margin: 0; font: inherit; font-size: var(--v2-code); line-height: 1.5; }
.v2-code__row { display: block; white-space: pre; }
.v2-code__line { display: inline-block; vertical-align: top; font-variant-ligatures: none; }
.v2-code__line.is-first { color: var(--v2-accent); }
.v2-code__cursor { display: inline-block; vertical-align: top; width: 0.185em; height: 1em; margin: 0.31em 0 0 0.17em; background: var(--v2-accent); opacity: 0; }
/* typed by public/js/v2.js: nothing shows before it starts */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .v2-code:not([data-static]) .v2-code__line { clip-path: inset(0 100% 0 0); }
}
.v2-code[data-live] .v2-code__seq { visibility: hidden; }
.v2-code[data-live] .v2-code__seq.is-on { visibility: visible; }
.v2-code[data-live] .v2-code__line { clip-path: inset(0 max(0px, calc(100% - var(--shown, 0ch))) 0 0); }
.v2-code[data-live] .v2-code__cursor.is-on { opacity: 1; }
/* edit mode: both blocks, one under the other */
.v2-code[data-static] .v2-code__stage { display: flex; flex-direction: column; gap: 24px; }
.v2-code[data-static] .v2-code__seq + .v2-code__seq { visibility: visible; }
.v2-code__jump { color: var(--v2-ink); font: 400 10px/1.5 var(--v2-mono); text-decoration: none; white-space: pre; }
.v2-code__jump:hover { color: var(--v2-muted); }

/* ---- films */
.v2-films { display: flex; flex-direction: column; gap: 32px; border-top: 1px solid var(--v2-line); padding-block: 48px 64px; scroll-margin-top: 24px; }
.v2-films__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.v2-films__title { margin: 0; font: 400 var(--v2-films-title)/1.5 var(--v2-mono); }
.v2-films__aside { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.v2-films__nav { display: flex; gap: 8px; }
.v2-films__nav[hidden] { display: none; }
/* Carousel (Fynn, 3 Nov 2026, "as commented in Figma"): the films in one row that scrolls sideways — swipe,
   trackpad, Shift + wheel, or the arrows in the heading (public/js/v2.js shows them when the row is wider than the
   page). One card and the edge of the next on phones, two from 768 px, three from 1024 px. Below 1024 px the row
   runs to the window's edges; its padding (cancelled by the margin) keeps room for the lifted card (10 px) and the
   focus ring (6 px), which the scrolling box would otherwise cut off. */
.v2-films__grid {
  --bleed: var(--v2-margin);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 85%;
  align-items: start;
  gap: 24px;
  margin: -16px calc(-1 * var(--bleed)) -8px;
  padding: 16px var(--bleed) 8px;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--bleed);
}
.v2-films.is-carousel .v2-films__grid { scrollbar-width: none; }
.v2-films.is-carousel .v2-films__grid::-webkit-scrollbar { display: none; }
/* edit mode: every card at once, in rows */
.v2-films.is-editing .v2-films__grid { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 32px 24px; margin: 0; padding: 0; overflow: visible; }
.v2-film { position: relative; display: flex; flex-direction: column; gap: 16px; container-type: inline-size; scroll-snap-align: start; }
.v2-film__art {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 234px;
  overflow: hidden;
  padding: 24px;
  background: var(--v2-surface);
  color: var(--v2-ink);
  font-family: var(--v2-mono);
  line-height: 1.5;
}
.v2-film.is-dark .v2-film__art { background: var(--v2-ink); color: var(--v2-white); }
.v2-film__meta, .v2-film__play { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; color: var(--v2-muted); white-space: nowrap; }
.v2-film__meta { font-size: 10px; }
.v2-film__play { font-size: 11px; }
.v2-film__symbol { font-size: 16px; letter-spacing: -0.06em; }
.v2-film.is-dark .v2-film__play span:last-child { color: var(--v2-white); }
/* the longest Figma line (23 characters) fits a card from 324 px; narrower cards shrink the code */
.v2-film__code { position: relative; margin: 0; font: inherit; font-size: min(20px, 5.85cqi); white-space: pre; overflow: hidden; }
.v2-film__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: grayscale(1); scale: 1.04; pointer-events: none; }
.v2-film__title { margin: 0; font: 400 19px/1.5 var(--v2-sans); }
.v2-film__link { color: inherit; text-decoration: none; }
/* the whole card opens the film */
.v2-film__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.v2-films.is-editing .v2-film__link::after { content: none; }
.v2-film__link:focus-visible { outline: none; }
.v2-film:has(.v2-film__link:focus-visible) { outline: 2px solid var(--v2-focus); outline-offset: 4px; }
/* motion reference: the card lifts, its picture grows and the film plays in grey behind the code */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .v2-film.has-video { transition: translate 0.35s var(--v2-ease); }
  .v2-film.has-video .v2-film__art { transition: height 0.4s var(--v2-ease); }
  .v2-film.has-video:hover { translate: 0 -10px; }
  .v2-film.has-video:hover .v2-film__art { height: 294px; }
  .v2-film.has-video:hover .v2-film__preview { opacity: 0.78; scale: 1; }
  .v2-film.has-video:hover .v2-film__code { opacity: 0.12; }
}
/* phones and tablets (no mouse): the film in the row's first position plays by itself, so the cards read as films,
   not pictures; a swipe hands it on to the next (Fynn, 4 Nov 2026); public/js/v2.js sets .is-previewing once it plays */
@media (prefers-reduced-motion: no-preference) {
  .v2-film.has-video .v2-film__preview { transition: opacity 0.4s, scale 1.2s; }
  .v2-film.has-video .v2-film__code { transition: opacity 0.3s; }
  .v2-film.is-previewing .v2-film__preview { opacity: 0.78; scale: 1; }
  .v2-film.is-previewing .v2-film__code { opacity: 0.12; }
}

/* ---- numbered sections (About Us) */
.v2-section { display: flex; flex-direction: column; gap: 24px; border-top: 1px solid var(--v2-line); padding-block: 48px; }
.v2-section__text { display: flex; flex-direction: column; gap: 24px; max-width: 1076px; }

/* ---- rows of label and text (Imprint) */
.v2-facts__rows { margin: 0; }
.v2-facts__row { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid var(--v2-line); padding-block: 24px; }
.v2-facts__row dt { margin: 0; }
.v2-facts__row dd { margin: 0; }
.v2-facts__note { margin: 0; padding-block: 24px 48px; color: var(--v2-muted); font: 400 11px/1.5 var(--v2-mono); }

/* ---- login */
.v2-login { padding-block: 72px; }
.v2-login__form { display: flex; flex-direction: column; gap: 24px; max-width: 416px; }
.v2-login__heading { display: flex; flex-direction: column; gap: 24px; }
.v2-login__title { font-size: var(--v2-login-h1); }
.v2-login__fields { display: contents; }
.v2-field { display: flex; flex-direction: column; gap: 8px; }
.v2-field label { color: var(--v2-ink); font: 400 12px/1.5 var(--v2-mono); }
.v2-field input {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--v2-line);
  border-radius: 0;
  background: var(--v2-white);
  color: var(--v2-ink);
  font: 400 14px/1.5 var(--v2-mono);
  appearance: none;
}
.v2-field input::placeholder { color: var(--v2-muted); opacity: 1; }
.v2-field input:focus-visible { outline-offset: -1px; }
/* the form's focus ring (the fields' frame while typing) in the site's light blue, not violet (Fynn, 4 Nov 2026) */
.v2-login :focus-visible { outline-color: var(--v2-accent); }
/* iOS Safari zooms into fields under 16 px when they get focus */
@supports (-webkit-touch-callout: none) {
  .v2-field input { font-size: 16px; }
}
.v2-submit {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 13px 20px;
  border: 1px solid var(--v2-ink);
  border-radius: 0;
  background: var(--v2-ink);
  color: var(--v2-white);
  font: 400 12px/1.5 var(--v2-mono);
  white-space: pre;
  cursor: pointer;
  transition: color 0.25s, background-color 0.25s;
}
@media (hover: hover) {
  .v2-submit:hover { background: var(--v2-white); color: var(--v2-ink); }
}
/* login refused (site text login_error): shown by public/js/v2.js, without JavaScript by the address #login-failed */
.v2-form__msg { margin: 0; padding-left: 24px; background: url("/img/msg-error.svg") 0 1px / 16px 16px no-repeat; color: var(--v2-ink); font: 400 12px/1.5 var(--v2-mono); }
.v2-form__msg.is-hidden:not(:target) { display: none; }
.v2-login__forgot { align-self: flex-start; color: var(--v2-muted); font: 400 11px/1.5 var(--v2-mono); text-decoration: none; transition: color 0.2s; }
.v2-login__forgot:hover { color: var(--v2-ink); }

/* ---- desktop: 12 columns */
@media (width >= 768px) {
  .v2-nav { gap: 32px; }
  /* 80 px under the header (the Figma since 4 Nov, was 96) */
  .v2-hero { padding-top: 80px; }
  /* the small heading --v2-kicker-gap above the title, the lead 48 px under it (Home: the grid rows below). The
     lead keeps the phones' 72 px to what follows: About Us's table, which the Figma has 96 below it (Fynn, 4 Nov
     2026: less space around the table) */
  .v2-hero:not(.has-code) { gap: 0; }
  .v2-hero:not(.has-code) > .v2-label + .v2-h1 { margin-top: var(--v2-kicker-gap); }
  .v2-hero:not(.has-code) > .v2-h1 + .v2-lead { margin-top: 48px; }
  .v2-hero.has-code { padding-bottom: 48px; }
  /* leads span ten of the twelve columns (Home: the Figma's 1023 px) */
  .v2-lead { max-width: min(1076px, 83.4%); }
  .v2-hero.has-code .v2-lead { max-width: min(1023px, 83.4%); }
  .v2-code { padding-bottom: 48px; }
  .v2-films__grid { grid-auto-columns: calc((100% - 24px) / 2); }
  .v2-films.is-editing .v2-films__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-film__symbol { font-size: 24px; }
  /* the rows of About Us's table: 40 px above and below the text (Fynn, 4 Nov 2026: too much white space on
     desktop; the Figma has 56, phones keep 48) */
  .v2-section { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-block: 40px; }
  /* the label sits on the title's line */
  .v2-section__label { grid-column: span 2; line-height: calc(var(--v2-h2) * 1.5); }
  .v2-section__text { grid-column: 3 / -1; }
  .v2-facts__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .v2-facts__row dt { grid-column: span 4; padding-top: 5px; }
  .v2-facts__row dd { grid-column: 5 / -1; }
  /* the form 80 px under the header (the Figma since 4 Nov, was 64), 64 above the footer */
  .v2-login { padding-block: 80px 64px; }
  .v2-login__form { gap: 20px; }
  .v2-login__heading { gap: 32px; }
  /* the Figma's desktop Login: 56 px at 110 % (to be confirmed by the design team, card of 30 Oct 2026) */
  .v2-login__title { line-height: 1.1; }
  .v2-field { gap: 6px; }
}
@media (width >= 1024px) {
  /* the row stays inside the page's columns, as drawn */
  .v2-films__grid { --bleed: 8px; grid-auto-columns: calc((100% - 48px) / 3); }
  .v2-films.is-editing .v2-films__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---- Home: heading, typed code and "↓ VIDEOS" in the first screen (Fynn, 3 Nov 2026: the arrow has to show).
   The heading keeps the Figma's spacing at every window height (80 under the header, --v2-kicker-gap to the
   title, 48 to the lead: Lukas, 4 Nov 2026); the two gaps around the code take what the window height leaves,
   never more than the Figma's 96 px, never less than 16. On a desktop the content is about 420 px (kicker,
   heading, two lines of lead, the code, the arrow), so "↓ VIDEOS" ends 48 px above the window's bottom edge and
   the hairline sits on it, on windows from about 754 px tall (1440 wide); the Figma's spacing exactly from about
   914. Shorter windows and taller content only move the arrow down. The hero keeps its own height (never cut,
   never overlapping, whatever the CMS text); phones keep the Figma's spacing. */
@media (width >= 768px) {
  .v2-hero.has-code {
    /* the room for the two gaps: the window less the space above the header, the header (46), the hero's padding
       (80 + 48), the content and the heading's gaps */
    --v2-hero-room: calc(100svh - var(--v2-margin-top) - 46px - 128px - 420px - var(--v2-kicker-gap) - 48px);
    --v2-hero-code: clamp(16px, var(--v2-hero-room) / 2, 96px);
    display: grid;
    /* the content rows are min-content, not auto: the code box clips (overflow: hidden) and an auto row could
       squeeze it */
    grid-template-rows: min-content var(--v2-kicker-gap) min-content 48px min-content var(--v2-hero-code) min-content var(--v2-hero-code) min-content;
    justify-items: start;
    gap: 0;
  }
  .v2-hero.has-code > .v2-label { grid-row: 1; }
  .v2-hero.has-code > .v2-h1 { grid-row: 3; }
  .v2-hero.has-code > .v2-lead { grid-row: 5; }
  .v2-hero.has-code > .v2-code { grid-row: 7; justify-self: stretch; padding-block: 0; }
  .v2-hero.has-code > .v2-code__jump { grid-row: 9; }
}
@media (prefers-reduced-motion: reduce) {
  .v2-button:hover { translate: none; }
}

/* ---- video player (Figma "Homepage video overlay") */
.v2-player {
  box-sizing: border-box;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--v2-night);
  color: var(--v2-white);
  font-family: var(--v2-mono);
  overscroll-behavior: contain;
}
.v2-player::backdrop { overflow: hidden; overscroll-behavior: contain; background: var(--v2-night); }
/* the focus ring of every control (play/pause, sound, volume, timeline, Back, …) in the site's light blue, not
   violet; still shown to keyboard users (Fynn, 8 Nov 2026: the frame around play/pause) */
.v2-player:focus-visible, .v2-player :focus-visible { outline-color: var(--v2-accent); }
.v2-player__body {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 94px auto minmax(0, 1fr) auto;
  grid-template-areas: "back" "film" "stage" "dock";
  height: 100%;
  background: var(--v2-night);
}
/* Full screen as on other video sites (Patrik's card of 11 Nov 2026: the player box in full screen kept Back, the
   title and the margins, so on a desktop the film hardly grew): the film fills the screen, Back and the title wait
   outside, the controls float over the film's lower edge. While it plays they fade out with the pointer after 3 s
   without a move (v2.js: is-idle); hidden, they let taps through to the film and keep a keyboard focus. */
.v2-player__body:fullscreen {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "stage";
  width: 100%;
  height: 100%;
  padding: 0;
}
.v2-player__body:fullscreen :is(.v2-player__back, .v2-player__film) { display: none; }
.v2-player__body:fullscreen .v2-player__dock {
  grid-area: stage;
  align-self: end;
  z-index: 1;
  padding-top: 48px;
  background: linear-gradient(rgb(16 16 18 / 0), rgb(16 16 18 / 0.8));
  transition: opacity 0.3s;
}
.v2-player__body:fullscreen.is-idle .v2-player__dock { opacity: 0; pointer-events: none; }
.v2-player__body:fullscreen.is-idle, .v2-player__body:fullscreen.is-idle * { cursor: none; }
.v2-player__back { grid-area: back; display: flex; align-items: center; padding-inline: 24px; }
.v2-button--night { min-width: 132px; border-color: var(--v2-night-edge); background: var(--v2-night); color: var(--v2-white); text-align: left; }
@media (hover: hover) {
  .v2-button--night:hover { border-color: var(--v2-white); background: var(--v2-white); color: var(--v2-night); }
}
.v2-player__film { grid-area: film; display: flex; flex-direction: column-reverse; gap: 12px; min-width: 0; padding: 22px 24px 16px; }
.v2-player__title { margin: 0; color: var(--v2-white); font: 400 19px/1.5 var(--v2-sans); }
.v2-player__category { margin: 0; color: var(--v2-night-muted); font-size: 10px; line-height: 1.5; }
.v2-player__stage { grid-area: stage; display: grid; place-items: center; min-height: 0; container-type: size; }
/* the film keeps 16:9 inside whatever room the window leaves */
.v2-player__frame { position: relative; width: min(100cqw, 100cqh * 16 / 9); aspect-ratio: 16 / 9; container-type: inline-size; }
.v2-player__video { display: block; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.v2-player__ident { position: absolute; inset: 4.94cqi 4.94cqi auto; display: none; justify-content: space-between; margin: 0; color: var(--v2-night-muted); font-size: 14px; line-height: 1.5; pointer-events: none; transition: opacity 0.3s; }
.v2-player.is-playing .v2-player__ident { opacity: 0; }
.v2-player__dock {
  grid-area: dock;
  display: grid;
  grid-template-columns: 44px 44px minmax(0, 1fr) 44px 44px 44px 44px;
  grid-template-areas: "line line line line line line line" "time time time time time time time" "play mute . speed subs set full";
  align-items: center;
  row-gap: 8px;
  padding: 24px 24px calc(40px + env(safe-area-inset-bottom, 0px));
}
.v2-player__timeline { grid-area: line; position: relative; height: 20px; }
.v2-player__timeline::before { content: ""; position: absolute; inset: 9px 0 auto; height: 2px; background: var(--v2-night-line); }
.v2-player__buffered { position: absolute; top: 9px; left: 0; width: calc(var(--buffered, 0) * 100%); height: 2px; background: var(--v2-night-edge); }
.v2-player__seek, .v2-player__volume { margin: 0; padding: 0; background: transparent; appearance: none; cursor: pointer; }
.v2-player__seek { position: absolute; inset: 0; width: 100%; height: 20px; }
.v2-player__seek::-webkit-slider-runnable-track { height: 20px; background: linear-gradient(var(--v2-accent), var(--v2-accent)) 0 9px / calc(var(--played, 0) * 100%) 2px no-repeat; }
.v2-player__seek::-webkit-slider-thumb { width: 10px; height: 10px; margin-top: 5px; border: 0; border-radius: 50%; background: var(--v2-accent); appearance: none; }
.v2-player__seek::-moz-range-track { height: 2px; background: transparent; }
.v2-player__seek::-moz-range-progress { height: 2px; background: var(--v2-accent); }
.v2-player__seek::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--v2-accent); }
.v2-player__volume { grid-area: vol; display: none; width: 64px; height: 20px; }
.v2-player__volume::-webkit-slider-runnable-track { height: 20px; background: linear-gradient(var(--v2-white), var(--v2-white)) 0 9px / calc(var(--level, 0.75) * 100%) 2px no-repeat, linear-gradient(var(--v2-night-line), var(--v2-night-line)) 0 9px / 100% 2px no-repeat; }
.v2-player__volume::-webkit-slider-thumb { width: 8px; height: 8px; margin-top: 6px; border: 0; border-radius: 50%; background: var(--v2-white); appearance: none; }
.v2-player__volume::-moz-range-track { height: 2px; background: var(--v2-night-line); }
.v2-player__volume::-moz-range-progress { height: 2px; background: var(--v2-white); }
.v2-player__volume::-moz-range-thumb { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--v2-white); }
.v2-player__time { grid-area: time; display: flex; justify-content: space-between; gap: 8px; margin: 0; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.v2-player__total { color: var(--v2-night-muted); }
.v2-player__slash { display: none; }
.v2-player__icon, .v2-player__speed { display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--v2-white); cursor: pointer; }
.v2-player__icon img { grid-area: 1 / 1; display: block; }
.v2-player__icon[disabled] { opacity: 0.35; cursor: default; }
/* two pictures per button: .is-off (playing: no, sound: on, full screen: no) and .is-on */
.v2-player__icon .is-on, .v2-player__icon:is([data-state="on"], [aria-pressed="true"]) .is-off { display: none; }
.v2-player__icon:is([data-state="on"], [aria-pressed="true"]) .is-on { display: block; }
.v2-player__subtitles[aria-pressed="true"] { box-shadow: inset 0 -2px var(--v2-accent); }
.v2-player__play { grid-area: play; }
.v2-player__mute { grid-area: mute; }
.v2-player__speed { grid-area: speed; font: 400 12px/1.5 var(--v2-mono); }
.v2-player__subtitles { grid-area: subs; }
.v2-player__settings { grid-area: set; position: relative; }
.v2-player__fullscreen { grid-area: full; }
.v2-player__menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 1; display: grid; min-width: 140px; padding: 8px; border: 1px solid var(--v2-night-line); background: var(--v2-night); }
.v2-player__menu[hidden] { display: none; }
.v2-player__menu-title { margin: 0; padding: 4px 8px 8px; color: var(--v2-night-muted); font-size: 10px; line-height: 1.5; }
.v2-player__menu button { padding: 6px 8px; border: 0; background: none; color: var(--v2-white); font: 400 12px/1.5 var(--v2-mono); text-align: left; cursor: pointer; }
.v2-player__menu button:hover { background: var(--v2-night-line); }
.v2-player__menu button[aria-pressed="true"] { color: var(--v2-accent); }
@media (width >= 768px) {
  .v2-player__body {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 104px minmax(0, 1fr) auto;
    grid-template-areas: "back film" "stage stage" "dock dock";
    padding: 0 max(var(--v2-margin), (100% - 1296px) / 2) 24px;
  }
  .v2-player__back { padding: 0; }
  /* Back, a 32 px gap, the 1 px separator, a 32 px gap, then the film's title over its category */
  .v2-player__film { position: relative; flex-direction: column; justify-content: center; gap: 4px; padding: 0 0 0 65px; }
  .v2-player__film::before { content: ""; position: absolute; top: 50%; left: 32px; width: 1px; height: 32px; translate: 0 -50%; background: var(--v2-night-line); }
  .v2-player__title, .v2-player__category { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v2-player__ident { display: flex; }
  /* 103 px high as in the Figma; the right-hand buttons sit 12 px apart (48 px tracks, button at the end) */
  .v2-player__dock {
    grid-template-columns: 44px 44px 64px auto minmax(0, 1fr) 44px 48px 48px 48px;
    grid-template-areas: "line line line line line line line line line" "play mute vol time . speed subs set full";
    column-gap: 8px;
    row-gap: 12px;
    padding: 16px 0 11px;
  }
  /* in full screen the controls stay where they were: the page's margins at the sides, 35 px under them (the
     player's 24 + their own 11) */
  .v2-player__body:fullscreen .v2-player__dock { padding: 48px var(--v2-margin) 35px; }
  .v2-player__volume { display: block; }
  .v2-player__time { justify-content: flex-start; padding-left: 16px; }
  .v2-player__slash { display: inline; }
  .v2-player__subtitles, .v2-player__settings, .v2-player__fullscreen { justify-self: end; }
}
