/* ==========================================================================
   YunGet / cloud parcel manifest

   This stylesheet is intentionally owned by YunGet only. It does not share
   tokens, components, templates or motion with the TurboDL site.

   Visual system:
   - warm paper, black ink, vermilion stamps, cobalt routing notes
   - sharp, printed rules; offset shadows instead of glass or blur
   - oversized editorial headings paired with compact operational labels
   - motion is limited to transform and opacity
   ========================================================================== */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/schibsted-grotesk-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: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/schibsted-grotesk-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-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  color-scheme: light;
  --paper: #f1eadb;
  --paper-raised: #fbf7ed;
  --paper-deep: #e4d9c5;
  --ink: #181914;
  --ink-soft: #3b3d34;
  --muted: #636459;
  --rule: #a79d89;
  --rule-soft: #d2c7b3;
  --red: #c83f2e;
  --red-deep: #8b2118;
  --blue: #214d78;
  --blue-soft: #d7e4ed;
  --yellow: #e6c75e;
  --green: #315e47;
  --grid: rgba(24, 25, 20, 0.038);
  --wash: rgba(200, 63, 46, 0.075);
  --white: #fffdf7;
  --shadow: #181914;
  --selection: #c83f2e;
  --selection-ink: #fffdf7;

  --font-display: "Iowan Old Style", "Palatino Linotype", "Noto Serif SC",
    "Songti SC", "STSong", SimSun, serif;
  --font-body: "Schibsted Grotesk", "Microsoft YaHei", "PingFang SC",
    "Noto Sans CJK SC", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;

  --step-xs: 0.75rem;
  --step-sm: 0.875rem;
  --step-base: 1rem;
  --step-md: 1.1875rem;
  --step-lg: clamp(1.35rem, 1.1rem + 0.9vw, 1.875rem);
  --t-head: clamp(1.65rem, 1.2rem + 1.6vw, 2.6rem);
  --step-xl: clamp(2.15rem, 1.2rem + 3.8vw, 4.6rem);
  --step-hero: clamp(3.4rem, 1.4rem + 6.4vw, 7.2rem);

  --wrap: 1280px;
  --gutter: clamp(1.125rem, 4vw, 3.5rem);
  --section-y: clamp(4.25rem, 9vw, 8rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 140ms;
  --t-mid: 320ms;
  --t-slow: 720ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #171812;
  --paper-raised: #22231c;
  --paper-deep: #2b2c23;
  --ink: #f2eadb;
  --ink-soft: #d8d0c0;
  --muted: #aaa697;
  --rule: #5e5f50;
  --rule-soft: #3d3e33;
  --red: #ff705b;
  --red-deep: #ff9683;
  --blue: #88b4dc;
  --blue-soft: #253d50;
  --yellow: #f0d272;
  --green: #8fc3a3;
  --grid: rgba(242, 234, 219, 0.045);
  --wash: rgba(255, 112, 91, 0.09);
  --white: #f7f0e2;
  --shadow: #050604;
  --selection: #ff705b;
  --selection-ink: #171812;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #171812;
    --paper-raised: #22231c;
    --paper-deep: #2b2c23;
    --ink: #f2eadb;
    --ink-soft: #d8d0c0;
    --muted: #aaa697;
    --rule: #5e5f50;
    --rule-soft: #3d3e33;
    --red: #ff705b;
    --red-deep: #ff9683;
    --blue: #88b4dc;
    --blue-soft: #253d50;
    --yellow: #f0d272;
    --green: #8fc3a3;
    --grid: rgba(242, 234, 219, 0.045);
    --wash: rgba(255, 112, 91, 0.09);
    --white: #f7f0e2;
    --shadow: #050604;
    --selection: #ff705b;
    --selection-ink: #171812;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, transparent calc(100% - 1px), var(--grid) 1px),
    linear-gradient(to bottom, transparent calc(100% - 1px), var(--grid) 1px),
    radial-gradient(circle at 88% 7%, var(--wash), transparent 34rem);
  background-size: 72px 72px, 72px 72px, 100% 100%;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-md);
  line-height: 1.68;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

a {
  color: inherit;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 3px;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.94;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-hero);
}

h2 {
  font-size: var(--step-xl);
}

h3 {
  font-family: var(--font-body);
  font-size: var(--step-lg);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 1rem 0;
  padding-inline-start: 1.4rem;
}

li {
  padding-inline-start: 0.18rem;
}

code:not(pre code) {
  padding: 0.12em 0.32em;
  border: 1px solid var(--rule);
  background: var(--paper-raised);
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}

