@font-face {
  font-family: "Sentient";
  src: url("fonts/sentient-300.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Sentient";
  src: url("fonts/sentient-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Sentient";
  src: url("fonts/sentient-500.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #eef1ec;
  --paper-raised: #f4f6f2;
  --paper-cool: #e5e9e4;
  --warm-card: #f7f2e6;
  --ink: #1d211e;
  --ink-soft: #3f4842;
  --muted: #5d665f;
  --line: #c9cec6;
  --line-strong: #919b93;
  --rail: #2f6b5d;
  --rail-dark: #235044;
  --signal: #c75a36;
  --signal-text: #a94726;
  --signal-soft: #f0d9cf;
  --steel: #cfd6d1;
  --yellow: #d7c751;
  --yellow-soft: #f2edc9;
  --white: #fffdf7;
  --display: "Sentient", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  --sans: "Aptos", "Segoe UI Variable", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", "Consolas", "Liberation Mono", monospace;
  --wrap: 1320px;
  --gutter: clamp(1rem, 3.3vw, 3.25rem);
  --radius: 7px;
  --ease: cubic-bezier(0.2, 0.75, 0.25, 1);
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open,
body.dialog-open {
  overflow: hidden;
}

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

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

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--rail-dark);
  text-decoration-color: currentColor;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
summary,
a {
  touch-action: manipulation;
}

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

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -0.027em;
  text-wrap: balance;
}

h1 {
  max-width: 13ch;
  font-size: clamp(3.4rem, 7.4vw, 6.8rem);
}

.display {
  font-weight: 300;
}

h1 span,
.display span {
  color: var(--rail);
}

h2 {
  max-width: 24ch;
  font-size: clamp(2.3rem, 4.4vw, 4.2rem);
}

h3 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

p,
li {
  text-wrap: pretty;
}

strong {
  color: var(--ink);
  font-weight: 700;
}

.mono,
code,
pre,
kbd,
samp,
.data-value,
.asset-size {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

code {
  color: var(--rail-dark);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.small {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.muted {
  color: var(--muted);
}

.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

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

.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  min-height: 44px;
  padding: 0.7rem 1rem;
  transform: translateY(-150%);
  border: 1px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
}

.skip:focus {
  transform: none;
}

/* Header and route navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}

.header-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.68rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--rail);
}

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

.brand-copy {
  display: grid;
  line-height: 1;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.42rem;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.brand-sub {
  margin-top: 0.28rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.primary-nav {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: stretch;
  justify-content: center;
}

.primary-nav::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.4rem;
  left: 0.4rem;
  height: 1px;
  background: var(--line-strong);
}

.nav-stop {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 0.45rem;
  padding: 0 0.65rem;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}

.nav-stop:hover,
.nav-stop.is-current {
  color: var(--ink);
}

.stop-lamp {
  width: 7px;
  height: 7px;
  border: 1px solid var(--rail);
  border-radius: 50%;
  background: var(--paper);
}

.nav-stop.is-current .stop-lamp {
  background: var(--rail);
  box-shadow: 0 0 0 4px rgba(47, 107, 93, 0.12);
}

.nav-stop-icon {
  width: 0.85rem;
  height: 0.85rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}

.nav-stop:hover .nav-stop-icon,
.nav-stop:focus-visible .nav-stop-icon {
  opacity: 1;
  transform: none;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.langs {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  overflow: hidden;
}

.lang-option {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 0 0.72rem;
  color: var(--ink-soft);
  font-size: 0.77rem;
  text-decoration: none;
}

.lang-option + .lang-option {
  border-left: 1px solid var(--line);
}

.lang-option:hover,
.lang-option.is-current {
  background: var(--rail);
  color: var(--white);
}

.repo-link,
.menu-toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.42rem;
  padding: 0 0.72rem;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
}

.repo-link:hover,
.menu-toggle:hover {
  border-color: var(--line-strong);
}

.menu-toggle {
  display: none;
}

.system-strip {
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: var(--paper-raised);
}

.system-strip-inner {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 1.15rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
}

.system-strip-inner > span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.system-strip-end {
  margin-left: auto;
}

.status-lamp {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}

.status-lamp.is-green {
  background: var(--rail);
}

.status-lamp.is-orange {
  background: var(--signal);
}

/* Dialogs and mobile navigation */

.sheet-dialog {
  width: min(30rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--paper-raised);
  color: var(--ink);
  overflow: auto;
}

.sheet-dialog::backdrop {
  background: rgba(29, 33, 30, 0.42);
}

.sheet-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper-raised);
}

.sheet-head h2 {
  margin-top: 0.25rem;
  font-size: 2rem;
}

.sheet-title {
  margin-top: 0.25rem;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1.03;
  letter-spacing: -0.027em;
}

.sheet-code,
.lane-code,
.error-code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--steel);
}

