:root {
  --bg: #070b14;
  --bg-elevated: #0f1629;
  --bg-surface: #131a2e;
  --bg-code: #05080f;
  --text: #e8edf7;
  --text-soft: #cbd5e1;
  --muted: #8b9cb3;
  --faint: #5e6d85;
  --accent: #38bdf8;
  --accent-dim: rgba(56, 189, 248, 0.14);
  --accent2: #a78bfa;
  --accent2-dim: rgba(167, 139, 250, 0.12);
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.22);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

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

html {
  /* Sticky site header + in-page anchors */
  scroll-padding-top: 5.75rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.08), transparent 30%),
    linear-gradient(180deg, #08101d 0%, var(--bg) 24%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

pre,
code,
a,
p,
li {
  overflow-wrap: anywhere;
}

.wrap {
  width: min(1200px, calc(100% - 4rem));
  margin: 0 auto;
}

/* Narrower reading column for main sections (editorial lane + gutters) */
.wrap-content {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.wrap-header {
  max-width: min(52rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--accent2);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
ul,
pre {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 0.85rem;
  font-size: clamp(1.85rem, 4vw, 2.4rem);
}

h3 {
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}

p,
ul {
  color: var(--text-soft);
}

ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

li + li {
  margin-top: 0.45rem;
}

li::marker {
  color: var(--accent);
}

.inline-code {
  display: inline-block;
  padding: 0.08rem 0.38rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(15, 22, 41, 0.95);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88em;
}

pre {
  margin-bottom: 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-x: auto;
}

pre code {
  font-family: inherit;
  color: inherit;
}

/* Copy control: floating icon on hover / focus-within (script adds .code-copy-wrap) */
.code-copy-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.code-copy-toolbar {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.code-context-badge {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: rgba(15, 22, 41, 0.92);
  color: var(--muted);
  line-height: 1.2;
  user-select: none;
  white-space: nowrap;
}

.code-context-badge--claude {
  color: #ddd6fe;
  border-color: rgba(139, 92, 246, 0.4);
  background: rgba(76, 29, 149, 0.22);
}

.code-context-badge--bash {
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(20, 83, 45, 0.25);
}

.code-copy-wrap pre {
  padding-right: 2.75rem;
}

.code-copy-wrap--labeled pre,
.code-copy-wrap--labeled.code-copy-wrap--code > code {
  padding-right: 6.5rem;
}

.code-copy-btn {
  position: relative;
  top: auto;
  right: auto;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  background: rgba(15, 22, 41, 0.92);
  color: var(--muted);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.code-copy-btn svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.code-copy-wrap:hover .code-copy-btn,
.code-copy-wrap:focus-within .code-copy-btn {
  opacity: 1;
  pointer-events: auto;
}

.code-copy-btn:hover,
.code-copy-btn:focus-visible {
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
}

.code-copy-btn.is-copied {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.35);
  background: rgba(74, 222, 128, 0.08);
}

@media (hover: none) {
  .code-copy-btn {
    opacity: 0.8;
    pointer-events: auto;
  }
}

/* Block <code> in command example (wrapped by script) */
.code-copy-wrap.code-copy-wrap--code > code {
  padding-right: 2.75rem;
}

.command-example-step .code-copy-wrap {
  margin: 0;
}

.detail-card .code-copy-wrap {
  margin: 0;
}

.detail-card .code-copy-wrap pre {
  margin: 0;
}

.detail-card .code-copy-wrap + .code-copy-wrap {
  margin-top: 0.65rem;
}

.site-header,
.hero-section,
.feature-section,
.detail-section,
.site-footer {
  position: relative;
}

.hero-section,
.feature-section,
.detail-section,
.commands-section {
  scroll-margin-top: 1.5rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(10px);
}

.site-header-bar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  padding: 1rem 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-lockup:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  color: var(--text);
}

.brand-mark svg,
.brand-mark-img {
  width: 100%;
  height: 100%;
  display: block;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.7rem;
  margin-left: 0;
  font-size: 1rem;
}

.site-nav a {
  padding: 0.55rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  text-decoration: none;
  color: var(--text);
  background: var(--accent-dim);
  border-color: rgba(56, 189, 248, 0.26);
}

.hero-section {
  padding: 4.5rem 0 3.5rem;
}

.hero-stack {
  max-width: 46rem;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.15rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: var(--accent2-dim);
  border: 1px solid rgba(167, 139, 250, 0.22);
  color: #ddd6fe;
  font-size: 0.82rem;
  font-weight: 600;
}

.hero-stack h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 0.95;
}

.hero-outcome {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hero-outcome strong {
  color: var(--text);
}

.hero-lead {
  margin-bottom: 0.85rem;
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  line-height: 1.2;
  color: var(--text);
  max-width: none;
}

.hero-body {
  margin-bottom: 1.15rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.install-shell,
.terminal-card,
.detail-card,
.feature-card,
.lineage-note {
  background: linear-gradient(180deg, rgba(19, 26, 46, 0.98), rgba(15, 22, 41, 0.98));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.install-shell {
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%;
}

.lineage-note + .install-shell {
  margin-top: 1.15rem;
}

.install-shell + .slash-commands-hero {
  margin-top: 1.15rem;
}

.slash-commands-hero {
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
}

.slash-commands-hero .hero-body {
  margin-bottom: 0;
}

.slash-commands-hero + .terminal-card {
  margin-top: 1.15rem;
}

.install-shell-top {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}

.hero-story {
  margin-top: 1.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
}

.hero-story-label {
  margin-bottom: 0.8rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-story-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.story-step {
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(19, 26, 46, 0.58);
}

.story-step-title {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.story-step pre {
  padding: 0.85rem 0.95rem;
  font-size: 0.8rem;
}

.hero-story-note {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  font-weight: 600;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  text-decoration: none;
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #04111d;
  border-color: transparent;
}

.button-secondary {
  background: transparent;
  color: var(--text);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--accent-dim);
  border-color: rgba(56, 189, 248, 0.28);
}

.terminal-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

.terminal-top {
  display: flex;
  gap: 0.45rem;
  padding: 0.9rem 1rem 0;
}

.terminal-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal-dot-red {
  background: #fb7185;
}

.terminal-dot-amber {
  background: #fbbf24;
}

.terminal-dot-green {
  background: #4ade80;
}

.terminal-body {
  padding-top: 0.85rem;
  border: 0;
  background: transparent;
  color: #d5f8e5;
}

.feature-section {
  padding: 2.75rem 0 3.25rem;
}

.detail-section {
  padding: 2rem 0 3.75rem;
}

.section-intro {
  max-width: 42rem;
  margin-bottom: 1.5rem;
  color: var(--muted);
}

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

.feature-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.25rem;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.feature-card:hover,
.feature-card:focus-visible {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.28);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.12), var(--shadow-lg);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: var(--accent-dim);
  color: var(--accent);
}

.feature-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.feature-card h3 {
  margin-bottom: 0.65rem;
  color: var(--text);
}

.feature-card p {
  margin-bottom: 1rem;
  color: var(--muted);
}

.feature-link {
  margin-top: auto;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.detail-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.85rem 1.65rem;
  border-radius: var(--radius);
  scroll-margin-top: 1.5rem;
}

.detail-card p,
.detail-card ul,
.detail-card pre,
.detail-card .detail-note,
.detail-card .flow-list,
.detail-card .viewer-preview,
.detail-card .command-story,
.detail-card .command-list,
.detail-card .support-note-list {
  margin: 0;
}

.detail-heading {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0;
}

.detail-kicker {
  color: var(--accent2);
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 700;
}

.detail-card h3 {
  margin-bottom: 0;
}

.detail-card > h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.detail-card > h5.slash-group-title {
  margin: 1.35rem 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
}

.detail-card > h5.slash-group-title:first-of-type {
  margin-top: 0;
}

.detail-card > p.slash-group-note {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
  max-width: 44rem;
}

.detail-card > h5.slash-group-title + p.slash-group-note {
  margin-top: -0.15rem;
}

.commands-dl dt a {
  color: inherit;
  text-decoration: none;
}

.commands-dl dt a:hover,
.commands-dl dt a:focus-visible {
  text-decoration: underline;
}

.commands-dl dt a code {
  color: var(--accent);
}

.detail-card p {
  color: var(--text-soft);
}

.detail-card pre {
  margin: 0;
}

.detail-note {
  margin-top: 1rem;
  color: var(--muted);
}

.detail-card .detail-note {
  margin-top: 0;
}

.flow-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.45rem 0.55rem;
  flex-wrap: nowrap;
  margin: 1rem 0;
  width: 100%;
}

.flow-list--ingest .flow-step {
  flex: 1 1 0;
  min-width: 0;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.65rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.45);
  color: var(--text);
}

.flow-step-title {
  display: block;
  font-weight: 600;
  line-height: 1.2;
  font-size: clamp(0.74rem, 1.15vw + 0.52rem, 0.98rem);
}

.flow-step-desc {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.35;
  font-size: clamp(0.62rem, 0.95vw + 0.38rem, 0.84rem);
  overflow-wrap: anywhere;
  hyphens: auto;
  max-width: 100%;
}

.flow-arrow {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: var(--accent);
}

.flow-arrow svg {
  width: clamp(0.85rem, 1.5vw, 1.05rem);
  height: clamp(0.85rem, 1.5vw, 1.05rem);
}

/* Mini mock of templates/site viewer (build-site output) */
.viewer-preview {
  margin: 1.25rem 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-md);
}

.viewer-preview-chrome {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.viewer-preview-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  padding: 0.45rem 0.65rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-soft);
}

