/* ==========================================================================
   Cuberta — styles, design v5 (2026-11-08). See DESIGN.md.

   A product page in the manner of a serious 3D-software maker: warm paper and
   white sections, ink bands for the header, export and download, real renders
   shown large, one typeface. Orange (the logo colour) is for the download
   buttons and the active state only. No glows, no glass, no scroll effects.
   ========================================================================== */

/* ---------- fonts: Fira Sans, self-hosted, latin + cyrillic ---------- */

@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-400-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fira Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-400i-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-400i-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-500-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-500-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/fira-sans-700-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- tokens ---------- */

:root {
  /* Light surfaces, warm. */
  --paper: #f3f2ee;
  --white: #ffffff;
  --line: #dcd8cf;
  --line-2: #c4bfb4;

  /* Ink: text on light, and the dark bands. */
  --ink: #151412;
  --ink-2: #3d3a35;
  --ink-3: #67635c;
  --ink-raise: #1f1d1a;
  --ink-line: #2f2c28;

  /* Text on ink. */
  --on-ink: #f3f2ee;
  --on-ink-2: #b8b2a8;
  --on-ink-3: #8e887e;

  /* The logo orange. Download buttons and the active state, nothing else.
     Text on it is ink (6.1:1); white on it fails AA. */
  --accent: #ff6203;
  --accent-hover: #ff7a26;
  --accent-press: #e85800;
  --link: #a84300; /* orange darkened for links on light: 5.4:1 on paper */

  --font: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --max: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --header-h: 64px;
}

/* ---------- base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

:lang(ja) body,
body:lang(ja) {
  font-family: "Fira Sans", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo,
    "Noto Sans JP", sans-serif;
  line-height: 1.8;
}

:lang(zh-Hans) body,
body:lang(zh-Hans) {
  font-family: "Fira Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  line-height: 1.8;
}

img,
video,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
li,
dd {
  text-wrap: pretty;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.btn:focus-visible {
  outline-color: var(--accent);
}

.band .btn-primary:focus-visible,
.hero .btn-primary:focus-visible,
.site-header .btn-primary:focus-visible {
  outline-color: var(--on-ink);
}

::selection {
  background: #ffd2b5;
  color: var(--ink);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- icons and buttons ---------- */

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-solid {
  fill: currentColor;
  stroke: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font: 500 16px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-sm {
  height: 38px;
  padding: 0 14px;
  font-size: 15px;
}

.btn-lg {
  height: 54px;
  padding: 0 24px;
  font-size: 17px;
}

.btn-primary {
  background: var(--accent);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:active {
  background: var(--accent-press);
}

/* Outline button: takes its colour from the surface it sits on. */
.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: color-mix(in srgb, currentColor 38%, transparent);
}

.btn-ghost:hover {
  border-color: currentColor;
}

.btn-block {
  width: 100%;
  justify-content: flex-start;
}

.btn-meta {
  margin-left: auto;
  font-weight: 400;
  font-size: 14px;
  opacity: 0.72;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.text-link:hover {
  text-decoration-thickness: 2px;
}

.text-link .icon {
  width: 18px;
  height: 18px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  color: var(--on-ink);
  border-bottom: 1px solid var(--ink-line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--on-ink);
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  width: auto;
  height: 24px;
}

.site-nav {
  flex: 1;
}

.nav-list {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--on-ink-2);
  font-size: 15.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

/* Six links in Russian are wide; tighten them before the menu button takes over. */
@media (max-width: 1239px) {
  .header-inner {
    gap: 20px;
  }

  .nav-list a {
    padding-inline: 8px;
    font-size: 15px;
  }
}

.nav-list a:hover,
.nav-list a[aria-current] {
  color: var(--on-ink);
}

.nav-list a[aria-current] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.lang {
  position: relative;
}

.lang summary {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 10px;
  border-radius: 4px;
  color: var(--on-ink-2);
  font-size: 14.5px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary:hover,
.lang[open] summary {
  color: var(--on-ink);
}

.lang summary .icon {
  width: 18px;
  height: 18px;
}

.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(21, 20, 18, 0.18);
}

.lang-list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
}

.lang-list a:hover {
  background: var(--paper);
}

.lang-list a[aria-current] {
  font-weight: 700;
}

.lang-code {
  color: var(--ink-3);
  font-size: 13px;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  background: transparent;
  color: var(--on-ink);
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-bars {
  top: 50%;
  margin-top: -1px;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  left: 0;
  margin-left: 0;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  border-top: 1px solid var(--ink-line);
  background: var(--ink);
}

.mobile-nav {
  padding-block: 8px 28px;
}

.mobile-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-list a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--ink-line);
  color: var(--on-ink);
  font-size: 21px;
  font-weight: 500;
  text-decoration: none;
}