.wrap {
  width: min(100%, calc(var(--wrap) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--white);
  font-weight: 760;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

section[id],
article[id] {
  scroll-margin-top: 8rem;
}

/* --------------------------------------------------------------------------
   Header / route manifest
   -------------------------------------------------------------------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 2px solid var(--ink);
  background: var(--paper);
}

.top-rule {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.top-rule-in {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 31px;
  gap: 1rem;
}

.top-rule-in > :last-child {
  text-align: right;
}

.route-title {
  max-width: 38ch;
  overflow: hidden;
  color: var(--yellow);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-in {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 82px;
  gap: clamp(1rem, 3vw, 2.75rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--red);
}

.brand-mark svg {
  width: 29px;
  height: 29px;
}

.brand-copy {
  display: grid;
  gap: 0.05rem;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.brand-copy small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.59rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.top-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.15rem, 1.2vw, 1.1rem);
  min-width: 0;
}

.top-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  gap: 0.4rem;
  padding: 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-weight: 720;
  text-decoration: none;
}

.top-nav a::after {
  position: absolute;
  right: 0.35rem;
  bottom: 0.25rem;
  left: 0.35rem;
  height: 3px;
  background: var(--red);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) var(--ease-out);
}

.top-nav a:hover::after,
.top-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.top-nav a[aria-current="page"] {
  color: var(--red-deep);
}

.nav-index {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.langs {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-inline: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.langs a {
  text-decoration: none;
}

.lang-cur {
  color: var(--red);
  font-weight: 700;
}

.theme-toggle,
.icon-link,
.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out);
}

.theme-toggle {
  grid-template-columns: 20px;
  position: relative;
  width: 58px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  grid-area: 1 / 1;
}

.theme-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.theme-moon {
  display: none;
}

:root[data-theme="dark"] .theme-sun {
  display: none;
}

:root[data-theme="dark"] .theme-moon {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun {
    display: none;
  }

  :root:not([data-theme="light"]) .theme-moon {
    display: block;
  }
}

.theme-toggle:hover,
.icon-link:hover,
.nav-toggle:hover {
  transform: translateY(-2px);
}

.theme-toggle:active,
.icon-link:active,
.nav-toggle:active {
  transform: translateY(1px);
}

.icon-link svg {
  width: 19px;
  height: 19px;
}

.top-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 0.6rem;
  padding: 0 1rem;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 760;
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out);
}

.top-download:hover {
  transform: translateY(-2px);
}

.top-download:active {
  transform: translateY(1px);
}

.nav-toggle {
  display: none;
  align-content: center;
  gap: 4px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 19px;
  height: 2px;
  background: currentColor;
  transition: transform var(--t-fast) var(--ease-out),
    opacity var(--t-fast) var(--ease-out);
}

.top[data-nav-open] .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.top[data-nav-open] .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.top[data-nav-open] .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.route-progress {
  position: absolute;
  right: 0;
  bottom: -2px;
  left: 0;
  height: 3px;
  overflow: hidden;
}

.route-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   Shared page rhythm
   -------------------------------------------------------------------------- */

main {
  min-height: 70vh;
}

.page-canvas {
  overflow: clip;
}

.page-canvas > section:not(.hero):not(.cta):not(.field-light),
.page-canvas > .doc-head,
.page-canvas > .doc-meta,
.page-canvas > .doc-grid,
.page-canvas > .crumbs,
.page-canvas > .notfound {
  width: min(100%, calc(var(--wrap) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-canvas > section:first-of-type:not(.hero):not(.cta):not(.field-light) {
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(2.75rem, 6vw, 5rem);
}

.page-canvas > section:first-of-type > h1 {
  max-width: 11ch;
}

.page-canvas > section:first-of-type:not(.notfound) > h1::before,
.doc-head h1::before {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--red);
  content: "INCOMING / 本地运单";
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section > h2 {
  max-width: 14ch;
  margin-bottom: 1.3rem;
}

.section > p,
.section > .lead,
.section > .section-lead,
.doc-head > .lead {
  max-width: 66ch;
}

.section-lead,
.lead {
  color: var(--ink-soft);
  font-size: var(--step-lg);
  line-height: 1.48;
}

.section-lead + *,
.lead + * {
  margin-top: 2rem;
}

.small,
.muted,
.is-available,
.is-planned {
  color: var(--muted);
  font-size: var(--step-sm);
}

.accent {
  color: var(--red);
}

.cur {
  font-weight: 760;
}

.tight {
  margin-block: 0.45rem 0;
}

.seg-rule {
  display: flex;
  width: min(100%, 39rem);
  height: 11px;
  gap: 5px;
  margin-bottom: 1.7rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 10px;
}

.seg-rule i,
.seg i,
.dl-lane i {
  display: block;
  min-width: 3px;
  background: var(--rule-soft);
}

.seg-rule i.done,
.seg i.done,
.dl-lane i.done {
  background: var(--red);
}

/* --------------------------------------------------------------------------
   Buttons / labels / notes
   -------------------------------------------------------------------------- */

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
}

.btn-row.tight {
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  gap: 0.55rem;
  padding: 0.72rem 1.2rem;
  border: 2px solid var(--ink);
  background: var(--red);
  color: var(--white);
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out);
}

.btn:hover {
  transform: translate(-2px, -2px);
}

.btn:active {
  transform: translate(2px, 2px);
}

.btn-row .btn:nth-child(n + 2) {
  background: var(--paper-raised);
  color: var(--ink);
}

.btn-row.tight .btn {
  min-height: 42px;
  padding: 0.55rem 0.9rem;
  box-shadow: 3px 3px 0 var(--shadow);
  font-size: 0.82rem;
}

.link-act {
  color: var(--red-deep);
  font-weight: 740;
  text-decoration: none;
  border-bottom: 3px solid var(--red);
}

.note {
  margin: 1.4rem 0;
  padding: 1rem 1.15rem;
  border: 1.5px solid var(--ink);
  border-left: 8px solid var(--yellow);
  background: var(--paper-raised);
  box-shadow: 4px 4px 0 var(--rule-soft);
  color: var(--ink-soft);
}

.note strong {
  color: var(--ink);
}

.note.warn {
  border-left-color: var(--red);
  background: color-mix(in srgb, var(--red) 9%, var(--paper-raised));
  color: var(--ink-soft);
}

.note.ok {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 9%, var(--paper-raised));
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

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

.hero {
  position: relative;
  border-bottom: 2px solid var(--ink);
  background:
    linear-gradient(90deg, transparent 0 72%, var(--wash) 72% 100%),
    var(--paper);
}

.hero::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 16px;
  width: 6px;
  background: var(--red);
  content: "";
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(320px, 0.87fr);
  grid-template-rows: auto auto auto auto;
  align-items: start;
  column-gap: clamp(2rem, 6vw, 6rem);
  row-gap: 1.4rem;
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(4.5rem, 8vw, 8rem);
}

.hero h1 {
  grid-column: 1;
  grid-row: 1;
  max-width: 100%;
  color: var(--ink);
  font-size: var(--step-hero);
}

.hero h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  white-space: nowrap;
}

.hero h1 .line > span {
  display: block;
}

.hero-lead {
  grid-column: 1;
  grid-row: 2;
  max-width: 35em;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 0.95rem + 0.55vw, 1.45rem);
  line-height: 1.55;
}

