@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #0f1419;
  --bg-deep: #0a0e12;
  --fg: #e7ecf1;
  --muted: #9aa7b5;
  --accent: #3d9cf0;
  --accent-soft: #7eb8f0;
  --card: #1a222c;
  --border: #243040;
  --light: #f4f7fa;
  --light-fg: #15202b;
  --light-muted: #5a6b7c;
  --light-border: #d7e0ea;
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1080px;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--fg);
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent); }
a:hover { color: var(--accent-soft); }

/* —— chrome —— */
.announce {
  background: #1a3a5c;
  color: var(--fg);
  text-align: center;
  font-size: 0.875rem;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #2a4a6c;
}
.announce a { color: var(--accent-soft); font-weight: 600; text-decoration: none; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  max-width: calc(var(--max) + 3rem);
  margin: 0 auto;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--fg);
  letter-spacing: -0.02em;
}
.brand-mark {
  display: block;
  width: 28px;
  height: auto;
  border-radius: 4px;
  background: #f2f2f0;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem 1.1rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a.active { color: var(--accent-soft); }
.nav-cta {
  color: var(--fg) !important;
  font-weight: 600 !important;
  white-space: nowrap;
}
.nav-cta::after { content: " →"; }

@media (max-width: 820px) {
  .site-header { flex-wrap: wrap; }
  .site-nav { width: 100%; justify-content: flex-start; }
}

/* —— hero bands —— */
.band-dark {
  background:
    radial-gradient(900px 420px at 12% -20%, #1a3050 0%, transparent 55%),
    var(--bg);
  color: var(--fg);
}
.band-light {
  background: var(--light);
  color: var(--light-fg);
}
.band-light a { color: #1f6fb8; }
.band-light a:hover { color: #155a98; }
.band-light .muted { color: var(--light-muted); }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.page-hero .wrap { padding-top: 3.25rem; padding-bottom: 3.25rem; }
.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.page-hero .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 40rem;
  margin: 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--accent);
  color: var(--accent-soft);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 1rem;
  line-height: 1.2;
  width: fit-content;
  max-width: 100%;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.hero-copy h1 {
  font-size: clamp(2.6rem, 6vw, 3.8rem);
  margin: 0 0 1rem;
  letter-spacing: -0.035em;
  line-height: 1.08;
  width: 100%;
}
.hero-points {
  margin: 0 0 1.5rem;
  padding-left: 1.15rem;
  color: var(--muted);
  width: 100%;
}
.hero-points li { margin: 0.35rem 0; }
.hero-points li::marker { color: var(--accent); }

.cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.7rem 1.15rem;
  border-radius: 8px;
  background: var(--accent);
  color: #061018 !important;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn:hover { filter: brightness(1.06); color: #061018 !important; }
.btn.ghost {
  background: transparent;
  color: var(--fg) !important;
  border-color: #3a4a5c;
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-soft) !important; }

.hero-brand {
  display: block;
  width: min(168px, 42vw);
  height: auto;
  border-radius: 12px;
  background: #f2f2f0;
  margin: 0 0 1rem;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

/* code window */
.code-panel { min-width: 0; }
.code-panel .caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.code-window {
  background: #31485f;
  border: 1px solid #4a647c;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}
.code-chrome {
  display: flex;
  gap: 6px;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #425a72;
  background: #2a3d52;
}
.code-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #7a90a8;
}
.code-window pre,
.pipe {
  margin: 0;
  padding: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.55;
  white-space: pre;
}
.code-window pre:not(:has(> code)),
.pipe:not(:has(> code)) {
  padding: 1rem 1.1rem;
}
.pipe {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
}
.band-light .pipe {
  background: #fff;
  border-color: var(--light-border);
  color: var(--light-fg);
}
.code-output {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: #152033;
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--accent-soft);
}
.code-output .label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  font-family: var(--font);
}

/* sections */
.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  text-align: center;
}
.section-lede {
  text-align: center;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 2rem;
}
.band-light .section-lede { color: var(--light-muted); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.snippet-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  align-items: start;
}
@media (max-width: 800px) {
  .snippet-grid { grid-template-columns: 1fr; }
}
.snippet-grid .code-panel .caption span:last-child {
  font-family: var(--mono);
  font-size: 0.8rem;
}
.band-light .snippet-grid .code-window {
  box-shadow: 0 12px 32px rgba(20, 40, 70, 0.12);
  background: #31485f;
  border-color: #4a647c;
}
.band-light .snippet-grid .code-output {
  background: #243447;
}
.feature h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.band-light .feature p { color: var(--light-muted); }