.mobile-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.mobile-langs a {
  color: var(--on-ink-2);
  text-decoration: none;
}

.mobile-langs a[aria-current] {
  color: var(--on-ink);
  font-weight: 700;
}

html.menu-open {
  overflow: hidden;
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(64px, 8.5vw, 120px);
}

.section-white {
  background: var(--white);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.section-head-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 64px;
  align-items: end;
  max-width: none;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: none;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.008em;
}

.section-lead {
  max-width: 60ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.6;
}

.caption {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.45;
}

/* ---------- hero ---------- */

.hero {
  background: var(--ink);
  color: var(--on-ink);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px 72px;
  align-items: end;
  padding-block: clamp(40px, 5.5vw, 76px) clamp(36px, 4.5vw, 60px);
}

.hero-title {
  margin: 0;
  font-size: clamp(34px, 4.1vw, 56px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.012em;
}

.hero-lead {
  margin: 0 0 26px;
  color: var(--on-ink-2);
  font-size: clamp(17px, 1.3vw, 19px);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-watch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  color: var(--on-ink);
  font-weight: 500;
  text-decoration: none;
}

.hero-watch .icon {
  width: 34px;
  height: 34px;
  padding: 10px 9px 10px 11px;
  border: 1px solid var(--ink-line);
  border-radius: 50%;
  transition: border-color 0.15s ease;
}

.hero-watch:hover .icon {
  border-color: var(--on-ink-2);
}

.hero-watch:hover span {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-media {
  margin: 0;
  background: #0d0c0b;
}

.hero-media img {
  display: block;
  width: 100%;
  height: clamp(340px, 50vw, 760px);
  object-fit: cover;
  object-position: 50% 42%;
}

.hero-credit {
  padding-block: 14px;
  background: var(--ink);
  color: var(--on-ink-3);
  font-size: 13.5px;
}

/* ---------- demo video ---------- */

.video {
  margin: 0;
}

.video-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0d0c0b;
}

.demo-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.video-toggle {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px 0 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 20, 18, 0.8);
  color: #fff;
  font: 500 14px/1 var(--font);
  cursor: pointer;
}

.video-toggle .icon {
  width: 16px;
  height: 16px;
}

.video-toggle .icon-pause,
.video-toggle[aria-pressed="true"] .icon-play {
  display: none;
}

.video-toggle[aria-pressed="true"] .icon-pause {
  display: block;
}

/* ---------- the astronomer's house: frames in alternating rows ---------- */

.shots {
  display: grid;
  gap: clamp(48px, 7vw, 104px);
}

.shot {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 28px clamp(28px, 4.5vw, 72px);
  align-items: center;
}

.shot-flip {
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
}

.shot-flip .shot-media {
  order: 2;
}

.shot-media {
  margin: 0;
}

.shot-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.shot-title {
  margin: 0 0 12px;
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.2;
}

.shot-text {
  max-width: 40ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.6;
}

/* ---------- other scenes: covers on the home page ---------- */

.section-head-copy {
  display: grid;
  gap: 14px;
  max-width: 760px;
}

/* Six columns: two wide covers on top, three under them. */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scene-grid > li {
  grid-column: span 2;
}

.scene-grid > li:nth-child(-n + 2) {
  grid-column: span 3;
}

.scene-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.scene-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}