.hero-actions {
  grid-column: 1;
  grid-row: 3;
  margin-top: 0.6rem;
}

.hero-meta {
  grid-column: 1;
  grid-row: 4;
  max-width: 50ch;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-transform: uppercase;
}

.hero.page-intro {
  width: min(100%, calc(var(--wrap) + var(--gutter) * 2));
  margin-inline: auto;
  padding-top: clamp(4rem, 8vw, 7.5rem);
  padding-bottom: clamp(2.75rem, 6vw, 5rem);
  padding-inline: var(--gutter);
  border-bottom: 0;
  background: transparent;
}

.hero.page-intro::before {
  display: none;
}

.hero.page-intro h1 {
  max-width: 14ch;
}

.hero.page-intro h1::before {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--red);
  content: "INCOMING / 本地运单";
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hero.page-intro .lead {
  max-width: 52ch;
  margin-top: 1.25rem;
}

.hero.page-intro .lead + .lead {
  margin-top: 1rem;
}

.hero.page-intro .btn-row {
  margin-top: 1.8rem;
}

body[data-kind="inner"] .page-canvas > section:first-of-type {
  padding-bottom: 1.25rem;
}

body[data-kind="inner"] .page-canvas > section:first-of-type + .section {
  padding-top: clamp(3.25rem, 6vw, 5.25rem);
}

.resolver {
  position: relative;
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
  width: 100%;
  padding: 3.45rem 1.35rem 1.55rem;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 10px 10px 0 var(--ink);
}

.resolver::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 38px;
  padding: 0.72rem 1.05rem 0;
  background: var(--ink);
  color: var(--paper);
  content: "PARCEL INTAKE / 本地识别台";
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.resolver::after {
  position: absolute;
  top: 3.7rem;
  right: 0.8rem;
  z-index: 1;
  padding: 0.38rem 0.55rem;
  border: 2px solid var(--red);
  color: var(--red);
  content: "LOCAL ONLY";
  font-family: var(--font-mono);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  transform: rotate(4deg);
}

.resolver.has-hit::after {
  content: "MATCHED";
}

.resolver label {
  display: block;
  max-width: calc(100% - 5.5rem);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.resolver-row {
  display: flex;
  margin-top: 0.7rem;
}

.resolver input[type="text"] {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 0.72rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.4;
}

.resolver input[type="text"]::placeholder {
  color: var(--muted);
}

.resolver input[type="text"]:focus {
  outline: 3px solid var(--red);
  outline-offset: 0;
}

.resolver-out {
  margin-top: 1.25rem;
  min-height: 5.4rem;
}

.resolver-line {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.55;
}

.resolver-line b {
  color: var(--ink);
  font-weight: 760;
}

.resolver-empty {
  max-width: 40ch;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.seg {
  display: flex;
  height: 44px;
  gap: 3px;
  margin-top: 1rem;
}

.seg i {
  flex: 1 1 0;
}

.seg-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.75rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.seg-legend b {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Manifest panels, lists and product fragments
   -------------------------------------------------------------------------- */

.panel {
  position: relative;
  margin-top: 2rem;
  padding: clamp(1.25rem, 3.5vw, 2.8rem);
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 8px 8px 0 var(--paper-deep);
}

.panel > :first-child {
  margin-top: 0;
}

.split,
.split-wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1.5rem, 4.5vw, 4.5rem);
}

.split-wide {
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 0.86fr);
}

.defs {
  min-width: 0;
}

.def {
  position: relative;
  padding: 0.9rem 0 0.9rem 1.35rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.96rem;
  line-height: 1.6;
}

.def:first-child {
  border-top: 0;
  padding-top: 0;
}