.mobile-nav {
  display: grid;
  padding: 0.75rem 1.25rem;
}

.mobile-nav .nav-stop {
  justify-content: flex-start;
  min-height: 52px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 1.45rem;
}

.mobile-nav .nav-stop-icon {
  margin-left: auto;
  opacity: 1;
  transform: none;
}

.sheet-section {
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.sheet-langs {
  margin-top: 0.7rem;
}

.sheet-repo {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 0.55rem;
  padding: 0 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-decoration: none;
}

/* Shared page primitives */

.page {
  min-height: 65vh;
}

.page-content {
  padding-top: clamp(2.4rem, 5vw, 5rem);
  padding-bottom: clamp(5rem, 8vw, 8rem);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.crumbs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

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

.lead {
  max-width: 65ch;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  line-height: 1.58;
}

.lede {
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: 1.06rem;
  line-height: 1.65;
}

.section {
  margin-top: clamp(4.5rem, 9vw, 8.5rem);
}

.section > h2 {
  margin-top: 1.15rem;
}

.section-lead {
  max-width: 68ch;
  margin-top: 1.25rem;
  color: var(--ink-soft);
}

.section-foot {
  max-width: 68ch;
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.route-divider {
  display: flex;
  height: 8px;
  align-items: stretch;
  gap: 3px;
  overflow: hidden;
}

.route-divider i {
  display: block;
  min-width: 4px;
  background: var(--steel);
}

.route-divider i.is-complete {
  background: var(--rail);
}

.note {
  max-width: 72ch;
  margin-top: 1.3rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--warm-card);
  color: var(--ink-soft);
}

.note.warn {
  border-color: var(--signal);
  background: var(--signal-soft);
}

.note.info {
  border-color: var(--rail);
  background: #e3ebe6;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

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

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.68rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--ink);
  background: var(--steel);
  color: var(--ink);
}

.btn-primary {
  border-color: var(--rail);
  background: var(--rail);
  color: var(--white);
}

.btn-primary:hover {
  border-color: var(--rail-dark);
  background: var(--rail-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--paper-raised);
}

.btn-icon {
  width: 1rem;
  height: 1rem;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--rail-dark);
  font-weight: 650;
}

/* Home route board */

.home-hero {
  padding-top: 0.5rem;
}

.hero-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
}

.hero-lead h1 {
  max-width: 11ch;
  font-size: clamp(3.8rem, 8.4vw, 7.8rem);
  line-height: 0.94;
}

.hero-lead h1:lang(zh) {
  max-width: 100%;
  font-size: clamp(3.4rem, 5.8vw, 5.8rem);
  line-height: 1.04;
}

.hero-side {
  padding-bottom: 0.4rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.8rem;
}

.route-board {
  margin-top: clamp(3rem, 6vw, 5.5rem);
  padding: 8px 16px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink-soft);
  background: rgba(248, 246, 239, 0.64);
}

.route-board-head {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(18rem, 1.15fr);
  align-items: end;
  gap: 2rem;
  padding: 1.5rem 0 1.2rem;
  border-bottom: 1px solid var(--line-strong);
}

