/* ─────────────────────────────────────────
   Nyx - Editorial Security Journal
   Light mode · Playfair Display headlines
   Deep forest accent · Hairline rules
───────────────────────────────────────── */

:root {
  color-scheme: light;

  /* Warm editorial palette */
  --bg: #f9f8f4;
  --bg-soft: #f2f0ea;
  --surface: #ffffff;
  --line: #e5e1d7;
  --line-strong: #cac5b8;
  --text: #0d0c0a;
  --text-2: #3c3830;
  --muted: #6c6660;
  --subtle: #9c9690;

  /* Forest green authority accent */
  --accent: #0b3d2a;
  --accent-hover: #0f4e35;
  --accent-mid: #1b5c40;
  --accent-light: #ecf3ee;

  /* Semantic colors */
  --green: #1c5c38;
  --teal: #1b5c52;
  --amber: #8c6310;
  --red: #9d2f25;

  /* Terminal surfaces */
  --terminal-bg: #0d0e12;
  --terminal-border: #232730;
  --terminal-bar: #181a21;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(13, 12, 10, 0.07), 0 1px 2px rgba(13, 12, 10, 0.04);
  --shadow-md: 0 4px 14px rgba(13, 12, 10, 0.09), 0 2px 4px rgba(13, 12, 10, 0.04);
  --shadow-lg: 0 20px 56px rgba(13, 12, 10, 0.13), 0 6px 18px rgba(13, 12, 10, 0.07);

  /* Typography */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(11, 61, 42, 0.14);
}

a {
  color: inherit;
  text-decoration: none;
}

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

code,
pre {
  font-family: var(--font-mono);
}

:not(pre) > code {
  padding: 0.1em 0.36em;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text-2);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Skip link ── */
.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}
.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Layout ── */
.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 248, 244, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}

.header-wordmark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
}

.nav a {
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  transition: color 110ms;
}

.nav a:hover {
  color: var(--text);
}

.nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

.nav-github {
  margin-left: 12px;
  padding: 5px 12px !important;
  border: 1px solid var(--text) !important;
  border-radius: 4px !important;
  background: transparent !important;
  color: var(--text) !important;
  font-weight: 500 !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.02em !important;
  transition:
    background 110ms,
    color 110ms !important;
}

.nav-github:hover {
  background: var(--text) !important;
  color: var(--bg) !important;
}

/* ── Typography ── */
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(4rem, 9vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text);
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

p {
  margin-top: 0;
}

main {
  flex: 1 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-family: var(--font-sans);
}

