/* ============================================
   HELIUM DEVELOPER STANDARDS — STYLES
   Vercel-inspired premium dark theme
   Font: Geist + Geist Mono
   ============================================ */

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

:root {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --bg-tertiary: #161616;
  --bg-hover: #1a1a1a;
  --border: #1f1f1f;
  --border-subtle: #161616;
  --text-primary: #ededed;
  --text-secondary: #a1a1a1;
  --text-tertiary: #666666;
  --text-muted: #444444;
  --accent: #ffffff;
  --accent-dim: rgba(255,255,255,0.06);
  --green: #00d084;
  --green-dim: rgba(0, 208, 132, 0.1);
  --red: #ff4444;
  --red-dim: rgba(255, 68, 68, 0.1);
  --yellow: #f5a623;
  --yellow-dim: rgba(245, 166, 35, 0.1);
  --blue: #0070f3;
  --blue-dim: rgba(0, 112, 243, 0.1);
  --code-bg: #0d0d0d;
  --sidebar-width: 240px;
  --topnav-height: 56px;
  --radius: 8px;
  --radius-sm: 5px;
  --font: 'Geist', -apple-system, sans-serif;
  --font-mono: 'Geist Mono', 'Fira Code', monospace;
  --transition: 0.15s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topnav-height) + 24px); }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

/* ============================================
   TOP NAV
   ============================================ */
.topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-height);
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.topnav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-mark.small { width: 20px; height: 20px; font-size: 10px; border-radius: 4px; }

.logo-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

.logo-sub {
  color: var(--text-tertiary);
  font-weight: 400;
}

.nav-center { flex: 1; display: flex; justify-content: center; }

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 34px;
  width: 280px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.search-wrap:hover { border-color: #333; background: var(--bg-tertiary); }

.search-icon { width: 14px; height: 14px; color: var(--text-tertiary); flex-shrink: 0; }

.search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 13px;
  flex: 1;
  cursor: pointer;
}

.search-wrap input::placeholder { color: var(--text-tertiary); }

.search-wrap kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color var(--transition);
}

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

.badge-version {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 8px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.2s;
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-overlay.active { display: flex; }

.search-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 560px;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  animation: modalIn 0.15s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.search-modal-header svg { width: 16px; height: 16px; color: var(--text-tertiary); flex-shrink: 0; }

.search-modal-header input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
}

.search-modal-header input::placeholder { color: var(--text-tertiary); }

.search-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.search-results { max-height: 400px; overflow-y: auto; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
  text-decoration: none;
}

.search-result-item:hover { background: var(--bg-hover); }

.search-result-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  width: 20px;
  flex-shrink: 0;
}

.search-result-title { font-size: 13px; color: var(--text-primary); font-weight: 500; }
.search-result-desc { font-size: 12px; color: var(--text-tertiary); margin-top: 1px; }

.search-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* ============================================
   LAYOUT
   ============================================ */
.layout {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: var(--topnav-height);
  min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: sticky;
  top: var(--topnav-height);
  height: calc(100vh - var(--topnav-height));
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 24px 0;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 1px; padding: 0 12px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 16px 8px 6px;
}

.sidebar-section-label:first-child { padding-top: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: all var(--transition);
  position: relative;
}

.sidebar-link svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.6; }

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

.sidebar-link:hover svg { opacity: 1; }

.sidebar-link.active {
  color: var(--text-primary);
  background: var(--accent-dim);
  font-weight: 500;
}

.sidebar-link.active svg { opacity: 1; }

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 16px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.content {
  flex: 1;
  min-width: 0;
  padding: 0 48px 80px;
  max-width: 860px;
}

.section { padding: 56px 0 0; }

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 56px 0 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section { padding-top: 64px; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #666666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.meta-value { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.meta-divider { width: 1px; height: 28px; background: var(--border); }

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
}

.toc-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
  cursor: pointer;
}

.toc-card:hover {
  background: var(--bg-tertiary);
  border-color: #2a2a2a;
  transform: translateY(-1px);
}

.toc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.toc-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  flex-shrink: 0;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.section-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 28px 0 12px;
  letter-spacing: -0.01em;
}

.body-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* ============================================
   CODE BLOCKS
   ============================================ */