.route-board-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.illustration-note {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.route-line {
  position: relative;
  display: grid;
  grid-template-columns: 0.92fr 1.18fr 1fr 1.34fr 0.9fr;
  padding: 0;
  list-style: none;
}

.route-line::before {
  content: "";
  position: absolute;
  top: 25px;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--rail);
}

.route-line::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 0;
  z-index: 2;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--signal);
  animation: packet-run 9s linear infinite;
}

@keyframes packet-run {
  from { left: 0; }
  to { left: calc(100% - 9px); }
}

.route-stage {
  position: relative;
  min-width: 0;
  padding: 3.4rem 1.15rem 1.5rem;
  border-left: 1px solid var(--line);
}

.route-stage:first-child {
  border-left: 0;
}

.route-node {
  position: absolute;
  top: 20px;
  left: -5px;
  z-index: 1;
  width: 11px;
  height: 11px;
  border: 2px solid var(--rail);
  border-radius: 50%;
  background: var(--paper-raised);
}

.route-stage:first-child .route-node {
  left: 0;
}

.route-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stage-number,
.plugin-index {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.stage-state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.stage-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rail);
}

.route-stage h3 {
  margin-top: 1.1rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
}

.stage-value {
  margin-top: 0.2rem;
  color: var(--signal-text);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.route-stage > p:last-child {
  max-width: 30ch;
  margin-top: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.55;
}

.route-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  padding: 0.85rem 0 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.route-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-note {
  margin-left: auto;
}

/* Config and controls */

.split-ledger {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.7fr);
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: 2rem;
}

.split-copy {
  position: sticky;
  top: 9rem;
  align-self: start;
}

.split-copy .small {
  margin-top: 1rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  padding: 8px;
  border-top: 1px solid var(--ink-soft);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 246, 239, 0.56);
}

.table-wrap:focus-visible {
  outline-offset: 5px;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th,
td {
  padding: 0.86rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

td {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

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

tbody tr:hover {
  background: rgba(207, 214, 209, 0.34);
}

.data-value {
  color: var(--ink);
  font-weight: 600;
}

.tag,
.chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin: 0.16rem 0.16rem 0.16rem 0;
  padding: 0.16rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: var(--paper-raised);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.3;
}

.control-ledger {
  margin-top: 2rem;
  border-top: 1px solid var(--ink-soft);
}

.control-row {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(18rem, 1.35fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

.control-name {
  display: grid;
  gap: 0.18rem;
}

.control-name .mono {
  color: var(--rail-dark);
  font-size: 0.8125rem;
}

.control-name strong {
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 400;
}

.control-row > p {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.switch {
  display: inline-flex;
  min-width: 132px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  cursor: pointer;
}

.switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--steel);
}

.switch-track i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 170ms var(--ease), background 170ms var(--ease);
}

.switch[aria-checked="true"] .switch-track {
  border-color: var(--rail);
  background: #cbdcd4;
}

.switch[aria-checked="true"] .switch-track i {
  background: var(--rail);
  transform: translateX(16px);
}

.switch[aria-checked="true"] .switch-label {
  color: var(--rail-dark);
}

/* Module and plugin routes */

.module-route {
  position: relative;
  margin-top: 2rem;
  padding: 0;
  border-top: 1px solid var(--ink-soft);
  list-style: none;
}

.module-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem minmax(14rem, 0.65fr) auto minmax(16rem, 1.3fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 1rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

.module-row::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.38rem;
  width: 1px;
  background: var(--rail);
}

.module-node {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border: 2px solid var(--rail);
  border-radius: 50%;
  background: var(--paper);
}

.module-row code {
  color: var(--ink);
  font-size: 0.8125rem;
}

.module-state {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.module-state.is-required {
  color: var(--signal-text);
}

.module-row p {
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.plugin-route {
  position: relative;
  margin-top: 2rem;
  border-top: 1px solid var(--ink-soft);
}

.plugin-stop {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  padding: 1.8rem 0 1.8rem 0.2rem;
  border-bottom: 1px solid var(--line);
}

.plugin-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--rail);
}

.plugin-track i {
  position: absolute;
  top: 2rem;
  left: -4px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--rail);
  border-radius: 50%;
  background: var(--paper);
}

.plugin-copy > .mono {
  color: var(--rail-dark);
  font-size: 0.75rem;
}

.plugin-copy h3 {
  margin-top: 0.35rem;
}

.plugin-copy > p {
  max-width: 76ch;
  margin-top: 0.8rem;
  color: var(--ink-soft);
}

.plugin-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-top: 1.15rem;
}