.use-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .use-grid { grid-template-columns: 1fr; }
}
.use-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.use-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}
.use-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  color: var(--light-fg);
}
.use-card p {
  margin: 0;
  color: var(--light-muted);
  font-size: 0.95rem;
}
.use-card .tag {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1f6fb8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.use-card .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.9rem;
}
.use-card .tag-row a {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1f6fb8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.use-card .tag-row a:hover {
  text-decoration: underline;
}
.use-snippet {
  margin-top: 0.9rem;
}
.use-snippet pre.pipe {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  max-height: 22rem;
  overflow: auto;
}
.example-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1.25rem;
}
@media (max-width: 700px) {
  .example-list { grid-template-columns: 1fr; }
}
.example-list li {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--light-border);
  border-radius: var(--radius);
  background: #fff;
}
.example-list a {
  font-weight: 600;
  color: #1f6fb8;
  text-decoration: none;
}
.example-list a:hover { text-decoration: underline; }
.example-list span {
  display: block;
  margin-top: 0.2rem;
  color: var(--light-muted);
  font-size: 0.88rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.5rem 0 0.5rem;
}
.pill {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.pill:hover,
.pill.active {
  border-color: var(--accent);
  color: var(--accent-soft);
}

.tabs {
  display: flex;
  gap: 1.25rem;
  border-bottom: 1px solid var(--light-border);
  margin-bottom: 1.75rem;
  overflow-x: auto;
}
.tabs a {
  text-decoration: none;
  color: var(--light-muted);
  font-weight: 600;
  padding: 0.65rem 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs a.active,
.tabs a:hover {
  color: var(--light-fg);
  border-bottom-color: var(--accent);
}

.layout-docs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  .layout-docs { grid-template-columns: 1fr; }
  .side-toc { order: -1; }
}
.side-toc {
  position: sticky;
  top: 1rem;
  font-size: 0.9rem;
}
.side-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-toc li { margin: 0.35rem 0; }
.side-toc a {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  text-decoration: none;
  color: var(--light-muted);
}
.side-toc a:hover,
.side-toc a.active { color: var(--light-fg); }
.side-toc .num {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #e6edf4;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--light-muted);
  flex-shrink: 0;
}
.side-toc a.active .num {
  background: #d6e8f8;
  color: #1f6fb8;
}

.callout {
  background: var(--card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.callout strong { color: var(--fg); display: block; margin-bottom: 0.25rem; }
.band-light .callout {
  background: #eef5fc;
  border-color: #b8d4ef;
  color: var(--light-muted);
}
.band-light .callout strong { color: var(--light-fg); }

.hero-split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 800px) {
  .hero-split { grid-template-columns: 1fr; }
}
.hero-aside {
  border-left: 2px solid var(--accent);
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-aside h3 {
  margin: 0 0 0.5rem;
  color: var(--fg);
  font-size: 0.95rem;
}
.hero-aside ul {
  margin: 0;
  padding-left: 1.1rem;
}
.hero-aside li { margin: 0.3rem 0; }

.version-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  background: var(--card);
  margin-top: 1.75rem;
}
.version-box h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}
.version-box .ver {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.doc-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1.25rem;
  margin-top: 1rem;
}
@media (max-width: 600px) {
  .doc-links { grid-template-columns: 1fr; }
}
.doc-links a { text-decoration: none; font-weight: 600; }
.doc-links span { display: block; color: var(--muted); font-weight: 400; font-size: 0.88rem; }

.content h2 {
  margin-top: 2.25rem;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}
.content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}
.content p { max-width: 46rem; }
.content ul { padding-left: 1.2rem; }
.content li { margin: 0.3rem 0; }
.muted { color: var(--muted); }

.tutorial-step {
  margin: 2rem 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light-border);
}
.tutorial-step:last-child { border-bottom: 0; }
.tutorial-step .step-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1f6fb8;
  margin-bottom: 0.35rem;
}
.tutorial-step .tech {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-left: 3px solid #1f6fb8;
  background: #eef5fc;
  color: var(--light-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.tutorial-step .tech strong {
  color: var(--light-fg);
  font-weight: 600;
}
.tutorial-step .tech code {
  color: var(--light-fg);
}
.tutorial-step .try {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  color: var(--light-muted);
}
.tutorial-step .try code { font-size: 0.88em; }

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.site-footer h4 {
  margin: 0 0 0.5rem;
  color: var(--fg);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { margin: 0.3rem 0; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--accent-soft); }
.footer-copy {
  max-width: var(--max);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

code { font-family: var(--mono); font-size: 0.9em; }
