/* style.css — Bash Automation Toolkit */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #020202;
  --bg1:       #0a0e0a;
  --bg2:       #0d130d;
  --card:      #0d1117;
  --card2:     #111811;
  --border:    rgba(34, 197, 94, 0.12);
  --border2:   rgba(34, 197, 94, 0.06);

  --green:     #22c55e;
  --green-dim: rgba(34, 197, 94, 0.15);
  --green-mid: rgba(34, 197, 94, 0.5);
  --warn:      #facc15;
  --warn-dim:  rgba(250, 204, 21, 0.12);
  --err:       #f87171;
  --err-dim:   rgba(248, 113, 113, 0.12);
  --gold:      #c9a832;

  --m1:  #9eb8a2;
  --m2:  #627a67;
  --m3:  #3a4e3e;

  --text:    #e2f0e6;
  --text-d:  #7e96b0;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;

  --radius: 6px;
  --radius-lg: 10px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--green);
  background: var(--green-dim);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Header ────────────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 52px;
  background: rgba(2, 2, 2, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border2);
}

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--green);
}
.logo-sep { color: var(--m3); }
.logo-sub { color: var(--m1); }

.gh-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--m1);
  transition: color .2s, border-color .2s, background .2s;
}
.gh-btn:hover {
  color: var(--green);
  border-color: var(--green-mid);
  background: var(--green-dim);
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 32px 96px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--m2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(52px, 6vw, 80px);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 15px;
  color: var(--m1);
  max-width: 440px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--green);
  letter-spacing: 0.04em;
}
.stat-lbl {
  font-size: 10px;
  color: var(--m2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat-div {
  width: 1px; height: 32px;
  background: var(--border);
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--green);
  color: #020202;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: #16a34a; transform: translateY(-1px); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--m1);
  transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--green); border-color: var(--green-mid); }

/* ── Terminal Window ────────────────────────────────────────── */
.term-wrap, .hero-terminal {
  background: #050c05;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(34, 197, 94, 0.04), 0 8px 32px rgba(0,0,0,0.5);
}
.hero-terminal { font-size: 12px; }

.term-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #0a120a;
  border-bottom: 1px solid var(--border2);
}
.tdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.tdot-r { background: #f87171; }
.tdot-y { background: #facc15; }
.tdot-g { background: #22c55e; }
.term-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--m2);
  letter-spacing: 0.05em;
}
.term-replay {
  background: none;
  border: none;
  color: var(--m2);
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
  transition: color .2s;
  line-height: 1;
}
.term-replay:hover { color: var(--green); }

.term-body {
  padding: 14px 16px;
  min-height: 140px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  overflow: hidden;
}

/* Terminal line types */
.tline { display: block; white-space: pre-wrap; word-break: break-all; }
.tline-cmd   { color: var(--green); }
.tline-cmd::before { content: '$ '; color: var(--m3); }
.tline-info  { color: var(--m1); }
.tline-ok    { color: var(--green); }
.tline-warn  { color: var(--warn); }
.tline-err   { color: var(--err); }
.tline-plain { color: var(--m2); }
.tline-border{ color: #2a4a2e; }
.tline-label {
  color: var(--green);
  font-weight: 500;
  border-bottom: 1px solid var(--border2);
  margin-bottom: 2px;
  padding-bottom: 2px;
  display: block;
}

.cursor {
  display: inline-block;
  width: 7px; height: 13px;
  background: var(--green);
  vertical-align: text-bottom;
  animation: blink .9s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ── Scripts Section ────────────────────────────────────────── */
.scripts {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border2);
}
.section-num {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--m3);
  line-height: 1;
  flex-shrink: 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.06em;
  color: var(--text);
}
.section-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  margin-top: 6px;
  font-weight: 500;
}

.install-section .section-header {
  border-bottom: 1px solid var(--border);
  position: relative;
}
.install-section .section-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 80px;
  height: 2px;
  background: var(--green);
}
.install-section .section-num {
  color: var(--green);
  opacity: 0.7;
}

.script-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.card-wide { grid-column: 1 / -1; }

