/* Defence Tech Academy. One stylesheet for every academy page, inside the DTC identity:
   ink and paper surfaces, signal green for state and the primary action, Geist, Tektur for tags and readouts. */
@font-face { font-family: Geist; src: url("/assets/fonts/Geist-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Tektur; src: url('/assets/fonts/Tektur-cyrillic-ext.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: Tektur; src: url('/assets/fonts/Tektur-cyrillic.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Tektur; src: url('/assets/fonts/Tektur-latin-ext.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; 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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Tektur; src: url('/assets/fonts/Tektur-latin.woff2') format('woff2'); font-style: normal; font-weight: 400 900; font-display: swap; 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; }

:root {
  --ink: #121212;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --paper: #fcfcfc;
  --off: #ededed;
  --muted: #5c5c5c;
  --muted-dark: #a0a0a0;
  --dim: #6f6f6f;
  --signal: #3ecf8e;
  --signal-bright: #6de1ab;
  --action: #006239;
  --action-deep: #004d2c;
  --link: #087f5b;
  --line-light: #dedede;
  --line-dark: #2e2e2e;
  --line-mid: #3e3e3e;
  --alert: #ff5a4e;
  --alert-ink: #b42318;
  --alert-line: #7a2f2a;
  --tint: #0d2e20;
  --tint-line: #1d6b48;
  --sans: Geist, sans-serif;
  --label: Tektur, Geist, sans-serif;
  --page-x: clamp(20px, 5.6vw, 96px);
  --section-y: clamp(64px, 8vw, 120px);
  --header-h: 72px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
  scrollbar-color: var(--line-mid) var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; min-height: 100svh; margin: 0; background: var(--ink); color: var(--off); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; caret-color: var(--signal); accent-color: var(--signal); }
main { flex: 1; outline: none; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.on-paper :focus-visible, .sheet :focus-visible { outline-color: var(--action); }
.icon { flex: none; }

.skip-link { position: absolute; z-index: 60; top: 8px; left: 8px; padding: 10px 16px; border-radius: 4px; background: var(--signal); color: var(--ink); font-weight: 500; text-decoration: none; }
.skip-link:not(:focus) { clip-path: inset(100%); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------------------------------------- header */
.site-header { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; gap: 28px; min-height: var(--header-h); padding: 0 var(--page-x); border-bottom: 1px solid var(--line-dark); background: var(--ink); }
.brand img { width: 140px; height: 44px; object-fit: contain; object-position: left center; }
.brand-section { display: inline-flex; align-items: center; min-height: 44px; padding-left: 20px; border-left: 1px solid var(--line-mid); font-size: 15px; font-weight: 500; text-decoration: none; }
.site-nav { display: flex; gap: 28px; margin-left: 12px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-dark); font-size: 15px; text-decoration: none; transition: color 160ms; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--off); }
.header-tools { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.language-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line-mid); border-radius: 4px; }
.language-switch button { min-width: 40px; min-height: 34px; padding: 0 6px; border: 0; border-radius: 2px; background: transparent; color: var(--muted-dark); font: 500 11px/1 var(--sans); }
.language-switch button:hover { background: var(--surface-2); color: var(--off); }
.language-switch button[aria-pressed="true"] { background: var(--off); color: var(--ink); }
.menu-button { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line-mid); border-radius: 4px; background: transparent; }

