/* ==========================================================================
   Inter, self-hosted.

   Four variable-weight woff2 subsets from Google Fonts v20, served from our
   own origin. Google's CSS is a render-blocking request to a host that is
   unreachable from mainland China, and the site has a Chinese locale; served
   from here the type arrives with the stylesheet and the /zh/ pages do not
   stall on a request that will never return. Subsets are gated by
   unicode-range, so an English page fetches 48 KB and nothing else.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-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;
}

/* ==========================================================================
   Cuberta — landing page
   Palette and metrics come from the app itself (see DESIGN.md).
   ========================================================================== */

:root {
  --bg: #101317;
  --surface: #15181c;
  --card: #1c2025;
  --card-hover: #22272e;
  --ink: #0b0d10;

  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #e6e8eb;
  --text-dim: #a7adb5;
  /* Lightened from #7b838d: at 11px on --card it measured 4.27:1, under AA.
     #868e98 clears 4.5:1 on every surface, hover states included. */
  --text-mute: #868e98;

  --accent: #ff6203;
  --accent-hover: #ff7a2a;
  --accent-ink: #12151a;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1120px;
  --gutter: 24px;
  --r-1: 6px;
  --r-2: 10px;
  --r-3: 14px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t-base: 220ms;

  --header-h: 64px;
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
figcaption {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border-radius: var(--r-1);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition:
    background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  background: var(--card-hover);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.btn-lg {
  height: 54px;
  padding: 0 28px;
  font-size: 17px;
  border-radius: 10px;
}

.btn-lg .icon {
  width: 20px;
  height: 20px;
}

.btn-meta {
  font-weight: 500;
  font-size: 14px;
  opacity: 0.72;
  margin-left: 2px;
}

/* White PNG glyphs; the height sets the size, the width follows the artwork. */
.btn-os {
  height: 20px;
  width: auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(16, 19, 23, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
}

.brand-mark {
  width: 42px;
  height: auto;
}

.brand-word {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  padding-top: 1px;
}

.nav-list {
  display: flex;
  gap: 4px;
}

.nav-list a {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--r-1);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dim);
  transition:
    color var(--t-fast) var(--ease),
    background-color var(--t-fast) var(--ease);
}

.nav-list a:hover {
  color: var(--text);
  background: var(--card-hover);
}

.nav-download {
  display: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-1);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast);
}

.nav-toggle-bars {
  position: relative;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  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);
}

/* ---------- Hero ---------- */

.hero {
  padding: 104px 0 0;
}

.hero-inner {
  text-align: center;
  max-width: 860px;
}

.hero-title {
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.hero-lead {
  max-width: 640px;
  margin: 28px auto 0;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--text-dim);
  text-wrap: pretty;
}

.download-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 40px;
}

.download-choice {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.download-meta {
  font-size: 14px;
  color: var(--text-mute);
}

/* ---------- Media frame (video) ---------- */

.media-frame {
  margin-top: 72px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.demo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-toggle {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: rgba(16, 19, 23, 0.78);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.video-toggle:hover {
  background: rgba(34, 39, 46, 0.92);
  border-color: rgba(255, 255, 255, 0.3);
}

.video-toggle .icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.video-toggle .icon-pause,
.video-toggle[aria-pressed="true"] .icon-play {
  display: none;
}

.video-toggle[aria-pressed="true"] .icon-pause {
  display: block;
}

.media-caption {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
}

/* ---------- Sections ---------- */

.section {
  padding: 128px 0;
}

.section-tight {
  padding: 0 0 112px;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-title {
  font-size: clamp(30px, 3.8vw, 44px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 14px;
  font-size: 18px;
  color: var(--text-dim);
}

/* ---------- Benefits ---------- */

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.benefit {
  padding: 32px 32px 34px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.benefit:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.benefit-icon {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 22px;
}

.benefit h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.benefit p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

/* ---------- Steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
}

.step h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.step p {
  font-size: 16px;
  color: var(--text-dim);
  text-wrap: pretty;
}

.step strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Scenes ---------- */

.scenes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.scene-wide {
  grid-column: 1 / -1;
}

.scene-button {
  display: block;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--t-base) var(--ease);
}

.scene-button:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.scene-button img {
  width: 100%;
  height: auto;
}

.scene figcaption {
  padding: 12px 4px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}

/* ---------- Works with ---------- */

.works-with {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 28px 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
}

.works-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mute);
  white-space: nowrap;
}

.works-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 34px;
  margin-left: auto;
}

.works-list li {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.works-icon {
  height: 26px;
  width: auto;
  opacity: 0.9;
}

/* ---------- Download ---------- */

.download-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#download .section-head {
  margin-bottom: 36px;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 780px;
}

.platform {
  padding: 26px 26px 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  transition: border-color var(--t-base) var(--ease);
}

.platform:hover {
  border-color: var(--line-strong);
}

.platform-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
}

.platform-icon {
  height: 22px;
  width: auto;
}

.platform-actions {
  display: grid;
  gap: 10px;
}

.platform-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-mute);
  text-wrap: pretty;
}