.viewer-ph-logo {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 5px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  flex-shrink: 0;
  opacity: 0.95;
}

.viewer-ph-brand {
  flex-shrink: 0;
  color: var(--text);
  letter-spacing: -0.02em;
  font-size: 0.72rem;
}

.viewer-ph-search {
  flex: 1;
  min-width: 0;
  margin-left: 0.15rem;
  padding: 0.28rem 0.5rem 0.28rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--faint);
  font-weight: 500;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-ph-kbd {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: var(--faint);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.5);
}

.viewer-ph-badge {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: var(--accent-dim);
}

.viewer-preview-main {
  display: grid;
  grid-template-columns: minmax(5.5rem, 22%) minmax(0, 1fr) minmax(6.5rem, 30%);
  flex: 1;
  min-height: 168px;
}

.viewer-sidebar {
  padding: 0.45rem 0.4rem 0.55rem;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  overflow: hidden;
}

.viewer-sidebar-label {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
  padding-left: 0.15rem;
}

.viewer-tree {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.45;
  color: var(--text-soft);
}

.viewer-tree li {
  margin: 0;
  padding: 0.06rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-tree .tree-folder {
  color: var(--muted);
  font-weight: 600;
}

.viewer-tree .tree-nested {
  padding-left: 0.45rem;
  border-left: 1px solid var(--border);
  margin-left: 0.35rem;
}

.viewer-tree .tree-file {
  color: var(--text-soft);
}

.viewer-tree .tree-file-accent {
  color: var(--accent);
  font-weight: 600;
}

.viewer-graph {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.25rem;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, rgba(56, 189, 248, 0.1), transparent 70%),
    linear-gradient(180deg, #0a1020 0%, #070b14 100%);
}

.viewer-graph-svg {
  width: 100%;
  max-width: 11rem;
  height: auto;
  aspect-ratio: 1.2 / 1;
}

.viewer-edge {
  stroke: rgba(148, 163, 184, 0.35);
  stroke-width: 1.25;
}

.viewer-node {
  fill: var(--accent);
  stroke: rgba(7, 11, 20, 0.9);
  stroke-width: 1.5;
}

.viewer-node-alt {
  fill: var(--accent2);
}

.viewer-node-root {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.45));
}

