:root {
  color-scheme: dark;
  --page: #0b0c0b;
  --surface: #121312;
  --surface-elevated: #181a18;
  --surface-hover: #1f211f;
  --code-bg: #0d0e0d;
  --ink: #f4f4f2;
  --muted: #949792;
  --soft: #666964;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --accent: #f4f4f2;
  --accent-dim: rgba(255, 255, 255, 0.06);
  --accent-border: rgba(255, 255, 255, 0.16);
  --live: #4ade80;
  --danger: #f87171;
  --solid-bg: #f4f4f2;
  --solid-hover: #ffffff;
  --solid-ink: #0e0f0e;
  --hero-glow: radial-gradient(58% 38% at 50% 0%, rgba(255, 255, 255, 0.055), transparent 72%);
  --grid-line: transparent;
  --window-bg: rgba(18, 19, 18, 0.9);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.62);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.28);
  --frame: 1120px;
  --ledger: 848px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, sans-serif;
  font-synthesis: none;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

:root[data-theme="light"] {
  color-scheme: light;
  --page: #fafafa;
  --surface: #ffffff;
  --surface-elevated: #f3f3f2;
  --surface-hover: #eaeae8;
  --code-bg: #f4f4f3;
  --ink: #121312;
  --muted: #5c5e5a;
  --soft: #868984;
  --line: rgba(18, 19, 18, 0.08);
  --line-strong: rgba(18, 19, 18, 0.16);
  --accent: #121312;
  --accent-dim: rgba(18, 19, 18, 0.05);
  --accent-border: rgba(18, 19, 18, 0.16);
  --live: #16a34a;
  --danger: #dc2626;
  --solid-bg: #121312;
  --solid-hover: #272927;
  --solid-ink: #fafafa;
  --hero-glow: radial-gradient(58% 38% at 50% 0%, rgba(18, 19, 18, 0.035), transparent 72%);
  --grid-line: transparent;
  --window-bg: rgba(255, 255, 255, 0.94);
  --shadow-lg: 0 28px 68px rgba(18, 19, 18, 0.1);
  --shadow-sm: 0 8px 24px rgba(18, 19, 18, 0.05);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --page: #fafafa;
    --surface: #ffffff;
    --surface-elevated: #f3f3f2;
    --surface-hover: #eaeae8;
    --code-bg: #f4f4f3;
    --ink: #121312;
    --muted: #5c5e5a;
    --soft: #868984;
    --line: rgba(18, 19, 18, 0.08);
    --line-strong: rgba(18, 19, 18, 0.16);
    --accent: #121312;
    --accent-dim: rgba(18, 19, 18, 0.05);
    --accent-border: rgba(18, 19, 18, 0.16);
    --live: #16a34a;
    --danger: #dc2626;
    --solid-bg: #121312;
    --solid-hover: #272927;
    --solid-ink: #fafafa;
    --hero-glow: radial-gradient(58% 38% at 50% 0%, rgba(18, 19, 18, 0.035), transparent 72%);
    --grid-line: transparent;
    --window-bg: rgba(255, 255, 255, 0.94);
    --shadow-lg: 0 28px 68px rgba(18, 19, 18, 0.1);
    --shadow-sm: 0 8px 24px rgba(18, 19, 18, 0.05);
  }
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background-color: var(--page);
  background-image: var(--hero-glow);
  background-repeat: no-repeat;
  background-size: 100% 760px;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
p,
figure,
pre,
ul {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
img {
  display: block;
  max-width: 100%;
}
[hidden] {
  display: none !important;
}

.ico {
  flex: none;
  display: block;
}
.ico-moon,
.ico-check {
  display: none;
}
:root[data-theme="light"] .ico-sun {
  display: none;
}
:root[data-theme="light"] .ico-moon {
  display: block;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .ico-sun {
    display: none;
  }
  :root:not([data-theme="dark"]) .ico-moon {
    display: block;
  }
  :root:not([data-theme="dark"]) .hero-art {
    opacity: 0.18;
  }
}
[data-copied="true"] .ico-copy {
  display: none;
}
[data-copied="true"] .ico-check {
  display: block;
}

.frame {
  width: min(var(--frame), 100% - 80px);
  margin-inline: auto;
}
.ledger-container {
  width: min(var(--ledger), 100% - 48px);
  margin-inline: auto;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--page);
  font-size: 0.85rem;
  font-weight: 600;
}
.skip:focus {
  transform: none;
}

