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

:root {
  --bg: #0b1210;
  --bg-alt: #0f1816;
  --surface: rgba(15, 23, 21, 0.88);
  --surface-strong: #131c1a;
  --border: rgba(120, 144, 140, 0.25);
  --text: #f3f7f5;
  --muted: #a3b4ae;
  --accent: #38d9a9;
  --accent-2: #ffd166;
  --accent-3: #ff7a59;
  --accent-4: #55c1ff;
  --shadow: 0 26px 50px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  --sans: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --toc-width: 260px;
  --toc-gap: 28px;
}

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

body {
  position: relative;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(56, 217, 169, 0.24), transparent 55%),
    radial-gradient(circle at 85% 18%, rgba(255, 209, 102, 0.2), transparent 55%),
    radial-gradient(circle at 22% 84%, rgba(85, 193, 255, 0.18), transparent 55%),
    radial-gradient(circle at 75% 75%, rgba(255, 122, 89, 0.16), transparent 52%),
    linear-gradient(150deg, #0a1110 0%, #0f1b18 45%, #0b1210 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body.dock-hidden {
  --toc-width: 0px;
  --toc-gap: 0px;
}

body.dock-hidden .layout {
  grid-template-columns: 1fr;
  gap: 0;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.08;
}

body::after {
  background: radial-gradient(circle at center, transparent 0%, rgba(2, 6, 5, 0.55) 75%);
  opacity: 0.8;
}

code {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: #d7f5ea;
  background: rgba(56, 217, 169, 0.12);
  border: 1px solid rgba(56, 217, 169, 0.2);
  border-radius: 6px;
  padding: 1px 6px;
}

pre code {
  background: none;
  border: none;
  padding: 0;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.05);
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transition: width 0.2s ease-out;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.orb {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  opacity: 0.35;
  animation: float 16s ease-in-out infinite;
}

.orb-1 {
  top: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(56, 217, 169, 0.5), transparent 70%);
}

.orb-2 {
  bottom: 12%;
  right: -60px;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.35), transparent 70%);
  animation-delay: -5s;
}

.orb-3 {
  top: 30%;
  right: 12%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(85, 193, 255, 0.35), transparent 70%);
  animation-delay: -8s;
}

.orb-4 {
  bottom: -120px;
  left: 20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 122, 89, 0.3), transparent 70%);
  animation-delay: -10s;
}

.gridline {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(transparent 95%, rgba(255, 255, 255, 0.05) 96%),
    linear-gradient(90deg, transparent 95%, rgba(255, 255, 255, 0.05) 96%);
  background-size: 90px 90px;
  opacity: 0.06;
}

.hero {
  position: relative;
  z-index: 2;
  padding: 48px 60px 20px;
}

.hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), rgba(56, 217, 169, 0.2));
  color: #06120d;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 12px 28px rgba(56, 217, 169, 0.35);
}

.title {
  font-size: 22px;
  font-weight: 700;
}

.subtitle {
  color: var(--muted);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  gap: 12px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 32px;
}

.hero-copy h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-copy p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.tagline {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 21, 0.6);
  font-size: 12px;
  color: var(--muted);
}

.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title {
  font-weight: 600;
}

.panel-sub {
  color: var(--muted);
  font-size: 13px;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(56, 217, 169, 0.15);
  color: #77f2cf;
  font-size: 11px;
  font-weight: 600;
}

.panel-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.panel-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

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

.terminal {
  background: #0c1412;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.terminal-head {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  align-items: center;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: default;
  appearance: none;
}

.terminal-dot--minimize {
  background: rgba(255, 209, 102, 0.8);
  cursor: pointer;
}

.terminal-dot--fullscreen {
  background: rgba(56, 217, 169, 0.85);
  cursor: pointer;
}

.terminal-dot:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.terminal-dot:focus-visible {
  outline: 2px solid rgba(56, 217, 169, 0.6);
  outline-offset: 2px;
}

