/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --saffron:       #FF9933;
  --saffron-light: #FFB347;
  --saffron-dark:  #E67E00;
  --saffron-pale:  #FFF3E0;
  --saffron-glow:  rgba(255,153,51,0.15);
  --white:         #FFFFFF;
  --bg:            #0f0f0f;
  --bg-card:       #181818;
  --bg-alt:        #141414;
  --bg-code:       #0d0d0d;
  --border:        rgba(255,153,51,0.12);
  --border-subtle: rgba(255,255,255,0.06);
  --text:          #f0f0f0;
  --text-muted:    #888;
  --text-dim:      #555;
  --green:         #4caf50;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow:   0 0 40px rgba(255,153,51,0.12);
  --font:          'Inter', system-ui, sans-serif;
  --mono:          'JetBrains Mono', 'Cascadia Code', monospace;
  --nav-h:         64px;
  --transition:    0.2s ease;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--saffron-dark); border-radius: 3px; }

/* ── SELECTION ── */
::selection { background: var(--saffron); color: #000; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5 { font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-weight: 600; }
a { color: var(--saffron); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--saffron-light); }
p { color: var(--text-muted); }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(255,153,51,0.1);
  color: var(--saffron-light);
  padding: 0.15em 0.45em;
  border-radius: 4px;
  border: 1px solid rgba(255,153,51,0.2);
}