/* Top Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--page) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  font-size: 0.98rem;
  font-weight: 660;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.brand img {
  border-radius: 6px;
}
.brand--small {
  font-size: 0.9rem;
  color: var(--ink);
}

.navigation {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.845rem;
  color: var(--muted);
}
.nav-link,
.nav-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  white-space: nowrap;
  transition: color 0.14s ease;
}
.nav-link:hover,
.nav-icon-link:hover,
.nav-link[aria-current="page"] {
  color: var(--ink);
}
.nav-link[aria-current="page"] {
  font-weight: 590;
}
.nav-divider {
  width: 1px;
  height: 15px;
  background: var(--line-strong);
}
.nav-pill,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding-inline: 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 560;
  transition:
    border-color 0.14s ease,
    color 0.14s ease,
    background-color 0.14s ease;
}
.icon-btn {
  width: 30px;
  padding: 0;
}
.nav-pill:hover,
.icon-btn:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface-hover);
}

/* Home Hero — Centered Architectural Lockup */
.hero-ambient {
  position: relative;
  padding-block: 68px 72px;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
}
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-badges {
  margin-bottom: 22px;
}
.announcement-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  font-size: 0.79rem;
  font-weight: 540;
  color: var(--muted);
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}
.announcement-pill:hover {
  border-color: var(--accent-border);
  color: var(--ink);
}
.signal {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px color-mix(in srgb, var(--live) 55%, transparent);
}
.pill-sep {
  opacity: 0.45;
}
.pill-cta {
  color: var(--ink);
  font-weight: 580;
}

.display-title {
  max-width: 15ch;
  font-size: clamp(2.85rem, 5.8vw, 4.95rem);
  line-height: 1.03;
  font-weight: 680;
  letter-spacing: -0.048em;
}
.display-title em {
  font-style: normal;
  color: var(--accent);
}
.hero-lead {
  max-width: 54ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.64;
}

.hero-cta-bar {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-hero {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-inline: 20px;
  border-radius: 10px;
  background: var(--solid-bg);
  color: var(--solid-ink);
  font-size: 0.9rem;
  font-weight: 630;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-sm);
  transition:
    background-color 0.14s ease,
    transform 0.14s ease;
}
.btn-hero:hover {
  background: var(--solid-hover);
}
.btn-os-icon {
  display: inline-flex;
  align-items: center;
}
.btn-tag {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(128, 128, 120, 0.18);
  font-size: 0.74rem;
  font-weight: 580;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.btn-quiet {
  height: 44px;
  display: inline-flex;
  align-items: center;
  padding-inline: 16px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 560;
}
.btn-quiet:hover {
  background: var(--surface-hover);
}

.quick-os-dock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.dock-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--muted);
  transition:
    background-color 0.14s ease,
    color 0.14s ease;
}
.dock-btn:hover {
  background: var(--surface-hover);
  color: var(--ink);
}
.dock-more {
  height: 34px;
  display: inline-flex;
  align-items: center;
  padding-inline: 10px 12px;
  border-inline-start: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--muted);
}
.dock-more:hover {
  color: var(--ink);
}