.download-notes {
  max-width: 560px;
  margin-top: 36px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.download-notes li {
  font-size: 14.5px;
  color: var(--text-mute);
  text-wrap: pretty;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 36px 0 44px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 40px;
  font-size: 14px;
  color: var(--text-dim);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 22px;
  margin-left: auto;
}

.footer-links a:hover {
  color: var(--text);
}

/* ---------- Lightbox ---------- */

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
  width: 100vw;
  height: 100vh;
  display: none;
  place-items: center;
  color: var(--text);
}

.lightbox[open] {
  display: grid;
}

.lightbox::backdrop {
  background: rgba(16, 19, 23, 0.94);
}

.lightbox img {
  max-width: min(94vw, 1800px);
  max-height: 84vh;
  width: auto;
  height: auto;
  border-radius: var(--r-2);
  border: 1px solid var(--line-strong);
}

.lightbox-caption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  padding: 0 24px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

.lightbox-close:hover {
  background: var(--card-hover);
}

/* ---------- Reveal on scroll (JS only) ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  html.js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

.br-desktop {
  display: none;
}

@media (min-width: 720px) {
  .br-desktop {
    display: inline;
  }
}

@media (max-width: 1023px) {
  .section {
    padding: 96px 0;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 859px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 10px var(--gutter) 14px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .nav-list.is-open {
    display: flex;
  }

  .nav-download {
    display: block;
  }

  .nav-list a {
    display: block;
    padding: 12px 12px;
    font-size: 16px;
  }

  .header-inner {
    gap: 12px;
  }

  .site-nav {
    order: 3;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-title {
    letter-spacing: -0.02em;
  }

  .download-block .btn-lg {
    width: 100%;
  }

  .media-frame {
    margin-top: 48px;
    border-radius: var(--r-2);
  }

  .section {
    padding: 72px 0;
  }

  .section-tight {
    padding-bottom: 72px;
  }

  .section-head {
    margin-bottom: 36px;
  }

  .benefit-grid,
  .scenes-grid {
    grid-template-columns: 1fr;
  }

  .benefit {
    padding: 26px 24px 28px;
  }

  .works-with {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
  }

  .works-list {
    margin-left: 0;
    gap: 6px 28px;
  }

  .works-list li {
    font-size: 19px;
  }

  .download-choice {
    width: 100%;
  }

  .platforms {
    grid-template-columns: 1fr;
  }

  .footer-links {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .header-cta {
    display: none;
  }

  .brand-mark {
    width: 36px;
  }
}

/* ==========================================================================
   Blog, FAQ and language switcher.
   Same palette and metrics as the landing page; nothing new is introduced
   except a reading measure for long text.
   ========================================================================== */

.container-narrow {
  max-width: calc(760px + var(--gutter) * 2);
}

/* ---------- Language switcher ---------- */

.lang {
  position: relative;
  flex: none;
}

.lang > summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-1);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.lang > summary::-webkit-details-marker {
  display: none;
}

.lang > summary:hover,
.lang[open] > summary {
  color: var(--text);
  background: var(--card-hover);
}

.lang .icon {
  width: 16px;
  height: 16px;
}

.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 152px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-2);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
}

.lang-list a {
  display: block;
  padding: 9px 12px;
  border-radius: var(--r-1);
  font-size: 14.5px;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.lang-list a:hover {
  background: var(--card-hover);
  color: var(--text);
}

.lang-list a[aria-current="true"] {
  color: var(--accent);
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  transition: border-color var(--t-base) var(--ease);
}

.faq-item:hover {
  border-color: var(--line-strong);
}

.faq-item > summary {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 22px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
  text-wrap: pretty;
}

.faq-item > summary::-webkit-details-marker {
  display: none;
}

.faq-item > summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 8px;
  margin-left: auto;
  border-right: 2px solid var(--text-mute);
  border-bottom: 2px solid var(--text-mute);
  transform: rotate(45deg);
  transition: transform var(--t-base) var(--ease);
}

.faq-item[open] > summary::after {
  transform: rotate(-135deg);
  border-color: var(--accent);
}

.faq-answer {
  padding: 0 22px 20px;
}

.faq-answer p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-dim);
  text-wrap: pretty;
  max-width: 68ch;
}

/* ---------- Page head (blog index, 404) ---------- */

.page-head {
  padding: 72px 0 0;
}

.page-head-tall {
  padding: 112px 0 132px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-mute);
  margin-bottom: 24px;
}

.crumbs a {
  transition: color var(--t-fast) var(--ease);
}

.crumbs a:hover {
  color: var(--text);
}

.crumbs-current {
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 44ch;
}