.plugin-spec div {
  display: grid;
  gap: 0.15rem;
}

.plugin-spec dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.plugin-spec dd {
  font-size: 0.875rem;
}

.plugin-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  align-self: start;
  gap: 0.4rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  text-decoration: none;
}

.plugin-link:hover {
  border-color: var(--rail);
  background: var(--steel);
}

/* Download page */

.download-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(24rem, 0.8fr);
  align-items: end;
  gap: 3rem;
}

.download-hero h1 {
  max-width: 10ch;
}

.download-hero .lead {
  margin-top: 1.5rem;
}

.release-ticket {
  border-top: 1px solid var(--ink-soft);
  border-bottom: 1px solid var(--ink-soft);
  padding: 8px 12px;
  background: var(--warm-card);
}

.release-ticket div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.release-ticket div:last-child {
  border-bottom: 0;
}

.release-ticket dt {
  color: var(--muted);
  font-size: 0.875rem;
}

.release-ticket dd {
  font-size: 0.875rem;
}

.delivery-board {
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-top: 8px;
  border-top: 1px solid var(--ink);
}

.delivery-lane {
  border-bottom: 1px solid var(--ink-soft);
  background: rgba(248, 246, 239, 0.5);
}

.lane-head {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 0 1rem;
}

.lane-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--rail);
}

.lane-icon .icon {
  width: 1.35rem;
  height: 1.35rem;
}

.lane-head h2 {
  margin-top: 0.16rem;
  font-size: clamp(1.9rem, 3.2vw, 3.1rem);
}