.scene-card-title {
  display: inline-block;
  margin-top: 12px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.scene-card:hover .scene-card-title,
.scene-card:focus-visible .scene-card-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* ---------- gallery: one large frame, three under it ---------- */

.frames {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 20px;
}

.frame {
  margin: 0;
}

.frame-main {
  grid-column: 1 / -1;
}

.frame-link {
  display: block;
  border-radius: var(--radius);
  cursor: zoom-in;
}

.frame-link img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.frame .caption {
  margin-top: 10px;
}

@media (max-width: 959px) {
  .scene-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scene-grid > li,
  .scene-grid > li:nth-child(-n + 2) {
    grid-column: span 1;
  }

  .scene-grid > li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 639px) {
  .scene-grid,
  .frames {
    grid-template-columns: minmax(0, 1fr);
  }

  .scene-grid > li:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

/* ---------- feature cards with line illustrations ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 28px 28px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card-art {
  display: flex;
  align-items: flex-end;
  height: 148px;
  margin-bottom: 28px;
}

.card-art img {
  width: auto;
  height: auto;
  max-width: min(100%, 250px);
  max-height: 148px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.card-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- annotated window ---------- */

.annot {
  margin: 0 0 28px;
}

.annot-shot {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #16171a;
}

.annot-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.annot-pins {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font: 700 14px/30px var(--font);
  text-align: center;
  box-shadow: 0 0 0 4px rgba(21, 20, 18, 0.45);
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.pin.is-active {
  background: var(--accent);
  transform: translate(-50%, -50%) scale(1.2);
}

.annot-expand {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(21, 20, 18, 0.78);
  color: #fff;
  cursor: pointer;
}

.annot-legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.legend-item.is-active,
.legend-item:hover {
  border-color: var(--ink-3);
}

.legend-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font: 700 13px/26px var(--font);
  text-align: center;
}

.legend-item.is-active .legend-num {
  background: var(--accent);
  color: var(--ink);
}

.legend-title {
  margin: 2px 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.legend-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}

/* ---------- ink bands: export, download ---------- */

.band {
  padding-block: clamp(56px, 7vw, 96px);
  background: var(--ink);
  color: var(--on-ink);
}

.band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 36px 72px;
  align-items: center;
}

.band-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.008em;
}

.band-text {
  max-width: 52ch;
  margin: 0;
  color: var(--on-ink-2);
  font-size: 18px;
  line-height: 1.6;
}

.engines-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.engines-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 12px 22px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  color: var(--on-ink);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}

.engines-list img {
  width: auto;
  height: 40px;
}

/* ---------- how it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}

.step-num {
  display: block;
  margin-bottom: 18px;
  font-size: 44px;
  font-weight: 700;
  line-height: 1;
}

.step-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.step-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.55;
}

.step-text strong {
  color: var(--ink);
  font-weight: 500;
}

/* ---------- specs and FAQ: heading column + content column ---------- */

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 32px 88px;
  align-items: start;
}

.col-head {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.col-head .section-lead {
  margin-top: 16px;
}

.col-head .text-link {
  margin-top: 20px;
}

.specs {
  margin: 0;
  border-top: 1px solid var(--line);
}

.spec-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 5fr);
  gap: 8px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.spec-row dt {
  font-weight: 500;
}

.spec-row dd {
  margin: 0;
  color: var(--ink-2);
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover .faq-q {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.faq-mark {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 5px;
}

.faq-mark::before,
.faq-mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.faq-mark::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-mark::after {
  transform: rotate(0deg);
}

.faq-answer {
  max-width: 68ch;
  padding-bottom: 24px;
}

.faq-answer p {
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.65;
}

/* ---------- post cards: home, blog index, related ---------- */

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.section-white .post-card {
  background: var(--paper);
  border-color: transparent;
}

.post-card:hover {
  border-color: var(--ink-3);
}

.post-card:hover .post-card-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.post-card.is-hidden {
  display: none;
}

.post-card-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px 24px;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 5px 8px;
  border-radius: 3px;
  background: rgba(21, 20, 18, 0.06);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.2;
}

.tag-accent {
  background: var(--ink);
  color: var(--on-ink);
}

.post-card-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.28;
}

