/* SEKVAR — one look for the site and the order pages (owner, Task 2026-12-01-12; the Instagram canvas).
   White paper, black ink, grey rules and one blue. Design v2 (Task 2026-12-02-20) uses the blue boldly: the hero band,
   primary buttons, links, focus, progress, the active switches; a dark theme on every page.
   Inter Tight 800 for headings, Inter for text, IBM Plex Mono for numbers, moves and labels. Square corners. */
:root {
  color-scheme: light;
  --paper: #FFFFFF;
  --ink: #0A0A0A;
  --ink-2: #4A4A4A;
  --rule: #D4D4D4;
  --wash: #F4F4F4;
  --blue: #1F3FD1;
  --blue-fill: #1F3FD1;
  --board-l: #FFFFFF;
  --error: #B3261E;
  --head: 'Inter Tight', 'Inter Tight Fallback', Arial, sans-serif;
  --body: 'Inter', 'Inter Fallback', Arial, sans-serif;
  --mono: 'IBM Plex Mono', 'Plex Mono Fallback', monospace;
  --page: 1120px;
  --gutter: 32px;
}
/* dark theme (Task 2026-12-02-20): the system setting unless <html data-scheme> (the switch beside RU/EN, kept in a
   cookie and written by the server) says light or dark. Black, white, the blue (lighter for text and lines on dark, a
   brighter fill for bands and buttons) and one grey. */
:root[data-scheme=dark] {
  color-scheme: dark;
  --paper: #0B0C10;
  --ink: #F2F2F0;
  --ink-2: #A6A6A6;
  --rule: #2E3038;
  --wash: #16171D;
  --blue: #8197FF;
  --blue-fill: #2F4FE3;
  --board-l: #DDE2F2;
  --error: #FF8A80;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-scheme=light]) {
    color-scheme: dark;
    --paper: #0B0C10;
    --ink: #F2F2F0;
    --ink-2: #A6A6A6;
    --rule: #2E3038;
    --wash: #16171D;
    --blue: #8197FF;
    --blue-fill: #2F4FE3;
    --board-l: #DDE2F2;
    --error: #FF8A80;
  }
}

/* Stand-ins until the self-hosted fonts have loaded: local system fonts scaled to the same widths (measured in Chrome
   on the headings and the lead), so the lines break the same and nothing moves when the fonts arrive (CLS). */
