:root,
:root[data-theme="light"] {
  color-scheme: light;
  --page: #f7f8f4;
  --surface: #ffffff;
  --surface-soft: #eef3ef;
  --surface-muted: #f4f1ea;
  --ink: #172019;
  --muted: #5c6a60;
  --line: #d7dfd7;
  --accent: #14784b;
  --accent-strong: #0e5d39;
  --blue: #2a61a8;
  --amber: #a56a17;
  --danger: #b44949;
  --hero-fg: #ffffff;
  --hero-muted: rgba(255, 255, 255, 0.78);
  --shadow: 0 18px 42px rgba(29, 44, 34, 0.12);
  --terminal-bg: #101816;
  --terminal-fg: #ddf8e8;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #101412;
  --surface: #171d1a;
  --surface-soft: #1d2722;
  --surface-muted: #212019;
  --ink: #edf6ef;
  --muted: #a8b7ac;
  --line: #2f3b34;
  --accent: #58d68d;
  --accent-strong: #77e7a5;
  --blue: #82aef5;
  --amber: #e5bb62;
  --danger: #ff9494;
  --hero-fg: #ffffff;
  --hero-muted: rgba(255, 255, 255, 0.76);
  --shadow: 0 16px 38px rgba(0, 0, 0, 0.3);
  --terminal-bg: #050807;
  --terminal-fg: #ddf8e8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #ffffff;
  background: var(--accent);
}

button,
select,
a {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 14px;
  z-index: 30;
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: max-content;
}

.site-header__tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: #153c2c;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
}

.brand-text {
  font-weight: 900;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: currentColor;
}

.top-nav,
.header-actions,
.theme-switch,
.github-link,
.lang-switch {
  display: flex;
  align-items: center;
}

.top-nav {
  gap: 15px;
}

.top-nav a,
.doc-card__action,
.text-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: color 0.18s ease;
}

.top-nav a:hover,
.doc-card:hover .doc-card__action,
.text-link:hover {
  color: var(--accent);
}

.header-actions {
  gap: 10px;
}

.lang-switch {
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.lang-switch select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  padding: 0 30px 0 10px;
  cursor: pointer;
}

.theme-switch {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.theme-switch__btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.theme-switch__btn.is-active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.github-link {
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  color: #ffffff;
  background: #172019;
  font-weight: 900;
  text-decoration: none;
}

:root[data-theme="dark"] .github-link {
  color: #111713;
  background: #edf6ef;
}

.hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 540px;
  margin: 18px auto 0;
  display: flex;
  align-items: flex-end;
  border-radius: 8px;
  overflow: hidden;
  color: var(--hero-fg);
  background:
    linear-gradient(90deg, rgba(8, 14, 12, 0.96) 0%, rgba(8, 14, 12, 0.86) 50%, rgba(8, 14, 12, 0.62) 100%);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: url("assets/dsa-webui.png") center / cover no-repeat;
  filter: blur(18px) saturate(1.05) brightness(0.7);
  transform: scale(1.08);
  z-index: -1;
}