/* Layered Product Stage (Desktop Workbench + Paired iPhone + Copper Hardware Glow) */
.stage-shell {
  position: relative;
  width: 100%;
  max-width: 1020px;
  margin-top: 52px;
  padding-top: 26px;
  padding-bottom: 18px;
  text-align: start;
}
.hero-art {
  position: absolute;
  inset: 0 6% auto 6%;
  height: 320px;
  border-radius: 24px;
  overflow: hidden;
  opacity: 0.42;
  filter: blur(1px) saturate(1.1);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 42%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 42%, #000 35%, transparent 100%);
  pointer-events: none;
}
:root[data-theme="light"] .hero-art {
  opacity: 0.18;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-art canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.workbench-window {
  position: relative;
  z-index: 1;
  width: min(880px, 100%);
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--window-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.wb-chrome {
  height: 38px;
  padding-inline: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--soft);
}
.wb-dots {
  display: flex;
  gap: 6px;
}
.wb-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.wb-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 540;
  white-space: nowrap;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  flex: none;
}
.idle-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--soft);
  opacity: 0.45;
  flex: none;
}

.wb-body {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 256px;
}
.wb-sidebar {
  padding: 14px 10px;
  border-inline-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.wb-group-label {
  padding: 8px 8px 4px;
  font-size: 0.69rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soft);
}
.wb-thread {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wb-thread.is-active {
  background: var(--surface-elevated);
  color: var(--ink);
  font-weight: 560;
}

.wb-main {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.wb-diff {
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--code-bg);
  overflow: hidden;
}
.wb-diff-head {
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  color: var(--muted);
}
.wb-diff-stat ins,
.phone-diff-mini ins {
  color: var(--live);
  text-decoration: none;
}
.wb-diff-stat del,
.phone-diff-mini del {
  color: var(--danger);
  text-decoration: none;
  margin-inline-start: 4px;
}
.wb-code {
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.62;
  color: var(--muted);
  overflow-x: auto;
}
.wb-code .ln {
  display: inline-block;
  width: 22px;
  color: var(--soft);
  user-select: none;
}
.wb-code .add {
  color: var(--live);
}
.wb-code .del {
  color: var(--danger);
}
.wb-composer {
  display: flex;
  gap: 7px;
  padding-top: 2px;
}
.wb-pill {
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  font-size: 0.73rem;
  font-weight: 560;
  color: var(--ink);
}
.wb-pill.muted {
  color: var(--muted);
}

.phone-card {
  position: absolute;
  right: 0;
  bottom: -6px;
  z-index: 2;
  width: 262px;
  padding: 14px 16px 16px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.phone-notch {
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
  margin: 0 auto 12px;
}
.phone-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.73rem;
  font-weight: 580;
  color: var(--muted);
}
.phone-prompt {
  margin-top: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.42;
  color: var(--ink);
}
.phone-diff-mini {
  margin-top: 10px;
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.73rem;
  color: var(--muted);
}
.phone-actions {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.phone-btn {
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}
.phone-btn.primary {
  border-color: transparent;
  background: var(--solid-bg);
  color: var(--solid-ink);
}

/* Protocol Hairline Bar */
.protocols {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.protocol-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  align-items: center;
  gap: 20px;
}
.protocol-inner h2 {
  font-size: 0.82rem;
  color: var(--soft);
  font-weight: 500;
}
.protocol-inner ul {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 0;
  list-style: none;
  text-align: center;
  font-size: 0.96rem;
  font-weight: 630;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.protocol-inner li + li {
  border-inline-start: 1px solid var(--line);
}

/* Architectural Swiss Grid */
.benefits {
  padding-block: 88px 72px;
}
.section-intro {
  max-width: 54ch;
}
.section-intro h2,
.closing-cta h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.85rem);
  line-height: 1.1;
  font-weight: 660;
  letter-spacing: -0.038em;
}
.editorial-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.editorial-cell {
  padding: 28px 32px 30px 0;
  border-bottom: 1px solid var(--line);
}
.editorial-cell:nth-child(even) {
  padding-inline-start: 32px;
  padding-inline-end: 0;
  border-inline-start: 1px solid var(--line);
}
.cell-index {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
  color: var(--soft);
  margin-bottom: 12px;
}
.editorial-cell h3 {
  font-size: 1.08rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin-bottom: 9px;
}
.editorial-cell p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.66;
}