/* ── Script Card ─────────────────────────────────────────────── */
.script-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .25s, box-shadow .25s;
}
.script-card:hover {
  border-color: var(--border);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.05);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.card-badge {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--m3);
  line-height: 1;
  flex-shrink: 0;
  min-width: 36px;
}
.card-name {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--green);
  font-weight: 500;
}
.card-tag {
  font-size: 11px;
  color: var(--m2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}
.card-desc {
  font-size: 13px;
  color: var(--m1);
  line-height: 1.65;
}

.card-usage {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #050c05;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 12px;
  flex-wrap: wrap;
}
.usage-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--m3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.usage-cmd {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  background: none;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.copy-btn {
  background: none;
  border: none;
  color: var(--m3);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  transition: color .2s;
  display: flex;
  align-items: center;
}
.copy-btn:hover { color: var(--green); }
.copy-btn.copied { color: var(--green); }

.card-log {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--m3);
}
.card-log code { font-size: 11px; }

/* ── Hero verified badge ─────────────────────────────────────── */
.eyebrow-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  padding: 2px 8px;
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 99px;
  color: var(--green);
  font-size: 10px;
  letter-spacing: 0.08em;
}

/* ── Cron Section ───────────────────────────────────────────── */
.cron-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.copy-all-btn {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--m1);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.copy-all-btn:hover {
  color: var(--green);
  border-color: var(--green-mid);
  background: var(--green-dim);
}
.cron-block {
  background: #050c05;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cron-block pre {
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--m1);
  white-space: pre;
  overflow-x: auto;
}
.cron-block pre .comment { color: var(--m3); }

/* ── Dry Run Section ─────────────────────────────────────────── */
.dryrun-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 80px;
}
.dryrun-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
}
.dryrun-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.dryrun-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s;
}
.dryrun-card.pass { border-left: 2px solid var(--green); }
.dryrun-card.fail { border-left: 2px solid var(--err); }
.dryrun-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}
.dryrun-checks { display: flex; gap: 6px; flex-wrap: wrap; }
.dcheck {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid transparent;
}
.dcheck.pass {
  background: var(--green-dim);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--green);
}
.dcheck.fail {
  background: var(--err-dim);
  border-color: rgba(248, 113, 113, 0.2);
  color: var(--err);
}
.dryrun-note {
  font-size: 11.5px;
  color: var(--m2);
  line-height: 1.5;
}
.dryrun-note code { font-size: 10.5px; }

/* ── Standards Section ──────────────────────────────────────── */
.standards-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 96px;
}
.standards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.std-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .25s;
}
.std-card:hover { border-color: var(--border); }
.std-icon { color: var(--green); opacity: 0.7; }
.std-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.std-body {
  font-size: 12.5px;
  color: var(--m2);
  line-height: 1.6;
}

/* ── Interactive Playground ──────────────────────────────────── */
.playground {
  background: var(--bg1);
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
  padding: 72px 0 80px;
  margin-bottom: 0;
}
.pg-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.pg-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--warn);
}

/* Script tabs */
.pg-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border2);
  padding-bottom: 0;
}
.pg-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  color: var(--m2);
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
  position: relative;
  bottom: -1px;
}
.pg-tab:hover  { color: var(--m1); }
.pg-tab.active {
  color: var(--green);
  background: var(--bg2);
  border-color: var(--border2);
  border-bottom-color: var(--bg2);
}

/* Body layout */
.pg-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}
.pg-left {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
}
.pg-panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--m3);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border2);
}

/* Param fields */
.pg-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pg-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--m1);
  letter-spacing: 0.04em;
}
.pg-input {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--green);
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.pg-input:focus { border-color: var(--green-mid); }
.pg-input.pg-input-err { border-color: rgba(248,113,113,0.5); }

.pg-select {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--m1);
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  width: 100%;
}
.pg-select:focus { border-color: var(--green-mid); }

.pg-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--green) 0%, var(--warn) 60%, var(--err) 85%);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.pg-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg);
  transition: background .2s;
}
.pg-range::-webkit-slider-thumb:hover { background: #16a34a; }
.pg-range-val { color: var(--green); font-weight: 500; }
.pg-range-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--m3);
}

.pg-hint {
  font-size: 10.5px;
  color: var(--m3);
  font-family: var(--font-mono);
}
.pg-err {
  font-size: 10.5px;
  color: var(--err);
  font-family: var(--font-mono);
  min-height: 14px;
}
.pg-no-params {
  font-size: 12.5px;
  color: var(--m2);
  line-height: 1.6;
  padding-top: 8px;
}