@font-face { font-family: 'Inter Tight Fallback'; font-weight: 800; size-adjust: 86%;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold'); }
@font-face { font-family: 'Inter Fallback'; font-weight: 400; size-adjust: 106%;
  src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo'); }
@font-face { font-family: 'Inter Fallback'; font-weight: 600; size-adjust: 101%;
  src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold'); }
@font-face { font-family: 'Plex Mono Fallback'; font-weight: 400; size-adjust: 109.1%; src: local('Consolas'); }
@font-face { font-family: 'Plex Mono Fallback'; font-weight: 600; size-adjust: 109.1%; src: local('Consolas Bold'); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--body); min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; max-width: var(--page); margin: 0 auto; padding: 48px var(--gutter) 72px; outline: none; }
/* the order pages fill in after the page is drawn: the footer starts below the fold, so it does not jump (CLS) */
.orders-page main { min-height: 100dvh; }
[hidden] { display: none !important; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:where(main, .site-footer) a:where(:not(.button)) { color: var(--blue); }
:where(main, .site-footer) a:where(:not(.button)):hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; letter-spacing: -0.01em; margin: 0 0 12px; line-height: 1.1; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: 18px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 720px; }
.eyebrow { font: 600 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 12px; }
.error-text { color: var(--error); }
.skip-link { position: absolute; left: 8px; top: -48px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip-link:focus { top: 8px; }

/* masthead: the mark, the navigation, the language switch */
.masthead { border-bottom: 2px solid var(--ink); background: var(--paper); }
.masthead-inner { max-width: var(--page); margin: 0 auto; padding: 16px var(--gutter); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand-name { font: 800 22px/1 var(--head); letter-spacing: -0.01em; }
.mark { width: 32px; height: 32px; flex: none; }
.mark-fill { fill: var(--ink); }
.mark-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.mark-dot { fill: var(--blue); }
.site-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-nav a { font-weight: 600; text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a[aria-current=page] { border-bottom-color: var(--blue); }
.site-nav a.button { padding: 8px 16px; }
.site-nav form { margin: 0; }
.link-button { font: inherit; font-weight: 600; background: none; border: 0; padding: 4px 0; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button:hover { color: var(--blue); }
.lang-switch { display: flex; border: 2px solid var(--ink); }
.lang-switch a { font: 600 13px/1 var(--mono); padding: 7px 10px; text-decoration: none; }
.lang-switch a + a { border-left: 2px solid var(--ink); }
.lang-switch a[aria-current] { background: var(--blue-fill); color: #FFFFFF; }
.lang-switch a, .theme-switch a { transition: background-color 0.15s, color 0.15s; }
.lang-switch a:not([aria-current]):hover, .theme-switch a:not([aria-current]):hover { background: var(--wash); color: var(--ink); }
.theme-switch { display: flex; border: 2px solid var(--ink); }
.theme-switch a { display: inline-flex; align-items: center; padding: 6px 9px; color: var(--ink); }
.theme-switch a + a { border-left: 2px solid var(--ink); }
.theme-switch svg { width: 15px; height: 15px; fill: currentColor; }
.theme-switch a[aria-current] { background: var(--blue-fill); color: #FFFFFF; }
/* no choice yet: the switch shows the system's theme as the active one */
@media (prefers-color-scheme: light) { :root:not([data-scheme]) .theme-switch a[data-mode=light] { background: var(--blue-fill); color: #FFFFFF; } }
@media (prefers-color-scheme: dark) { :root:not([data-scheme]) .theme-switch a[data-mode=dark] { background: var(--blue-fill); color: #FFFFFF; } }

/* buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; font: 600 15px/1.2 var(--body); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.08s; }
.button:active { transform: translateY(1px); }
.button:hover { color: var(--ink); background: var(--wash); }
.button.primary { background: var(--blue-fill); border-color: var(--blue-fill); color: #FFFFFF; }
.button.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button.quiet { border-color: var(--rule); }
.button.small { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.button:disabled { opacity: 0.55; cursor: wait; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* forms */
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; margin: 0 0 16px; }
input, select { font: 400 16px/1.4 var(--body); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 0; padding: 10px 12px; min-height: 44px; width: 100%; }
input[type=file] { padding: 8px; font-size: 14px; }
input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
small { color: var(--ink-2); font-size: 13px; margin: -10px 0 16px; display: block; }
fieldset { border: 0; border-top: 2px solid var(--ink); margin: 0 0 8px; padding: 16px 0 0; }
legend { font: 600 12px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 0 8px 0 0; }

/* sign-in */
.auth-shell { max-width: 440px; margin: 0 auto; }
.auth-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.auth-tabs a { font-weight: 600; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ink-2); }
.auth-tabs a[aria-current=page] { color: var(--ink); border-bottom-color: var(--blue); }
.auth-panel { border: 2px solid var(--ink); padding: 28px; }
.auth-panel h1 { font-size: 34px; }
.auth-panel .button { width: 100%; margin-top: 4px; }
.auth-hint { color: var(--ink-2); }
.auth-message { border-left: 4px solid var(--error); padding: 8px 12px; background: var(--wash); }
.auth-message.auth-success { border-left-color: var(--blue); }
.auth-back { margin-top: 20px; font-size: 14px; }
/* open sign-up (Task 2026-12-02-18): another way in, the invitation tucked away, what is kept, the Turnstile check */
.auth-aside { margin: 14px 0 0; font-size: 14px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; color: var(--ink-2); font-size: 14px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 1px solid var(--rule); }
.auth-providers .button.provider { width: 100%; margin-top: 8px; }
.auth-invite { margin-top: 22px; border-top: 1px solid var(--rule); padding-top: 14px; }
.auth-invite summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.auth-invite[open] summary { margin-bottom: 8px; }
.auth-privacy { margin-top: 24px; border-top: 1px solid var(--rule); padding-top: 14px; font-size: 14px; color: var(--ink-2); }
.auth-privacy h2 { font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.auth-privacy p { margin: 0; }
.cf-turnstile { min-height: 65px; margin: 4px 0 8px; }
.notice.unconfirmed { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; }
.notice.unconfirmed p { margin: 0; }

/* landing */
.hero { padding: 24px 0 56px; border-bottom: 1px solid var(--rule); }
.hero h1 { max-width: 900px; font-size: clamp(38px, 6vw, 72px); letter-spacing: -0.012em; line-height: 1.06; }
.hero .lead { margin-top: 20px; }
.hero-note { font-size: 14px; margin-top: 8px; }
.band { padding: 48px 0; border-bottom: 1px solid var(--rule); }
.band:last-child { border-bottom: 0; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.pilot-box { border: 2px solid var(--ink); padding: 24px; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.steps li { padding: 20px 24px 8px 0; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.step-number { display: block; font-size: 32px; font-weight: 600; margin-bottom: 8px; }

/* what the file holds */
.file-parts { list-style: none; margin: 8px 0 12px; padding: 0; border-top: 2px solid var(--ink); }
.file-part { display: grid; grid-template-columns: 10px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.file-mark { width: 10px; height: 10px; margin-top: 6px; background: var(--blue-fill); }
.file-part h3 { font-family: var(--mono); font-weight: 600; font-size: 16px; letter-spacing: 0; margin-bottom: 4px; }
.file-part p { margin: 0; color: var(--ink-2); }

/* order pages */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 2px solid var(--ink); margin-bottom: 24px; }
.page-head .lead { margin-bottom: 0; }
.notice { border-left: 4px solid var(--blue); background: var(--wash); padding: 10px 14px; margin-bottom: 24px; }
.notice.error-text { border-left-color: var(--error); }
.empty { border: 2px solid var(--ink); padding: 28px; max-width: 760px; }
.order-list { display: grid; gap: 0; }
.order-card { border-bottom: 1px solid var(--rule); padding: 20px 0; transition: box-shadow 0.2s, background-color 0.2s; }
.order-card:hover { background: linear-gradient(90deg, var(--wash), transparent 70%); box-shadow: inset 4px 0 0 var(--blue-fill); }
.order-card:first-child { padding-top: 4px; }
.order-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.order-head h2 { font-size: 22px; margin: 0; }
.badge { font: 600 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; border: 2px solid var(--ink); padding: 6px 8px; white-space: nowrap; }
.badge.status-done { background: var(--ink); color: var(--paper); }
.badge.status-running, .badge.status-queued, .badge.status-receiving { border-color: var(--blue); color: var(--blue); }
.badge.status-running { background: var(--blue-fill); border-color: var(--blue-fill); color: #FFFFFF; animation: chip-pulse 1.8s ease-out infinite; }
@keyframes chip-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue-fill) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
.badge.status-failed { border-color: var(--error); color: var(--error); }
.phase { font-weight: 600; }
progress { width: 100%; max-width: 520px; height: 10px; appearance: none; -webkit-appearance: none; border: 2px solid var(--ink); background: var(--paper); display: block; margin: 8px 0; }
progress::-webkit-progress-bar { background: var(--paper); }
progress::-webkit-progress-value { background: var(--blue-fill) repeating-linear-gradient(-45deg, transparent 0 7px, rgba(255, 255, 255, 0.28) 7px 14px);
  background-size: 20px 100%; animation: bar-run 0.9s linear infinite; transition: width 0.6s ease; }
progress::-moz-progress-bar { background: var(--blue-fill) repeating-linear-gradient(-45deg, transparent 0 7px, rgba(255, 255, 255, 0.28) 7px 14px);
  background-size: 20px 100%; animation: bar-run 0.9s linear infinite; }
@keyframes bar-run { to { background-position: 20px 0; } }
.new-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.sheet { border: 2px solid var(--ink); padding: 24px; }
.sheet + .sheet { margin-top: 24px; }
.sheet-foot { border-top: 2px solid var(--ink); padding-top: 16px; }
.sheet-foot .button { margin-bottom: 12px; }
.file-aside h2 { font-size: 22px; }
.back-link { font-weight: 600; }
.order-detail .badge { font-size: 13px; }

/* footer */
.site-footer { border-top: 2px solid var(--ink); }
.footer-inner { max-width: var(--page); margin: 0 auto; padding: 20px var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  main { padding-top: 28px; padding-bottom: 48px; }
  .masthead-inner { gap: 12px 16px; padding-top: 12px; padding-bottom: 12px; }
  .site-nav { order: 3; width: 100%; gap: 16px; }
  .split, .new-grid { grid-template-columns: 1fr; gap: 24px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 16px 0 4px; border-left: 0; }
  .steps li + li { border-top: 1px solid var(--rule); }
  .auth-panel, .sheet, .empty, .pilot-box { padding: 20px; }
  .page-head { align-items: stretch; }
  .page-head .button { width: 100%; }
  .file-part { gap: 12px; }
  /* the status always under the name: whether both fit on one line must not depend on the font arriving (CLS) */
  .order-head { row-gap: 8px; }
  .order-head h2 { flex-basis: 100%; }
}

/* ---- the landing's hero (Task 2026-12-02-20, design v2): the board that plays once, the tree that grows ---- */
.landing-page main { padding-top: 0; }
.hero-figure { margin: 0; }
.hero-play { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 36px; align-items: start; }
.board-frame { aspect-ratio: 1; }
.hero-board { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.hero-board .sq-l { fill: var(--sq-l); }
.hero-board .sq-d { fill: var(--sq-d); }
.hero-board .hl { fill: var(--hl); }
.hero-board .coord { font: 600 7.5px var(--mono); }
.hero-board .coord.on-l { fill: var(--sq-d); }
.hero-board .coord.on-d { fill: var(--sq-l); }
.hero-board .pc.w { --pf: #FFFFFF; --ps: #0A0A0A; --pd: #0A0A0A; }
.hero-board .pc.b { --pf: #0A0A0A; --ps: var(--b-edge, #0A0A0A); --pd: #FFFFFF; }
/* the shapes inside <use> copies: plain class selectors (an ancestor selector does not reach into the copy) */
.hb-pb { fill: var(--pf); stroke: var(--ps); stroke-width: 1.5; stroke-linejoin: round; }
.hb-pl { fill: none; stroke: var(--pd); stroke-width: 1.5; stroke-linecap: round; }
.hb-pd { fill: var(--pd); }
.hero-board .taken { opacity: 0; }
.hero-figure figcaption { font-size: 12px; line-height: 1.5; margin-top: 18px; color: var(--cap); max-width: 780px; }

.hero-tree { font-size: 14px; color: var(--tree-text); }
.tree-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--tree-line); font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--tree-head); }
.tree-head .tag { border: 2px solid currentColor; padding: 3px 7px; line-height: 1; }
.hero-tree .ours { margin: 6px 0 4px; font-size: 13px; color: var(--tree-ours); }
.tree { list-style: none; margin: 0; padding: 0 0 0 10px; }
.tree > li { position: relative; padding: 6px 0 6px 24px; }
.tree > li::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--tree-line); }
.tree > li:last-child::before { bottom: auto; height: 19px; }
.tree > li::after { content: ''; position: absolute; left: 0; top: 17px; width: 16px; border-top: 2px solid var(--tree-line); }
.hero-tree .row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 14px; }
.hero-tree .mv { font-weight: 600; font-size: 15px; min-width: 4.2em; color: var(--tree-move); }
/* the quieter labels and the rarer rows in solid colours, 4.5:1 or more on both blues (Task 2026-12-02-22: at reduced
   opacity they fell to 1.8-4.2); the rarer row's evaluation is an outline, not the white chip */
.hero-tree .count { font-size: 12px; color: var(--tree-dim); }
.hero-tree .ev { font-size: 12.5px; padding: 3px 7px; background: var(--ev-bg); color: var(--ev-ink); white-space: nowrap; }
.hero-tree .alt > .row, .hero-tree .alt .mv { color: var(--tree-dim); }
.hero-tree .alt .ev { background: transparent; color: var(--tree-dim); box-shadow: inset 0 0 0 1.5px var(--tree-dim); }
.hero-tree .now .mv::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 7px;
  vertical-align: 1px; background: var(--now); animation: hb-idle 2.4s ease-in-out infinite; }
.hero-tree span.grow { display: inline-block; }
.hero-tree .grow { animation: hb-grow 0.5s cubic-bezier(.3, 0, .2, 1) both; }
@keyframes hb-grow { from { opacity: 0; transform: translateY(5px); } }
@keyframes hb-idle { 50% { opacity: 0.25; } }

/* the hero is the blue band (full bleed without widening the page); the owner picked this direction (A) */
.hero-a { --band: var(--blue-fill); color: #FFFFFF; background: var(--band); box-shadow: 0 0 0 100vmax var(--band);
  clip-path: inset(0 -100vmax); padding: 56px 0 52px; border-bottom: 0;
  --sq-l: #FFFFFF; --sq-d: #C3CDF6; --hl: rgba(31, 63, 209, 0.36);
  --tree-line: rgba(255, 255, 255, 0.6); --tree-text: #EEF1FD; --tree-head: #FFFFFF; --tree-dim: #DDE3FB;
  --tree-ours: #E6EBFC; --tree-move: #FFFFFF; --ev-bg: #FFFFFF; --ev-ink: var(--blue-fill);
  --now: #FFFFFF; --cap: rgba(255, 255, 255, 0.8); }
.hero-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; margin-bottom: 48px; }
.hero-a h1 { color: #FFFFFF; font-size: clamp(38px, 5.2vw, 64px); margin: 0; }
.hero-a .eyebrow { color: rgba(255, 255, 255, 0.82); }
.hero-a .lead { color: rgba(255, 255, 255, 0.92); margin-top: 0; }
.hero-a .hero-note { color: #FFFFFF; }
.hero-a .button { color: #FFFFFF; background: transparent; border-color: #FFFFFF; }
.hero-a .button:hover { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
.hero-a .button.primary { background: #FFFFFF; border-color: #FFFFFF; color: var(--blue-fill); }
.hero-a .button.primary:hover { background: #0A0A0A; border-color: #0A0A0A; color: #FFFFFF; }
.hero-a :focus-visible { outline-color: #FFFFFF; }
.hero-a .board-frame { box-shadow: 0 0 0 3px #FFFFFF; }

/* ---- the file as a chess program shows it (7b-2): a game list and one chapter's notation ---- */
.file-panel { margin: 24px 0 8px; border: 2px solid var(--ink); background: var(--paper); }
.window-bar { display: flex; align-items: center; gap: 12px; margin: 0; padding: 9px 14px; background: var(--ink);
  color: var(--paper); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.window-bar .dots { display: inline-flex; gap: 5px; }
.window-bar i { width: 10px; height: 10px; border: 2px solid var(--paper); }
.window-bar i:first-child { background: var(--paper); }
.window-bar i:last-child { background: var(--blue-fill); border-color: var(--blue-fill); }
.window-bar .tag { margin-left: auto; border: 2px solid currentColor; padding: 2px 6px; text-transform: uppercase; letter-spacing: 0.08em; }
.panel-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
.panel-games { list-style: none; margin: 0; padding: 0; border-right: 2px solid var(--ink); font-size: 13px; }
.panel-games li { padding: 9px 14px; border-bottom: 1px solid var(--rule); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-games li.open { background: var(--blue-fill); color: #FFFFFF; font-weight: 600; }
.panel-games li.more { color: var(--ink-2); }
.panel-notation { padding: 18px 22px 20px; font-size: 15px; line-height: 1.7; }
.pn-title { font: 800 19px/1.2 var(--head); margin: 0 0 2px; }
.pn-meta { font-size: 12px; color: var(--ink-2); margin: 0 0 12px; }
.pn-line, .pn-var { margin: 0 0 6px; }
.pn-line b { font-weight: 600; }
.pn-var { margin-left: 22px; padding-left: 12px; border-left: 2px solid var(--blue); color: var(--ink-2); }
.pn-note { color: var(--blue); }
.pn-ev { display: inline-block; font-size: 12.5px; line-height: 1.4; padding: 1px 6px; background: var(--blue-fill); color: #FFFFFF; }
.file-panel figcaption { font-size: 12px; line-height: 1.5; color: var(--ink-2); padding: 10px 14px; margin: 0; border-top: 1px solid var(--rule); }
.band .file-parts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 24px; border-top: 0; margin-top: 20px; }
.band .file-part { grid-template-columns: 10px 1fr; border-bottom: 0; border-top: 2px solid var(--ink); }

/* ---- the three steps' icons (7b-3) ---- */
.step-icon { display: block; width: 64px; height: 48px; margin-bottom: 14px; overflow: visible; }
.si-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.si-ink { fill: var(--ink); }
.si-dot { fill: var(--blue-fill); }
.steps li { view-timeline: --step block; }
.step-number { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }

/* ---- motion (7c): sections and icons as they scroll into view (CSS scroll-driven animations; the landing runs no
   script). A browser without them shows everything at once. ---- */
@supports (animation-timeline: view()) {
  .reveal { animation: reveal-in linear both; animation-timeline: view(); animation-range: entry 0% entry 45%; }
  .si-rise, .si-fill, .si-drop { animation: linear both; animation-timeline: --step; }
  .si-rise { animation-name: si-rise; animation-range: entry 40% cover 45%; }
  .si-rise.si-b { animation-range: entry 70% cover 50%; }
  .si-fill { animation-name: si-fill; }
  .si-fill.si-a { animation-range: entry 40% cover 38%; }
  .si-fill.si-b { animation-range: entry 70% cover 43%; }
  .si-fill.si-c { animation-range: entry 100% cover 48%; }
  .si-drop { animation-name: si-drop; animation-range: entry 50% cover 48%; }
}
@keyframes reveal-in { from { opacity: 0; transform: translateY(28px); } }
@keyframes si-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes si-fill { from { opacity: 0; } }
@keyframes si-drop { from { opacity: 0; transform: translateY(-20px); } }

/* The theme switch on the order pages changes the theme in place and the colours cross-fade (the script adds the
   class for the switch). No cross-document view transition: Chrome aborts one when a second navigation starts or a
   scrollbar changes the viewport, and the aborted transition is an uncaught error in the new page (CI's browser QA
   failed on it). The script-free pages (landing, sign-in) reload with the new theme. */
@media (prefers-reduced-motion: no-preference) {
  :root.theme-fade, :root.theme-fade *, :root.theme-fade *::before, :root.theme-fade *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, fill 0.3s ease, stroke 0.3s ease !important;
  }
}

@media (max-width: 760px) {
  /* phone: the title, then the board in the first screen (it plays on load), then the text and the buttons */
  .hero-a { display: flex; flex-direction: column; padding: 32px 0 36px; }
  .hero-top { display: contents; }
  .hero-a .hero-top > div:first-child { order: 1; margin-bottom: 26px; }
  .hero-a .hero-figure { order: 2; margin-bottom: 30px; }
  .hero-a .hero-sub { order: 3; }
  .hero-play { grid-template-columns: 1fr; gap: 22px; }
  .board-frame { max-width: 360px; }
  .hero-tree .mv { font-size: 14px; }
  .panel-body { grid-template-columns: 1fr; }
  .panel-games { border-right: 0; border-bottom: 2px solid var(--ink); }
  .panel-games li { padding: 7px 12px; }
  .panel-notation { padding: 14px 14px 16px; font-size: 14px; }
  .pn-var { margin-left: 8px; }
  .band .file-parts { grid-template-columns: 1fr; }
  .theme-switch a { padding: 6px 8px; }
}

/* everything still under prefers-reduced-motion: the board shows its final position, nothing moves */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* hero-board:begin (tools/hero_board.py) */
/* e4 c5 Nf3 d6 d4 cxd4 Nxd4 Nf6 Nc3 a6: 10 plies, 9.6s, then the board idles */
@keyframes hb-b1 {
  0% { transform: translate(-45px, 90px); opacity: 1; }
  83.333% { transform: translate(-45px, 90px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  88.021% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.hero-board .hb-b1 { animation: hb-b1 9.6s linear both; }
@keyframes hb-g1 {
  0% { transform: translate(135px, 135px); opacity: 1; }
  27.083% { transform: translate(135px, 135px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  31.771% { transform: translate(90px, 45px); opacity: 1; }
  64.583% { transform: translate(90px, 45px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  69.271% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.hero-board .hb-g1 { animation: hb-g1 9.6s linear both; }
@keyframes hb-d2 {
  0% { transform: translate(0px, 90px); opacity: 1; }
  45.833% { transform: translate(0px, 90px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  50.521% { transform: none; opacity: 1; }
  58.958% { transform: none; opacity: 1; }
  60.208% { transform: none; opacity: 0; }
  100% { transform: none; opacity: 0; }
}
.hero-board .hb-d2 { animation: hb-d2 9.6s linear both; }
@keyframes hb-e2 {
  0% { transform: translate(0px, 90px); opacity: 1; }
  8.333% { transform: translate(0px, 90px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  13.021% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.hero-board .hb-e2 { animation: hb-e2 9.6s linear both; }
@keyframes hb-a7 {
  0% { transform: translate(0px, -45px); opacity: 1; }
  92.708% { transform: translate(0px, -45px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  97.396% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.hero-board .hb-a7 { animation: hb-a7 9.6s linear both; }
@keyframes hb-c7 {
  0% { transform: translate(-45px, -135px); opacity: 1; }
  17.708% { transform: translate(-45px, -135px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  22.396% { transform: translate(-45px, -45px); opacity: 1; }
  55.208% { transform: translate(-45px, -45px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  59.896% { transform: none; opacity: 1; }
  68.333% { transform: none; opacity: 1; }
  69.583% { transform: none; opacity: 0; }
  100% { transform: none; opacity: 0; }
}
.hero-board .hb-c7 { animation: hb-c7 9.6s linear both; }
@keyframes hb-d7 {
  0% { transform: translate(0px, -45px); opacity: 1; }
  36.458% { transform: translate(0px, -45px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  41.146% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.hero-board .hb-d7 { animation: hb-d7 9.6s linear both; }
@keyframes hb-g8 {
  0% { transform: translate(45px, -90px); opacity: 1; }
  73.958% { transform: translate(45px, -90px); opacity: 1; animation-timing-function: cubic-bezier(.3, 0, .2, 1); }
  78.646% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.hero-board .hb-g8 { animation: hb-g8 9.6s linear both; }
@keyframes hb-hl-from {
  0% { opacity: 0; }
  8.333% { opacity: 1; transform: translate(180px, 225px); }
  17.708% { opacity: 1; transform: translate(90px, 0px); }
  27.083% { opacity: 1; transform: translate(270px, 270px); }
  36.458% { opacity: 1; transform: translate(135px, 0px); }
  45.833% { opacity: 1; transform: translate(135px, 225px); }
  55.208% { opacity: 1; transform: translate(90px, 90px); }
  64.583% { opacity: 1; transform: translate(225px, 180px); }
  73.958% { opacity: 1; transform: translate(270px, -45px); }
  83.333% { opacity: 1; transform: translate(45px, 270px); }
  92.708% { opacity: 1; transform: none; }
}
.hero-board .hl-from { animation: hb-hl-from 9.6s step-end both; }
@keyframes hb-hl-to {
  0% { opacity: 0; }
  8.333% { opacity: 1; transform: translate(180px, 90px); }
  17.708% { opacity: 1; transform: translate(90px, 45px); }
  27.083% { opacity: 1; transform: translate(225px, 135px); }
  36.458% { opacity: 1; transform: translate(135px, 0px); }
  45.833% { opacity: 1; transform: translate(135px, 90px); }
  55.208% { opacity: 1; transform: translate(135px, 90px); }
  64.583% { opacity: 1; transform: translate(135px, 90px); }
  73.958% { opacity: 1; transform: translate(225px, 0px); }
  83.333% { opacity: 1; transform: translate(90px, 135px); }
  92.708% { opacity: 1; transform: none; }
}
.hero-board .hl-to { animation: hb-hl-to 9.6s step-end both; }
.hero-tree .t1 { animation-delay: 1.07s; }
.hero-tree .t2 { animation-delay: 1.97s; }
.hero-tree .t3 { animation-delay: 2.87s; }
.hero-tree .t4 { animation-delay: 3.77s; }
.hero-tree .t5 { animation-delay: 4.67s; }
.hero-tree .t6 { animation-delay: 5.57s; }
.hero-tree .t7 { animation-delay: 6.47s; }
.hero-tree .t8 { animation-delay: 7.37s; }
.hero-tree .t9 { animation-delay: 8.27s; }
.hero-tree .t10 { animation-delay: 9.17s; }
.hero-tree .now .mv::before { animation-delay: 9.6s; }
/* hero-board:end */