/* ---------------------------------------------------------------------------------------- controls */
.action { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 4px; background: transparent; font-size: 15px; font-weight: 500; line-height: 1.3; text-align: center; text-decoration: none; transition: background 160ms, border-color 160ms, color 160ms; }
.action .icon { transition: transform 240ms var(--ease-out); }
.action:hover .icon { transform: translateX(3px); }
.action-signal { border-color: var(--signal); background: var(--signal); color: var(--ink); }
.action-signal:hover { border-color: var(--signal-bright); background: var(--signal-bright); }
.action-outline { border-color: var(--line-mid); color: var(--off); }
.action-outline:hover { border-color: var(--off); }
.action-small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.action[disabled], .action[aria-disabled="true"] { opacity: .55; cursor: default; }
.on-paper .action-signal { border-color: var(--action); background: var(--action); color: #fff; }
.on-paper .action-signal:hover { border-color: var(--action-deep); background: var(--action-deep); }
.on-paper .action-outline { border-color: #b9b9b9; color: var(--ink); }
.on-paper .action-outline:hover { border-color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--signal); font-size: 15px; font-weight: 500; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.on-paper .text-link { color: var(--link); }
.text-link-quiet { color: var(--muted-dark); font-weight: 400; text-decoration: underline; }
.on-paper .text-link-quiet { color: var(--muted); }
.text-link-danger, .on-paper .text-link-danger { color: var(--alert); }
.on-paper .text-link-danger { color: var(--alert-ink); }

.tag { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid var(--line-mid); border-radius: 3px; color: var(--muted-dark); font: 400 11px/1.5 var(--label); letter-spacing: .02em; white-space: nowrap; }
.tag-ok { border-color: var(--tint-line); background: var(--tint); color: var(--signal); }
.tag-alert { border-color: var(--alert-line); color: var(--alert); }
.on-paper .tag { border-color: #c9c9c9; color: var(--muted); }
.on-paper .tag-ok { border-color: #a9d8c1; background: #e6f5ee; color: var(--action); }
.on-paper .tag-alert { border-color: #e7b1ab; color: var(--alert-ink); }
.readout { color: var(--muted-dark); font: 400 11px/1.6 var(--label); letter-spacing: .06em; text-transform: uppercase; }
.on-paper .readout { color: var(--muted); }

.progress { display: grid; gap: 8px; }
.progress-track { height: 4px; background: var(--line-dark); }
.progress-track span { display: block; height: 100%; background: var(--signal); transition: inline-size 500ms var(--ease-out); }
.progress-label { color: var(--muted-dark); font-size: 13px; font-variant-numeric: tabular-nums; }
.on-paper .progress-track { background: var(--line-light); }
.on-paper .progress-track span { background: var(--action); }
.on-paper .progress-label { color: var(--muted); }

.message { padding: 12px 14px; border: 1px solid var(--alert-line); border-radius: 4px; color: var(--alert); font-size: 14px; line-height: 1.5; }
.message[data-tone="ok"] { border-color: var(--tint-line); background: var(--tint); color: var(--signal); }
.on-paper .message { border-color: #e7b1ab; background: #fdf1ef; color: var(--alert-ink); }
.on-paper .message[data-tone="ok"] { border-color: #a9d8c1; background: #e6f5ee; color: var(--action); }

/* Forms: dark fields on ink, white fields on paper. */
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 8px; }
.field > label, .field > .label { font-size: 14px; font-weight: 500; }
.field input:not([type="checkbox"]):not([type="radio"]), .field textarea, .field select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-mid); border-radius: 4px; background-color: var(--surface); color: var(--off); font-size: 16px; line-height: 1.4; transition: border-color 160ms; }
.field select { padding-right: 40px; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23a0a0a0' stroke-width='1.5'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E"); background-position: right 14px center; background-size: 12px; background-repeat: no-repeat; }
.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #8a8a8a; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: #5a5a5a; }
.field [aria-invalid="true"] { border-color: var(--alert); }
.field-hint { color: var(--muted-dark); font-size: 13px; line-height: 1.5; }
.field-error { color: var(--alert); font-size: 13px; line-height: 1.5; }
.on-paper { accent-color: var(--action); caret-color: var(--action); color-scheme: light; }
.on-paper .field input:not([type="checkbox"]):not([type="radio"]), .on-paper .field textarea, .on-paper .field select { border-color: #bdbdbd; background-color: #fff; color: var(--ink); }
.on-paper .field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%235c5c5c' stroke-width='1.5'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E"); }
.on-paper .field input:hover, .on-paper .field textarea:hover, .on-paper .field select:hover { border-color: #8f8f8f; }
.on-paper .field input::placeholder { color: #767676; }
.on-paper .field-hint { color: var(--muted); }
.on-paper .field-error { color: var(--alert-ink); }
.on-paper .field [aria-invalid="true"] { border-color: var(--alert-ink); }
.password-row { position: relative; }
.password-row input { padding-right: 96px !important; }
.password-row button { position: absolute; top: 4px; right: 4px; bottom: 4px; padding: 0 12px; border: 0; border-radius: 3px; background: transparent; color: var(--muted-dark); font-size: 13px; }
.password-row button:hover { color: var(--off); }
.on-paper .password-row button { color: var(--muted); }
.on-paper .password-row button:hover { color: var(--ink); }
.check-row { font-weight: 400; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; }
.check-row input, .option input { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 1px 0 0; border: 1.5px solid #7a7a7a; border-radius: 3px; background: transparent center / 12px 12px no-repeat; cursor: pointer; }
.option input[type="radio"] { border-radius: 50%; }
.check-row input:checked { border-color: var(--signal); background-color: var(--signal); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23121212' stroke-width='1.8'%3E%3Cpath d='M2.2 6.3l2.5 2.4 5-5.4'/%3E%3C/svg%3E"); }
.on-paper .check-row input:checked, .option input[type="checkbox"]:checked { border-color: var(--action); background-color: var(--action); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.8'%3E%3Cpath d='M2.2 6.3l2.5 2.4 5-5.4'/%3E%3C/svg%3E"); }
.option input[type="radio"]:checked { border-color: var(--action); background: radial-gradient(var(--action) 0 4.5px, transparent 5px); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

/* ---------------------------------------------------------------------------------------- home: the reel and the course tiles */
/* First screen: every clip in turn, full bleed, with the title low over it as on the site's home page. */
/* --shade is an extra even darkening for a bright clip; it is set per clip and eases with the dissolve. The still shown first is the brightest clip, so that is the starting value. */
@property --shade { syntax: "<number>"; inherits: true; initial-value: 0; }
.reel { --shade: .3; transition: --shade 900ms ease; position: relative; isolation: isolate; display: grid; place-items: center; min-height: calc(100svh - var(--header-h)); overflow: hidden; padding: clamp(48px, 9vh, 104px) var(--page-x) clamp(96px, 16vh, 148px); border-bottom: 1px solid var(--line-dark); background: #0c0c0c; text-align: center; }
.reel-media { position: absolute; z-index: -3; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 900ms ease; }
.reel-media.is-showing { opacity: 1; }
.reel-media.is-front { z-index: -2; }
/* The footage stays clear at the edges; the middle is darkened just enough to carry the statement. */
.reel::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(rgb(12 12 12 / var(--shade)), rgb(12 12 12 / var(--shade))), radial-gradient(ellipse 74% 68% at 50% 46%, rgb(12 12 12 / .62), rgb(12 12 12 / .42) 60%, transparent), linear-gradient(rgb(12 12 12 / .3), transparent 20%, transparent 70%, rgb(12 12 12 / .6)); pointer-events: none; }
.reel-center { display: grid; justify-items: center; max-width: 100%; }
/* The title and the line under it read as one statement: same size, capitals, tight leading. */
.reel-title { max-width: 15em; font-size: clamp(31px, 6.1vw, 92px); font-weight: 500; line-height: .98; letter-spacing: -.025em; text-transform: uppercase; text-wrap: balance; }
/* The statement waits for its decode effect; if the script never runs, it shows by itself after a moment. */
.reel-title { opacity: 0; animation: title-fallback 1ms 2.5s forwards; }
.reel-title.is-ready { opacity: 1; animation: none; }
@keyframes title-fallback { to { opacity: 1; } }
/* A line of the statement while it decodes: it never wraps, and the side margins let it stay centred if the loose letters run a little wide. */
.decode-line { display: block; margin-inline: -2em; white-space: nowrap; }
.decode-word { display: inline-block; white-space: nowrap; }
.decode-char { display: inline-block; text-align: center; transition: color 260ms; }
.decode-char.is-loose { color: var(--signal); }
.reel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: clamp(20px, 3.4vw, 56px); margin-top: clamp(28px, 5vh, 52px); }
.reel-row .action { justify-self: end; }
.reel-mark { width: auto; height: clamp(40px, 5vw, 60px); }
.reel-link { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--off); font-size: 14px; font-weight: 500; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.reel-link:hover { color: var(--signal); }
.reel-link .icon { transition: transform 240ms var(--ease-out); }
.reel-link:hover .icon { transform: translateX(3px); }
.reel-side { position: absolute; right: var(--page-x); bottom: clamp(24px, 5vh, 44px); display: grid; gap: 12px; justify-items: end; }
.reel-caption { color: var(--off); font: 400 11px/1.6 var(--label); letter-spacing: .06em; text-transform: uppercase; }
.reel-controls { display: flex; align-items: center; gap: 14px; }
.reel-ticks { display: flex; gap: 6px; }
.reel-ticks i { width: 24px; height: 2px; background: rgb(237 237 237 / .28); }
.reel-ticks i.is-done { background: rgb(237 237 237 / .7); }
.reel-ticks i.is-current { background: linear-gradient(90deg, var(--signal) var(--progress, 0%), rgb(237 237 237 / .28) var(--progress, 0%)); }
.reel-toggle { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgb(237 237 237 / .4); border-radius: 4px; background: rgb(12 12 12 / .35); color: var(--off); transition: border-color 160ms, background 160ms; }
.reel-toggle:hover { border-color: var(--off); background: rgb(12 12 12 / .6); }

/* Courses as a mosaic of media tiles. Every sixth tile starts a group: one tall, one wide, two small, one wide, one small. */
.catalog { padding: var(--section-y) clamp(16px, 2.6vw, 40px); }
.catalog .section-head { padding-inline: calc(var(--page-x) - clamp(16px, 2.6vw, 40px)); }
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(210px, 23vw, 350px); grid-auto-flow: dense; gap: clamp(10px, 1.3vw, 22px); }
.tile { position: relative; isolation: isolate; grid-column: span 4; overflow: hidden; border-radius: 4px; background: #0c0c0c; }
.tile:nth-child(6n + 1) { grid-row: span 2; }
.tile:nth-child(6n + 2), .tile:nth-child(6n + 5) { grid-column: span 8; }
/* A group cut short by the number of courses closes its last row instead of leaving a hole. */
.tile:nth-child(6n + 1):last-child { grid-column: span 12; grid-row: span 1; }
.tile:nth-child(6n + 2):last-child { grid-row: span 2; }
.tile:nth-child(6n + 3):last-child { grid-column: span 8; }
.tile:nth-child(6n + 5):last-child { grid-column: span 12; }
.tile-link { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px 16px; padding: clamp(16px, 1.8vw, 28px); color: var(--off); text-decoration: none; }
.tile-link:focus-visible { outline-offset: -5px; }
.tile-media { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); transform-origin: var(--origin, 50% 50%); transform: scale(var(--zoom, 1)); transition: scale 1200ms var(--ease-out), opacity 700ms ease; }
video.tile-media { opacity: 0; }
video.tile-media.is-playing { opacity: 1; }
video.tile-media.is-playing.is-wrapping { opacity: 0; transition-duration: 1200ms, 380ms; }
.tile-link:hover .tile-media, .tile-link:focus-visible .tile-media { scale: 1.04; }
/* Where the subject of a clip would sit under the tile's text, the picture is enlarged from the lower left corner, which lifts the subject up and to the right. */
.tile-comms { --origin: 0% 100%; --zoom: 1.16; }
.tile-robotics { --focus: 50% 22%; }
.tile-link::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(rgb(12 12 12 / .36), transparent 34%, transparent 46%, rgb(12 12 12 / .86)); transition: background 300ms; }
.tile-top { grid-column: 1 / -1; align-self: start; color: rgb(237 237 237 / .86); }
.tile-name { min-width: 0; max-width: 17em; font-size: clamp(20px, 2.1vw, 34px); font-weight: 500; line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; }
/* The name and the arrow keep to the bottom row, with or without the direction readout above them. */
.tile-name, .tile-link > .icon { grid-row: 2; }
.tile-link > .icon { margin-bottom: 4px; transition: transform 320ms var(--ease-out); }
.tile-link:hover > .icon, .tile-link:focus-visible > .icon { transform: translate(3px, -3px); }
/* Reticle corners close in on the tile under the pointer: the site's instrument mark, used as the hover state. */
.reticle { position: absolute; inset: 12px; pointer-events: none; opacity: 0; transform: scale(1.04); transition: opacity 260ms, transform 420ms var(--ease-out); }
.reticle i { position: absolute; width: 16px; height: 16px; border: solid rgb(237 237 237 / .85); border-width: 0; }
.reticle i:nth-child(1) { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.reticle i:nth-child(2) { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.reticle i:nth-child(3) { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.reticle i:nth-child(4) { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.tile-link:hover .reticle, .tile-link:focus-visible .reticle, .tile.is-live .reticle { opacity: 1; transform: none; }
.catalog-empty { padding: 28px calc(var(--page-x) - clamp(16px, 2.6vw, 40px)); color: var(--muted-dark); }

/* ---------------------------------------------------------------------------------------- all courses: search, filters, list */
.courses-page { display: grid; gap: clamp(28px, 3.6vw, 44px); padding: clamp(48px, 7vw, 96px) var(--page-x) var(--section-y); }
.finder { display: grid; gap: 18px; }
.finder-search { position: relative; }
.finder-search svg { position: absolute; top: 50%; left: 20px; translate: 0 -50%; color: var(--muted-dark); pointer-events: none; }
.finder-search input { width: 100%; min-height: 64px; padding: 14px 20px 14px 56px; border: 1px solid var(--line-mid); border-radius: 4px; background: var(--surface); color: var(--off); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.4; transition: border-color 160ms; }
.finder-search input::placeholder { color: #8a8a8a; }
.finder-search input:hover { border-color: #5a5a5a; }
.finder-search input:focus-visible { border-color: var(--signal); outline-offset: 0; }
.finder-search:focus-within svg { color: var(--off); }
.finder-filters { display: flex; flex-wrap: wrap; gap: 12px 32px; }
/* Courses as ruled rows: picture, name and summary, the facts at the right. */
.listing { border-top: 1px solid var(--line-dark); }
.listing-row { border-bottom: 1px solid var(--line-dark); }
.listing-link { display: grid; grid-template-columns: clamp(150px, 17vw, 250px) minmax(0, 1fr) auto 20px; align-items: center; gap: 12px clamp(20px, 3vw, 48px); padding: 22px 0; color: var(--off); text-decoration: none; }
.listing-thumb { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 3px; object-fit: cover; }
.listing-name { font-size: clamp(20px, 1.9vw, 28px); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; transition: color 160ms; }
.listing-summary { max-width: 62ch; margin-top: 8px; color: var(--muted-dark); font-size: 15px; line-height: 1.5; }
.listing-facts { display: grid; gap: 4px; justify-items: end; color: var(--off); font-size: 14px; white-space: nowrap; }
.listing-link > .icon { transition: transform 240ms var(--ease-out); }
.listing-link:hover .listing-name { color: var(--signal); }
.listing-link:hover > .icon { transform: translateX(4px); }
.listing-empty { display: grid; gap: 8px; justify-items: start; padding: 36px 0; color: var(--muted-dark); }

/* ---------------------------------------------------------------------------------------- sections */
.section { padding: var(--section-y) var(--page-x); }
.section-paper { background: var(--paper); color: var(--ink); }
.section-surface { background: var(--surface); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(28px, 4vw, 48px); }
.section h2, .catalog h2, .page-title { font-size: clamp(34px, 4.2vw, 60px); font-weight: 500; line-height: 1.1; letter-spacing: -.03em; text-wrap: balance; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 8px 14px; border: 1px solid var(--line-mid); border-radius: 4px; background: transparent; color: var(--off); font-size: 14px; font-weight: 500; transition: background 160ms, border-color 160ms, color 160ms; }
.chip:hover { border-color: var(--off); }
.chip[aria-pressed="true"] { border-color: var(--off); background: var(--off); color: var(--ink); }

.steps { border-bottom: 1px solid var(--line-dark); counter-reset: step; }
.step { display: grid; grid-template-columns: 72px minmax(0, 4fr) minmax(0, 6fr); gap: 12px 32px; align-items: baseline; padding: 28px 0; border-top: 1px solid var(--line-dark); counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); color: var(--signal); font: 400 12px/1.6 var(--label); letter-spacing: .06em; }
.step h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
.step p { max-width: 56ch; color: var(--muted-dark); }

.check-lead { max-width: 40ch; margin-top: 16px; color: var(--muted-dark); }
.check-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.check-form .field-hint, .check-form .field-error { grid-column: 1 / -1; }
.check-form input { font-family: var(--label); letter-spacing: .04em; text-transform: uppercase; }
.check-result { margin-top: 24px; }
.verdict { display: grid; gap: 20px; padding: 24px; border: 1px solid var(--line-mid); border-radius: 4px; background: var(--surface-2); }
.verdict-ok { border-color: var(--tint-line); background: var(--tint); }
.verdict-bad { border-color: var(--alert-line); }
.verdict-line { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; line-height: 1.35; }
.verdict-ok .verdict-line { color: var(--signal); }
.verdict-bad .verdict-line { color: var(--alert); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px 24px; }
.facts dt { color: var(--muted-dark); font: 400 11px/1.6 var(--label); letter-spacing: .06em; text-transform: uppercase; }
.facts dd { margin-top: 2px; font-size: 16px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.on-paper .facts dt { color: var(--muted); }

.faq { border-bottom: 1px solid var(--line-dark); }
.faq details { border-top: 1px solid var(--line-dark); }
.faq summary { display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 20px; align-items: center; padding: 22px 0; font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; line-height: 1.35; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; width: 14px; height: 14px; background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat; transition: transform 320ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--signal); }
.faq details p { max-width: 62ch; padding: 0 36px 24px 0; color: var(--muted-dark); }
.faq details a { color: var(--signal); }

.closing { position: relative; isolation: isolate; display: grid; gap: 32px; justify-items: start; overflow: hidden; padding-block: clamp(80px, 11vw, 168px); }
.closing::before { content: ""; position: absolute; z-index: -1; inset: 0 0 0 52%; background: url("/assets/academy/simulation.webp") center / cover no-repeat; -webkit-mask: linear-gradient(90deg, transparent, #000 42%); mask: linear-gradient(90deg, transparent, #000 42%); }
.closing h2 { max-width: 14ch; font-size: clamp(42px, 6vw, 88px); line-height: 1.02; }

.site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; padding: 24px var(--page-x); border-top: 1px solid var(--line-dark); background: var(--ink); color: var(--muted-dark); font-size: 14px; }
.site-footer .brand { margin-right: auto; }
.site-footer a:not(.brand) { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-footer a:not(.brand):hover { color: var(--off); }
.consent-settings { min-height: 44px; padding: 10px 0; border: 0; background: transparent; color: var(--muted-dark); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.consent-settings:hover { color: var(--off); }
.consent-banner { position: fixed; z-index: 50; right: 16px; bottom: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 20px; width: min(760px, calc(100% - 32px)); padding: 14px 16px; border: 1px solid var(--line-mid); border-radius: 4px; background: var(--surface-2); color: var(--off); }
.consent-banner h2 { font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: 0; }
.consent-banner p { grid-column: 1; color: var(--muted-dark); font-size: 13px; line-height: 1.5; }
.consent-actions { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.consent-actions button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--line-mid); border-radius: 4px; background: transparent; color: var(--off); font-size: 13px; font-weight: 500; }
.consent-actions button:hover { background: var(--line-dark); }
.consent-actions [data-consent="preferences"] { border-color: var(--signal); background: var(--signal); color: var(--ink); }
.consent-actions [data-consent="preferences"]:hover { border-color: var(--signal-bright); background: var(--signal-bright); }
.consent-actions a { color: var(--muted-dark); font-size: 12px; }

/* ---------------------------------------------------------------------------------------- page heads and states */
.page-head { display: grid; gap: 20px; padding: clamp(40px, 6vw, 80px) var(--page-x) clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line-dark); }
.page-head .page-title { max-width: 20ch; }
.page-lead { max-width: 60ch; color: var(--muted-dark); font-size: 18px; line-height: 1.55; }
.page-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.page-body { padding: clamp(40px, 6vw, 80px) var(--page-x) var(--section-y); }
.course-head { position: relative; isolation: isolate; overflow: hidden; }
.course-head::before { content: ""; position: absolute; z-index: -1; inset: 0 0 0 38%; background: var(--head-image) center / cover no-repeat; opacity: .7; -webkit-mask: linear-gradient(90deg, transparent, #000 60%); mask: linear-gradient(90deg, transparent, #000 60%); }
.course-head::after { content: ""; position: absolute; z-index: -1; inset: auto 0 0; height: 55%; background: linear-gradient(transparent, var(--ink)); }
.back-link { justify-self: start; color: var(--muted-dark); font-weight: 400; }
.back-link:hover { color: var(--off); text-decoration: none; }
.back-link .icon { transition: transform 240ms var(--ease-out); }
.back-link:hover .icon { transform: translateX(-3px); }
.state { display: grid; gap: 20px; justify-items: start; padding: clamp(64px, 12vw, 160px) var(--page-x); }
.state h1 { max-width: 20ch; font-size: clamp(30px, 3.6vw, 48px); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.state p { max-width: 52ch; color: var(--muted-dark); }
.loading { color: var(--muted-dark); font: 400 11px/1.6 var(--label); letter-spacing: .06em; text-transform: uppercase; }
.loading::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 10px; background: var(--signal); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }

/* ---------------------------------------------------------------------------------------- course page */
.course-facts { display: flex; flex-wrap: wrap; gap: 0; margin-top: 8px; border: solid var(--line-dark); border-width: 1px 0; }
.course-facts div { flex: 1 1 150px; padding: 16px 24px 16px 0; }
.course-facts div + div { padding-left: 24px; border-left: 1px solid var(--line-dark); }
.course-facts dt { color: var(--muted-dark); font: 400 11px/1.6 var(--label); letter-spacing: .06em; text-transform: uppercase; }
.course-facts dd { margin-top: 2px; font-size: 17px; font-weight: 500; }
.course-action { display: grid; gap: 16px; max-width: 560px; margin-top: 12px; }
.course-action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.course-note { color: var(--muted-dark); font-size: 15px; line-height: 1.55; }
.apply-form { display: grid; gap: 20px; padding: 24px; border: 1px solid var(--line-mid); border-radius: 4px; background: var(--surface); }
.apply-form h2 { font-size: 20px; font-weight: 500; line-height: 1.3; }
.prose { display: grid; gap: 16px; max-width: 54ch; font-size: 17px; line-height: 1.7; }
.prose h2 { margin-top: 20px; font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 8px; font-size: 18px; font-weight: 500; line-height: 1.35; }
.prose ol { display: grid; gap: 10px; padding-left: 22px; }
.prose a { color: var(--link); text-underline-offset: 3px; }
.prose code { padding: 1px 6px; border: 1px solid var(--line-light); border-radius: 3px; background: #f3f3f3; font: 400 .9em/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; }
/* A lesson page is a column of blocks: text, pictures, videos, documents, links. */
.lesson-blocks { display: grid; gap: 28px; }
.lesson-figure { display: grid; gap: 10px; margin: 0; }
.lesson-figure img { width: auto; max-width: 100%; height: auto; border-radius: 4px; }
.lesson-figure figcaption { max-width: 60ch; color: var(--muted); font-size: 14px; line-height: 1.5; }
.lesson-preview { margin-bottom: -8px; }
.outline-module.is-sub { margin-left: 28px; }
.prose ul { display: grid; gap: 10px; padding-left: 22px; list-style: none; }
.prose li { position: relative; }
.prose li::before { content: ""; position: absolute; top: .66em; left: -20px; width: 5px; height: 5px; background: currentColor; }
.block-title { margin-bottom: 20px; font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -.01em; }
.syllabus-link { margin-top: 28px; }
.outline { display: grid; gap: 28px; }
.outline-module h3 { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: baseline; padding-bottom: 12px; font-size: 18px; font-weight: 500; line-height: 1.35; }
.outline-module h3 span:first-child { color: var(--muted); font: 400 12px/1.6 var(--label); font-variant-numeric: tabular-nums; }
.outline-lessons { border-bottom: 1px solid var(--line-light); }
.outline-lesson { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 52px; padding: 12px 0 12px 28px; border-top: 1px solid var(--line-light); font-size: 16px; line-height: 1.4; text-decoration: none; }
a.outline-lesson:hover { color: var(--action); }
.outline-mark { display: grid; place-items: center; width: 18px; height: 18px; border: 1px solid #b9b9b9; border-radius: 50%; color: transparent; }
.outline-lesson.is-done .outline-mark { border-color: var(--action); background: var(--action); color: #fff; }
.outline-lesson[aria-current="page"] { font-weight: 500; }
.outline-lesson[aria-current="page"] .outline-mark { border-color: var(--ink); }
.outline-empty { color: var(--muted); }

/* ---------------------------------------------------------------------------------------- account */
.account { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 48px clamp(40px, 8vw, 140px); padding: clamp(40px, 7vw, 96px) var(--page-x) var(--section-y); align-items: start; }
.account h1 { margin-bottom: 28px; font-size: clamp(34px, 4vw, 52px); font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin-bottom: 32px; padding: 3px; border: 1px solid var(--line-mid); border-radius: 4px; }
.mode-switch button { min-height: 44px; border: 0; border-radius: 2px; background: transparent; color: var(--muted-dark); font-size: 15px; font-weight: 500; }
.mode-switch button:hover { background: var(--surface-2); color: var(--off); }
.mode-switch button[aria-pressed="true"] { background: var(--off); color: var(--ink); }
.account-aside { display: grid; gap: 20px; max-width: 44ch; padding-top: clamp(0px, 8vw, 132px); color: var(--muted-dark); font-size: 15px; line-height: 1.6; }
.account-aside p { padding-top: 20px; border-top: 1px solid var(--line-dark); }
.account-aside a { color: var(--signal); }

/* ---------------------------------------------------------------------------------------- my learning */
.learn-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px clamp(40px, 6vw, 96px); align-items: start; }
.learn-block + .learn-block { margin-top: 56px; }
.enrolments { border-bottom: 1px solid var(--line-light); }
.enrolment { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 32px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line-light); }
.enrolment-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 20px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.enrolment-title a { text-decoration: none; }
.enrolment-title a:hover { color: var(--action); }
.enrolment-detail { display: grid; gap: 10px; max-width: 520px; margin-top: 12px; color: var(--muted); font-size: 15px; }
.empty { display: grid; gap: 16px; justify-items: start; padding: 28px 0; border-block: 1px solid var(--line-light); color: var(--muted); }
.certificate-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line-light); }
.certificate-row strong { display: block; font-weight: 500; line-height: 1.35; }
.certificate-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; margin-top: 2px; color: var(--muted); font-size: 14px; }
.certificate-number { font: 400 12px/1.6 var(--label); letter-spacing: .04em; }
/* Numbers a person reads back or checks are set like the other readouts. */
.code { font-family: var(--label); font-weight: 400; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.panel { display: grid; gap: 28px; padding: 28px; border: 1px solid var(--line-light); border-radius: 4px; background: #fff; }
.panel h2 { font-size: 20px; font-weight: 500; line-height: 1.3; }
.panel h3 { font-size: 16px; font-weight: 500; line-height: 1.4; }
.panel-part { display: grid; gap: 16px; }
.panel-part + .panel-part, .panel-fold { padding-top: 28px; border-top: 1px solid var(--line-light); }
.panel-fold summary { display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 16px; align-items: center; min-height: 28px; font-size: 16px; font-weight: 500; line-height: 1.4; list-style: none; cursor: pointer; }
.panel-fold summary::-webkit-details-marker { display: none; }
.panel-fold summary::after { content: ""; width: 8px; height: 8px; margin-right: 4px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); transition: transform 240ms var(--ease-out); }
.panel-fold[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.panel-fold summary:hover { color: var(--action); }
.panel-fold .form { margin-top: 20px; }
.panel-note { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------------------------------------------------------------------------------------- lesson */
.lesson-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding: 16px var(--page-x); border-bottom: 1px solid var(--line-dark); }
.lesson-bar .progress { min-width: min(280px, 100%); }
.lesson-layout { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 96px); padding: clamp(32px, 5vw, 64px) var(--page-x) var(--section-y); align-items: start; }
.lesson-nav { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100svh - var(--header-h) - 48px); overflow-y: auto; scrollbar-color: #c4c4c4 transparent; }
.lesson-nav summary { display: none; }
.lesson-nav .outline { gap: 20px; }
.lesson-nav .outline-module h3 { font-size: 15px; }
.lesson-nav .outline-lesson { min-height: 44px; padding-block: 10px; font-size: 15px; }
.lesson-main { min-width: 0; max-width: 62ch; }
.lesson-main h1 { margin-bottom: 28px; font-size: clamp(30px, 3.4vw, 46px); font-weight: 500; line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.lesson-extra { display: grid; gap: 12px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line-light); }
.lesson-extra h2 { font-size: 16px; font-weight: 500; }
.video-frame { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-gate { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 20px; color: var(--off); text-align: center; }
.video-gate p { max-width: 40ch; color: var(--muted-dark); font-size: 13px; line-height: 1.5; }
.video-gate .action-signal { border-color: var(--signal); background: var(--signal); color: var(--ink); }
.file-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--link); font-weight: 500; }
.file-size { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.lesson-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-light); }
.lesson-foot .message { flex: 1 1 100%; }
.finish { display: grid; gap: 12px; justify-items: start; margin-top: 32px; padding: 24px; border: 1px solid #a9d8c1; border-radius: 4px; background: #e6f5ee; color: var(--action-deep); }
.finish strong { font-size: 18px; font-weight: 500; line-height: 1.4; }

.quiz { display: grid; gap: 32px; }
.quiz-intro { color: var(--muted); }
.question { display: grid; gap: 14px; min-width: 0; margin: 0; padding: 0; border: 0; }
.question legend { padding: 0; font-size: 19px; font-weight: 500; line-height: 1.4; }
.question-hint { color: var(--muted); font-size: 14px; }
.option { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid #c9c9c9; border-radius: 4px; background: #fff; line-height: 1.5; cursor: pointer; transition: border-color 160ms; }
.option:hover { border-color: #8f8f8f; }
.option:has(input:checked) { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.option input { margin-top: 2px; background-color: #fff; }
/* A graded question frames the chosen answers by the result: green only when the question was answered right. */
.question.is-graded .option { cursor: default; }
.question.is-graded .option:hover { border-color: #c9c9c9; }
.question.is-wrong .option:has(input:checked) { border-color: var(--alert-ink); box-shadow: inset 0 0 0 1px var(--alert-ink); }
.question.is-wrong .option input[type="checkbox"]:checked { border-color: var(--alert-ink); background-color: var(--alert-ink); }
.question.is-wrong .option input[type="radio"]:checked { border-color: var(--alert-ink); background: radial-gradient(var(--alert-ink) 0 4.5px, transparent 5px); }
.question-result { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.question-result.is-right { color: var(--action); }
.question-result.is-wrong { color: var(--alert-ink); }
.quiz-result { display: grid; gap: 12px; justify-items: start; padding: 20px 24px; border: 1px solid #c9c9c9; border-radius: 4px; background: #fff; }
.quiz-result strong { font-size: 20px; font-weight: 500; line-height: 1.35; }
.quiz-result.is-passed { border-color: #a9d8c1; background: #e6f5ee; color: var(--action-deep); }
.quiz-result.is-failed { border-color: #e7b1ab; background: #fdf1ef; color: var(--alert-ink); }

/* ---------------------------------------------------------------------------------------- certificate */
/* Both grids get a column that may shrink below its content, so a wide sheet never pushes the page sideways. */
.certificate-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding: clamp(40px, 6vw, 80px) var(--page-x) var(--section-y); }
#certificate { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; justify-items: start; }
#certificate:empty { display: none; }
#certificate .verdict-line { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; line-height: 1.35; }
#certificate .verdict-line.is-ok { color: var(--signal); }
#certificate .verdict-line.is-bad { color: var(--alert); }
.certificate-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* The sheet: a landscape A4 drawing. Every size inside is a number of millimetres of that page, --u being one of them
   (1/297 of the sheet's width), so the sheet scales as one picture on a phone and prints at full size. */
.sheet { container-type: inline-size; position: relative; width: 100%; max-width: 1180px; aspect-ratio: 297 / 210; overflow: hidden; background: #fff; color: var(--ink); color-scheme: light; }
.sheet-paper { --u: calc(100cqi / 297); position: absolute; inset: 0; font-size: calc(var(--u) * 3); line-height: 1.3; }
.sheet-first, .sheet-second { display: block; }
.sheet-second { color: var(--muted); font-size: .86em; font-weight: 400; }
.sheet-marks { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--ink); stroke-linecap: square; }
.sheet-marks path, .sheet-marks rect { vector-effect: non-scaling-stroke; }
.sheet-frame { stroke-width: 1.4; }
.sheet-ticks { stroke-width: .7; }
.sheet-centres { stroke-width: 1.6; }
.sheet-corners { stroke-width: 1; }
.sheet-scale { position: absolute; color: var(--muted); font: 400 calc(var(--u) * 1.8)/1 var(--label); letter-spacing: .04em; white-space: nowrap; }
.sheet-scale-top { top: calc(var(--u) * 5.4); left: calc(var(--u) * (var(--at) + .8)); }
.sheet-scale-left { top: calc(var(--u) * (var(--at) + .8)); right: calc(var(--u) * 289.8); }
.sheet-scale-unit { top: calc(var(--u) * 5.4); left: calc(var(--u) * 11.6); }

/* Inside the frame: the head, the middle that takes what room is left, and the bottom row whose title block meets the frame. */
.sheet-field { position: absolute; top: calc(var(--u) * 10); left: calc(var(--u) * 10); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: calc(var(--u) * 276.85); height: calc(var(--u) * 189.85); }
.sheet-top { display: flex; align-items: flex-start; justify-content: space-between; gap: calc(var(--u) * 8); padding: calc(var(--u) * 9) calc(var(--u) * 12) 0; }
.sheet-wordmark { width: auto; height: calc(var(--u) * 11); }
.sheet-tag { padding: calc(var(--u) * 1.2) calc(var(--u) * 2.4); border: max(1px, calc(var(--u) * .35)) solid var(--ink); font: 500 calc(var(--u) * 2.5)/1.35 var(--label); letter-spacing: .06em; text-align: right; text-transform: uppercase; }
.sheet-tag .sheet-second { color: inherit; font-size: 1em; }
.sheet-main { --fit: 1; display: flex; flex-direction: column; align-items: flex-start; min-height: 0; padding: calc(var(--u) * 7) calc(var(--u) * 12) calc(var(--u) * 4); overflow: hidden; }
.sheet-title { font-size: calc(var(--u) * 8.5 * var(--fit)); font-weight: 600; line-height: 1; letter-spacing: .16em; text-transform: uppercase; }
.sheet-title::after { content: ""; display: block; width: calc(var(--u) * 16); height: max(1px, calc(var(--u) * .5)); margin-top: calc(var(--u) * 3.4 * var(--fit)); background: var(--ink); }
.sheet-kind { margin-top: calc(var(--u) * 5 * var(--fit)); font-size: calc(var(--u) * 3.6 * var(--fit)); line-height: 1.3; }
.sheet-name { max-width: 100%; margin-top: calc(var(--u) * 2.5 * var(--fit)); font-size: calc(var(--u) * 15 * var(--fit)); font-weight: 500; line-height: 1.06; letter-spacing: -.025em; overflow-wrap: anywhere; text-wrap: balance; }
.sheet-name[data-step="2"] { font-size: calc(var(--u) * 12 * var(--fit)); }
.sheet-name[data-step="3"] { font-size: calc(var(--u) * 9.5 * var(--fit)); }
.sheet-name[data-step="4"] { font-size: calc(var(--u) * 7.5 * var(--fit)); }
.sheet-name + .sheet-kind { margin-top: calc(var(--u) * 4 * var(--fit)); }
.sheet-course { max-width: calc(var(--u) * 205); margin-top: calc(var(--u) * 1.6 * var(--fit)); font-size: calc(var(--u) * 7 * var(--fit)); font-weight: 500; line-height: 1.16; letter-spacing: -.015em; overflow-wrap: anywhere; text-wrap: balance; }
.sheet-course[data-step="2"] { font-size: calc(var(--u) * 5.6 * var(--fit)); }
.sheet-course[data-step="3"] { font-size: calc(var(--u) * 4.6 * var(--fit)); }
.sheet-course[data-step="4"] { font-size: calc(var(--u) * 3.8 * var(--fit)); }
.sheet-course .sheet-second { margin-top: .2em; font-size: .8em; letter-spacing: 0; }
.sheet-note { max-width: calc(var(--u) * 150); margin-top: calc(var(--u) * 4.5 * var(--fit)); padding-left: calc(var(--u) * 2.4); border-left: max(1px, calc(var(--u) * .6)) solid var(--ink); font-size: calc(var(--u) * 3 * var(--fit)); font-weight: 500; }

.sheet-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: calc(var(--u) * 8); }
.sheet-signer { width: calc(var(--u) * 96); padding: 0 0 calc(var(--u) * 9) calc(var(--u) * 12); }
.sheet-sign-area { position: relative; width: calc(var(--u) * 74); height: calc(var(--u) * 20); border-bottom: max(1px, calc(var(--u) * .3)) solid var(--ink); }
.sheet-signature { position: absolute; bottom: calc(var(--u) * -2.5); left: calc(var(--u) * 3); width: auto; max-width: calc(var(--u) * 58); height: auto; max-height: calc(var(--u) * 21); object-fit: contain; }
/* The stamp sits over the end of the line, as it does on paper; multiply keeps the signature visible through it. */
.sheet-stamp { position: absolute; bottom: calc(var(--u) * -8); left: calc(var(--u) * 44); width: calc(var(--u) * 30); height: calc(var(--u) * 30); object-fit: contain; mix-blend-mode: multiply; }
.sheet-signer-name { margin-top: calc(var(--u) * 2); font-size: calc(var(--u) * 3.3); font-weight: 500; line-height: 1.25; }
.sheet-signer-title { margin-top: calc(var(--u) * .8); color: var(--muted); font-size: calc(var(--u) * 2.7); line-height: 1.3; }
.sheet-signer-title .sheet-first { color: var(--ink); }

.sheet-block { display: flex; flex: none; margin-left: auto; width: calc(var(--u) * 132); border: solid var(--ink); border-width: max(1px, calc(var(--u) * .35)) 0 0 max(1px, calc(var(--u) * .35)); }
.sheet-qr-cell { display: grid; flex: none; place-content: center; justify-items: center; gap: calc(var(--u) * 1.4); width: calc(var(--u) * 34); padding: calc(var(--u) * 2.5) calc(var(--u) * 1.5); border-right: max(1px, calc(var(--u) * .25)) solid var(--ink); }
.sheet-qr { width: calc(var(--u) * 29); height: calc(var(--u) * 29); }
.sheet-qr-address { max-width: calc(var(--u) * 30); color: var(--muted); font: 400 calc(var(--u) * 1.55)/1.3 var(--label); letter-spacing: .02em; text-align: center; overflow-wrap: anywhere; }
.sheet-table { display: grid; flex: 1; min-width: 0; }
.sheet-row { display: grid; grid-template-columns: calc(var(--u) * 29) minmax(0, 1fr); min-height: calc(var(--u) * 8.5); }
.sheet-row + .sheet-row { border-top: max(1px, calc(var(--u) * .25)) solid var(--ink); }
.sheet-label { padding: calc(var(--u) * 1.4) calc(var(--u) * 2); border-right: max(1px, calc(var(--u) * .25)) solid var(--ink); color: var(--muted); font-size: calc(var(--u) * 2.05); line-height: 1.25; }
.sheet-label .sheet-second { font-size: .92em; }
.sheet-value { align-self: center; padding: calc(var(--u) * 1.4) calc(var(--u) * 2.4); font-size: calc(var(--u) * 2.9); line-height: 1.25; overflow-wrap: anywhere; }
.sheet-value .sheet-second { font-size: .9em; }
.sheet-readout { font-family: var(--label); font-size: calc(var(--u) * 3.1); letter-spacing: .05em; }
.sheet-clamp > span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* A revoked certificate says so across its middle, and its name and course are struck through. */
.sheet-void { position: absolute; top: 47%; left: 50%; padding: calc(var(--u) * 2) calc(var(--u) * 5); border: max(2px, calc(var(--u) * .8)) solid var(--alert-ink); background: rgba(255, 255, 255, .8); color: var(--alert-ink); font-size: calc(var(--u) * 7); font-weight: 600; line-height: 1.15; letter-spacing: .08em; text-align: center; text-transform: uppercase; transform: translate(-50%, -50%) rotate(-8deg); }
.sheet-void .sheet-second { color: inherit; }
.sheet.is-revoked .sheet-name, .sheet.is-revoked .sheet-course { color: var(--muted); text-decoration: line-through; text-decoration-thickness: max(1px, calc(var(--u) * .4)); }

/* ---------------------------------------------------------------------------------------- narrower screens */
/* ---------------------------------------------------------------------------------------- the account */
/* A sidebar of sections and one working column, on ink: the learner's own place, so it is dark like
   the rest of the Academy rather than paper. Rows are ruled, not boxed. */
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 8px; padding: 0 6px; border-radius: 10px; background: var(--signal); color: var(--ink); font: 500 12px/1 var(--sans); font-variant-numeric: tabular-nums; }
.cabinet { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: calc(100svh - var(--header-h)); }
.cab-nav { position: sticky; top: var(--header-h); display: flex; flex-direction: column; justify-content: space-between; gap: 24px; height: calc(100svh - var(--header-h)); padding: 28px 16px 24px; border-right: 1px solid var(--line-dark); overflow-y: auto; }
.cab-nav ul { display: grid; gap: 2px; }
.cab-nav-foot { padding-top: 16px; border-top: 1px solid var(--line-dark); }
.cab-link { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 4px; background: transparent; color: var(--muted-dark); font: inherit; font-size: 15px; line-height: 1.3; text-align: left; text-decoration: none; cursor: pointer; transition: background 160ms, color 160ms; }
.cab-link .icon { flex: none; }
.cab-link span:not(.count) { flex: 1 1 auto; min-width: 0; }
.cab-link:hover { background: var(--surface); color: var(--off); }
.cab-link[aria-current="page"] { background: var(--surface-2); color: var(--off); }
.cab-link[aria-current="page"] .icon { color: var(--signal); }
.cab-main { display: grid; align-content: start; gap: clamp(32px, 4vw, 48px); max-width: 1120px; padding: clamp(32px, 4.4vw, 64px) clamp(20px, 4.4vw, 72px) var(--section-y); }
.cab-title, .cab-hello h1 { font-size: clamp(30px, 3.4vw, 48px); font-weight: 500; line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; outline-offset: 6px; }
.cab-hello { display: grid; gap: 6px; }
.cab-hello > p { color: var(--muted-dark); font-size: 16px; }
.cab-hello .cab-email { font-size: 15px; }
.cab-group { display: grid; gap: 16px; }
.cab-group > h2, .cab-group-head h2, .cab-now > h2 { font-size: 18px; font-weight: 500; line-height: 1.3; }
.cab-group-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.cab-quiet { color: var(--muted-dark); font-size: 15px; }
.cab-empty { display: grid; gap: 16px; justify-items: start; padding: 28px 0; border-block: 1px solid var(--line-dark); color: var(--muted-dark); }
/* The course to continue: the one place on the overview with a filled action. */
.cab-now { display: grid; gap: 16px; padding: clamp(20px, 2.4vw, 32px); border: 1px solid var(--line-dark); border-radius: 4px; background: var(--surface); }
.cab-now-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px 40px; }
.cab-now-body > div { display: grid; gap: 10px; }
.cab-now-course { font-size: clamp(22px, 2.2vw, 30px); font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
.cab-now-course a { text-decoration: none; }
.cab-now-course a:hover { color: var(--signal); }
.cab-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-block: 1px solid var(--line-dark); }
.cab-facts div { display: grid; gap: 6px; padding: 18px 20px 18px 0; }
.cab-facts div + div { padding-left: 20px; border-left: 1px solid var(--line-dark); }
.cab-facts dt { color: var(--muted-dark); font-size: 14px; }
.cab-facts dd { font-size: 24px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
/* A ruled row: what it is, a fact or two, and one action. */
.rows { border-bottom: 1px solid var(--line-dark); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(132px, auto); align-items: center; gap: 12px 28px; padding: 18px 0; border-top: 1px solid var(--line-dark); }
.row > .action, .row > button { justify-self: end; }
.row-main { display: grid; gap: 6px; min-width: 0; }
.row-title { font-size: 17px; font-weight: 500; line-height: 1.35; }
.row-title a { text-decoration: none; }
.row-title a:hover { color: var(--signal); }
.row-sub { color: var(--muted-dark); font-size: 14px; line-height: 1.5; }
.row-facts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 14px; color: var(--muted-dark); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.row-score { color: var(--signal); font-weight: 500; }
.row-course .progress { max-width: 420px; }
.cab-comment { display: grid; gap: 4px; max-width: 68ch; margin: 6px 0 0; padding: 12px 14px; border: 1px solid var(--alert-line); border-radius: 4px; color: var(--off); font-size: 15px; line-height: 1.55; }
.cab-comment-by { color: var(--alert); font-size: 13px; }
.cab-absence { max-width: 520px; margin-top: 10px; }
.notices { border-bottom: 1px solid var(--line-dark); }
.notice { display: grid; gap: 8px; padding: 20px 0; border-top: 1px solid var(--line-dark); }
.notice-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted-dark); font-size: 13px; }
.notice h3 { font-size: 18px; font-weight: 500; line-height: 1.35; }
.notice.is-unread h3::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--signal); vertical-align: 2px; }
.notice-body { display: grid; gap: 10px; max-width: 68ch; color: rgb(237 237 237 / .86); font-size: 15px; line-height: 1.6; }
.notice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 4px; }
.cab-form { max-width: 520px; padding-bottom: clamp(28px, 3vw, 40px); border-bottom: 1px solid var(--line-dark); }
.cab-form:last-child { border-bottom: 0; }
.cab-link-panel { border-color: var(--tint-line); }
.cab-link-form { max-width: 420px; }
.cab-fold summary { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted-dark); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; list-style: none; }
.cab-fold summary::-webkit-details-marker { display: none; }
.cab-fold summary:hover { color: var(--off); }
.cab-fold .form { margin-top: 12px; }
/* An assignment on the lesson page (a paper surface). */
.task { display: grid; gap: 20px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line-light); }
.task-due { color: var(--muted); font-size: 15px; }
.task-state { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid #c9c9c9; border-radius: 4px; background: #fff; font-size: 15px; }
.task-state.is-accepted { border-color: #a9d8c1; background: #e6f5ee; color: var(--action-deep); }
.task-state.is-returned { border-color: #e7b1ab; background: #fdf1ef; color: var(--alert-ink); }
.on-paper .cab-comment { border-color: #e7b1ab; background: #fff; color: var(--ink); }
.on-paper .cab-comment-by { color: var(--alert-ink); }
.task-answer { display: grid; gap: 8px; }
.task-answer h2 { font-size: 16px; font-weight: 500; }
.task-answer p { max-width: 68ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-answer a { color: var(--link); }

@media (max-width: 1100px) {
  .site-nav { gap: 20px; }
  .lesson-layout { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); }
}
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .site-header { flex-wrap: wrap; gap: 0 14px; }
  .brand img { width: 118px; height: 40px; }
  .brand-section { padding-left: 14px; }
  .menu-button { display: inline-flex; margin-left: auto; }
  .site-nav, .header-tools { display: none; flex-basis: 100%; margin: 0; }
  .site-header.is-open { padding-bottom: 20px; }
  .site-header.is-open .site-nav { display: grid; gap: 0; padding-top: 8px; border-top: 1px solid var(--line-dark); }
  .site-header.is-open .site-nav a { min-height: 52px; border-bottom: 1px solid var(--line-dark); font-size: 17px; }
  .site-header.is-open .header-tools { display: flex; flex-wrap: wrap; justify-content: space-between; padding-top: 16px; }

  /* Phones: the reel keeps the full screen; the tiles stack, the first of each group taller. */
  .reel { padding: 40px var(--page-x) 112px; }
  .reticle { inset: 6px; }
  .reel-row { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 12px; }
  .reel-row .action, .reel-link { justify-self: center; }
  .reel-mark { display: none; }
  .reel-side { left: var(--page-x); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .reel-title { font-size: clamp(31px, 9.4vw, 44px); letter-spacing: -.015em; }
  .reel-caption { white-space: nowrap; }
  .reel-ticks i { width: 10px; }
  /* The account: the sections become a strip that scrolls sideways under the header. */
  .cabinet { grid-template-columns: minmax(0, 1fr); }
  .cab-nav { z-index: 20; flex-direction: row; justify-content: flex-start; gap: 4px; height: auto; padding: 8px var(--page-x); border-right: 0; border-bottom: 1px solid var(--line-dark); background: var(--ink); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .cab-nav ul { display: flex; gap: 4px; }
  .cab-nav-foot { padding: 0 0 0 4px; border-top: 0; border-left: 1px solid var(--line-dark); }
  .cab-link { width: auto; white-space: nowrap; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .row-facts { justify-content: flex-start; text-align: left; }
  .row-facts:empty { display: none; }
  .row > .action, .row > button { justify-self: start; }
  .cab-now-body { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .cab-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cab-facts div, .cab-facts div + div { padding: 16px 12px 16px 0; border-left: 0; }
  .catalog { padding-inline: var(--page-x); }
  .finder-search input { min-height: 56px; }
  .listing-link { grid-template-columns: 104px minmax(0, 1fr); align-items: start; gap: 6px 16px; padding: 16px 0; }
  .listing-thumb { grid-row: span 2; aspect-ratio: 1; }
  .listing-summary, .listing-link > .icon { display: none; }
  .listing-name { font-size: 19px; }
  .listing-facts { grid-column: 2; justify-items: start; white-space: normal; }
  .catalog .section-head, .catalog-empty { padding-inline: 0; }
  .mosaic { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 12px; }
  .tile, .tile:nth-child(n) { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
  .tile:nth-child(6n + 1) { aspect-ratio: 4 / 5; }
  .tile-name { font-size: 24px; }

  .split, .learn-grid, .account { grid-template-columns: minmax(0, 1fr); }
  .account-aside { padding-top: 0; }
  .step { grid-template-columns: 40px minmax(0, 1fr); }
  .step p { grid-column: 2; }
  .faq details p { padding-right: 0; }
  .course-head::before, .course-head::after { display: none; }
  .closing::before { position: static; z-index: auto; display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 4px; -webkit-mask: none; mask: none; }
  .course-facts div { flex-basis: 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; }
  .course-facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line-dark); }
  .course-facts dd { margin-top: 0; text-align: right; }
  .enrolment { grid-template-columns: minmax(0, 1fr); }
  .lesson-layout { grid-template-columns: minmax(0, 1fr); }
  .lesson-nav { position: static; max-height: none; border: 1px solid var(--line-light); border-radius: 4px; background: #fff; }
  .lesson-nav summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 0 16px; font-weight: 500; list-style: none; cursor: pointer; }
  .lesson-nav summary::-webkit-details-marker { display: none; }
  .lesson-nav summary::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); transition: transform 240ms var(--ease-out); }
  .lesson-nav[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
  .lesson-nav .outline { padding: 4px 16px 16px; }
  .consent-banner { left: 12px; right: 12px; bottom: 12px; width: auto; grid-template-columns: minmax(0, 1fr); }
  .consent-actions { grid-column: 1; grid-row: auto; }
}
@media (max-width: 520px) {
  .check-form { grid-template-columns: minmax(0, 1fr); }
  .form-actions .action, .course-action-row .action, .closing .action { flex: 1 1 100%; }
  .panel, .apply-form, .verdict { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Zero, not a token duration: with any duration every style change becomes a transition and scripts measure the old value. */
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: 0s !important; }
}

/* The certificate alone, edge to edge on one landscape A4 page: the sheet carries its own margins and frame. */
@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { background: #fff; }
  body { display: block; min-height: 0; }
  .site-header, .site-footer, .certificate-tools, .consent-banner, .check-panel, .skip-link, #certificate .verdict-line, noscript { display: none !important; }
  .certificate-page, #certificate { display: block; padding: 0; }
  .sheet { width: 297mm; max-width: none; height: 209.5mm; aspect-ratio: auto; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