.terminal pre {
  margin: 0;
  padding: 16px;
  color: #c7f0e4;
  font-family: var(--mono);
  font-size: 13px;
  white-space: pre-wrap;
}

.terminal.shell {
  background: #0a1110;
  border-color: rgba(76, 104, 98, 0.35);
}

body.shell-fullscreen {
  overflow: hidden;
}

.shell-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(15, 35, 31, 0.7), rgba(4, 8, 7, 0.9));
  z-index: 35;
  cursor: zoom-out;
}

.terminal.shell.is-fullscreen {
  position: fixed;
  inset: 24px 4vw;
  z-index: 40;
  width: auto;
  max-width: none;
  height: auto;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
}

.terminal.shell.is-fullscreen .shell-body {
  flex: 1;
  min-height: 0;
  height: 100%;
}

.terminal.shell.is-fullscreen .shell-output {
  max-height: none;
  flex: 1;
}

.shell-body {
  padding: 14px 16px 16px;
  font-family: var(--mono);
  font-size: 13px;
  color: #d7f5ea;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(180deg, rgba(6, 12, 11, 0.5), rgba(6, 12, 11, 0.9));
}

.shell-output {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding-right: 6px;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 217, 169, 0.4) transparent;
}

.shell-output::-webkit-scrollbar {
  width: 6px;
}

.shell-output::-webkit-scrollbar-thumb {
  background: rgba(56, 217, 169, 0.35);
  border-radius: 999px;
}

.shell-line {
  white-space: pre-wrap;
  line-height: 1.4;
}

.shell-note {
  color: rgba(198, 216, 210, 0.78);
}

.shell-error {
  color: #ff9b85;
}

.shell-command-line {
  color: #e7fff7;
}

.shell-command {
  color: #e7fff7;
}

.shell-prompt {
  color: #7cf5d0;
  font-weight: 600;
  flex-shrink: 0;
}

.shell-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.shell-text {
  flex: 1;
  min-width: 120px;
  border: none;
  outline: none;
  background: transparent;
  color: #d7f5ea;
  font-family: var(--mono);
  font-size: 13px;
  caret-color: var(--accent);
}

.shell-text::placeholder {
  color: rgba(198, 216, 210, 0.5);
}

.shell-entry {
  font-weight: 600;
}

.shell-entry--dir {
  color: #6fb7ff;
}

.shell-entry--exec {
  color: #7dff9a;
}

.shell-entry--flag {
  color: #ffd37a;
}

.shell-entry--file {
  color: #e7fff7;
}

.shell-entry--hidden {
  opacity: 0.7;
}

.layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--toc-width) 1fr;
  gap: var(--toc-gap);
  padding: 20px 60px 80px;
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toc-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  overflow: auto;
  padding-right: 4px;
}

.toc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(16, 25, 23, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.toc-toolbar-title {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc-toggle {
  border: 1px solid var(--border);
  background: rgba(56, 217, 169, 0.14);
  color: #d7f5ea;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.toc-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.25);
  background: rgba(56, 217, 169, 0.2);
}

.toc-reveal {
  position: fixed;
  left: 18px;
  top: 140px;
  z-index: 20;
  border: 1px solid var(--border);
  background: rgba(15, 23, 21, 0.94);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

body.dock-hidden .toc {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-120%);
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body.dock-hidden .toc-reveal {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.toc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.toc-card.callout {
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(31, 27, 16, 0.6);
}

.toc-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.toc-nav a.active {
  background: rgba(56, 217, 169, 0.15);
  color: #b9f7e4;
}

.stat-grid {
  display: grid;
  gap: 12px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.section-head h2 {
  font-size: 24px;
  margin-bottom: 6px;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 18px;
}

.section-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.examples-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .examples-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.example-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(140deg, rgba(14, 22, 20, 0.9), rgba(9, 14, 13, 0.7));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  display: grid;
  gap: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.example-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(circle at top right, rgba(56, 217, 169, 0.12), transparent 55%);
  pointer-events: none;
}

.example-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.example-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: rgba(255, 209, 102, 0.8);
  margin-bottom: 6px;
}

.example-head h3 {
  margin-bottom: 6px;
  font-size: 18px;
  color: var(--text);
}

.example-head p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}


.example-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.example-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 16, 15, 0.7);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1 1 auto;
  text-align: center;
  white-space: normal;
  line-height: 1.3;
}