/* ── UTILITIES ── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mt { margin-top: 2rem; }
.mt-sm { margin-top: 0.75rem; }
.mt-lg { margin-top: 3rem; }
.hide-mobile { display: inline; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--saffron);
  color: #000;
}
.btn-primary:hover {
  background: var(--saffron-light);
  color: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255,153,51,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--saffron);
  border: 1.5px solid var(--saffron);
}
.btn-outline:hover {
  background: var(--saffron-glow);
  color: var(--saffron-light);
  transform: translateY(-1px);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(15,15,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}
.nav.scrolled {
  background: rgba(15,15,15,0.97);
  border-bottom-color: var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-links a:hover { color: var(--white); background: var(--border-subtle); }
.nav-github {
  display: flex !important;
  align-items: center;
  gap: 0.35rem !important;
  margin-left: 0.25rem;
  color: var(--saffron) !important;
  border: 1px solid var(--border) !important;
}
.nav-github:hover {
  background: var(--saffron-glow) !important;
  border-color: var(--saffron) !important;
  color: var(--saffron-light) !important;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255,153,51,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(255,153,51,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content {
  padding: 5rem 24px 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  width: 100%;
}
/* flag stripe */
.hero-flag {
  display: flex;
  height: 4px;
  width: 80px;
  border-radius: 2px;
  overflow: hidden;
}
.flag-saffron { flex: 1; background: #FF9933; }
.flag-white   { flex: 1; background: #FFFFFF; }
.flag-green   { flex: 1; background: #138808; }

.hero-title {
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--white);
}
.hero-title-term {
  color: var(--saffron);
  display: block;
  font-size: 0.55em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: -0.2em;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 600px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.hero-badges img { height: 22px; border-radius: 4px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ── HERO TERMINAL PREVIEW ── */
.hero-terminal-preview {
  width: 100%;
  max-width: 860px;
  background: #0e0e0e;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
  margin-top: 1.5rem;
  text-align: left;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #1c1c1c;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}
.dot-red    { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green  { background: #28c840; }
.terminal-title {
  margin-left: auto;
  margin-right: auto;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--mono);
}
.terminal-body {
  padding: 0 0 1rem;
  font-family: var(--mono);
  overflow-x: auto;
}

/* ── EXACT TERMINAL BANNER ── */
.term-banner {
  display: block;
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.38;
  white-space: pre;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  background: #0e0e0e;
  user-select: none;
  /* force horizontal scroll on small screens, no wrap */
  min-width: 0;
}

/* tricolor span classes — match exact Go ANSI codes */
.t-sf { color: #FF9933; }   /* saffron  \033[38;5;208m */
.t-wh { color: #e8e8e8; }   /* white    \033[97m       */
.t-gr { color: #22a822; }   /* green    \033[38;5;28m  */
.t-bl { color: #4da6ff; }   /* blue     \033[38;5;33m  */
.t-cy { color: #00e5ff; }   /* cyan     \033[36m       */
.t-yl { color: #fdd835; }   /* yellow   \033[33m       */

/* terminal content area below banner */
.term-lines {
  margin: 0.5rem 1rem 0.25rem;
  max-height: 80px;
  overflow: hidden;
  font-size: 0.8rem;
}
.term-line { color: var(--text-muted); margin: 2px 0; }
.term-line-prompt { color: var(--saffron); }
.term-line-out { color: #ccc; padding-left: 1ch; }
.term-line-ok { color: var(--green); padding-left: 1ch; }
.term-prompt-line {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 1rem;
  font-size: 0.82rem;
}
.term-prompt { color: var(--saffron); }
.term-cursor {
  color: var(--saffron);
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── SECTION BASE ── */
.section { padding: 6rem 0; }
.section--alt { background: var(--bg-alt); }
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--saffron);
  background: var(--saffron-glow);
  border: 1px solid rgba(255,153,51,0.25);
  padding: 0.3em 0.8em;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

/* ── FEATURES ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--saffron), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow), var(--shadow-glow);
}
.feature-card:hover::before { opacity: 1; }
.feature-card--accent {
  border-color: rgba(255,153,51,0.25);
  background: linear-gradient(135deg, rgba(255,153,51,0.06), var(--bg-card));
}
.feature-icon { margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: 0.5rem; color: var(--white); }
.feature-card p { font-size: 0.9rem; margin-bottom: 1rem; }
.feature-code {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.feature-code code {
  background: none;
  border: none;
  padding: 0;
  color: var(--saffron-light);
}

/* ── INSTALL TABS ── */
.install-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0;
  flex-wrap: wrap;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--transition);
  font-family: var(--font);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn:hover { color: var(--white); }
.tab-btn.active { color: var(--saffron); border-bottom-color: var(--saffron); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.install-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.install-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.install-step:hover { border-color: var(--border); }
.step-num {
  width: 36px; height: 36px;
  min-width: 36px;
  background: var(--saffron);
  color: #000;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.step-body h4 { color: var(--white); margin-bottom: 0.4rem; }
.step-body p { font-size: 0.9rem; margin-bottom: 0.75rem; }

.install-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 0.75rem;
}
.install-detail {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.detail-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ── CODE BLOCKS ── */
.code-block-wrap {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;          /* clip rounded corners vertically */
  overflow-x: auto;          /* let wide code scroll inside the box */
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  width: 100%;
}
.code-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.03);
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--mono);
}
.copy-btn {
  position: absolute;
  top: 0.6rem; right: 0.75rem;
  background: rgba(255,153,51,0.12);
  border: 1px solid var(--border);
  color: var(--saffron);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  z-index: 10;
}
.copy-btn:hover { background: var(--saffron); color: #000; }
.code-block-header + .copy-btn { position: static; margin-left: auto; }
.code-block {
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.7;
  padding: 1.25rem;
  color: #cdd6f4;
  overflow-x: auto;
  white-space: pre;
  word-break: normal;
  tab-size: 2;
  max-width: 100%;
  display: block;
}
.code-block .c  { color: #6c7086; }
.code-block .str{ color: #a6e3a1; }
.code-block .prompt { color: var(--saffron); user-select: none; }

/* ── USAGE GRID ── */
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.usage-block {
  min-width: 0;       /* allow grid cell to shrink below content */
  overflow: hidden;
}
.usage-block .code-block-wrap {
  width: 100%;
  max-width: 100%;
}
.usage-block h4 {
  color: var(--white);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── TABLES ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}
.commands-table, .compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.commands-table th,
.commands-table td,
.compare-table th,
.compare-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.commands-table th,
.compare-table th {
  color: var(--text-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  background: rgba(255,255,255,0.02);
}
.commands-table tr:hover td,
.compare-table tr:hover td { background: rgba(255,153,51,0.03); }
.commands-table-wrap {
  margin-top: 3rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.commands-table-wrap h3 { color: var(--white); margin-bottom: 1.25rem; }

.compare-table .col-indus { background: rgba(255,153,51,0.04); }
.compare-table .col-indus th { color: var(--saffron); }
.yes    { color: #4caf50; font-size: 1.1rem; text-align: center; }
.no     { color: #f44336; font-size: 1.1rem; text-align: center; }
.partial{ color: #ff9800; font-size: 1.1rem; text-align: center; }
.col-indus.yes { background: rgba(255,153,51,0.04); }
.compare-note {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── CONFIG BLOCK ── */
.config-block { margin-top: 3rem; }
.config-block h3 { color: var(--white); margin-bottom: 0.75rem; }
.config-block > p { margin-bottom: 1rem; font-size: 0.9rem; }

/* ── PIPELINES ── */
.pipeline-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.pipe-box--input {
  background: rgba(255,153,51,0.06);
  border: 1px dashed var(--saffron);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  text-align: center;
  width: 100%;
  max-width: 640px;
}
.pipe-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--saffron);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.pipe-arrow {
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
}
.pipe-stages {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 720px;
  flex-wrap: wrap;
  justify-content: center;
}
.pipe-stage {
  flex: 1;
  min-width: 220px;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
}
.pipe-stage-title {
  font-size: 0.72rem;
  color: var(--saffron);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.pipe-stage-cmd { margin-bottom: 0.5rem; }
.pipe-stage-sub { font-size: 0.78rem; color: var(--text-dim); }
.pipe-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem;
  gap: 0.25rem;
}
.pipe-connector-line {
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--saffron-dark), var(--saffron));
  border-radius: 1px;
}
.pipe-connector-label {
  font-size: 0.7rem;
  color: var(--saffron);
  white-space: nowrap;
  font-family: var(--mono);
}
.pipe-rules {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 640px;
}
.pipe-rule {
  font-size: 0.88rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  border-left: 3px solid var(--saffron);
  padding: 0.6rem 1rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ── COLORS ── */
.colors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.color-swatch {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.color-swatch:hover,
.color-swatch.active {
  border-color: var(--c, var(--saffron));
  box-shadow: 0 0 0 1px var(--c, var(--saffron)), 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.swatch-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--c, var(--saffron));
}
.swatch-info { display: flex; flex-direction: column; gap: 0.15rem; }
.swatch-info code { font-size: 0.82rem; }
.swatch-info span { font-size: 0.8rem; color: var(--text-dim); }
.swatch-preview {
  font-family: var(--mono);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}
.colors-note { text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* ── RELEASES ── */
.releases-header-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.releases-list { display: flex; flex-direction: column; gap: 1rem; }
.releases-loading {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-dim);
  padding: 2rem;
  justify-content: center;
}
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--saffron);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.release-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition);
}
.release-card:hover { border-color: var(--border); }
.release-card.latest { border-color: rgba(255,153,51,0.35); }
.release-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.release-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.release-title h3 { color: var(--white); font-size: 1.1rem; }
.release-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2em 0.6em;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.release-badge.latest { background: var(--saffron); color: #000; }
.release-badge.pre    { background: rgba(255,153,51,0.15); color: var(--saffron); border: 1px solid var(--border); }
.release-date { font-size: 0.82rem; color: var(--text-dim); }
.release-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.asset-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255,153,51,0.08);
  color: var(--saffron-light);
  border: 1px solid rgba(255,153,51,0.2);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-family: var(--mono);
  text-decoration: none;
  transition: all var(--transition);
}
.asset-link:hover {
  background: var(--saffron);
  color: #000;
  border-color: var(--saffron);
}
.release-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  line-height: 1.6;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  white-space: pre-wrap;
}
.releases-error {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-dim);
}
.releases-error a { color: var(--saffron); }

/* ── ROADMAP ── */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
.roadmap-col h4 { color: var(--white); margin-bottom: 1.25rem; font-size: 1.05rem; }
.roadmap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.roadmap-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.roadmap-list li::before { content: '○'; color: var(--text-dim); flex-shrink: 0; }
.roadmap-list.done li { border-color: rgba(76,175,80,0.15); }
.roadmap-list.done li::before { content: '●'; color: var(--green); }

/* ── FOOTER ── */
.footer {
  background: #0a0a0a;
  border-top: 1px solid var(--border-subtle);
  padding-top: 4rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3rem;
  padding-bottom: 3rem;
}
.footer-brand { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-brand .nav-logo-img { width: 32px; height: 32px; border-radius: 7px; }
.footer-brand strong { font-size: 1.15rem; color: var(--white); }
.footer-brand p { font-size: 0.88rem; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col h5 {
  color: var(--white);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.footer-col a { color: var(--text-muted); font-size: 0.88rem; transition: color var(--transition); }
.footer-col a:hover { color: var(--saffron); }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 1.25rem 24px;
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--saffron); }

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 520px;
  width: 90%;
  position: relative;
  transform: scale(0.95);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}
.modal-close:hover { color: var(--white); }
.modal-terminal { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-subtle); }
.modal-desc {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════
   GLOBAL OVERFLOW GUARD
═══════════════════════════════════════════════ */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Every box is capped at viewport width */
* { min-width: 0; }

/* Scrollable wrappers for wide content */
.table-wrap,
.commands-table-wrap,
.code-block,
.term-banner,
.terminal-body,
.pipeline-diagram {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Grids — safe minimums that never force overflow */
.features-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
}
.usage-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
}
.colors-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
}
.install-info-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
}

/* Pipeline stages — safe at any width */
.pipe-stage { min-width: 0; flex: 1 1 180px; }
.pipe-stages { flex-wrap: wrap; }

/* Compare table always scrolls, never wraps columns */
.compare-table { min-width: 520px; }

/* ═══════════════════════════════════════════════
   RESPONSIVE — 1200 → 1024 → 768 → 640 → 480 → 360
═══════════════════════════════════════════════ */

/* ── 1200px ── */
@media (max-width: 1200px) {
  .container { padding: 0 20px; }
  .colors-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ── 1024px: tablet landscape ── */
@media (max-width: 1024px) {
  .hero-terminal-preview { max-width: 100%; }
  .roadmap-grid { grid-template-columns: 1fr 1fr; }
}

/* ── 768px: tablet portrait ── */
@media (max-width: 768px) {
  :root { --nav-h: 58px; }

  /* ── nav ── */
  .nav-hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(12,12,12,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: flex;
    align-items: center;
    padding: 0.85rem 1rem;
    width: 100%;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }
  .nav-github { margin-left: 0 !important; margin-top: 0.25rem; border: 1px solid var(--border) !important; }
  .hide-mobile { display: none; }

  /* ── hero ── */
  .hero-content { padding: 3.5rem 16px 3rem; gap: 1.25rem; }
  .hero-sub { font-size: 1rem; }
  .hero-badges { gap: 0.4rem; }
  .hero-badges img { height: 20px; }
  .hero-terminal-preview { border-radius: var(--radius-sm); }
  .term-banner { font-size: 0.42rem; line-height: 1.3; }

  /* ── sections ── */
  .section { padding: 4.5rem 0; }
  .section-header { margin-bottom: 2.5rem; }
  .section-header h2 { font-size: clamp(1.5rem, 5vw, 2rem); }

  /* ── features ── */
  .features-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .feature-card:hover { transform: none; }

  /* ── usage ── */
  .usage-grid { grid-template-columns: 1fr; gap: 1.25rem; }

  /* ── install ── */
  .install-step { padding: 1.25rem; }
  .code-block { font-size: 0.78rem; padding: 1rem; }
  .code-block-header { font-size: 0.72rem; }

  /* ── colors ── */
  .colors-grid { grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
  .color-swatch { padding: 1rem; }
  .color-swatch:hover { transform: none; }

  /* ── pipeline ── */
  .pipeline-diagram { padding: 1.5rem 1rem; }
  .pipe-stages { flex-direction: column; align-items: stretch; }
  .pipe-connector { flex-direction: row; padding: 0.5rem 0; justify-content: center; }
  .pipe-connector-line { width: 40px; height: 2px; }
  .pipe-stage { flex: 1 1 auto; }

  /* ── tables ── */
  .commands-table,
  .compare-table { font-size: 0.82rem; }
  .commands-table th,
  .commands-table td,
  .compare-table th,
  .compare-table td { padding: 0.6rem 0.75rem; }

  /* ── releases ── */
  .releases-header-actions { gap: 0.75rem; }
  .release-header { flex-direction: column; gap: 0.5rem; }
  .release-assets { gap: 0.4rem; }
  .asset-link { font-size: 0.78rem; }

  /* ── roadmap ── */
  .roadmap-grid { grid-template-columns: 1fr; gap: 1.5rem; }

  /* ── footer ── */
  .footer-inner { flex-direction: column; gap: 2rem; padding-bottom: 2rem; }
  .footer-links { gap: 1.5rem; flex-wrap: wrap; }
  .footer-col { min-width: 140px; }

  /* ── modal ── */
  .modal { padding: 1.5rem; }
}

/* ── 640px: large phone ── */
@media (max-width: 640px) {
  .container { padding: 0 14px; }

  /* ── hero ── */
  .hero-content { padding: 3rem 14px 2.5rem; gap: 1rem; }
  .hero-title { font-size: clamp(2.2rem, 11vw, 3.5rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; width: 100%; }
  .hero-flag { width: 60px; }
  .hero-badges img { height: 18px; }
  .term-banner { font-size: 0.34rem; line-height: 1.25; }
  .terminal-body { padding-bottom: 0.75rem; }

  /* ── sections ── */
  .section { padding: 3.5rem 0; }
  .section-header { margin-bottom: 2rem; }

  /* ── features ── */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 1.25rem; }
  .feat-svg { width: 1.6rem; height: 1.6rem; }

  /* ── install ── */
  .install-info-grid { grid-template-columns: 1fr 1fr; }
  .install-tabs { flex-direction: column; border-bottom: none; gap: 0.4rem; }
  .tab-btn {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    text-align: left;
    padding: 0.65rem 1rem;
    width: 100%;
    margin-bottom: 0;
  }
  .tab-btn.active { background: var(--saffron-glow); border-color: var(--saffron); color: var(--saffron); }

  /* ── colors ── */
  .colors-grid { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; }
  .swatch-preview { font-size: 0.7rem; }

  /* ── pipeline ── */
  .pipe-box--input { padding: 0.75rem 1rem; }
  .pipe-box--input code { font-size: 0.72rem; word-break: break-all; }

  /* ── Built-in commands table → card layout ── */
  .commands-table thead { display: none; }
  .commands-table tr {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    gap: 0.25rem;
  }
  .commands-table td {
    display: block;
    border: none;
    padding: 0.2rem 0;
    font-size: 0.83rem;
  }
  .commands-table td:first-child { font-weight: 600; color: var(--saffron-light); }
  .commands-table td:last-child  { color: var(--green); }

  /* ── code blocks ── */
  .code-block {
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-all;
  }
  .copy-btn { font-size: 0.68rem; padding: 0.2rem 0.5rem; }

  /* ── roadmap ── */
  .roadmap-list li { font-size: 0.85rem; padding: 0.5rem 0.75rem; }

  /* ── releases ── */
  .releases-header-actions { flex-direction: column; }
  .releases-header-actions .btn { width: 100%; justify-content: center; }
  .release-card { padding: 1.25rem; }

  /* ── footer ── */
  .footer-links { flex-direction: column; gap: 1.25rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ── 480px: phone ── */
@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.9rem, 10vw, 2.6rem); }
  .hero-title-term { font-size: 0.48em; letter-spacing: 0.1em; }
  .hero-sub { font-size: 0.9rem; }
  .hero-badges { gap: 0.3rem; }
  .hero-badges img { height: 17px; }
  .term-banner { font-size: 0.28rem; line-height: 1.2; }

  .nav-logo span { font-size: 0.95rem; }

  .section { padding: 3rem 0; }

  /* ── install ── */
  .install-info-grid { grid-template-columns: 1fr; }
  .install-step { flex-direction: column; gap: 0.75rem; padding: 1rem; }
  .step-num { width: 30px; height: 30px; min-width: 30px; font-size: 0.85rem; }

  /* ── colors ── */
  .colors-grid { grid-template-columns: repeat(2, 1fr); }
  .swatch-info code { font-size: 0.75rem; }
  .swatch-info span { font-size: 0.72rem; }

  /* ── pipeline rules ── */
  .pipe-rules { gap: 0.4rem; }
  .pipe-rule { font-size: 0.8rem; padding: 0.5rem 0.75rem; }

  /* ── modal ── */
  .modal { padding: 1.25rem; border-radius: 12px; width: 95%; }
  .modal-terminal .terminal-bar { padding: 8px 12px; }

  /* ── footer ── */
  .footer-col { min-width: 0; width: 100%; }
}

/* ── 360px: small phone ── */
@media (max-width: 360px) {
  :root { --nav-h: 54px; }
  .container { padding: 0 10px; }

  .hero-title { font-size: 1.85rem; }
  .hero-content { padding: 2.5rem 10px 2rem; gap: 0.9rem; }
  .hero-badges img { height: 16px; }
  .term-banner { font-size: 0.22rem; line-height: 1.15; }

  .btn { padding: 0.65rem 1.1rem; font-size: 0.88rem; }
  .btn-sm { padding: 0.45rem 0.85rem; font-size: 0.8rem; }

  .section { padding: 2.5rem 0; }
  .section-header h2 { font-size: 1.35rem; }

  .feature-card { padding: 1rem; }

  .colors-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .color-swatch { padding: 0.65rem; }

  .release-card { padding: 1rem; }
  .roadmap-col h4 { font-size: 0.95rem; }

  .code-block { font-size: 0.7rem; padding: 0.75rem; }
  .install-step { padding: 0.85rem; }
}

/* ── SVG Icon System ─────────────────────────────────────────── */

/* Feature card icons */
.feature-icon { margin-bottom: 1rem; }
.feat-svg {
  width: 2rem;
  height: 2rem;
  color: var(--saffron);
  display: block;
  flex-shrink: 0;
}

/* Pipeline rule icons */
.pipe-rule {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}
.rule-svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--text-muted);
}

/* Button icons */
.btn-icon {
  width: 1rem;
  height: 1rem;
  vertical-align: middle;
  margin-right: 0.3rem;
  display: inline-block;
}

/* Table check/cross/warn */
.icon-yes {
  color: #4caf50;
  font-weight: 700;
  font-size: 1.05em;
}
.icon-no {
  color: #f44336;
  font-weight: 700;
  font-size: 1.05em;
}
.icon-warn {
  color: #ff9800;
  font-weight: 700;
  font-size: 1.1em;
}

/* Roadmap heading icons */
.roadmap-col h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.rm-svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.rm-svg--done  { color: #4caf50; }
.rm-svg--plan  { color: var(--saffron); }