.code-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.code-block.no-header { border-radius: 0 0 var(--radius) var(--radius); }

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.code-lang {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.copy-btn {
  font-size: 11px;
  color: var(--text-tertiary);
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
}

.copy-btn:hover { color: var(--text-primary); border-color: #333; }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

.code-block pre {
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  color: #c9d1d9;
}

.code-block code { font-family: var(--font-mono); }

/* Syntax tokens */
.token-keyword { color: #ff7b72; }
.token-string { color: #a5d6ff; }
.token-comment { color: #484f58; font-style: italic; }
.token-fn { color: #d2a8ff; }
.token-meta { color: #79c0ff; }
.token-green { color: var(--green); }

/* ============================================
   TABLES
   ============================================ */
.table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

td {
  padding: 10px 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

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

tbody tr:hover { background: var(--bg-hover); }

td code, th code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ============================================
   CALLOUTS
   ============================================ */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.callout svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

.callout-info {
  background: var(--blue-dim);
  border-color: rgba(0, 112, 243, 0.2);
  color: #93c5fd;
}

.callout-warn {
  background: var(--yellow-dim);
  border-color: rgba(245, 166, 35, 0.2);
  color: #fcd34d;
}

.callout-danger {
  background: var(--red-dim);
  border-color: rgba(255, 68, 68, 0.2);
  color: #fca5a5;
}

.callout strong { color: inherit; font-weight: 600; }
.callout code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 1px 5px;
}

/* ============================================
   INLINE CODE
   ============================================ */
code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
}

.inline-link {
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition);
}

.inline-link:hover { text-decoration-color: var(--text-secondary); }

/* ============================================
   EXAMPLE GRID (GOOD/BAD)
   ============================================ */
.example-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.example-block { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

.example-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
}

.example-label svg { width: 13px; height: 13px; }

.example-good .example-label { background: var(--green-dim); color: var(--green); border-bottom: 1px solid rgba(0,208,132,0.15); }
.example-bad .example-label { background: var(--red-dim); color: var(--red); border-bottom: 1px solid rgba(255,68,68,0.15); }

.example-block .code-block { border: none; border-radius: 0; margin: 0; }

/* ============================================
   RULE LIST
   ============================================ */
.rule-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.rule-item:hover { background: var(--bg-tertiary); }

.rule-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rule-icon svg { width: 14px; height: 14px; }

.rule-icon-info { background: var(--blue-dim); color: #60a5fa; }
.rule-icon-warn { background: var(--yellow-dim); color: var(--yellow); }
.rule-icon-danger { background: var(--red-dim); color: var(--red); }

.rule-title { font-size: 13px; color: var(--text-primary); font-weight: 500; line-height: 1.4; }
.rule-title code { font-size: 12px; }
.rule-desc { font-size: 12px; color: var(--text-tertiary); margin-top: 3px; line-height: 1.5; }

/* ============================================
   RULES INLINE (PILLS)
   ============================================ */
.rules-inline { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }

.rule-pill {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.pill-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  min-width: 52px;
}

/* ============================================
   TABS
   ============================================ */
.tabs { margin-bottom: 16px; }

.tab-list {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.tab-btn {
  padding: 8px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-tertiary);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}

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

.tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
  font-weight: 500;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel .code-block { border-radius: 0 0 var(--radius) var(--radius); border-top: none; margin: 0; }

/* ============================================
   FEATURE FLAG LIFECYCLE
   ============================================ */
.lifecycle {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.lifecycle-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  flex: 1;
}

.lifecycle-num {
  width: 32px;
  height: 32px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.lifecycle-content { text-align: center; }
.lifecycle-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.lifecycle-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; line-height: 1.4; }
.lifecycle-desc code { font-size: 10px; }

.lifecycle-arrow {
  color: var(--text-muted);
  font-size: 16px;
  padding: 0 4px;
  margin-top: 8px;
  flex-shrink: 0;
}

/* ============================================
   WHY GRID (FEATURE FLAGS)
   ============================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.why-card {
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all var(--transition);
}

.why-card:hover { background: var(--bg-tertiary); border-color: #2a2a2a; }

.why-icon { font-size: 20px; margin-bottom: 8px; }
.why-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.why-desc { font-size: 11px; color: var(--text-tertiary); }

/* ============================================
   BANNED LIST
   ============================================ */
.banned-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}

.banned-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--red-dim);
  border: 1px solid rgba(255,68,68,0.12);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #fca5a5;
}

.banned-x {
  color: var(--red);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.banned-item code {
  background: rgba(255,68,68,0.15);
  border-color: rgba(255,68,68,0.2);
  color: #fca5a5;
}

/* ============================================
   VERSION GRID
   ============================================ */
.version-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.version-card {
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all var(--transition);
}

.version-card:hover { background: var(--bg-tertiary); }

.version-icon { font-size: 24px; margin-bottom: 8px; }
.version-name { font-size: 12px; color: var(--text-tertiary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.06em; }
.version-num { font-family: var(--font-mono); font-size: 20px; font-weight: 600; color: var(--text-primary); }

/* ============================================
   PR SIZE METER
   ============================================ */
.size-meter { margin-bottom: 16px; }

.size-bar {
  display: flex;
  height: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  gap: 1px;
}

.size-segment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 500;
  gap: 8px;
  flex-shrink: 0;
}

.size-green { background: rgba(0, 208, 132, 0.12); color: var(--green); }
.size-yellow { background: rgba(245, 166, 35, 0.12); color: var(--yellow); }
.size-red { background: rgba(255, 68, 68, 0.12); color: var(--red); }

.size-tag {
  font-size: 10px;
  opacity: 0.7;
  white-space: nowrap;
}

/* ============================================
   TECH STACK GRID
   ============================================ */
.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tech-card {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.tech-card:hover { background: var(--bg-tertiary); }

.tech-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.tech-desc { font-size: 12px; color: var(--text-tertiary); }
.tech-desc code { font-size: 11px; }

/* ============================================
   COVERAGE DISPLAY
   ============================================ */
.coverage-display {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.coverage-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.coverage-ring svg { width: 80px; height: 80px; transform: rotate(-90deg); }

.coverage-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
  line-height: 1;
}

.coverage-label span { font-size: 10px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }

.coverage-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.coverage-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ============================================
   CHECKLIST
   ============================================ */
.checklist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.checklist-group {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.checklist-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.checklist-group-title svg { width: 14px; height: 14px; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  transition: color var(--transition);
}

.check-item:hover { color: var(--text-primary); }

.check-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--transition);
  position: relative;
}

.check-item input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
}

.check-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 2px;
  width: 5px;
  height: 8px;
  border: 1.5px solid #000;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.check-item input[type="checkbox"]:checked ~ span {
  color: var(--text-tertiary);
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
}

.check-item code { font-size: 11px; }

.checklist-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-check-all, .btn-reset {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 500;
}

.btn-check-all {
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
}

.btn-check-all:hover { background: #e0e0e0; }

.btn-reset {
  background: none;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-reset:hover { background: var(--bg-hover); color: var(--text-primary); }

.check-progress {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

/* ============================================
   QUICK REFERENCE
   ============================================ */
.quickref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}

.qr-card {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: baseline;
  gap: 12px;
  transition: background var(--transition);
}

.qr-card:hover { background: var(--bg-tertiary); }

.qr-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  min-width: 80px;
}

.qr-value code {
  font-size: 12px;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
}

/* ============================================
   COMPLIANCE BANNER
   ============================================ */
.compliance-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compliance-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.compliance-icon svg { width: 20px; height: 20px; color: var(--text-secondary); }

.compliance-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.compliance-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }
.compliance-desc code { font-size: 12px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  margin-top: 0;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 0 calc(var(--sidebar-width) + 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.footer-right { font-size: 12px; color: var(--text-muted); }

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.progress-bar {
  position: fixed;
  top: var(--topnav-height);
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 101;
  transition: width 0.1s linear;
  width: 0%;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 90;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .content { padding: 0 32px 80px; }
}

@media (max-width: 900px) {
  :root { --sidebar-width: 260px; }

  .sidebar {
    position: fixed;
    top: var(--topnav-height);
    left: 0;
    height: calc(100vh - var(--topnav-height));
    z-index: 95;
    background: var(--bg);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    border-right: 1px solid var(--border);
  }

  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; }
  .sidebar-overlay.active { display: block; }

  .hamburger { display: flex; }
  .nav-center { display: none; }
  .nav-right .nav-link { display: none; }

  .content { padding: 0 20px 80px; max-width: 100%; }

  .footer-inner { padding: 0 20px; }

  .example-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .checklist-grid { grid-template-columns: 1fr; }
  .tech-stack-grid { grid-template-columns: 1fr 1fr; }
  .version-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .hero-title { font-size: 36px; }
  .toc-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .version-grid { grid-template-columns: repeat(3, 1fr); }
  .tech-stack-grid { grid-template-columns: 1fr; }
  .quickref-grid { grid-template-columns: 1fr; }
  .lifecycle { flex-direction: column; align-items: flex-start; gap: 8px; }
  .lifecycle-step { flex-direction: row; align-items: flex-start; min-width: unset; }
  .lifecycle-content { text-align: left; }
  .lifecycle-arrow { display: none; }
  .size-segment span:first-child { display: none; }
  .coverage-display { flex-direction: column; align-items: flex-start; }
  .section-header { flex-direction: column; gap: 8px; }
  .hero-meta { gap: 12px; }
  .meta-divider { display: none; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-section {
  opacity: 1;
  transform: none;
}