/* Terminal */
.pg-term-wrap { border-radius: var(--radius-lg); }
.pg-term-body {
  min-height: 380px;
  max-height: 440px;
  overflow-y: auto;
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.pg-term-body::-webkit-scrollbar { width: 5px; }
.pg-term-body::-webkit-scrollbar-track { background: transparent; }
.pg-term-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.pg-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  min-height: 340px;
  color: var(--m3);
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}

/* Exit code line types */
.tline-exit0 { color: var(--green); font-weight: 500; }
.tline-exit1 { color: var(--warn);  font-weight: 500; }

/* Status badge */
.pg-status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
}
.status-running {
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.25);
  color: var(--warn);
  animation: statusPulse 1.2s ease-in-out infinite;
}
.status-done {
  background: var(--green-dim);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: var(--green);
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* Action buttons */
.pg-right { display: flex; flex-direction: column; gap: 12px; }
.pg-actions { display: flex; gap: 10px; }

.pg-run-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: var(--green);
  color: #020202;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .15s, opacity .2s;
  letter-spacing: 0.02em;
}
.pg-run-btn:hover:not(:disabled) { background: #16a34a; transform: translateY(-1px); }
.pg-run-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.pg-clear-btn {
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--m2);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.pg-clear-btn:hover { color: var(--text); border-color: var(--m3); }

.pg-copy-btn {
  margin-left: auto;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--m2);
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.pg-copy-btn:hover:not(:disabled) { color: var(--green); border-color: var(--green-mid); }
.pg-copy-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Footer — base (overridden by new styles at bottom) ──────── */
.footer-copy { font-size: 12px; color: var(--m3); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--green);
  color: #020202;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 99px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 999;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Scroll Reveal ───────────────────────────────────────────── */
/* Cards are visible by default (no JS = no broken layout).
   JS adds .pre-reveal immediately, then IntersectionObserver removes it. */
.script-card, .std-card {
  transition: opacity .45s ease, transform .45s ease, border-color .25s, box-shadow .25s;
}
.script-card.pre-reveal, .std-card.pre-reveal {
  opacity: 0;
  transform: translateY(16px);
}
@media print {
  .script-card.pre-reveal, .std-card.pre-reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Responsive ──────────────────────────────────────────────── */

/* Tablet Landscape / Small Desktop */
@media (max-width: 1024px) {
  .hero { padding: 64px 24px 72px; gap: 36px; }
  .scripts, .cron-section, .standards-section, .dryrun-section, .pg-wrap, .section-inner, .deep-wrap { padding-left: 24px; padding-right: 24px; }
  .install-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet Portrait */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 56px 20px 60px; gap: 32px; }
  .hero-terminal { display: none; }
  .script-grid { grid-template-columns: 1fr; }
  .card-wide { grid-column: 1; }
  .standards-grid { grid-template-columns: repeat(2, 1fr); }
  .dryrun-grid { grid-template-columns: repeat(2, 1fr); }
  .install-grid { grid-template-columns: repeat(2, 1fr); }
  header { padding: 0 20px; }
  .scripts, .cron-section, .standards-section, .dryrun-section { padding-left: 20px; padding-right: 20px; }
  .deep-body { grid-template-columns: 1fr; }
  .deep-nav { flex-direction: row; flex-wrap: wrap; position: static; }
  .deep-nav-btn { width: auto; flex: 1 1 auto; }
  .deep-nav-num { display: none; }
  .deep-wrap { padding: 0 20px; }
  .deep-section { padding: 48px 0 56px; }
  .deep-panel-head { padding: 18px 20px 16px; }
  .deep-content { padding: 18px 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  footer { padding: 40px 20px 24px; }
  .pg-body { grid-template-columns: 1fr; }
  .pg-wrap { padding: 0 20px; }
  .playground { padding: 48px 0 56px; }
  .pg-term-body { min-height: 280px; }
}

/* Large Mobile */
@media (max-width: 640px) {
  .hero-title { font-size: clamp(36px, 8vw, 52px); }
  .hero-sub { font-size: 14px; }
  .hero-stats { gap: 12px; }
  .stat-num { font-size: 18px; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
  .script-card { padding: 18px; }
  .card-badge { font-size: 24px; }
  .card-name { font-size: 14px; }
  .section-num { font-size: 40px; }
  .section-title { font-size: 24px; }
  .card-usage { flex-direction: column; align-items: flex-start; gap: 8px; }
  .usage-cmd { width: 100%; white-space: normal; word-break: break-all; }
  .dryrun-grid { grid-template-columns: 1fr; }
  .standards-grid { grid-template-columns: 1fr; }
  .install-grid { flex-direction: column; gap: 16px; }
  .install-step {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 12px;
  }
  .step-num { font-size: 40px; }
  .install-section { padding: 48px 0 56px; }
  .section-inner { padding: 0 20px; }
  .step-code-wrap { padding: 8px 10px; }
  .step-title { font-size: 14px; }
  .step-desc { font-size: 12px; }
  .pg-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .pg-tab { white-space: nowrap; }
  .pg-left { min-height: auto; }
  .pg-field { width: 100%; }
  .deep-panel { min-height: auto; }
  .deep-badge { font-size: 32px; }
  .deep-name { font-size: 15px; }
  .deep-synopsis { font-size: 11px; }
  .deep-table { display: block; overflow-x: auto; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .header-nav { display: none; }
  .logo { font-size: 16px; }
  .gh-btn { padding: 5px 10px; font-size: 11px; }
}

/* ── Reduced Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .eyebrow-dot { animation: none; }
  .cursor { animation: none; opacity: 1; }
  .status-running { animation: none; }
  .script-card, .std-card { transition: border-color .25s, box-shadow .25s; }
  .btn-primary:hover, .pg-run-btn:hover:not(:disabled) { transform: none; }
}

/* Small Mobile */
@media (max-width: 480px) {
  html { font-size: 13px; }
  header { padding: 0 12px; height: 48px; }
  .logo { font-size: 14px; }
  .hero { padding: 40px 12px 48px; }
  .hero-eyebrow { font-size: 10px; flex-wrap: wrap; }
  .hero-title { font-size: clamp(28px, 10vw, 36px); margin-bottom: 16px; }
  .hero-sub { font-size: 13px; margin-bottom: 24px; }
  .hero-stats { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stat-div { display: none; }
  .stat { flex-direction: row; align-items: baseline; gap: 8px; }
  .stat-num { font-size: 16px; }
  .stat-lbl { font-size: 9px; }
  .hero-actions { gap: 8px; }
  .scripts, .cron-section, .standards-section, .dryrun-section, .pg-wrap, .section-inner, .deep-wrap { padding-left: 12px; padding-right: 12px; }
  .section-header { flex-wrap: wrap; gap: 12px; }
  .section-num { font-size: 36px; }
  .section-title { font-size: 20px; }
  .script-grid { gap: 12px; }
  .script-card { padding: 14px; gap: 12px; }
  .card-badge { font-size: 22px; min-width: 28px; }
  .card-name { font-size: 13px; }
  .card-desc { font-size: 12px; }
  .card-tag { font-size: 10px; }
  .card-usage { padding: 6px 10px; }
  .usage-label { font-size: 9px; }
  .usage-cmd { font-size: 10.5px; }
  .copy-all-btn { margin-left: 0; padding: 6px 12px; font-size: 11px; }
  .dryrun-badge { margin-left: 0; padding: 5px 10px; font-size: 11px; }
  .dryrun-card { padding: 14px 12px; }
  .dryrun-name { font-size: 11px; }
  .dcheck { font-size: 9px; padding: 2px 6px; }
  .std-card { padding: 14px; }
  .std-title { font-size: 12px; }
  .std-body { font-size: 11.5px; }
  .install-section { padding: 36px 0 40px; }
  .install-grid { gap: 12px; margin-bottom: 20px; }
  .install-step { padding: 16px 14px; }
  .step-num { font-size: 32px; }
  .step-title { font-size: 12px; }
  .step-desc { font-size: 11px; }
  .step-code { font-size: 10px; }
  .install-reqs { padding: 10px 12px; font-size: 10px; }
  .req-label { font-size: 9px; }
  .playground { padding: 36px 0 40px; }
  .pg-tab { font-size: 11px; padding: 6px 12px; }
  .pg-left { padding: 14px; gap: 12px; }
  .pg-label { font-size: 10px; }
  .pg-input, .pg-select { font-size: 11.5px; padding: 6px 8px; }
  .pg-term-body { min-height: 220px; max-height: 300px; font-size: 11px; padding: 12px 14px; }
  .pg-run-btn, .pg-clear-btn, .pg-copy-btn { padding: 8px 14px; font-size: 11px; }
  .pg-actions { flex-wrap: wrap; }
  .deep-section { padding: 36px 0 40px; }
  .deep-nav-btn { padding: 8px 10px; font-size: 11px; }
  .deep-panel-head { padding: 14px 12px 12px; }
  .deep-badge { font-size: 28px; }
  .deep-name { font-size: 14px; }
  .deep-tag { font-size: 10px; }
  .deep-summary { font-size: 12px; }
  .deep-synopsis-wrap { padding: 8px 10px; flex-wrap: wrap; }
  .deep-synopsis-label { font-size: 8px; }
  .deep-synopsis { font-size: 10px; }
  .deep-content { padding: 14px 12px; gap: 20px; }
  .deep-group-title { font-size: 9px; }
  .deep-table { font-size: 11px; }
  .deep-table th { font-size: 9px; }
  .deep-table td { font-size: 11px; padding: 6px 12px 6px 0; }
  .deep-behavior { font-size: 11.5px; }
  .deep-bnum { font-size: 16px; }
  .exit-row { padding: 8px 10px; gap: 10px; }
  .exit-code { font-size: 22px; }
  .exit-label { font-size: 10px; min-width: 60px; }
  .exit-desc { font-size: 11px; }
  footer { padding: 32px 12px 20px; }
  .footer-logo { font-size: 16px; }
  .footer-desc { font-size: 11.5px; }
  .footer-col-title { font-size: 9px; }
  .footer-links-col a { font-size: 11px; }
  .footer-copy { font-size: 10.5px; }
  .toast { font-size: 12px; padding: 6px 16px; bottom: 16px; }
}

/* Extra Small / Foldable Devices */
@media (max-width: 360px) {
  .hero-eyebrow { display: none; }
  .hero-title { font-size: 26px; }
  .eyebrow-verified { display: none; }
  .script-card { padding: 12px; }
  .card-badge { font-size: 20px; }
  .deep-nav-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Header Nav ──────────────────────────────────────────────── */
.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--m2);
  padding: 5px 11px;
  border-radius: var(--radius);
  transition: color .2s, background .2s;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.nav-link:hover { color: var(--green); background: var(--green-dim); }
.nav-link.active { color: var(--green); }


/* ── Install Section ─────────────────────────────────────────── */
.install-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg1) 0%, var(--bg) 100%);
  padding: 80px 0 88px;
  position: relative;
}
.install-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-mid), transparent);
  opacity: 0.3;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.install-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}