.def::before {
  position: absolute;
  top: 1.22rem;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--red);
  content: "";
}

.def:first-child::before {
  top: 0.32rem;
}

.def strong {
  display: block;
  margin-bottom: 0.12rem;
  color: var(--ink);
  font-weight: 780;
}

.defs > .small {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

.row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  font-size: 0.93rem;
}

.row .name {
  font-weight: 720;
}

.row .val {
  margin-left: auto;
  color: var(--muted);
  text-align: right;
}

.rows {
  max-width: 52rem;
  margin-top: 2rem;
  border-bottom: 1px solid var(--rule);
}

.group-label {
  margin-top: 2rem;
  color: var(--red-deep);
  font-family: var(--font-mono);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.frag {
  position: relative;
  min-width: 0;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 6px 6px 0 var(--blue);
}

.frag-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.75rem;
  padding: 0.78rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
}

.frag-title {
  color: var(--paper);
  font-size: 0.78rem;
  font-weight: 760;
}

.frag-sub {
  margin-left: auto;
  color: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.62rem;
}

.frag-row {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  padding: 0.68rem 0.9rem;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.8rem;
  line-height: 1.45;
}

.frag-head + .frag-row {
  border-top: 0;
}

.frag-row .name {
  min-width: 0;
  font-weight: 700;
}

.frag-row .val {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-align: right;
}

.frag-row.sel {
  background: var(--red);
  color: var(--white);
}

.frag-row.sel .val {
  color: var(--white);
}

.frag-bar {
  height: 10px;
  margin: 0.85rem 0.9rem 0;
  background: var(--rule-soft);
}

.frag-bar i {
  display: block;
  height: 100%;
  background: var(--red);
}

.frag-note {
  padding: 0.7rem 0.9rem 0.85rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.shot,
figure {
  margin: 0;
}

.shot {
  width: fit-content;
  padding: 0.55rem 0.55rem 0.15rem;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 6px 6px 0 var(--rule);
}

.shot img {
  width: 100%;
  border: 1px solid var(--rule);
}

.shot figcaption,
figcaption {
  padding-top: 0.65rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  line-height: 1.5;
}

.pic-drift {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--ink);
}

.pic-drift img {
  width: 100%;
  filter: saturate(0.72) contrast(1.08);
  transform: scale(1.015);
  transition: transform 650ms var(--ease-out);
}

.pic-drift:hover img {
  transform: scale(1.045);
}

.pic-drift figcaption {
  margin: 0;
  padding: 0.75rem;
  background: var(--paper-raised);
}

.pic-band {
  margin-top: 2.3rem;
}

.pic-band img {
  max-height: 34rem;
  object-fit: cover;
}

.field-light {
  margin-block: var(--section-y);
  padding-block: clamp(3.5rem, 8vw, 7rem);
  background:
    linear-gradient(135deg, transparent 0 76%, rgba(255, 255, 255, 0.08) 76%),
    var(--blue);
  color: var(--paper-raised);
}

.field-light h2,
.field-light h3,
.field-light strong {
  color: var(--paper-raised);
}

.field-light .section-lead,
.field-light .def,
.field-light .small,
.field-light figcaption {
  color: color-mix(in srgb, var(--paper-raised) 78%, var(--blue));
}

.field-light .def {
  border-top-color: color-mix(in srgb, var(--paper-raised) 28%, transparent);
}

.field-light .def::before {
  background: var(--yellow);
}

.field-light .frag {
  color: var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}

.field-light .frag .name,
.field-light .frag .val,
.field-light .frag-title,
.field-light .frag-sub,
.field-light .frag-note {
  color: inherit;
}

.field-light .frag-head {
  background: var(--ink);
  color: var(--paper-raised);
}