.hero__content {
  width: min(820px, 100%);
  padding: 54px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid rgba(20, 120, 75, 0.28);
  border-radius: 6px;
  color: var(--accent-strong);
  background: rgba(20, 120, 75, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.hero .eyebrow {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.hero h1 {
  margin: 16px 0 14px;
  color: #ffffff;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 64px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero h1 span {
  color: #9ee6bd;
}

.hero-desc {
  margin: 0;
  max-width: 760px;
  color: var(--hero-muted);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: var(--accent-strong);
  box-shadow: 0 12px 24px rgba(20, 120, 75, 0.26);
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.hero .btn-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.hero-badges li {
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.section:nth-of-type(even) {
  background: var(--surface-muted);
}

.section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-head {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-head--split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.section h2,
.docs-hero h1 {
  margin: 10px 0 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: 0;
}

.section-lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.78;
}

.quick-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: 28px;
  align-items: start;
}

.command-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.command-tab {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.command-tab.is-active {
  color: #ffffff;
  background: var(--accent-strong);
}

.quick-console {
  min-width: 0;
}

.command-panel {
  min-height: 220px;
  margin: 0;
  padding: 18px;
  overflow: auto;
  border-radius: 8px;
  color: var(--terminal-fg);
  background: var(--terminal-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font: 600 13px/1.78 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.summary-metrics article {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.summary-metrics strong {
  display: block;
  color: var(--ink);
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 24px;
  line-height: 1;
}

.summary-metrics span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.capability-card,
.sample-card,
.doc-card,
.visual-card,
.workflow-list li,
.docs-list,
.doc-content,
.callout,
.code-card,
.decision-preview article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.capability-card {
  min-height: 220px;
  padding: 22px;
}

.capability-card span,
.workflow-list span {
  display: inline-grid;
  width: 36px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  color: var(--accent-strong);
  background: rgba(20, 120, 75, 0.12);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 900;
}

.capability-card h3,
.workflow-list h3,
.visual-card h3,
.sample-card h3,
.doc-card h3 {
  margin: 16px 0 0;
  font-size: 21px;
  line-height: 1.28;
}

.capability-card p,
.workflow-list p,
.visual-card p,
.doc-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.72;
}

.workflow-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  position: relative;
  min-height: 230px;
  padding: 18px;
}

.workflow-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 33px;
  right: -10px;
  width: 10px;
  height: 1px;
  background: var(--line);
}

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

.visual-card {
  overflow: hidden;
  position: relative;
}

.visual-card--large {
  grid-row: span 2;
}

.visual-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 0;
}

.visual-card__head h3 {
  margin: 0 !important;
  padding: 0 !important;
}

.visual-flag {
  flex-shrink: 0;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.visual-flag--daily {
  background: rgba(20, 120, 75, 0.14);
  border-color: rgba(20, 120, 75, 0.3);
  color: var(--accent-strong);
}

.visual-flag--ondemand {
  background: rgba(192, 70, 58, 0.12);
  border-color: rgba(192, 70, 58, 0.3);
  color: #c0463a;
}

.visual-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.visual-card--large img {
  aspect-ratio: 4 / 5;
}

.visual-mock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(180deg, var(--surface-soft), var(--surface));
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}

.visual-card--large .visual-mock {
  min-height: 360px;
}

.vm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vm-tag {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(20, 120, 75, 0.12);
  color: var(--accent-strong);
}

.vm-code {
  font-family: "Space Grotesk", monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
}

.vm-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.vm-score-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  margin-left: auto;
  line-height: 1.1;
}

.vm-score {
  font-family: "Space Grotesk", monospace;
  font-size: 22px;
  font-weight: 900;
  color: var(--accent-strong);
}

.vm-score-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 2px;
  text-transform: uppercase;
}

.vm-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vm-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
}

.vm-pill--buy {
  background: rgba(20, 120, 75, 0.12);
  border-color: rgba(20, 120, 75, 0.3);
  color: var(--accent-strong);
}

.vm-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vm-label {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.vm-label--risk {
  color: #c0463a;
}

.vm-label--good {
  color: var(--accent-strong);
}

.vm-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.vm-stats {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.vm-stats--3 {
  grid-template-columns: repeat(3, 1fr);
}

.vm-stats--2 {
  grid-template-columns: repeat(2, 1fr);
}

.vm-stats > div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vm-stat-label {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.vm-stats strong {
  font-family: "Space Grotesk", monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.vm-light {
  font-size: 14px;
}

.vm-light--green {
  color: #1a9b5b;
}

.vm-light--red {
  color: #c0463a;
}

.vm-temp {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.vm-temp strong {
  font-family: "Space Grotesk", monospace;
  font-weight: 800;
  color: var(--text);
  font-size: 13px;
}

.vm-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

[data-theme="dark"] .vm-bar {
  background: rgba(255, 255, 255, 0.08);
}

.vm-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3aa672, var(--accent-strong));
  border-radius: 3px;
}

.vm-indices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.vm-indices > div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}

.vm-indices strong {
  font-family: "Space Grotesk", monospace;
  font-size: 14px;
  font-weight: 800;
}

.vm-up { color: #c0463a; }
.vm-down { color: #1a9b5b; }
.vm-up-us { color: #1a9b5b; }
.vm-down-us { color: #c0463a; }

.vm-strats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vm-strats li {
  display: grid;
  grid-template-columns: 84px 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.vm-strats strong {
  font-family: "Space Grotesk", monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  text-align: right;
}

.vm-conclusion {
  margin: 0;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.visual-card h3,
.visual-card p {
  padding-inline: 18px;
}

.visual-card p {
  padding-bottom: 18px;
}

.sample-source {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.sample-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.sample-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.sample-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--amber);
}

.sample-card--up::before {
  background: var(--accent);
}

.sample-card--down::before {
  background: var(--danger);
}

.sample-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.sample-card__market,
.sample-card__sector,
.doc-card__tag {
  display: inline-flex;
  margin: 0 6px 6px 0;
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--accent-strong);
  background: rgba(20, 120, 75, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.sample-card__sector {
  color: var(--muted);
  background: var(--surface-soft);
}

.sample-score {
  min-width: 68px;
  min-height: 68px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.sample-score strong {
  display: block;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 26px;
  line-height: 1;
}

.sample-score span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.sample-card__code {
  margin: 4px 0 0;
  color: var(--muted);
  font-family: "Space Grotesk", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 800;
}

.sample-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.sample-meta span {
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
}

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

.sample-summary {
  margin: 14px 0 0;
  color: var(--ink);
  line-height: 1.72;
  font-weight: 700;
}

.sample-insights {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.sample-insights p {
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  line-height: 1.62;
}

.sample-insights span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.sample-card__source,
.sample-note {
  color: var(--muted);
  line-height: 1.68;
}

.sample-card__source {
  margin: 14px 0 0;
  font-size: 12px;
}

.sample-note {
  margin: 14px 0 0;
  font-size: 13px;
}

.up {
  color: var(--accent-strong);
}

.flat {
  color: var(--amber);
}

.down {
  color: var(--danger);
}

.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.doc-card {
  min-height: 210px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.doc-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.doc-card__action {
  display: inline-flex;
  margin-top: 16px;
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 34px;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.docs-page .site-header {
  margin-bottom: 18px;
}

.docs-hero.hero {
  min-height: auto;
  align-items: flex-start;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: 46px;
  display: block;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.docs-hero h1 {
  color: var(--ink);
}

.docs-hero .hero-desc {
  max-width: 780px;
  color: var(--muted);
}

.docs-hero .btn-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-soft);
}

.docs-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 22px auto 42px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
}

.docs-list,
.doc-content {
  padding: 18px;
}

.docs-list {
  align-self: start;
  position: sticky;
  top: 104px;
}

.docs-list h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.doc-button {
  width: 100%;
  display: block;
  margin: 8px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-soft);
  text-align: left;
  cursor: pointer;
}

.doc-button.is-active {
  border-color: var(--accent);
  background: rgba(20, 120, 75, 0.12);
}

.doc-button span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.doc-content h1 {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: 40px;
  line-height: 1.16;
}

.doc-content .lead {
  color: var(--muted);
  line-height: 1.78;
}

.doc-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.doc-section h2 {
  margin: 0 0 8px;
}

.doc-section p,
.doc-section li {
  color: var(--muted);
  line-height: 1.78;
}

.doc-section ul {
  padding-left: 20px;
}

.code-card {
  margin-top: 14px;
  overflow: hidden;
}

.code-card pre {
  margin: 0;
  padding: 16px;
  overflow: auto;
  color: var(--terminal-fg);
  background: var(--terminal-bg);
  font: 500 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.callout {
  margin-top: 18px;
  padding: 14px;
  color: var(--muted);
}

@media (max-width: 1080px) {
  .site-header,
  .site-header__tools,
  .top-nav,
  .header-actions {
    align-items: flex-start;
  }

  .site-header {
    flex-direction: column;
  }

  .site-header__bar {
    width: 100%;
  }

  .site-header__tools {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: 8px;
  }

  .site-header.is-open .site-header__tools {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .top-nav,
  .header-actions {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 500px;
  }

  .hero__content {
    padding: 42px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .quick-grid,
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .capability-grid,
  .workflow-list,
  .doc-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workflow-list li:not(:last-child)::after {
    display: none;
  }

  .docs-list {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header,
  .hero,
  .section-inner,
  .docs-hero.hero,
  .docs-shell,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .brand-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    gap: 8px;
  }

  .hero {
    min-height: 430px;
    background:
      linear-gradient(0deg, rgba(8, 14, 12, 0.94), rgba(8, 14, 12, 0.7));
  }

  .hero::before {
    inset: -30px;
    filter: blur(20px) saturate(1.05) brightness(0.65);
  }

  .hero__content,
  .docs-hero.hero {
    padding: 28px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .section {
    padding: 42px 0;
  }

  .section h2,
  .docs-hero h1,
  .doc-content h1 {
    font-size: 30px;
  }

  .section-head--split {
    display: block;
  }

  .section-head--split .btn,
  .sample-source {
    margin-top: 14px;
  }

  .summary-metrics,
  .capability-grid,
  .workflow-list,
  .visual-grid,
  .sample-card-grid,
  .doc-card-grid {
    grid-template-columns: 1fr;
  }

  .sample-source {
    display: inline-flex;
    white-space: normal;
  }
}