.install-step {
  background: linear-gradient(145deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
  transition: all .3s ease;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.install-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  opacity: 0;
  transition: opacity .3s ease;
}
.install-step:hover {
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.08);
}
.install-step:hover::before { opacity: 1; }
.step-num {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--green);
  line-height: 1;
  opacity: 0.5;
}
.step-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step-title {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.step-desc {
  font-size: 14px;
  color: var(--m2);
  line-height: 1.65;
}
.step-code-wrap {
  grid-column: 1 / -1;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: linear-gradient(135deg, #050c05 0%, #071007 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 8px;
  overflow-x: auto;
}
.step-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  white-space: pre;
  overflow-x: auto;
  flex: 1;
  margin: 0;
  background: none;
  border: none;
  padding: 0;
}
.step-copy-btn {
  background: none;
  border: none;
  color: var(--m3);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  transition: color .2s;
  display: flex;
  align-items: center;
  margin-top: 1px;
}
.step-copy-btn:hover { color: var(--green); }

/* Requirements strip */
.install-reqs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--card) 0%, var(--card2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  font-size: 11.5px;
}
.req-label {
  color: var(--m3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  margin-right: 4px;
}
.req-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--m1);
}
.req-item svg { color: var(--green); flex-shrink: 0; }
.req-div { color: var(--m3); }