.viewer-graph-stats {
  font-family: var(--mono);
  font-size: 0.55rem;
  color: var(--faint);
  letter-spacing: 0.02em;
}

.viewer-reader {
  padding: 0.45rem 0.5rem 0.55rem;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
  overflow: hidden;
}

.viewer-reader-kicker {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.viewer-reader-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-reader-body {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.viewer-line {
  display: block;
  height: 0.28rem;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(232, 237, 247, 0.14), rgba(232, 237, 247, 0.06));
  width: 100%;
}

.viewer-line-lg {
  width: 92%;
}

.viewer-line-sm {
  width: 64%;
}

.viewer-reader-linked {
  margin-top: 0.15rem;
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--muted);
}

.viewer-reader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.viewer-tag {
  font-family: var(--mono);
  font-size: 0.52rem;
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent);
}

.viewer-tag-alt {
  background: var(--accent2-dim);
  border-color: rgba(167, 139, 250, 0.22);
  color: var(--accent2);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1rem 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.35rem 0.72rem;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
}

.command-story {
  margin: 1.15rem 0 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(7, 11, 20, 0.36);
}

.command-story-header {
  margin-bottom: 0.9rem;
}

.command-story-header h4,
.command-group h4 {
  margin: 0 0 0.3rem;
  color: var(--text);
  font-size: 0.98rem;
}

.command-story-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.command-example {
  display: grid;
  gap: 0.7rem;
}

