@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #071520;
  --bg-subtle: #0a1b28;
  --panel: #0c2130;
  --panel-elevated: #0f2a3d;
  --panel-hover: #123349;
  --line: #18374d;
  --line-subtle: #122838;
  --text: #e6f0f5;
  --text-muted: #8eaabb;
  --text-dim: #607d91;
  
  --accent: #3FB0CF;
  --accent-hover: #58c0dc;
  --accent-dim: #267a92;
  --navy: #0E2A3B;
  --teal: #1F5F78;
  
  --color-green: #65C59C;
  --color-purple: #B294E8;
  --color-amber: #E5AD52;
  --color-red: #e06c75;
  
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'DM Mono', monospace;
  
  --max-width: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

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

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 21, 32, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.brand-link .mark {
  width: 28px;
  height: 28px;
  display: block;
}

.version-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  background: #0E2A3B;
  color: var(--accent);
  border: 1px solid var(--teal);
  padding: 2px 8px;
  border-radius: 12px;
  transition: border-color 0.15s ease;
}

.version-badge:hover {
  border-color: var(--accent);
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav.main-nav a {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

nav.main-nav a:hover {
  color: var(--text);
  background: var(--line-subtle);
}

nav.main-nav a.active {
  color: var(--accent);
  background: rgba(63, 176, 207, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-install-btn {
  background: var(--accent);
  color: #05131c !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  padding: 6px 14px !important;
  border-radius: var(--radius-md);
  transition: background 0.15s ease;
}

.nav-install-btn:hover {
  background: var(--accent-hover) !important;
}

.github-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.github-link:hover {
  color: var(--text);
  border-color: var(--teal);
}

.github-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #05131c;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #020a10;
}

.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: var(--panel-elevated);
  border-color: var(--teal);
  color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--line-subtle);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--line);
  background: var(--line-subtle);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* ==========================================================================
   Code Blocks & Terminal Snippets
   ========================================================================== */

.code-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 16px 0;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #091925;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.code-header .lang-tag {
  color: var(--accent);
  font-weight: 500;
}

.btn-copy {
  background: var(--line-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-copy:hover {
  background: var(--line);
  color: var(--text);
}

.btn-copy.copied {
  background: #184236;
  border-color: var(--color-green);
  color: var(--color-green);
}

pre.code-content {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
}

/* Syntax Token Colors (VS Code Extension Theme) */
.tok-keyword { color: var(--color-purple); font-weight: 500; }
.tok-type    { color: var(--accent); }
.tok-string  { color: var(--color-green); }
.tok-comment { color: #6d8b9d; font-style: italic; }
.tok-number  { color: var(--color-amber); }
.tok-call    { color: #d6e8f2; }

/* Quick Install Terminal Component */
.terminal-card {
  background: #06131c;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 20px 0;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #091a27;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 16px 18px;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.terminal-body .prompt {
  color: var(--accent);
  user-select: none;
  margin-right: 8px;
}

.terminal-footer {
  padding: 8px 14px;
  background: #081723;
  border-top: 1px solid var(--line-subtle);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   Home Page Layout
   ========================================================================== */

.hero-section {
  padding: 60px 24px 48px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin: 0 0 16px;
  color: var(--text);
}

.hero-title .accent-text {
  color: var(--accent);
}

.hero-lead {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 760px;
  line-height: 1.6;
  margin: 0 0 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-install-box {
  max-width: 680px;
  margin-bottom: 32px;
}

/* ==========================================================================
   Code Showcase with Tabs
   ========================================================================== */

.showcase-section {
  padding: 48px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0 0 8px;
  color: var(--text);
}

.section-heading p {
  color: var(--text-muted);
  margin: 0;
  font-size: 16px;
}

.tabs-container {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tab-nav {
  display: flex;
  overflow-x: auto;
  background: #081724;
  border-bottom: 1px solid var(--line);
  padding: 0 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 12px 16px;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(63, 176, 207, 0.05);
}

.tab-content {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  min-height: 380px;
}

.tab-pane-code {
  border-right: 1px solid var(--line);
  background: #071520;
  overflow-x: auto;
  padding: 20px;
}

.tab-pane-code pre {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.tab-pane-desc {
  padding: 24px 28px;
  background: var(--panel);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tab-pane-desc h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--accent);
}

.tab-pane-desc p {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.tab-pane-desc ul {
  margin: 0 0 20px;
  padding-left: 20px;
  color: var(--text-muted);
  font-size: 14px;
}

.tab-pane-desc li {
  margin-bottom: 6px;
}

.tab-footer-meta {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

/* ==========================================================================
   Core Pillars / Technical Highlights
   ========================================================================== */

.pillars-section {
  padding: 56px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.pillar-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pillar-card:hover {
  border-color: var(--teal);
  background: var(--panel-elevated);
}

.pillar-icon {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  display: inline-block;
}

.pillar-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.pillar-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   Getting Started 3-Step Section
   ========================================================================== */

.quickstart-section {
  padding: 56px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.step-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}

.step-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: #081a26;
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
}

.step-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

/* ==========================================================================
   Documentation / Tour Page Layout
   ========================================================================== */

.doc-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 36px 24px 64px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
}

.doc-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding-right: 12px;
}

.sidebar-title {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 0 0 12px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--panel);
}

.sidebar-link.active {
  color: var(--accent);
  background: rgba(63, 176, 207, 0.08);
  border-left-color: var(--accent);
}

.doc-main {
  min-width: 0;
}

.doc-main h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
}

.doc-main .doc-lead {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.doc-section {
  margin-bottom: 48px;
  scroll-margin-top: 84px;
}

.doc-section h2 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin: 0 0 12px;
  color: var(--text);
}

.doc-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--accent);
}

.doc-section p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 14px;
}

.doc-section ul, .doc-section ol {
  color: var(--text-muted);
  padding-left: 22px;
  margin: 0 0 16px;
}

.doc-section li {
  margin-bottom: 6px;
}

.callout {
  background: var(--panel);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 18px 0;
  color: var(--text);
  font-size: 14px;
}

.callout.callout-amber {
  border-left-color: var(--color-amber);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-container {
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

table.data-table th {
  background: #091a27;
  color: var(--text);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

table.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-subtle);
  color: var(--text-muted);
}

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

table.data-table code {
  color: var(--accent);
  background: #081824;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12.5px;
}

/* ==========================================================================
   Package Registry & Search (Scalable List View)
   ========================================================================== */

.search-input-box {
  position: relative;
  margin: 20px 0 12px;
}

.search-input {
  width: 100%;
  max-width: 650px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  border-color: var(--accent);
}

.registry-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 0 20px;
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.registry-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: var(--line-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--teal);
}

.filter-btn.active {
  background: rgba(63, 176, 207, 0.12);
  color: var(--accent);
  border-color: var(--accent);
}

.registry-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.registry-sort select {
  background: #081724;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* Package List Items (Dense, scalable for 1 to 1000+ packages) */
.package-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.pkg-row {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all 0.15s ease;
}

.pkg-row:hover {
  border-color: var(--teal);
  background: var(--panel-elevated);
}

.pkg-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pkg-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pkg-name-link {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.3px;
  text-decoration: none;
}

.pkg-name-link:hover {
  text-decoration: underline;
}

.pkg-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #081a26;
  border: 1px solid var(--line);
  color: var(--text-muted);
}

.pkg-badge.native {
  color: var(--color-amber);
  border-color: rgba(229, 173, 82, 0.35);
  background: rgba(229, 173, 82, 0.08);
}

.pkg-badge.status {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--accent);
  border-color: rgba(63, 176, 207, 0.3);
}

.pkg-quick-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #06131c;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.pkg-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 10px;
}