.field-light .shot {
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

/* --------------------------------------------------------------------------
   Tables: paper ledger with mobile card conversion
   -------------------------------------------------------------------------- */

.table-wrap {
  max-width: 100%;
  margin: 1.7rem 0;
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 5px 5px 0 var(--rule);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.5;
}

thead {
  background: var(--ink);
  color: var(--paper);
}

th,
td {
  padding: 0.78rem 0.85rem;
  border-right: 1px solid var(--rule-soft);
  text-align: left;
  vertical-align: top;
}

th:last-child,
td:last-child {
  border-right: 0;
}

thead th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

tbody tr {
  border-top: 1px solid var(--rule);
}

tbody tr:nth-child(even) {
  background: color-mix(in srgb, var(--paper-deep) 36%, transparent);
}

/* --------------------------------------------------------------------------
   Cards / platform list / FAQ
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  gap: 1.1rem;
  margin: 1.8rem 0;
}

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

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

.card {
  position: relative;
  min-width: 0;
  padding: 1.35rem 1.25rem 1.2rem;
  border: 1.5px solid var(--ink);
  border-top: 6px solid var(--ink);
  background: var(--paper-raised);
  transition: transform var(--t-fast) var(--ease-out);
}

.card::before {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--red);
  content: "MANIFEST ENTRY";
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.card:hover {
  transform: translateY(-3px);
}

.card h3 {
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}

.card-body {
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.62;
}

.card-body p + p {
  margin-top: 0.55rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.8rem 0;
}

.card p.muted {
  overflow-wrap: anywhere;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1.7rem 0;
  border: 1.5px solid var(--ink);
  background: var(--ink);
}

.platform {
  min-width: 0;
  padding: 1.3rem;
  background: var(--paper-raised);
}

.platform h3 {
  margin: 0.25rem 0 0.35rem;
}

.state {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.is-planned .state {
  color: var(--muted);
}

.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.faq-list {
  display: grid;
  counter-reset: faq;
}

.faq-q {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  padding: 0.8rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  counter-increment: faq;
}

.faq-q:last-child {
  border-bottom: 1px solid var(--rule);
}

.faq-q::before {
  color: var(--red);
  content: counter(faq, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
}

.faq-q::after {
  justify-self: end;
  color: var(--red);
  content: "↘";
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transform: rotate(-45deg);
  transition: transform var(--t-fast) var(--ease-out);
}

.faq-q[aria-expanded="true"] {
  color: var(--ink);
}

.faq-q[aria-expanded="true"]::after {
  transform: rotate(0);
}

.faq-q:focus-visible {
  outline-offset: 0;
}

.faq-panel {
  position: sticky;
  top: 8.5rem;
  min-height: 15rem;
  padding: 2.6rem 1.5rem 1.5rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 7px 7px 0 var(--red);
}

.faq-panel::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  padding: 0.65rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  content: "ANSWER / 答复页";
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.faq-answer {
  display: none;
}

.faq-answer[data-open] {
  display: block;
}

.faq-a {
  color: var(--ink-soft);
  font-size: clamp(1.03rem, 0.95rem + 0.35vw, 1.25rem);
  line-height: 1.65;
}

/* JS-off: questions still answer inline. */
html:not(.js) .faq-answer {
  display: block;
  margin: 0.5rem 0 1rem;
}

/* --------------------------------------------------------------------------
   Call to action
   -------------------------------------------------------------------------- */

.cta {
  position: relative;
  margin-top: var(--section-y);
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
}

.cta::before,
.cta::after {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  content: "";
  background: repeating-linear-gradient(
    to bottom,
    var(--red) 0 4px,
    transparent 4px 9px
  );
}

.cta::before {
  left: 0;
}

.cta::after {
  right: 0;
}

.cta .wrap {
  padding-top: clamp(4rem, 8vw, 7rem);
  padding-bottom: clamp(4rem, 8vw, 7rem);
}

.cta-line {
  max-width: 15ch;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 1.5rem + 6.5vw, 7.3rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.cta-line .line {
  display: block;
}

.cta-line .fill {
  color: var(--red);
  font-style: italic;
}

.cta .hero-actions {
  margin-top: 2rem;
}

.cta .btn {
  border-color: var(--paper);
  background: var(--red);
  color: var(--white);
  box-shadow: 4px 4px 0 var(--paper);
}

.cta .btn:nth-child(n + 2) {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 4px 4px 0 var(--red);
}

.cta-note {
  margin-top: 1.5rem;
  color: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-transform: uppercase;
}

.cta-note a {
  color: var(--paper);
}

/* --------------------------------------------------------------------------
   Documentation and long-form pages
   -------------------------------------------------------------------------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.35rem !important;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  text-decoration: none;
}

.crumbs .sep {
  color: var(--red);
}

.doc-head {
  padding-top: clamp(3rem, 7vw, 6rem) !important;
  padding-bottom: 1rem !important;
}

.doc-head h1 {
  max-width: 12ch;
}

.doc-head .lead {
  margin-top: 1.3rem;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 1rem;
  padding-top: 0.6rem !important;
  padding-bottom: 2rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.doc-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--red-deep);
}

.doc-grid {
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4.5vw, 4rem);
  padding-bottom: var(--section-y);
}

.doc-aside {
  position: sticky;
  top: 8.6rem;
  min-width: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.toc {
  margin-bottom: 0.9rem;
  border: 1.5px solid var(--ink);
  background: var(--paper-raised);
}

.toc summary {
  position: relative;
  min-height: 46px;
  padding: 0.75rem 2.5rem 0.75rem 0.85rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.35;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

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

.toc summary::after {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  color: var(--red);
  content: "+";
  font-size: 1rem;
  transform: translateY(-50%);
}

.toc[open] summary::after {
  content: "−";
}

.toc ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
}

.toc li {
  padding: 0;
  border-top: 1px solid var(--rule-soft);
}

.toc li:first-child {
  border-top: 0;
}

.toc a,
.toc li.cur span {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.toc a:hover {
  color: var(--red-deep);
}

.toc li.cur span {
  border-left: 4px solid var(--red);
  background: var(--paper-deep);
  font-weight: 740;
}

.doc-body {
  min-width: 0;
  max-width: 80ch;
  padding: clamp(1.35rem, 4vw, 3rem);
  border: 1.5px solid var(--ink);
  background: var(--paper-raised);
  box-shadow: 8px 8px 0 var(--rule);
  counter-reset: doc-section;
}

.doc-body > :first-child {
  margin-top: 0;
}

.doc-body p {
  margin: 0.9rem 0;
}

.doc-body ul,
.doc-body ol {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
}

.doc-body li {
  max-width: 72ch;
}

.doc-body h2 {
  position: relative;
  margin: clamp(2.5rem, 5vw, 4rem) 0 1rem;
  padding-top: 1.1rem;
  border-top: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 1.15rem + 1.25vw, 2.35rem);
  line-height: 1.08;
  counter-increment: doc-section;
}

.doc-body h2::before {
  position: absolute;
  top: -1.7rem;
  left: 0;
  color: var(--red);
  content: "SECTION " counter(doc-section, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.doc-body h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
}

.doc-body h4 {
  margin: 1.5rem 0 0.65rem;
}

.anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  margin-left: 0.35rem;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.85em;
  text-decoration: none;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--t-fast) ease, transform var(--t-fast) var(--ease-out);
}

.doc-body h2:hover .anchor,
.doc-body h3:hover .anchor,
.doc-body h4:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
  transform: none;
}

@media (pointer: coarse) {
  .anchor {
    opacity: 0.7;
    transform: none;
  }
}

.doc-body .table-wrap {
  box-shadow: 4px 4px 0 var(--rule-soft);
}

.doc-raw {
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   Code blocks
   -------------------------------------------------------------------------- */

.code {
  margin: 1.5rem 0;
  border: 1.5px solid var(--ink);
  background: var(--ink);
}

.code-cap {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  color: var(--yellow);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

pre {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 1.1rem 4.8rem 1.1rem 1rem;
  overflow-x: auto;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  tab-size: 2;
}

pre code {
  font-family: inherit;
  white-space: pre;
}

pre .copy {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-height: 36px;
  padding: 0 0.7rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out);
}

.pre .copy:hover,
pre .copy:hover {
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Footer outbound manifest
   -------------------------------------------------------------------------- */

.site-foot {
  position: relative;
  margin-top: var(--section-y);
  background: var(--ink);
  color: var(--paper);
}

.site-foot::before {
  display: block;
  height: 14px;
  background: repeating-linear-gradient(
    90deg,
    var(--red) 0 26px,
    var(--ink) 26px 42px,
    var(--yellow) 42px 62px,
    var(--ink) 62px 88px
  );
  content: "";
}

.foot-mast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.25rem, 5vw, 5rem);
  padding-top: clamp(2.8rem, 6vw, 5rem);
  padding-bottom: clamp(2.8rem, 6vw, 5rem);
  border-bottom: 1px dashed var(--rule);
}

.foot-stamp {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  border: 3px double var(--red);
  color: var(--red);
  font-family: var(--font-mono);
  line-height: 1.1;
  text-align: center;
  transform: rotate(-6deg);
}

.foot-stamp span,
.foot-stamp small {
  font-size: 0.58rem;
  letter-spacing: 0.12em;
}

.foot-stamp strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.05em;
}