.post-card-text {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.55;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: auto 0 0;
  padding-top: 6px;
  color: var(--ink-3);
  font-size: 14px;
}

.post-card-feature {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.post-card-feature .post-card-media img {
  height: 100%;
  aspect-ratio: auto;
}

.post-card-feature .post-card-body {
  justify-content: center;
  padding: clamp(24px, 3vw, 44px);
}

.post-card-feature .post-card-title {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.18;
}

.post-card-feature .post-card-text {
  font-size: 17px;
}

/* ---------- download page ---------- */

.platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.platform {
  padding: clamp(24px, 3vw, 36px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.platform .btn-ghost {
  color: var(--ink);
}

.platform-name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-size: 22px;
  font-weight: 700;
}

.platform-name .icon {
  width: 24px;
  height: 24px;
}

.platform-actions {
  display: grid;
  gap: 10px;
}

.platform-note {
  margin: 16px 0 0;
  color: var(--ink-3);
  font-size: 14.5px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 40px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.info-title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.info p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 16px;
}

.info-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--ink-2);
  font-size: 16px;
}

/* ---------- download pair and the closing band ---------- */

.dl-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cta-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 64px;
  align-items: center;
}

.cta-band-actions {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.cta-band .text-link {
  color: var(--on-ink-2);
}

.cta-band .text-link:hover {
  color: var(--on-ink);
}

/* ---------- inner pages ---------- */

.section-tight-top {
  padding-top: clamp(8px, 2vw, 24px);
}

/* Narrow content that still lines up with the page title on the left. */
.narrow > * {
  max-width: 960px;
}

.page-more {
  margin: 18px 0 0;
}

/* How it works: one row per step, picture on alternate sides. */
.how-steps {
  display: grid;
  gap: clamp(48px, 6vw, 88px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-step {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 28px clamp(28px, 5vw, 80px);
  align-items: center;
}

.how-step-flip .how-art {
  order: -1;
}

.how-copy .step-num {
  margin-bottom: 14px;
}

.how-title {
  margin: 0 0 12px;
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 700;
  line-height: 1.18;
}

.how-text {
  max-width: 52ch;
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.6;
}

.how-art {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 32px;
  background: var(--paper);
  border-radius: var(--radius);
}

.how-art img {
  width: auto;
  height: auto;
  max-width: min(100%, 360px);
  max-height: 240px;
}

.prompt {
  max-width: 52ch;
  margin: 4px 0 0;
  padding: 16px 18px;
  background: var(--paper);
  border-radius: var(--radius);
}

.prompt figcaption {
  margin-bottom: 4px;
  color: var(--ink-3);
  font-size: 14px;
}

.prompt blockquote {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.engine-notes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.engine-note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
}

.engine-note img {
  width: auto;
  height: 34px;
  margin-bottom: 6px;
}

.engine-name {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
}

.engine-text {
  flex: 1;
  margin: 0;
  color: var(--on-ink-2);
  font-size: 15.5px;
  line-height: 1.55;
}

.engine-note .text-link {
  color: var(--on-ink);
  font-size: 15px;
}

/* Specs: the file table. */
.files-wrap {
  margin-top: 24px;
}

.files {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.files th,
.files td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.files thead th {
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
}

.files tbody th {
  font-weight: 500;
}

.files tr:last-child th,
.files tr:last-child td {
  border-bottom: 0;
}

.files td:last-child {
  text-align: right;
}

.files .icon {
  width: 18px;
  height: 18px;
}

/* FAQ page: questions are h2s inside <summary>. */
.faq-q {
  margin: 0;
  font: inherit;
}

/* "Your download is starting". */
.thanks {
  padding-block: clamp(48px, 7vw, 104px);
}

.thanks .page-title {
  max-width: none;
}

.thanks-file {
  margin: 18px 0 6px;
  color: var(--ink-2);
  font-size: 19px;
}

.thanks-manual {
  margin: 0 0 clamp(36px, 5vw, 56px);
}

.thanks-steps-title,
.thanks-other-title {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.thanks-other-title {
  margin-top: clamp(36px, 5vw, 56px);
}

.thanks-steps {
  display: grid;
  gap: 14px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.thanks-steps li {
  position: relative;
  padding: 16px 18px 16px 60px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 17px;
  line-height: 1.55;
  counter-increment: step;
}

.thanks-steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 15px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font: 700 14px/28px var(--font);
  text-align: center;
}

.thanks-other {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.thanks-other a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.thanks-other a:hover {
  border-color: var(--ink-3);
}

.thanks-other .icon {
  width: 18px;
  height: 18px;
}

/* ---------- footer ---------- */

.site-footer {
  padding-block: 56px 32px;
  background: var(--ink);
  color: var(--on-ink-2);
  border-top: 1px solid var(--ink-line);
  font-size: 15px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 40px;
}

.footer-tagline {
  max-width: 30ch;
  margin: 16px 0 0;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-head {
  margin: 0 0 12px;
  color: var(--on-ink);
  font-weight: 500;
}

.footer-col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col a {
  color: var(--on-ink-2);
  text-decoration: none;
}

.footer-col a:hover,
.footer-col a[aria-current] {
  color: var(--on-ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-line);
  color: var(--on-ink-3);
  font-size: 14px;
}

/* ---------- lightbox ---------- */

.lightbox {
  max-width: min(96vw, 1600px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(13, 12, 11, 0.88);
}

.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  border-radius: 4px;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lightbox-caption {
  margin: 10px 0 0;
  color: #d8d4cc;
  font-size: 14px;
  text-align: center;
}

/* ---------- blog index ---------- */

.page-head {
  padding-block: clamp(48px, 6vw, 88px) clamp(28px, 3vw, 44px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--ink-3);
  font-size: 14px;
}

.crumbs a {
  color: var(--ink-3);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.crumbs-current {
  overflow: hidden;
  max-width: 40ch;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-title {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.page-lead {
  max-width: 62ch;
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.6;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}

.filters[hidden] {
  display: none;
}

.filter {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 14.5px/1 var(--font);
  cursor: pointer;
}

.filter:hover {
  border-color: var(--ink);
}

.filter[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.section-list {
  padding-top: 0;
}

/* ---------- article ---------- */

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 3px;
  pointer-events: none;
}

.progress-bar {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

.article-head {
  padding-block: clamp(40px, 5vw, 72px) 32px;
}

.container-text {
  max-width: 860px;
}

.article-tags {
  margin-bottom: 16px;
}

.article-title {
  margin: 0;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.article-standfirst {
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1.55;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
  color: var(--ink-3);
  font-size: 14.5px;
}

.article-hero {
  margin: 0 0 clamp(40px, 5vw, 64px);
}

.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.article-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 720px);
  gap: 64px;
  justify-content: center;
  padding-bottom: clamp(64px, 8vw, 112px);
}

.article-layout-single {
  grid-template-columns: minmax(0, 720px);
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.toc-title {
  margin: 0 0 12px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
}

.toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  color: var(--ink-3);
  font-size: 14.5px;
  line-height: 1.4;
  text-decoration: none;
}

.toc a:hover,
.toc a.is-active {
  color: var(--ink);
}

.toc a.is-active {
  font-weight: 500;
}

.toc-num {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.prose {
  font-size: 18px;
  line-height: 1.7;
}

.prose p {
  margin: 0 0 1.1em;
}

.prose h2 {
  margin: 2em 0 0.6em;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.2;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h3 {
  margin: 1.7em 0 0.5em;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 1.3em;
}

.prose li {
  margin: 0.35em 0;
}

.prose a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose strong {
  font-weight: 700;
}

.prose code {
  padding: 0.12em 0.35em;
  border-radius: 3px;
  background: rgba(21, 20, 18, 0.07);
  font-family: var(--mono);
  font-size: 0.86em;
}

.prose pre {
  overflow-x: auto;
  margin: 1.4em 0;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14.5px;
  line-height: 1.55;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.prose blockquote {
  margin: 1.5em 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--ink);
  color: var(--ink-2);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 700;
  white-space: nowrap;
}

.prose tr:last-child td {
  border-bottom: 0;
}

.cta-box {
  margin: 56px 0 0;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--on-ink);
}

.cta-title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.cta-text {
  margin: 0 0 22px;
  color: var(--on-ink-2);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.cta-meta {
  color: var(--on-ink-3);
  font-size: 14.5px;
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.pager-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}

.pager-item:hover {
  border-color: var(--ink-3);
}

.pager-next {
  align-items: flex-end;
  text-align: right;
}

.pager-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 14px;
}

.pager-label .icon {
  width: 16px;
  height: 16px;
}

.pager-title {
  font-weight: 500;
  line-height: 1.35;
}

.back-link {
  margin: 32px 0 0;
}

/* ---------- 404 ---------- */

.notfound {
  padding-block: clamp(80px, 12vw, 168px);
}

.notfound-inner {
  max-width: 760px;
}

.notfound-code {
  margin: 0 0 16px;
  color: var(--ink-3);
  font-size: 15px;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- CJK: no negative tracking, phrase-aware breaks ---------- */

:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3,
:lang(zh-Hans) h1,
:lang(zh-Hans) h2,
:lang(zh-Hans) h3 {
  letter-spacing: 0;
  line-height: 1.32;
}

:lang(ja) h1,
:lang(ja) h2,
:lang(ja) h3,
:lang(ja) .hero-lead,
:lang(ja) .section-lead {
  word-break: auto-phrase;
}

:lang(ja) .prose,
:lang(zh-Hans) .prose {
  line-height: 1.9;
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .annot-legend {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 959px) {
  .site-nav,
  .lang {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .header-inner {
    gap: 16px;
  }

  .hero-copy,
  .section-head-split,
  .band-inner,
  .two-col,
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    gap: 22px;
  }

  .hero-media img {
    height: clamp(260px, 62vw, 560px);
  }

  .shot,
  .shot-flip {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot-flip .shot-media {
    order: 0;
  }

  .shot-text {
    max-width: 60ch;
  }

  .cards,
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-card-feature {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-card-feature .post-card-media img {
    aspect-ratio: 16 / 9;
  }

  .col-head {
    position: static;
  }

  .article-layout,
  .article-layout-single {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .article-aside {
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .toc {
    position: static;
  }

  /* No script: the menu button can't open anything, so the links stay as a row. */
  html:not(.js) .site-nav {
    display: block;
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  html:not(.js) .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-block: 12px;
  }

  html:not(.js) .nav-toggle {
    display: none;
  }
}

@media (max-width: 639px) {
  body {
    font-size: 16px;
  }

  .header-cta {
    padding: 0 12px;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .cards,
  .post-grid,
  .steps,
  .platforms,
  .annot-legend,
  .pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .engines-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spec-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-lead,
  .shot-text,
  .band-text {
    font-size: 17px;
  }

  .prose {
    font-size: 17px;
  }

  .prose h2 {
    font-size: 25px;
  }

  .annot-expand {
    display: none;
  }

  .pin {
    width: 22px;
    height: 22px;
    font-size: 12px;
    line-height: 22px;
    box-shadow: 0 0 0 3px rgba(21, 20, 18, 0.45);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* Japanese and Chinese UI fonts have no medium weight; bold keeps button labels firm. */
:lang(ja) .btn,
:lang(zh-Hans) .btn {
  font-weight: 700;
}

/* ---------- inner pages: narrow screens ---------- */

@media (max-width: 959px) {
  .info-grid,
  .cta-band-inner,
  .how-step {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-step-flip .how-art {
    order: 0;
  }

  .how-art {
    min-height: 200px;
  }

  .engine-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .dl-pair .btn {
    flex: 1 1 100%;
  }

  .engine-notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .files th,
  .files td {
    padding: 12px;
  }
}