.command-example-step {
  display: grid;
  gap: 0.35rem;
}

.command-example-label {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.command-example-step code {
  display: block;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-code);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.8rem;
  overflow-x: auto;
}

.command-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.command-group {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(19, 26, 46, 0.5);
}

.command-group ul {
  color: var(--muted);
}

.support-note-list {
  margin-top: 1rem;
}

.support-note-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.lineage-note {
  margin-top: 2.75rem;
  padding: 1.2rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(167, 139, 250, 0.18);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.08), rgba(15, 22, 41, 0.96));
}

.commands-section {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.commands-section .section-intro {
  margin-bottom: 1.75rem;
}

.commands-stack {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.commands-group-title {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.commands-dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.commands-dl dt {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.45;
}

.commands-dl dd {
  margin: 0.35rem 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.commands-dl code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text-soft);
}

.lineage-quote {
  margin: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-style: italic;
  line-height: 1.5;
}

.lineage-attrib,
.lineage-thanks,
.lineage-note p {
  margin-top: 0.8rem;
  margin-bottom: 0;
  color: var(--muted);
}

.lineage-attrib {
  font-size: 0.9rem;
}

.lineage-attrib cite {
  font-style: normal;
}

.lineage-sub {
  opacity: 0.9;
}

.lineage-thanks a {
  color: var(--text-soft);
}

.lineage-thanks a:hover,
.lineage-thanks a:focus-visible {
  color: var(--accent);
}

.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.site-footer a {
  color: var(--text-soft);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent);
}

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

  .command-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .site-header-bar {
    align-items: center;
    gap: 0.9rem;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-section {
    padding-top: 2.5rem;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    margin-right: 0;
  }

  .detail-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .viewer-preview-chrome {
    min-height: 200px;
  }

  .viewer-preview-header {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .viewer-ph-search {
    order: 5;
    flex: 1 1 100%;
    margin-left: 0;
  }

  .viewer-ph-kbd {
    display: none;
  }

  .viewer-preview-main {
    grid-template-columns: minmax(4.5rem, 26%) minmax(0, 1fr) minmax(5.5rem, 32%);
    min-height: 150px;
  }

  .viewer-graph-svg {
    max-width: 9rem;
  }

  .flow-list {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .flow-list--ingest .flow-step {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .flow-arrow {
    align-self: center;
    transform: rotate(90deg);
  }

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

@media (max-width: 479px) {
  .wrap {
    width: min(1280px, calc(100% - 1.2rem));
  }

  .site-nav {
    gap: 0.4rem;
    width: 100%;
  }

  .site-nav a,
  .feature-card,
  .detail-card,
  .install-shell-top,
  .terminal-body,
  pre {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .feature-card,
  .detail-card {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .hero-stack h1 {
    font-size: clamp(2.3rem, 15vw, 3rem);
  }
}

/* Memory hub (docs/memory/index.html) */
.memory-hub-articles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.memory-hub-articles .detail-heading h2 {
  font-size: 1.25rem;
}

.memory-hub-back {
  margin-top: 1.5rem;
}

/* Tighter spacing than hero .lineage-note (2.75rem) */
.memory-hub-lineage {
  margin-top: 1.5rem;
}

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

.memory-hub-cta {
  margin-bottom: 1rem;
}

.memory-hub-cta .button {
  display: inline-block;
}

.memory-metrics-section {
  margin-top: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 1.5rem;
}

.memory-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.memory-metrics-grid--loading .memory-metrics-figure {
  opacity: 0.55;
  animation: memory-metrics-pulse 1.15s ease-in-out infinite alternate;
}

.memory-metrics-grid--error .memory-metrics-figure {
  animation: none;
  opacity: 0.4;
}

@keyframes memory-metrics-pulse {
  from {
    opacity: 0.42;
  }

  to {
    opacity: 0.78;
  }
}

@media (max-width: 900px) {
  .memory-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.memory-metrics-figure {
  margin: 0;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(19, 26, 46, 0.45);
}

.memory-externals-card {
  margin-top: 1.5rem;
}

.memory-externals-heading {
  font-size: 1.1rem;
}

.memory-externals-list {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.memory-peer-lme-card {
  margin-top: 1.5rem;
}

.memory-peer-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 0;
}

.memory-peer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.memory-peer-table th,
.memory-peer-table td {
  border: 1px solid var(--border);
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: top;
}

.memory-peer-table th {
  font-weight: 600;
  color: var(--text);
  background: rgba(19, 26, 46, 0.35);
}