.closing-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding-block: 44px 12px;
  border-top: 1px solid var(--line);
}
.closing-cta p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.98rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* ============================================================
   Download & Changelog — Precision 820px Hardware Ledger
   ============================================================ */
.ledger-page {
  padding-block: 52px 24px;
}
.dl-header,
.cl-header {
  margin-bottom: 28px;
}
.dl-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}
.ledger-title {
  font-size: clamp(2.15rem, 3.8vw, 2.95rem);
  line-height: 1.05;
  font-weight: 675;
  letter-spacing: -0.042em;
}
.ledger-meta {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}
.ledger-meta strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.ledger-meta a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}
.ledger-meta a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}
.ledger-subtitle {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.58;
}

/* Channel Segmented Pill */
.channel-pill {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.ch-btn {
  height: 30px;
  padding-inline: 14px;
  border-radius: 999px;
  font-size: 0.81rem;
  font-weight: 590;
  color: var(--muted);
  transition:
    background-color 0.14s ease,
    color 0.14s ease;
}
.ch-btn:hover {
  color: var(--ink);
}
.ch-btn.is-active {
  background: var(--solid-bg);
  color: var(--solid-ink);
}

/* Subtle Preview Strip & Detected Bar */
.preview-strip {
  margin-top: 16px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--accent-border);
  background: var(--accent-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 0.83rem;
  color: var(--ink);
}
.preview-strip strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.strip-action {
  color: var(--accent);
  font-weight: 620;
  white-space: nowrap;
}
.strip-action:hover {
  text-decoration: underline;
}

/* Ledger Panels & Hairline Rows */
.ledger-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ledger-panel {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
}
.panel-head {
  padding: 20px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 {
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.panel-head p {
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}
.panel-glyph {
  color: var(--soft);
  margin-top: 2px;
}

.ledger-rows {
  display: flex;
  flex-direction: column;
}
.ledger-row {
  padding: 15px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  transition: background-color 0.12s ease;
}
.ledger-row + .ledger-row {
  border-top: 1px solid var(--line);
}
.ledger-row:hover {
  background: color-mix(in srgb, var(--surface-hover) 55%, transparent);
}
.row-lead {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.os-glyph {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.row-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ledger-row h3 {
  font-size: 0.93rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.row-sub {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--soft);
  line-height: 1.45;
}
.inline-link {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  white-space: nowrap;
}
.inline-link:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

.subtle-tag {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding-inline: 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.subtle-tag.stable {
  background: var(--surface-elevated);
  color: var(--muted);
  border-color: var(--line-strong);
}
.detected-only {
  display: none;
}
.ledger-row.is-detected .detected-only {
  display: inline-flex;
}
.ledger-row.is-detected .os-glyph {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.pill-action {
  height: 32px;
  padding-inline: 13px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.81rem;
  font-weight: 610;
  white-space: nowrap;
  transition:
    background-color 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}
.pill-action.solid,
.pill-action.primary {
  background: var(--solid-bg);
  color: var(--solid-ink);
}
.pill-action.solid:hover,
.pill-action.primary:hover {
  background: var(--solid-hover);
}
.pill-action.primary {
  height: 36px;
  padding-inline: 15px;
}
.pill-action.quiet {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
}
.pill-action.quiet:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.pill-size {
  font-size: 0.72rem;
  font-weight: 520;
  opacity: 0.66;
}

.status-pill {
  height: 32px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-elevated);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.79rem;
  font-weight: 570;
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eab308;
  flex: none;
}

.quickstart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.qs-step {
  padding: 18px 22px 20px;
}
.qs-step + .qs-step {
  border-inline-start: 1px solid var(--line);
}
.qs-step .cell-index {
  margin-bottom: 8px;
}
.qs-step h3 {
  font-size: 0.92rem;
  font-weight: 630;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.qs-step p {
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.54;
}

.sha-chip {
  height: 28px;
  padding-inline: 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--code-bg);
  color: var(--soft);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.71rem;
  white-space: nowrap;
}
.sha-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.sha-chip[data-copied="true"],
.cmd-pill[data-copied="true"] {
  border-color: var(--live);
  color: var(--live);
}

/* Inline Command Pill (Server & Source rows) */
.cmd-pill {
  max-width: 508px;
  height: 34px;
  padding-inline: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--code-bg);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.725rem;
  transition:
    border-color 0.14s ease,
    color 0.14s ease;
}
.cmd-pill:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.cmd-pill code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cmd-dollar {
  color: var(--soft);
  user-select: none;
}
.cmd-copy-icon {
  color: var(--soft);
  display: inline-flex;
}
.cmd-pill:hover .cmd-copy-icon {
  color: var(--ink);
}

.ledger-footnote {
  margin-top: 8px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--soft);
}
.ledger-footnote a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
  margin-inline: 3px;
}
.ledger-footnote a:hover {
  color: var(--ink);
}

/* ============================================================
   Changelog — Sticky Two-Column Editorial Stream
   ============================================================ */
.cl-stream,
.cl-live-stream {
  display: flex;
  flex-direction: column;
}
.cl-row {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 28px;
  padding-block: 28px;
  border-top: 1px solid var(--line);
}
.cl-rail {
  position: sticky;
  top: 80px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cl-ver-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cl-rail h2,
.cl-rail h3 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.cl-date {
  font-size: 0.78rem;
  color: var(--soft);
}
.cl-rail-link {
  font-size: 0.78rem;
  color: var(--muted);
}
.cl-rail-link:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cl-body {
  min-width: 0;
}
.cl-lead {
  font-size: 0.91rem;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 10px;
}
.cl-lead a,
.cl-bullets a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.cl-lead a:hover,
.cl-bullets a:hover {
  text-decoration-color: var(--ink);
}
.cl-bullets {
  padding-inline-start: 18px;
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.66;
}
.cl-bullets strong {
  color: var(--ink);
}
.cl-bullets code,
.cl-lead code {
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--code-bg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.83em;
  color: var(--ink);
}

.missing {
  min-height: 56vh;
  padding-block: 72px;
}
.missing .actions {
  margin-top: 24px;
}

/* Footer */
.footer {
  margin-top: 72px;
  min-height: 80px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--soft);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.82rem;
}
.footer-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover {
  color: var(--ink);
}

/* Responsive */
@media (max-width: 960px) {
  .frame {
    width: calc(100% - 44px);
  }
  .phone-card {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 14px auto 0;
  }
  .wb-body {
    grid-template-columns: 1fr;
  }
  .wb-sidebar {
    display: none;
  }
}

@media (max-width: 720px) {
  .frame,
  .ledger-container {
    width: calc(100% - 32px);
  }
  .header-inner {
    min-height: 0;
    flex-wrap: wrap;
    padding-block: 10px 8px;
    gap: 8px;
  }
  .navigation {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
    font-size: 0.8rem;
  }
  .nav-divider,
  .nav-icon-link span {
    display: none;
  }
  .hero-ambient {
    padding-block: 44px 48px;
  }
  .protocol-inner {
    grid-template-columns: 1fr;
    padding-block: 16px;
    gap: 10px;
  }
  .protocol-inner ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: start;
    gap: 8px;
  }
  .protocol-inner li + li {
    border: 0;
  }
  .editorial-grid {
    grid-template-columns: 1fr;
  }
  .editorial-cell,
  .editorial-cell:nth-child(even) {
    padding: 22px 0;
    border-inline-start: 0;
  }
  .ledger-row,
  .ledger-row--cmd {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }
  .panel-head {
    padding: 18px;
  }
  .row-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .cmd-pill {
    max-width: 100%;
    width: 100%;
    justify-content: space-between;
  }
  .quickstart-grid {
    grid-template-columns: 1fr;
  }
  .qs-step {
    padding: 16px 18px;
  }
  .qs-step + .qs-step {
    border-inline-start: 0;
    border-top: 1px solid var(--line);
  }
  .cl-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 22px;
  }
  .cl-rail {
    position: static;
  }
}