.pkg-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-dim);
  border-top: 1px solid var(--line-subtle);
  padding-top: 10px;
}

.pkg-meta-items {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.pkg-details-toggle {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pkg-details-toggle:hover {
  text-decoration: underline;
}

.pkg-expanded-drawer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: none;
}

.pkg-expanded-drawer.open {
  display: block;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0;
  padding: 12px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  background: var(--line-subtle);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--font-mono);
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--teal);
}

.page-btn.active {
  background: var(--accent);
  color: #05131c;
  font-weight: 700;
  border-color: var(--accent);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer.site-footer {
  border-top: 1px solid var(--line);
  background: #051019;
  padding: 48px 24px 32px;
  margin-top: 64px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 32px;
}

.footer-brand h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 16px;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin: 0 0 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  font-size: 13.5px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 36px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 960px) {
  .doc-layout {
    grid-template-columns: 1fr;
  }
  
  .doc-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
    margin-bottom: 24px;
  }
  
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .tab-content {
    grid-template-columns: 1fr;
  }
  
  .tab-pane-code {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  
  .grid-3, .steps-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }
  
  nav.main-nav {
    display: none; /* Hide main links on narrow mobile */
  }
  
  .footer-inner {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
}

/* Package Detail & Markdown README View */
.pkg-header-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.pkg-select-styled {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
}

.pkg-select-styled:focus {
  border-color: var(--accent);
  outline: none;
}

.pkg-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  margin-top: 28px;
}

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

.readme-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.readme-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #091a26;
  border-bottom: 1px solid var(--line);
}

.readme-prose {
  padding: 32px 36px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 600px) {
  .readme-prose {
    padding: 20px 16px;
  }
}

.readme-prose h1, .readme-prose h2, .readme-prose h3, .readme-prose h4 {
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.readme-prose h1 {
  font-size: 28px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.readme-prose h1:first-child {
  margin-top: 0;
}

.readme-prose h2 {
  font-size: 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-subtle);
}

.readme-prose h3 {
  font-size: 18px;
}

.readme-prose h4 {
  font-size: 15px;
}

.readme-prose p {
  margin: 14px 0;
  color: var(--text-muted);
}

.readme-prose ul, .readme-prose ol {
  padding-left: 24px;
  margin: 14px 0;
  color: var(--text-muted);
}

.readme-prose li {
  margin: 6px 0;
}

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

.readme-prose blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
  margin: 16px 0;
  background: var(--bg-subtle);
  color: var(--text);
}

.readme-prose code {
  background: #091d2c;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--accent);
}

.readme-prose .code-box code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

.pkg-sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pkg-sidebar-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.sidebar-heading {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 600;
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
}

.meta-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-subtle);
}

.meta-list li:last-child {
  border-bottom: none;
}

.meta-list span {
  color: var(--text-muted);
}

.meta-list strong {
  font-weight: 600;
  color: var(--text);
}

.hash-box {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.hash-box code {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
  padding-right: 50px;
  line-height: 1.4;
}

.hash-box .btn-copy {
  position: absolute;
  right: 6px;
  top: 6px;
}

.version-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.version-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid transparent;
}

.version-pill:hover {
  border-color: var(--line);
  color: var(--text);
}

.version-pill.current {
  background: rgba(63, 176, 207, 0.1);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