.foot-mark {
  display: grid;
  gap: 0.25rem;
}

.foot-mark span {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 0.78;
}

.foot-mark small {
  color: var(--rule);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.foot-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: min(100%, 290px);
  gap: 1rem;
  padding: 1rem;
  border: 2px solid var(--paper);
  color: var(--paper);
  text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out);
}

.foot-cta:hover {
  transform: translate(-2px, -2px);
}

.foot-cta span {
  display: grid;
  gap: 0.2rem;
}

.foot-cta small {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.11em;
}

.foot-cta strong {
  max-width: 24ch;
  color: var(--paper);
  font-size: 0.9rem;
  line-height: 1.4;
}

.foot-cta svg {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  color: var(--red);
}

.foot-ledger {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.foot-nav-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.5rem;
}

.foot-col,
.foot-meta,
.foot-credits {
  min-width: 0;
}

.foot-col h2,
.foot-meta h2,
.foot-credits h2 {
  margin-bottom: 0.8rem;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.foot-col ul {
  display: grid;
  gap: 0.42rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-col li {
  padding: 0;
}

.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--rule);
  font-size: 0.78rem;
  line-height: 1.35;
  text-decoration: none;
}

.foot-col a:hover {
  color: var(--paper);
}

.foot-fine {
  display: grid;
  align-content: start;
  gap: 1.5rem;
}

.foot-meta p,
.foot-credits p {
  color: var(--rule);
  font-size: 0.74rem;
  line-height: 1.6;
}

.foot-meta p + p,
.foot-credits p + p {
  margin-top: 0.7rem;
}

.foot-credits a {
  color: var(--paper);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1.4rem;
  border-top: 1px solid var(--rule);
  color: var(--rule);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
}

.foot-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--red);
  text-decoration: none;
}

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

.notfound {
  position: relative;
  min-height: 66vh;
  padding-top: clamp(4rem, 10vw, 8rem) !important;
  padding-bottom: clamp(5rem, 12vw, 10rem) !important;
}