.install-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.install-cta .btn-primary {
  padding: 14px 32px;
  font-size: 14px;
}
.install-cta .btn-ghost {
  padding: 14px 28px;
  font-size: 14px;
}


/* ── Deep Dive / Script Reference ────────────────────────────── */
.deep-section {
  padding: 72px 0 80px;
}
.deep-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}
.deep-body {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  align-items: start;
}
.deep-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 68px;
}
.deep-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--m2);
  cursor: pointer;
  text-align: left;
  transition: all .2s;
  width: 100%;
}
.deep-nav-btn:hover {
  color: var(--m1);
  background: var(--green-dim);
  border-color: var(--border2);
}
.deep-nav-btn.active {
  color: var(--green);
  background: var(--green-dim);
  border-color: var(--border);
}
.deep-nav-num {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--m3);
  line-height: 1;
  min-width: 24px;
  flex-shrink: 0;
  transition: color .2s;
}
.deep-nav-btn.active .deep-nav-num { color: var(--green); }
.deep-nav-label { white-space: nowrap; }

.deep-panel {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 500px;
}
.deep-panel-head {
  padding: 24px 28px 22px;
  border-bottom: 1px solid var(--border2);
  background: var(--bg2);
}
.deep-head-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.deep-badge {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--m3);
  line-height: 1;
}
.deep-name {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--green);
  font-weight: 500;
}
.deep-tag {
  font-size: 11px;
  color: var(--m2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.deep-summary {
  font-size: 13px;
  color: var(--m1);
  line-height: 1.65;
  max-width: 680px;
}
.deep-synopsis-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #050c05;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 14px;
}
.deep-synopsis-label {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--m3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.deep-synopsis {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  flex: 1;
  overflow-x: auto;
  white-space: nowrap;
}
.deep-synopsis-copy {
  background: none;
  border: none;
  color: var(--m3);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  transition: color .2s;
  display: flex;
  align-items: center;
}
.deep-synopsis-copy:hover { color: var(--green); }

.deep-content {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.deep-group { display: flex; flex-direction: column; }
.deep-group-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--m3);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border2);
}