/* ── Hero ── */
.hero {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero .container {
  width: min(1280px, calc(100% - 40px));
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 56px;
  align-items: flex-start;
  padding: 112px 0 96px;
}

.hero__subtitle {
  margin-bottom: 20px;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}

.hero__body {
  max-width: 480px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}

/* App frame */
.hero__visual {
  display: flex;
  align-items: flex-start;
}

.app-frame {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(13, 12, 10, 0.12);
  box-shadow: var(--shadow-lg);
  background: var(--terminal-bg);
}

.app-frame__bar {
  display: flex;
  gap: 6px;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  background: var(--terminal-bar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.app-frame__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.app-frame__bar span:nth-child(1) {
  background: #ee5653;
}
.app-frame__bar span:nth-child(2) {
  background: #e8bb3b;
}
.app-frame__bar span:nth-child(3) {
  background: #56c554;
}

.app-frame picture,
.app-frame img {
  display: block;
  width: 100%;
  height: auto;
}

/* Hero stats bar */
.hero__stats {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 18px 0;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero-facts li {
  position: relative;
  padding: 3px 28px 3px 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero-facts li:not(:last-child)::after {
  content: "·";
  position: absolute;
  right: 10px;
  color: var(--line-strong);
}

/* ── Buttons ── */
.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1;
  transition:
    background 110ms,
    border-color 110ms,
    color 110ms;
  cursor: pointer;
}

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

.button--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.button--ghost:hover {
  background: var(--bg-soft);
}

/* ── Secondary / inline links ── */
.secondary-links,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.secondary-links a,
.inline-links a {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.87rem;
  transition:
    color 110ms,
    border-color 110ms,
    background 110ms;
}

.secondary-links a:hover,
.inline-links a:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface);
}

/* ── Sections ── */
.section {
  padding: 96px 0;
}

.section--tinted {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-intro {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-intro--wide {
  max-width: 860px;
}

.section-intro p,
.install-copy p {
  color: var(--muted);
}

/* News index */
.news-page {
  background: var(--bg);
}

.news-shell {
  padding: 50px 0 96px;
}

.news-feed {
  width: min(100%, 980px);
  margin: 0 auto;
}

.news-feed-item {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 38px 0;
  border-bottom: 1px solid var(--line);
}

.news-feed-item__media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.news-feed-item__media:hover {
  border-color: var(--line-strong);
}

.news-feed-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-feed-item__media--logo {
  background: var(--surface);
}

.news-feed-item__media--logo img {
  padding: 48px;
  object-fit: contain;
}

.news-feed-item__date {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.news-feed-item h2 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.4vw, 2.28rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.news-feed-item h2 a:hover {
  color: var(--accent);
}

.news-feed-item p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.68;
}

.news-read-more {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.news-read-more:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.text-link {
  display: inline-flex;
  width: fit-content;
  margin-top: 20px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
}

.text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Article pages */
.article-hero {
  padding: 82px 0 18px;
}

.article-hero__inner {
  max-width: 800px;
}

.article-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.article-back-link::before {
  content: "<";
  color: var(--subtle);
}

.article-back-link:hover {
  color: var(--accent);
}

.article-title {
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-meta span:not(:last-child)::after {
  content: "/";
  margin-left: 10px;
  color: var(--line-strong);
}

.article-body {
  max-width: 800px;
  padding: 34px 0 64px;
}

.article-media {
  max-width: 980px;
  margin: 22px auto 0;
}

.article-media img {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.article-body h2 {
  margin-top: 44px;
  margin-bottom: 12px;
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body p,
.article-body li {
  color: var(--text-2);
}

.article-body p {
  margin-bottom: 22px;
  font-size: 1.02rem;
  line-height: 1.8;
}

.article-body ul {
  margin: 0 0 26px;
  padding-left: 1.15em;
}

.article-body li {
  margin-bottom: 10px;
  padding-left: 0.2em;
  line-height: 1.72;
}

.article-body code {
  white-space: nowrap;
}

.article-release-notes {
  margin-top: 34px;
  color: var(--text-2);
  font-size: 0.96rem;
}

.article-release-notes a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-release-notes a:hover {
  color: var(--accent-hover);
}

/* ── Media / demo ── */
.media-frame {
  margin: 0;
}

.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.media-frame--demo img {
  width: min(100%, 960px);
  margin-inline: auto;
}

.media-frame figcaption {
  max-width: 680px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ── Install ── */
.install-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 32px;
  align-items: center;
}

.install-copy {
  max-width: 420px;
}

.terminal {
  overflow: hidden;
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  background: var(--terminal-bg);
  box-shadow: var(--shadow-md);
}

.terminal__bar {
  display: flex;
  gap: 7px;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  background: var(--terminal-bar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal__copy {
  margin-left: auto;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  color: #d8e9df;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background 110ms,
    border-color 110ms,
    color 110ms;
}

.terminal__copy:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.terminal__bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal__bar span:nth-child(1) {
  background: #ee5653;
}
.terminal__bar span:nth-child(2) {
  background: #e8bb3b;
}
.terminal__bar span:nth-child(3) {
  background: #56c554;
}

.terminal pre {
  margin: 0;
  overflow-x: auto;
  padding: 24px;
  color: #c8e8d8;
  font-size: 0.97rem;
  line-height: 1.8;
}

.terminal__field {
  display: block;
  width: 100%;
  min-height: 74px;
  margin: 0;
  padding: 24px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #c8e8d8;
  font-family: var(--font-mono);
  font-size: 0.97rem;
  line-height: 1.8;
  text-overflow: ellipsis;
}

.terminal__field::selection {
  background: rgba(200, 232, 216, 0.18);
}

.inline-links {
  grid-column: 2;
  align-self: start;
}

/* ── Why / text block ── */
.text-block {
  max-width: 800px;
}

.text-block p {
  color: var(--text-2);
  font-size: 1.04rem;
  line-height: 1.78;
}

.text-block p:last-child {
  margin-bottom: 0;
}

/* ── Comparison table ── */
.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.compare-table thead th {
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.compare-table thead th:nth-child(2) {
  color: var(--accent);
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover td {
  background: var(--bg-soft);
}

.compare-table td:first-child {
  color: var(--text-2);
  white-space: nowrap;
}

.compare-table td:nth-child(2) {
  font-weight: 600;
}

.cell--yes {
  color: var(--green);
  font-weight: 500;
}
.cell--no {
  color: var(--red);
  opacity: 0.75;
}
.cell--partial {
  color: var(--amber);
}

/* ── FAQ ── */
.faq-list {
  max-width: 800px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

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

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 110ms;
}

.faq-item summary:hover {
  background: var(--bg-soft);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  margin-left: auto;
  flex-shrink: 0;
  color: var(--subtle);
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 150ms ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary h3 {
  margin: 0;
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq-item > p {
  margin: 0;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.72;
}

/* ── Footer ── */
.site-footer {
  flex-shrink: 0;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.site-footer a {
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 0.86rem;
  color: var(--muted);
  transition:
    color 110ms,
    background 110ms;
}

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

/* ── 404 ── */
.error-page {
  min-height: calc(100vh - 64px);
  display: grid;
}

.not-found {
  display: grid;
  align-items: center;
  padding: 72px 0 120px;
}

.not-found__inner {
  max-width: 680px;
  text-align: center;
}

.not-found__title {
  margin-bottom: 20px;
  font-size: clamp(3.5rem, 8vw, 7rem);
  line-height: 0.95;
}

.not-found__body {
  max-width: 560px;
  margin-bottom: 32px;
  margin-inline: auto;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
}

.not-found__actions {
  margin-bottom: 22px;
  justify-content: center;
}

/* ── Reveal animations ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 560ms ease,
    transform 560ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 0 0;
  }

  .site-header__inner {
    justify-content: flex-start;
    height: 64px;
  }

  .header-wordmark {
    position: static;
    transform: none;
    margin-left: 10px;
    margin-right: auto;
  }

  .nav {
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin-left: auto;
  }

  .nav a {
    white-space: nowrap;
  }

  .install-layout {
    grid-template-columns: 1fr;
  }
  .inline-links {
    grid-column: 1;
  }

  .news-feed-item {
    grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
    gap: 24px;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .container {
    width: min(100% - 28px, 1120px);
  }

  .hero__inner {
    padding: 48px 0 0;
    gap: 32px;
  }

  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .secondary-links,
  .inline-links {
    flex-direction: column;
    align-items: stretch;
  }

  .secondary-links a,
  .inline-links a {
    text-align: center;
  }

  .install-layout {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 60px 0;
  }

  .article-hero {
    padding: 52px 0 8px;
  }

  .news-shell {
    padding: 34px 0 64px;
  }

  .news-feed-item {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 28px 0;
  }

  .news-feed-item__media--logo img {
    padding: 38px;
  }

  .article-body {
    padding: 30px 0 48px;
  }

  .article-media {
    margin-top: 18px;
  }

  .not-found {
    padding: 72px 0;
  }

  .terminal pre {
    padding: 18px 20px;
    font-size: 0.9rem;
  }

  .hero-facts {
    flex-direction: column;
    gap: 4px;
  }

  .hero-facts li::after {
    display: none;
  }

  .nav a {
    font-size: 0.85rem;
    padding: 6px 8px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ─────────────────────────────────────────
   Docs — sidebar + prose
───────────────────────────────────────── */
.docs-page {
  padding: 0;
}

.docs-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 56px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 40px 32px 96px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  font-size: 0.94rem;
}

.docs-sidebar__brand {
  display: block;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.docs-search {
  position: relative;
  z-index: 20;
  margin: 0;
}

.docs-search--content {
  position: sticky;
  top: 80px;
  width: min(100%, 860px);
  margin: 0 0 28px;
  padding: 0 0 12px;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(249, 248, 244, 0.96) 72%, rgba(249, 248, 244, 0));
}

.docs-search__control {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 240, 234, 0.72)), var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.docs-search--content .docs-search__control {
  min-height: 50px;
}

.docs-search.is-open .docs-search__control,
.docs-search__control:focus-within {
  border-color: rgba(11, 61, 42, 0.38);
  background: var(--surface);
  box-shadow:
    0 0 0 3px rgba(11, 61, 42, 0.08),
    var(--shadow-sm);
}

.docs-search__icon {
  position: relative;
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-left: 13px;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.docs-search__icon::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted);
  transform: rotate(45deg);
  transform-origin: left center;
}

.docs-search__control:focus-within .docs-search__icon,
.docs-search.is-open .docs-search__icon {
  border-color: var(--accent);
}

.docs-search__control:focus-within .docs-search__icon::after,
.docs-search.is-open .docs-search__icon::after {
  background: var(--accent);
}

.docs-search__control input {
  min-width: 0;
  flex: 1 1 auto;
  height: 40px;
  padding: 0 42px 0 12px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1;
}

.docs-search--content .docs-search__control input {
  height: 48px;
  font-size: 0.96rem;
}

.docs-search__control input::placeholder {
  color: var(--subtle);
}

.docs-search__control input::-webkit-search-cancel-button {
  appearance: none;
}

.docs-search__key {
  position: absolute;
  right: 9px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: rgba(249, 248, 244, 0.82);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1;
  transform: translateY(-50%);
}

.docs-search--content .docs-search__key {
  min-width: 34px;
}

.docs-search__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.docs-search--content .docs-search__panel {
  top: calc(100% + 10px);
  background: rgba(255, 255, 255, 0.99);
}

.docs-search__status {
  padding: 9px 12px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.docs-search__results {
  max-height: min(430px, calc(100vh - 210px));
  overflow-y: auto;
  padding: 5px;
}

.docs-search--content .docs-search__results {
  max-height: min(540px, calc(100vh - 190px));
  padding: 7px;
}

.docs-search__result {
  display: block;
  padding: 10px 11px;
  border-radius: 6px;
  color: var(--text-2);
  outline: 0;
  text-decoration: none;
}

.docs-search--content .docs-search__result {
  padding: 14px 16px;
}

.docs-search__result:hover,
.docs-search__result.is-active {
  background: var(--accent-light);
  color: var(--text);
}

.docs-search__result-title {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.25;
}

.docs-search--content .docs-search__result-title {
  font-size: 1rem;
}

.docs-search__result-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.docs-search__result-excerpt {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.42;
}

.docs-search--content .docs-search__result-excerpt {
  font-size: 0.88rem;
  line-height: 1.5;
}

.docs-search mark {
  padding: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.docs-sidebar__group {
  margin-bottom: 22px;
}

.docs-sidebar__heading {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-sidebar__list,
.docs-sidebar__sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-sidebar__sublist {
  margin: 4px 0 6px 12px;
  border-left: 1px solid var(--line);
  padding-left: 10px;
}

.docs-sidebar__list > li {
  margin: 2px 0;
}

.docs-sidebar__link {
  display: block;
  padding: 5px 8px;
  border-radius: 4px;
  color: var(--text-2);
  font-weight: 500;
  line-height: 1.4;
}

.docs-sidebar__link:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.docs-sidebar__link[aria-current="page"] {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.docs-sidebar__link--sub {
  font-size: 0.9rem;
  color: var(--muted);
}

.docs-content {
  min-width: 0;
}

.docs-prose {
  max-width: 760px;
  color: var(--text-2);
  font-size: 1.02rem;
  line-height: 1.78;
}

.docs-prose > :first-child {
  margin-top: 0;
}

.docs-prose h1 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--text);
}

.docs-prose h2 {
  margin: 52px 0 14px;
  padding-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.2;
  color: var(--text);
}

.docs-prose h3 {
  margin: 36px 0 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
}

.docs-prose h4 {
  margin: 28px 0 8px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
}

.docs-prose h1,
.docs-prose h2,
.docs-prose h3,
.docs-prose h4 {
  scroll-margin-top: 92px;
}

.docs-prose .docs-search-target {
  border-radius: 6px;
  background: rgba(236, 243, 238, 0.92);
  box-shadow:
    -10px 0 0 rgba(236, 243, 238, 0.92),
    10px 0 0 rgba(236, 243, 238, 0.92);
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.docs-prose h1 .docs-anchor,
.docs-prose h2 .docs-anchor,
.docs-prose h3 .docs-anchor,
.docs-prose h4 .docs-anchor {
  display: inline-block;
  margin-right: 0.4em;
  margin-left: -1.2em;
  width: 0.8em;
  color: var(--subtle);
  opacity: 0;
  transition: opacity 0.15s ease;
  font-weight: 400;
}

.docs-prose h1:hover .docs-anchor,
.docs-prose h2:hover .docs-anchor,
.docs-prose h3:hover .docs-anchor,
.docs-prose h4:hover .docs-anchor {
  opacity: 1;
}

.docs-prose p {
  margin: 0 0 18px;
}

.docs-prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.docs-prose a:hover {
  color: var(--accent-hover);
}

.docs-prose ul,
.docs-prose ol {
  margin: 0 0 20px;
  padding-left: 1.3em;
}

.docs-prose li {
  margin-bottom: 8px;
}

.docs-prose li > p {
  margin-bottom: 8px;
}

.docs-prose blockquote {
  margin: 22px 0;
  padding: 12px 18px;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  color: var(--text-2);
  font-style: normal;
}

.docs-prose blockquote p:last-child {
  margin-bottom: 0;
}

.docs-prose hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.docs-prose table {
  width: 100%;
  margin: 22px 0;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.docs-prose th,
.docs-prose td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.docs-prose th {
  background: var(--bg-soft);
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--line-strong);
}

.docs-prose img {
  margin: 22px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.docs-prose pre {
  margin: 22px 0;
  padding: 18px 20px;
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.62;
}

.docs-prose pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: #e5e1d7;
  font-size: inherit;
  white-space: pre;
}

.docs-prose :not(pre) > code {
  white-space: nowrap;
}

.docs-prevnext {
  display: flex;
  gap: 16px;
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.docs-prevnext__link,
.docs-prevnext__spacer {
  flex: 1 1 0;
  min-width: 0;
}

.docs-prevnext__link {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-2);
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}

.docs-prevnext__link:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.docs-prevnext__link--next {
  text-align: right;
}

.docs-prevnext__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.docs-prevnext__title {
  display: block;
  font-weight: 700;
  color: var(--text);
}

/* Docs index landing */
.docs-index__lede {
  max-width: 640px;
  margin: 0 0 36px;
  font-size: 1.12rem;
  color: var(--text-2);
}

.docs-index__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.docs-index__group {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.docs-index__group h2 {
  margin: 0 0 12px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.docs-index__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-index__group li {
  margin-bottom: 8px;
}

.docs-index__group a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.docs-index__group a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* highlight.js — palette tuned for terminal-bg */
.hljs {
  color: #e5e1d7;
  background: transparent;
}
.hljs-comment,
.hljs-quote {
  color: #8a857a;
  font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
  color: #7fb38a;
}
.hljs-built_in,
.hljs-name,
.hljs-tag {
  color: #9ec5d1;
}
.hljs-string,
.hljs-attr,
.hljs-symbol,
.hljs-bullet,
.hljs-addition {
  color: #d9b681;
}
.hljs-number,
.hljs-meta,
.hljs-deletion {
  color: #d39078;
}
.hljs-title,
.hljs-class .hljs-title,
.hljs-attribute {
  color: #c7c0b3;
  font-weight: 700;
}
.hljs-type,
.hljs-params,
.hljs-template-variable,
.hljs-variable {
  color: #c9d9c1;
}
.hljs-emphasis {
  font-style: italic;
}
.hljs-strong {
  font-weight: 700;
}

@media (max-width: 920px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 18px 72px;
  }
  .docs-sidebar {
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: 18px;
  }
  .docs-search--content {
    width: 100%;
    margin-bottom: 24px;
  }
  .docs-search__panel {
    position: static;
    margin-top: 8px;
  }
  .docs-search__results {
    max-height: 320px;
  }
  .docs-prose h1 .docs-anchor,
  .docs-prose h2 .docs-anchor,
  .docs-prose h3 .docs-anchor,
  .docs-prose h4 .docs-anchor {
    margin-left: 0;
    opacity: 1;
  }
}