.notfound-code {
  position: absolute;
  top: 2rem;
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 0.18em;
  color: var(--paper-deep);
  font-family: var(--font-display);
  font-size: clamp(12rem, 31vw, 28rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 0.8;
  pointer-events: none;
}

.notfound-code i {
  width: 0.16em;
  height: 0.16em;
  background: var(--red);
  transform: rotate(45deg);
}

.route-kicker {
  position: relative;
  margin-bottom: 1.2rem;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.notfound h1,
.notfound .lead,
.notfound .btn-row {
  position: relative;
}

.notfound h1::before {
  display: none;
}

.notfound h1 {
  max-width: 8ch;
}

.notfound .lead {
  margin: 1.5rem 0 2rem;
}

/* --------------------------------------------------------------------------
   Legacy utility classes still emitted by content.py
   -------------------------------------------------------------------------- */

.version-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.1rem;
  margin-top: 1.4rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
}

.version-bar .tag {
  color: var(--red-deep);
  font-weight: 700;
}

.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  margin: 1.8rem 0;
  border: 1.5px solid var(--ink);
  background: var(--ink);
}

.stat {
  display: grid;
  gap: 0.15rem;
  padding: 1rem;
  background: var(--paper-raised);
}

.stat .k {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.stat .v {
  font-weight: 760;
}

.dl-visual {
  margin: 1.8rem 0;
}

.dl-lane {
  display: flex;
  height: 58px;
  gap: 4px;
}

.dl-lane i {
  flex: 1 1 0;
}

.dl-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.66rem;
}

.seg-in-frag {
  height: 28px;
}

.platform-logo {
  max-height: 36px;
  width: auto;
}

/* --------------------------------------------------------------------------
   Motion: transform and opacity only
   -------------------------------------------------------------------------- */

.js .hero h1 .line > span {
  opacity: 0;
  transform: translateY(108%);
}

.js.hero-ready .hero h1 .line > span {
  opacity: 1;
  transform: none;
  transition: transform 820ms var(--ease-out), opacity 520ms var(--ease-out);
}

.js.hero-ready .hero h1 .line:nth-child(2) > span {
  transition-delay: 90ms;
}

.js .rise,
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

.js .rise.is-visible,
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  transition: transform 620ms var(--ease-out), opacity 480ms var(--ease-out);
}

.js .rise[data-reveal-order="1"] {
  transition-delay: 35ms;
}

.js .rise[data-reveal-order="2"] {
  transition-delay: 70ms;
}

.js .rise[data-reveal-order="3"] {
  transition-delay: 105ms;
}

.js .rise[data-reveal-order="4"] {
  transition-delay: 140ms;
}

.js .rise[data-reveal-order="5"] {
  transition-delay: 175ms;
}

.toc a {
  transition: transform var(--t-fast) var(--ease-out);
}

.toc a:hover {
  transform: translateX(3px);
}