.lane-status {
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.lane-body {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(18rem, 0.7fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 1.2rem 0 2rem;
  border-top: 1px solid var(--line);
}

.lane-body > * {
  min-width: 0;
}

.lane-body > p {
  grid-column: 1 / -1;
  max-width: 75ch;
}

.lane-body-cli {
  grid-template-columns: minmax(0, 1.15fr) minmax(19rem, 0.85fr);
}

.lane-body-offline {
  grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
}

.lane-body-modules {
  grid-template-columns: 1fr;
}

.lane-body-modules .btn-row {
  margin-top: 1rem;
}

.lane-body-modules .btn {
  width: fit-content;
}

.asset-ledger,
.primary-asset {
  display: grid;
  align-content: start;
  gap: 0.45rem;
}

.asset-link {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  min-height: 46px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: 0.875rem;
  text-decoration: none;
}

.asset-link:hover {
  border-color: var(--rail);
  background: #e4ece7;
}

.asset-link .icon {
  color: var(--rail);
}

.asset-link > span:not(.asset-size) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.asset-size {
  color: var(--muted);
  font-size: 0.75rem;
}

.manual-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.manual-steps > div {
  padding: 1.2rem;
  border-left: 1px solid var(--line);
}

.manual-steps > div:first-child {
  border-left: 0;
}

.step-mark {
  color: var(--signal-text);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.manual-steps h3 {
  margin-top: 0.45rem;
}

.manual-steps p {
  margin-top: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.manifest-details {
  margin-top: 1.5rem;
  padding: 8px 12px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.field-reference {
  margin-top: 1.4rem;
  padding: 8px 12px;
  border-top: 1px solid var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
}

.field-reference > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 650;
}

.field-reference > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.field-reference[open] > summary::after {
  transform: rotate(225deg);
}

.field-reference .readout {
  margin-top: 0;
  border-bottom: 0;
}

.manifest-details > summary {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.2rem;
  cursor: pointer;
  font-weight: 650;
}

/* Code */

.code-block,
.manifest-frag,
.console {
  min-width: 0;
  max-width: 100%;
  margin-top: 1.4rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #202722;
  color: #f3f2e9;
  overflow: hidden;
}

.code-cap,
.console-cap {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 8px 12px;
  border-bottom: 1px solid #465049;
  color: #b9c3bb;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.code-cap-bare {
  justify-content: flex-end;
}

.code-copy {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.55rem;
  border: 1px solid #536058;
  border-radius: 3px;
  background: transparent;
  color: #eef1ea;
  font-size: 0.75rem;
  cursor: pointer;
}

.code-copy:hover,
.code-copy.is-copied {
  border-color: var(--yellow);
  color: var(--yellow);
}

.code-copy .icon {
  width: 0.9rem;
  height: 0.9rem;
}

.code-scroll,
.console pre,
.manifest-frag pre {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.code-block pre,
.console pre,
.manifest-frag pre {
  margin: 0;
  padding: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.65;
  white-space: pre;
}

.code-block code,
.console code,
.manifest-frag code {
  color: #e8ede7;
  font-size: inherit;
  overflow-wrap: normal;
}

.manifest-frag .readout-title,
.manifest-frag .readout-foot {
  border-color: #465049;
  color: #c6d0c8;
}

.console-cap {
  min-height: 40px;
}

/* Fragment ledgers */

.readout,
.panel,
.runtime-panel {
  margin-top: 1.4rem;
  border-top: 1px solid var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(248, 246, 239, 0.58);
}

.readout-title,
.panel-state {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.readout-body,
.panel-grid,
.runtime-grid {
  display: grid;
}

.readout-row {
  display: grid;
  grid-template-columns: minmax(12rem, 0.6fr) minmax(0, 1.4fr);
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.readout-row:last-child {
  border-bottom: 0;
}

.readout-key {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.readout-val {
  color: var(--ink-soft);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.readout-foot,
.panel-foot,
.runtime-foot {
  padding: 0.75rem 0.85rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

.panel-state,
.panel-pct {
  font-size: 0.8125rem;
}

.panel-head,
.runtime-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.panel-head .panel-state,
.runtime-head {
  border-bottom: 0;
}

.panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.panel-grid > div,
.runtime-grid > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0.85rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.panel-grid span,
.runtime-grid span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

.panel-grid b,
.runtime-grid b {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Ledger replacement for card grids */

.ledger {
  margin-top: 1.5rem;
  border-top: 1px solid var(--ink-soft);
}

.ledger-item {
  display: grid;
  grid-template-columns: minmax(12rem, 0.46fr) minmax(0, 1.54fr);
  gap: clamp(1.2rem, 4vw, 4rem);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.ledger-item h3 {
  font-size: 1.45rem;
}

.ledger-copy {
  color: var(--ink-soft);
}

.ledger-copy .btn-row {
  margin-top: 0.9rem;
}

/* Documentation */

.docs-hero h1 {
  max-width: 11ch;
}

.docs-hero .lead {
  margin-top: 1.4rem;
}

.manual-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 3.5rem;
}

.manual-aside,
.doc-aside {
  position: sticky;
  top: 8.5rem;
  align-self: start;
  max-height: calc(100dvh - 10rem);
  overflow-y: auto;
}

.manual-aside {
  padding-right: 1.2rem;
  border-right: 1px solid var(--line-strong);
}

.manual-nav,
.toc {
  border-top: 1px solid var(--ink-soft);
}

.manual-nav > summary,
.toc > summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-weight: 700;
}

.manual-nav > summary::after,
.toc > summary::after,
.faq-item > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms var(--ease);
}

.manual-nav[open] > summary::after,
.toc[open] > summary::after,
.faq-item[open] > summary::after {
  transform: rotate(225deg);
}

.manual-nav-group {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.manual-nav-group > span,
.toc-title {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.manual-nav ul,
.toc ul {
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}

.manual-nav li,
.toc li {
  line-height: 1.35;
}

.manual-nav a,
.toc a {
  display: flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.875rem;
  text-decoration: none;
}

.manual-nav a:hover,
.toc a:hover,
.toc a.active,
.toc a[aria-current] {
  color: var(--rail-dark);
  text-decoration: underline;
}

.manual-aside-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.manual-main {
  min-width: 0;
}

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

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

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  margin-top: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.doc-meta a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--rail-dark);
  font-size: 0.875rem;
}

.doc-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 2.2rem;
}

.doc-side-inner {
  padding-right: 1.2rem;
  border-right: 1px solid var(--line-strong);
}

.doc-nav {
  margin-top: 1.2rem;
  padding-top: 1rem;
}

.doc-nav ul {
  margin-top: 0.5rem;
}

.doc-nav li.cur {
  padding: 0.6rem 0;
  color: var(--rail-dark);
  font-size: 0.875rem;
  font-weight: 700;
}

.doc-toc-trigger {
  display: none;
}

.doc-body {
  min-width: 0;
  max-width: 76ch;
}

.doc-body > * + * {
  margin-top: 1.05rem;
}

.doc-body h2 {
  margin-top: 3.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-strong);
  font-size: clamp(2rem, 3.4vw, 3rem);
}

.doc-body h3 {
  margin-top: 2.2rem;
  font-size: 1.55rem;
}

.doc-body h4 {
  margin-top: 1.8rem;
  font-size: 1.25rem;
}

.doc-body p,
.doc-body li {
  color: var(--ink-soft);
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.3rem;
}

.doc-body li + li {
  margin-top: 0.4rem;
}

.doc-body blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
}

.doc-body hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.doc-body img {
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.anchor {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  color: transparent;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
}

.doc-body h2:hover .anchor,
.doc-body h3:hover .anchor,
.anchor:focus-visible {
  color: var(--signal-text);
}

.doc-raw {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper-raised);
  white-space: pre;
}

.doc-dialog-toc {
  padding: 1rem 1.25rem 1.25rem;
}

.doc-dialog-toc .toc {
  border-top: 0;
}

.doc-toc-dialog {
  width: min(26rem, calc(100% - 2rem));
}

/* FAQ and event display */

.faq {
  margin-top: 1.5rem;
  padding-top: 8px;
  border-top: 1px solid var(--ink-soft);
}

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

.faq-item > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-family: var(--display);
  font-size: 1.25rem;
}

.faq-item > summary::-webkit-details-marker,
.manual-nav > summary::-webkit-details-marker,
.toc > summary::-webkit-details-marker,
.manifest-details > summary::-webkit-details-marker {
  display: none;
}

.answer {
  max-width: 70ch;
  padding: 0 0 1.1rem;
  color: var(--ink-soft);
}

.event-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(2rem, 5vw, 5rem);
  margin-top: 2rem;
}

.event-copy .illustration-note {
  margin-top: 1rem;
}

.closing-board {
  margin-top: 2rem;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink-soft);
  background: rgba(248, 246, 239, 0.62);
}

.closing-copy {
  max-width: 68ch;
  padding: 1.5rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.closing-copy p {
  margin-top: 0.7rem;
  color: var(--ink-soft);
}

.coordinate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.coordinate-row code {
  display: flex;
  min-width: 0;
  align-items: center;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  font-size: 0.84rem;
}

.copy-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1rem;
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: var(--rail);
  color: var(--white);
  cursor: pointer;
}

.closing-board .btn-row {
  padding: 1.2rem;
}

/* Release timeline, legal and community */

.release-timeline {
  position: relative;
  margin-top: 2rem;
  padding: 0;
  border-top: 1px solid var(--ink-soft);
  list-style: none;
}

.release-entry {
  position: relative;
  display: grid;
  gap: 0.8rem;
  padding: 1.35rem 0 1.55rem 1.6rem;
  border-bottom: 1px solid var(--line);
}

.release-node {
  position: absolute;
  top: 1.8rem;
  left: 0.1rem;
  width: 9px;
  height: 9px;
  border: 2px solid var(--rail);
  border-radius: 50%;
  background: var(--paper);
}

.release-node::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: -95px;
  left: 3px;
  width: 1px;
  background: var(--line-strong);
}

.release-entry:last-child .release-node::after {
  display: none;
}

.release-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.release-entry h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
}

.release-entry p {
  max-width: 84ch;
}

.release-entry .small {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.not-found {
  min-height: 55vh;
  padding-top: 8vh;
}

.not-found h1 {
  margin-top: 1rem;
}

.not-found .lead {
  margin-top: 1.2rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--ink);
  background: var(--paper-raised);
}

.footer-route {
  display: flex;
  height: 22px;
  align-items: center;
  gap: 3px;
  padding-inline: var(--gutter);
  overflow: hidden;
}

.footer-route i {
  display: block;
  height: 4px;
  background: var(--rail);
}

.footer-route i:nth-child(1) { width: 17%; }
.footer-route i:nth-child(2) { width: 8%; background: var(--signal); }
.footer-route i:nth-child(3) { width: 24%; }
.footer-route i:nth-child(4) { width: 11%; background: var(--yellow); }
.footer-route i:nth-child(5) { width: 19%; }
.footer-route i:nth-child(6) { width: 21%; background: var(--steel); }

.footer-main {
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-brand > p {
  max-width: 28ch;
  margin-top: 1.2rem;
  color: var(--ink-soft);
}

.footer-repo {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1.2rem;
  color: var(--rail-dark);
  font-family: var(--mono);
  font-size: 0.8125rem;
}

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

.footer-column h2 {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer-column ul {
  margin-top: 0.65rem;
  padding: 0;
  list-style: none;
}

.footer-column a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-column a:hover {
  color: var(--rail-dark);
  text-decoration: underline;
}

.footer-base {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  padding-top: 1.2rem;
  padding-bottom: 1.5rem;
  border-top: 1px solid var(--line);
}

.footer-notes {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-stamp {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* Responsive structure */

@media (max-width: 1180px) {
  .primary-nav .nav-stop {
    padding-inline: 0.45rem;
    font-size: 0.76rem;
  }

  .repo-link span {
    display: none;
  }

  .route-line {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

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

@media (max-width: 980px) {
  .header-main {
    grid-template-columns: auto 1fr auto;
  }

  .primary-nav,
  .repo-link {
    display: none;
  }

  .header-tools {
    justify-content: flex-end;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-lead,
  .download-hero {
    grid-template-columns: 1fr;
  }

  .hero-lead h1 {
    max-width: 12ch;
  }

  .hero-side {
    max-width: 65ch;
  }

  .route-board-head {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .route-line {
    display: block;
    padding-left: 1rem;
  }

  .route-line::before {
    top: 0;
    right: auto;
    bottom: 0;
    left: 5px;
    width: 1px;
    height: auto;
  }

  .route-line::after {
    top: 0;
    left: 1px;
    animation-name: packet-run-mobile;
  }

  @keyframes packet-run-mobile {
    from { transform: translateY(0); }
    to { transform: translateY(calc(100% - 9px)); }
  }

  .route-stage {
    min-height: 160px;
    padding: 1.3rem 0 1.6rem 1.5rem;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .route-stage:first-child {
    border-top: 0;
  }

  .route-node,
  .route-stage:first-child .route-node {
    top: 1.55rem;
    left: -13px;
  }

  .route-stage h3 {
    margin-top: 0.8rem;
  }

  .split-ledger,
  .event-layout,
  .manual-shell,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .split-copy,
  .manual-aside,
  .doc-aside {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .manual-aside,
  .doc-side-inner {
    padding-right: 0;
    border-right: 0;
  }

  .doc-side-inner {
    display: none;
  }

  .doc-toc-trigger {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    padding: 0 0.85rem;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: var(--paper-raised);
    color: var(--ink);
    cursor: pointer;
  }

  .lane-body,
  .lane-body-cli,
  .lane-body-offline {
    grid-template-columns: 1fr;
  }

  .control-row {
    grid-template-columns: minmax(12rem, 0.8fr) minmax(0, 1.2fr);
  }

  .control-row .switch {
    grid-column: 2;
  }

  .module-row {
    grid-template-columns: 1.5rem minmax(12rem, 0.75fr) auto;
  }

  .module-row p {
    grid-column: 2 / -1;
  }

  .footer-main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(calc(100% - 2rem), var(--wrap));
  }

  .header-main {
    min-height: 66px;
  }

  .brand-sub,
  .langs {
    display: none;
  }

  .system-strip-inner {
    gap: 0.8rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .system-strip-inner::-webkit-scrollbar {
    display: none;
  }

  .page-content {
    padding-top: 2rem;
  }

  h1 {
    font-size: clamp(3rem, 15vw, 5rem);
  }

  h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .hero-lead h1 {
    font-size: clamp(3.35rem, 16vw, 5.2rem);
  }

  .hero-lead h1:lang(zh) {
    max-width: 100%;
    font-size: clamp(2.85rem, 12.3vw, 4.35rem);
  }

  .hero-actions .btn,
  .btn-row .btn {
    width: 100%;
  }

  .route-board {
    margin-top: 2.4rem;
  }

  .route-stage > p:last-child {
    max-width: 42ch;
  }

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

  .legend-note {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .control-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .control-row .switch {
    grid-column: auto;
  }

  .module-row {
    grid-template-columns: 1.5rem minmax(0, 1fr) auto;
    gap: 0.65rem;
  }

  .module-row p {
    grid-column: 2 / -1;
  }

  .plugin-stop {
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.8rem;
  }

  .plugin-link {
    grid-column: 2;
    width: fit-content;
  }

  .lane-head {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .lane-status {
    grid-column: 2;
    width: fit-content;
  }

  .manual-steps {
    grid-template-columns: 1fr;
  }

  .manual-steps > div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .manual-steps > div:first-child {
    border-top: 0;
  }

  .readout-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }

  .footer-base {
    grid-template-columns: 1fr;
  }

  .coordinate-row {
    grid-template-columns: 1fr;
  }

  .copy-button {
    border-top: 1px solid var(--line-strong);
    border-left: 0;
  }

  /* Tables become compact labelled rows, not stacked cards. */
  .table-wrap {
    border-bottom: 1px solid var(--line-strong);
  }

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

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
    white-space: nowrap;
  }

  .table-wrap tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
    padding: 0.65rem 0.7rem;
    border-bottom: 1px solid var(--line);
  }

  .table-wrap tr:last-child {
    border-bottom: 0;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(5.7rem, 34%) minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.34rem 0;
    border: 0;
    font-size: 0.78rem;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.75rem;
  }

  .table-wrap td[data-label=""]::before,
  .table-wrap td[data-label=" "]::before {
    display: none;
  }

  .table-wrap.compact tr {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.3rem 1rem;
  }

  .table-wrap.compact td {
    display: flex;
    flex: 1 1 12rem;
    grid-template-columns: none;
    gap: 0.45rem;
  }

  .doc-body h2 {
    scroll-margin-top: 7.5rem;
  }

  .doc-body {
    max-width: 100%;
  }

  .code-block pre,
  .console pre,
  .manifest-frag pre {
    font-size: 0.73rem;
  }

  .dialog-open .site-header,
  .nav-open .site-header {
    position: static;
  }
}

@media (max-width: 520px) {
  .system-strip-end {
    margin-left: 0;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .menu-toggle span {
    display: none;
  }

  .footer-columns {
    grid-template-columns: 1fr;
  }

  .footer-column ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
  }

  .table-wrap tr {
    grid-template-columns: 1fr;
  }

  .release-entry-head {
    display: grid;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .route-line::after {
    display: none;
  }
}