.example-tab.active {
  color: #d9fff3;
  border-color: rgba(56, 217, 169, 0.6);
  background: rgba(56, 217, 169, 0.18);
}

.example-panels {
  position: relative;
  z-index: 1;
}

.example-panel {
  display: none;
}

.example-panel.active {
  display: block;
}

.example-block {
  background: rgba(8, 12, 11, 0.8);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  display: grid;
  gap: 10px;
  min-height: 120px;
}

.example-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.example-block pre {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  color: #c9f2e4;
  white-space: pre-wrap;
  max-height: 160px;
  overflow: auto;
}

.example-block.output {
  border-color: rgba(56, 217, 169, 0.2);
  background: rgba(9, 16, 14, 0.85);
}

.file-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

@media (min-width: 980px) {
  .file-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.file-panel {
  background: rgba(11, 18, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 14px;
}

.file-panel-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.file-badge {
  min-width: 58px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: #0b1210;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  font-weight: 700;
}

.file-panel-head h3 {
  margin-bottom: 4px;
  font-size: 18px;
  color: var(--text);
}

.file-panel-head p {
  color: var(--muted);
  font-size: 13px;
}

.file-list {
  display: grid;
  gap: 10px;
}

.file-item {
  background: rgba(8, 12, 11, 0.75);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.file-path {
  font-family: var(--mono);
  font-size: 12px;
  color: #c9f2e4;
  background: rgba(56, 217, 169, 0.12);
  border: 1px solid rgba(56, 217, 169, 0.25);
  border-radius: 8px;
  padding: 4px 8px;
  width: fit-content;
  max-width: 100%;
  word-break: break-all;
}

.file-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.card h3 {
  margin-bottom: 10px;
}

.card p,
.card li {
  color: var(--muted);
  line-height: 1.6;
}

.card ul {
  padding-left: 18px;
  margin-top: 8px;
}

.card ol {
  padding-left: 18px;
  margin-top: 8px;
}

.card pre,
.tab-panel pre {
  margin: 12px 0 0;
  background: #0b1412;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: #c9f2e4;
}

.pipeline {
  display: grid;
  gap: 16px;
}

.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  background: rgba(9, 15, 14, 0.6);
  border: 1px solid var(--border);
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(56, 217, 169, 0.18);
  color: #7ff0cf;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab {
  border: 1px solid var(--border);
  background: rgba(12, 18, 17, 0.6);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.tab.active {
  color: #d9fff3;
  border-color: rgba(56, 217, 169, 0.6);
  background: rgba(56, 217, 169, 0.2);
}

.tab-panels {
  background: rgba(9, 14, 13, 0.55);
  border-radius: 16px;
  padding: 18px;
  border: 1px solid var(--border);
}

.tab-panel {
  display: none;
  color: var(--muted);
}

.tab-panel.active {
  display: block;
}

.tab-panel h3 {
  color: var(--text);
  margin-bottom: 10px;
}

.tab-panel ol {
  padding-left: 20px;
  line-height: 1.6;
}

.callout {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(56, 217, 169, 0.12);
  color: #c8f7ea;
  border: 1px solid rgba(56, 217, 169, 0.35);
}

.code-card {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.code-card pre {
  background: #0b1412;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  color: #c9f2e4;
}

.output-block {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(9, 14, 13, 0.6);
}

.output-block summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.output-block summary::-webkit-details-marker {
  display: none;
}

.output-block summary::marker {
  content: "";
}

.output-block[open] summary {
  color: #c9f2e4;
}

.output-block summary::after {
  content: "+";
  font-size: 13px;
  color: var(--accent);
}

.output-block[open] summary::after {
  content: "-";
}

.output-block pre {
  margin-top: 8px;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--mono);
  font-size: 12px;
  color: #c9f2e4;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}

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

.feature-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(10, 16, 15, 0.6);
  padding: 12px 14px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-card h3 {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.feature-card p {
  line-height: 1.6;
  margin-bottom: 8px;
}

.mini {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.mini-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

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

.flag-pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(56, 217, 169, 0.16);
  border: 1px solid rgba(56, 217, 169, 0.35);
  color: #c9f2e4;
  white-space: nowrap;
}


.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.filter-bar input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 15, 0.6);
  color: var(--text);
}

.filter-hint {
  color: var(--muted);
  font-size: 12px;
}

.flag-list {
  display: grid;
  gap: 14px;
}

.flag-group h3 {
  margin-bottom: 8px;
}

.flag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(12, 18, 17, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.flag-row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.flag-row code {
  font-family: var(--mono);
  color: #c7f0e4;
}

.flag-row-desc {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
}

.flag-row.is-active {
  border-color: rgba(56, 217, 169, 0.45);
  box-shadow: 0 0 0 1px rgba(56, 217, 169, 0.2);
}

.flag-more {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 16, 15, 0.7);
  color: #c7f0e4;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.flag-more:hover {
  background: rgba(20, 32, 30, 0.8);
  border-color: rgba(56, 217, 169, 0.4);
  transform: translateY(-1px);
}

.flag-detail {
  display: none;
  position: fixed;
  inset: 0;
  padding: 24px;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 20% 20%, rgba(15, 35, 31, 0.72), rgba(4, 8, 7, 0.92));
  backdrop-filter: blur(6px);
  z-index: 60;
}

.flag-detail.is-active {
  display: flex;
}

.flag-detail-card {
  background: #0a1110;
  border-color: rgba(76, 104, 98, 0.35);
  width: min(980px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.55);
}

.flag-detail-body {
  padding: 16px;
  background: linear-gradient(180deg, rgba(6, 12, 11, 0.45), rgba(6, 12, 11, 0.9));
  color: #d7f5ea;
  overflow: auto;
}

.flag-detail-header h3 {
  margin-bottom: 6px;
}

.flag-detail-summary {
  color: rgba(198, 216, 210, 0.78);
  font-size: 13px;
}

.flag-detail-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.flag-detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(125, 240, 210, 0.7);
  margin-bottom: 6px;
}

.flag-detail-code {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 14, 13, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #c7f0e4;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}

.flag-detail-list {
  margin: 0;
  padding-left: 16px;
  color: rgba(214, 240, 232, 0.85);
  font-size: 13px;
  line-height: 1.6;
}

.flag-detail-close {
  margin-left: auto;
  border: none;
  background: transparent;
  color: rgba(214, 240, 232, 0.75);
  font-size: 12px;
  cursor: pointer;
}

.flag-detail-close:hover {
  color: #d7f5ea;
}

.flag-detail-card .terminal-head {
  flex-shrink: 0;
}

body.flag-detail-open {
  overflow: hidden;
}

@media (min-width: 900px) {
  .flag-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: rgba(12, 18, 17, 0.6);
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.is-hidden {
  display: none !important;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #07110d;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 60px 60px;
  color: var(--muted);
}

.footer span {
  margin-left: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-18px);
  }
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .toc {
    order: -1;
  }
  .hero {
    padding: 32px 24px 10px;
  }
  .layout,
  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 680px) {
  .hero-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-actions {
    width: 100%;
  }
  .hero-actions .btn {
    flex: 1;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .footer {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  .toc-reveal {
    top: auto;
    bottom: 120px;
    left: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb,
  .reveal,
  .toc,
  .toc-toggle,
  .toc-reveal {
    animation: none;
    transition: none;
  }
}