.page-title {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.page-lead {
  margin-top: 18px;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

.section-top-tight {
  padding-top: 56px;
}

.notfound-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Post cards ---------- */

.post-list {
  display: grid;
  gap: 20px;
}

.post-card-wide {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.post-card-wide:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.post-card-link {
  display: grid;
  grid-template-columns: 330px 1fr;
  align-items: stretch;
}

.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface);
}

.post-card-body {
  padding: 26px 30px 28px;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 10px;
}

.post-card-wide h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  text-wrap: balance;
}

.post-card-wide p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

.post-card-wide .post-card-meta {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-mute);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.post-card:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.post-card .post-card-img {
  aspect-ratio: 16 / 9;
  height: auto;
}

.post-card .post-card-body {
  padding: 20px 22px 24px;
}

.post-card h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  text-wrap: balance;
}

.post-card p {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-dim);
  text-wrap: pretty;
}

.section-more {
  margin-top: 28px;
  font-size: 15.5px;
}

.text-link {
  color: var(--accent);
  font-weight: 500;
  transition: color var(--t-fast) var(--ease);
}

.text-link:hover {
  color: var(--accent-hover);
}

/* ---------- Article ---------- */

.article {
  padding-top: 64px;
}

.article-tags {
  margin-bottom: 18px;
}

.article-title {
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.article-standfirst {
  margin-top: 20px;
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-dim);
  text-wrap: pretty;
}

.article-meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-mute);
}

.article-hero {
  margin-top: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--surface);
}

.article-hero img {
  width: 100%;
  height: auto;
}

/* ---------- Table of contents ---------- */

.toc {
  margin-top: 52px;
  padding: 22px 26px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

.toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 14px;
}

.toc ol {
  counter-reset: toc;
  display: grid;
  gap: 9px;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: flex;
  gap: 12px;
  font-size: 15.5px;
  line-height: 1.4;
  color: var(--text-dim);
  transition: color var(--t-fast) var(--ease);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  font-size: 12.5px;
  padding-top: 3px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

.toc a:hover {
  color: var(--text);
}

/* ---------- Article body ---------- */

.prose {
  margin-top: 52px;
  font-size: 17.5px;
  line-height: 1.72;
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose h2 {
  margin-top: 2.1em;
  font-size: clamp(25px, 3vw, 31px);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.022em;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h3 {
  margin-top: 1.75em;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose p,
.prose li {
  color: var(--text-dim);
  text-wrap: pretty;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 98, 3, 0.45);
  transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}

.prose a:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
  display: grid;
  gap: 0.5em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li::marker {
  color: var(--text-mute);
}

.prose li > ul,
.prose li > ol {
  margin-top: 0.5em;
}

.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 18px 24px;
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--r-2) var(--r-2) 0;
  background: var(--surface);
  font-size: 17px;
}

.prose blockquote p {
  color: var(--text);
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.12em 0.38em;
  color: var(--text);
}

.prose pre {
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  overflow-x: auto;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
}

.prose thead th {
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  padding: 13px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.prose tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-dim);
  line-height: 1.55;
  vertical-align: top;
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- Article CTA, pager, back link ---------- */

.cta-box {
  margin-top: 64px;
  padding: 34px 36px 36px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  text-align: center;
}

.cta-box h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.22;
  text-wrap: balance;
}

.cta-box p {
  margin: 12px auto 0;
  max-width: 48ch;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--text-dim);
  text-wrap: pretty;
}

.cta-box .btn {
  margin-top: 24px;
}

.cta-box .cta-meta {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-mute);
}

.pager {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pager-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 18px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.pager-item:hover {
  border-color: var(--line-strong);
  background: var(--card-hover);
}

.pager-next {
  text-align: right;
  align-items: flex-end;
}

.pager-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.pager-title {
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text);
}

.back-link {
  margin-top: 36px;
  font-size: 15px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .post-card-link {
    grid-template-columns: 260px 1fr;
  }
}

@media (max-width: 767px) {
  .page-head {
    padding-top: 48px;
  }

  .page-head-tall {
    padding: 64px 0 88px;
  }

  .section-top-tight {
    padding-top: 40px;
  }

  .post-grid,
  .post-card-link {
    grid-template-columns: 1fr;
  }

  .post-card-wide .post-card-img {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .post-card-body {
    padding: 22px 22px 24px;
  }

  .post-card-wide h2 {
    font-size: 21px;
  }

  .article {
    padding-top: 40px;
  }

  .article-hero {
    margin-top: 32px;
    border-radius: var(--r-2);
  }

  .article-standfirst {
    font-size: 18px;
  }

  .toc {
    margin-top: 38px;
    padding: 18px 20px 20px;
  }

  .prose {
    margin-top: 36px;
    font-size: 16.5px;
  }

  .prose blockquote {
    padding: 16px 18px;
  }

  .cta-box {
    margin-top: 48px;
    padding: 26px 22px 28px;
  }

  .pager {
    grid-template-columns: 1fr;
  }

  .pager-next {
    text-align: left;
    align-items: flex-start;
  }
}