.toc a[aria-current="location"] {
  background: var(--paper-deep);
  color: var(--red-deep);
  font-weight: 740;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .hero h1 .line > span,
  .js .rise,
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

.motion-fallback .js.hero h1 .line > span,
.js.motion-fallback .hero h1 .line > span,
.js.motion-fallback .rise,
.js.motion-fallback [data-reveal] {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Responsive: 1200 / 1024 / 760 / 520
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .top-in {
    gap: 1rem;
  }

  .top-nav {
    gap: 0.2rem;
  }

  .top-nav a {
    font-size: 0.83rem;
  }

  .hero::before {
    display: none;
  }

  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    padding-top: clamp(3.5rem, 8vw, 6rem);
  }

  .hero h1,
  .hero-lead,
  .hero-actions,
  .hero-meta,
  .resolver {
    grid-column: 1;
  }

  .hero h1 {
    grid-row: 1;
    max-width: 100%;
  }

  .hero-lead {
    grid-row: 2;
  }

  .hero-actions {
    grid-row: 3;
  }

  .hero-meta {
    grid-row: 4;
  }

  .resolver {
    grid-row: 5;
    max-width: 720px;
    margin-top: 1rem;
  }

  .foot-mast {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .foot-cta {
    grid-column: 1 / -1;
  }

  .foot-ledger {
    grid-template-columns: 1fr;
  }

  .foot-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  :root {
    --step-hero: clamp(3.3rem, 10vw, 6.6rem);
  }

  .top-rule-in {
    grid-template-columns: 1fr auto;
  }

  .top-rule-in > :last-child {
    display: none;
  }

  .route-title {
    text-align: right;
  }

  .top-in {
    grid-template-columns: auto 1fr auto;
  }

  .icon-link {
    display: none;
  }

  .top-nav {
    position: absolute;
    top: calc(100% + 2px);
    right: var(--gutter);
    left: var(--gutter);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0.4rem;
    border: 2px solid var(--ink);
    background: var(--paper-raised);
    box-shadow: 7px 7px 0 var(--ink);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition: transform var(--t-mid) var(--ease-out),
      opacity var(--t-fast) var(--ease-out), visibility 0s linear var(--t-fast);
  }

  .top-nav a {
    min-height: 52px;
    padding: 0 0.75rem;
    border-bottom: 1px solid var(--rule-soft);
  }

  .top-nav a::after {
    display: none;
  }

  .top-nav a[aria-current="page"] {
    background: var(--paper-deep);
  }

  .top[data-nav-open] .top-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: transform var(--t-mid) var(--ease-out),
      opacity var(--t-fast) var(--ease-out), visibility 0s;
  }

  .nav-toggle {
    display: inline-grid;
  }

  .split,
  .split-wide,
  .faq,
  .doc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-panel,
  .doc-aside {
    position: static;
  }

  .doc-aside {
    order: 0;
  }

  .doc-body {
    order: 1;
  }

  .faq-panel {
    display: none;
  }

  .faq-answer[data-open] {
    display: block;
    margin: 0.65rem 0 1rem;
    padding: 0.85rem;
    border-left: 5px solid var(--red);
    background: var(--paper);
  }

  .foot-nav-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  :root {
    --step-hero: clamp(3.1rem, 14vw, 5.5rem);
    --step-xl: clamp(2rem, 10vw, 3.5rem);
    --gutter: 1.1rem;
    --section-y: 4.25rem;
  }

  body {
    font-size: 1rem;
    background-size: 48px 48px, 48px 48px, 100% 100%;
  }

  .top-rule-in {
    min-height: 28px;
  }

  .top-rule-in > :first-child {
    font-size: 0.56rem;
  }

  .route-title {
    max-width: 16ch;
    font-size: 0.56rem;
  }

  .top-in {
    min-height: 68px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
    box-shadow: 3px 3px 0 var(--red);
  }

  .brand-mark svg {
    width: 25px;
    height: 25px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 1.02rem;
  }

  .top-actions {
    gap: 0.35rem;
  }

  .top-download {
    display: none;
  }

  .theme-toggle {
    width: 44px;
  }

  .top-nav {
    position: fixed;
    top: 100px;
    right: 0.7rem;
    left: 0.7rem;
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
  }

  .hero .wrap {
    padding-top: 3.25rem;
    padding-bottom: 4rem;
  }

  .hero h1 {
    max-width: 100%;
  }

  .hero-lead {
    font-size: 1.05rem;
  }

  .btn-row {
    align-items: stretch;
  }

  .btn-row .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .resolver {
    padding: 3.45rem 1rem 1.15rem;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .resolver::after {
    right: 0.65rem;
    top: 3.65rem;
    font-size: 0.5rem;
  }

  .resolver label {
    max-width: calc(100% - 4.8rem);
  }

  .resolver input[type="text"] {
    font-size: 0.72rem;
  }

  .seg-legend {
    grid-template-columns: 1fr;
  }

  .section > h2 {
    max-width: 10ch;
  }

  .section-lead,
  .lead {
    font-size: 1.1rem;
  }

  .panel {
    margin-inline: -0.2rem;
    padding: 1rem;
    box-shadow: 5px 5px 0 var(--paper-deep);
  }

  .cards.cols-2,
  .cards.cols-3,
  .platforms {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-light {
    margin-inline: 0;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
    width: 100%;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody {
    display: grid;
    gap: 0.8rem;
  }

  tr {
    border: 1.5px solid var(--ink);
    background: var(--paper-raised);
    box-shadow: 3px 3px 0 var(--rule);
  }

  tbody tr:nth-child(even) {
    background: var(--paper-raised);
  }

  td {
    padding: 0.65rem 0.75rem;
    border-right: 0;
    border-top: 1px solid var(--rule-soft);
  }

  td:first-child {
    border-top: 0;
  }

  td::before {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--red);
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  td:empty {
    display: none;
  }

  .faq-q {
    grid-template-columns: 1.8rem minmax(0, 1fr) 1rem;
    font-size: 1.05rem;
  }

  .doc-head {
    padding-top: 2.8rem !important;
  }

  .doc-grid {
    padding-bottom: 4.25rem;
  }

  .doc-body {
    padding: 1rem;
    box-shadow: 5px 5px 0 var(--rule);
  }

  .doc-body h2 {
    padding-inline: 0;
  }

  pre {
    padding-right: 1rem;
    padding-top: 3.4rem;
    font-size: 0.76rem;
  }

  .pic-band img {
    max-height: 22rem;
  }

  .cta-line {
    font-size: clamp(2.5rem, 12vw, 4.4rem);
  }

  .foot-mast {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .foot-stamp {
    width: 92px;
    height: 92px;
  }

  .foot-mark span {
    font-size: clamp(4.4rem, 20vw, 7rem);
  }

  .foot-cta {
    width: 100%;
  }

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

  .foot-fine {
    grid-template-columns: 1fr;
  }

  .foot-bottom {
    display: grid;
    justify-content: start;
  }

  .notfound-code {
    top: 5rem;
    opacity: 0.65;
  }
}

@media (max-width: 520px) {
  .theme-toggle {
    display: inline-grid;
    border: 0;
  }

  .top-nav {
    top: 96px;
  }

  .brand-copy strong {
    max-width: 6.4em;
    line-height: 1.05;
  }

  .hero h1 {
    max-width: 100%;
  }

  .hero-actions {
    width: 100%;
  }

  .frag-row {
    align-items: flex-start;
  }

  .frag-row .val {
    max-width: 47%;
  }

  .platforms {
    margin-inline: 0;
  }

  .foot-nav-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .foot-col a {
    min-height: 34px;
  }
}

@media print {
  .top,
  .site-foot,
  .route-progress,
  .hero-actions,
  .copy {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .doc-grid,
  .split,
  .split-wide,
  .faq {
    display: block;
  }

  .doc-aside {
    display: none;
  }

  .doc-body,
  .panel,
  .card,
  .frag,
  .table-wrap {
    box-shadow: none;
    break-inside: avoid;
  }
}