/* Reference tables */
.deep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.deep-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--m3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 16px 8px 0;
  border-bottom: 1px solid var(--border2);
}
.deep-table td {
  padding: 8px 16px 8px 0;
  color: var(--m1);
  border-bottom: 1px solid rgba(34,197,94,0.04);
  vertical-align: top;
  line-height: 1.55;
}
.deep-table td:first-child {
  font-family: var(--font-mono);
  color: var(--green);
  white-space: nowrap;
  font-size: 12px;
}
.deep-table .td-req {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
}
.deep-table .td-req.yes {
  color: var(--warn);
  background: var(--warn-dim);
  border: 1px solid rgba(250,204,21,0.2);
}
.deep-table .td-req.no {
  color: var(--m3);
  background: transparent;
}
.deep-table .td-pattern {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--m2);
}
.deep-table .td-default {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
}

/* Behavior list */
.deep-behaviors {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.deep-behavior {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(34,197,94,0.04);
  font-size: 12.5px;
  color: var(--m1);
  line-height: 1.55;
}
.deep-behavior:last-child { border-bottom: none; }
.deep-bnum {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--m3);
  line-height: 1;
  flex-shrink: 0;
  min-width: 22px;
  margin-top: 1px;
}

/* Exit codes */
.exit-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: #050c05;
}
.exit-code {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  min-width: 24px;
  text-align: center;
  flex-shrink: 0;
}
.exit-code.ec0 { color: var(--green); }
.exit-code.ec1 { color: var(--warn); }
.exit-code.ec2 { color: var(--err); }
.exit-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  min-width: 76px;
  flex-shrink: 0;
}
.exit-label.ec0 { color: var(--green); }
.exit-label.ec1 { color: var(--warn); }
.exit-label.ec2 { color: var(--err); }
.exit-desc { font-size: 12px; color: var(--m2); line-height: 1.5; }

/* Log info */
.log-path {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green);
  background: var(--green-dim);
  padding: 6px 12px;
  border-radius: var(--radius);
  display: inline-block;
  margin-bottom: 10px;
}
.log-sample {
  background: #050c05;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--m2);
  line-height: 1.75;
  overflow-x: auto;
  white-space: pre;
}
.log-sample .ls-info  { color: var(--m1); }
.log-sample .ls-ok    { color: var(--green); }
.log-sample .ls-warn  { color: var(--warn); }
.log-sample .ls-err   { color: var(--err); }



/* ── Enhanced Footer ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border2);
  padding: 48px 32px 32px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: 1fr 160px 160px 160px;
  gap: 32px;
}
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--m2);
}
.footer-desc {
  font-size: 12.5px;
  color: var(--m3);
  line-height: 1.6;
  max-width: 320px;
}
.footer-tech {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ftag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--border2);
  border-radius: 99px;
  color: var(--m3);
  letter-spacing: 0.06em;
}
.footer-links-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--m3);
  margin-bottom: 4px;
}
.footer-links-col a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--m2);
  transition: color .2s;
}
.footer-links-col a:hover { color: var(--green); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-copy { font-size: 11.5px; color: var(--m3); font-family: var(--font-mono); }
