/* =========================================================
   GitAtlas — blueprint theme
   Palette:  GitHub Primer — dark #0d1117 / light #ffffff
             accent #2f81f7 / #0969da
   Type:     Manrope (display) / IBM Plex Sans (body) / IBM Plex Mono (code)
   ========================================================= */

:root[data-theme="dark"] {
  --bg: #0d1117;
  --bg-2: #161b22;
  --bg-3: #010409;
  --bg-hover: #1c2128;
  --line: #30363d;
  --line-strong: #484f58;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --text-faint: #6e7681;
  --accent: #2f81f7;
  --accent-ink: #ffffff;
  --good: #3fb950;
  --warn: #d29922;
  --danger: #f85149;
  --purple: #a371f7;
  --grid: rgba(110, 118, 129, .13);
  --glow: rgba(47, 129, 247, .2);
  --shadow: 0 8px 24px rgba(1, 4, 9, .8);
  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f6f8fa;
  --bg-3: #ffffff;
  --bg-hover: #eaeef2;
  --line: #d1d9e0;
  --line-strong: #afb8c1;
  --text: #1f2328;
  --text-dim: #59636e;
  --text-faint: #818b98;
  --accent: #0969da;
  --accent-ink: #ffffff;
  --good: #1a7f37;
  --warn: #9a6700;
  --danger: #cf222e;
  --purple: #8250df;
  --grid: rgba(31, 35, 40, .06);
  --glow: rgba(9, 105, 218, .15);
  --shadow: 0 8px 24px rgba(66, 74, 83, .14);
}

*, *::before, *::after {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* Custom Sleek Scrollbars (Chrome/Edge/Safari/WebKit) */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html { scroll-padding-top: 92px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.018em;
  margin: 0;
}

code, pre, kbd, .mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  transform: translateY(-160%);
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 4px; font-weight: 600; text-decoration: none;
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed; inset: 0 auto auto 0; z-index: 120;
  height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--good));
  transform: scaleX(0); transform-origin: left center;
  will-change: transform;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1220px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 20px;
}

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.brand-mark { width: 26px; height: 26px; color: var(--accent); fill: currentColor; }
.brand-mark circle { fill: var(--text); }
.brand-mark .brand-node { fill: var(--accent); }
.brand-word {
  font-family: var(--font-display);
  font-weight: 800; font-size: 18px; letter-spacing: -.025em;
}
.brand-word em { font-style: normal; color: var(--accent); }

.search-shell {
  flex: 1; position: relative;
  display: flex; align-items: center;
  max-width: 560px; margin: 0 auto;
}
.search-icon {
  position: absolute; left: 13px; width: 17px; height: 17px;
  color: var(--text-faint); pointer-events: none;
}
#search {
  width: 100%;
  padding: 10px 46px 10px 40px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit; font-size: 14.5px;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
#search::placeholder { color: var(--text-faint); }
#search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}
#search::-webkit-search-cancel-button { display: none; }

.search-key {
  position: absolute; right: 12px;
  font-size: 11px; padding: 2px 7px;
  color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 4px;
}
#search:focus ~ .search-key { opacity: 0; }
.search-clear {
  position: absolute; right: 8px;
  width: 26px; height: 26px; line-height: 1;
  font-size: 19px; color: var(--text-dim);
  background: none; border: 0; border-radius: 4px; cursor: pointer;
}
.search-clear:hover { color: var(--text); background: var(--bg-hover); }

.topbar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: transparent; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--accent); border-color: var(--line-strong); background: var(--bg-2); }
.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%);
}

.hero-inner {
  position: relative;
  max-width: 1220px; margin: 0 auto;
  padding: 76px 24px 44px;
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 48px; align-items: center;
}

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 18px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; width: 34px; height: 1px; background: var(--accent);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1.02; letter-spacing: -.035em;
  margin-bottom: 20px; white-space: nowrap;
}
.hero-title em { font-style: normal; color: var(--accent); }

.hero-lede {
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--text-dim);
  max-width: 46ch; margin: 0 0 30px;
}

.hero-stats { display: flex; gap: 34px; margin-bottom: 30px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat b {
  font-family: var(--font-display);
  font-size: 27px; line-height: 1; font-weight: 800; letter-spacing: -.02em;
}
.stat i {
  font-style: normal; font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-faint); margin-top: 6px;
}

.hero-jump { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
  padding: 8px 14px;
  background: var(--bg-2); color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, transform .2s ease;
}
.chip:hover {
  color: var(--accent); border-color: var(--accent); transform: translateY(-2px);
}

.hero-rule {
  position: relative;
  max-width: 1220px; margin: 0 auto; padding: 0 24px 26px;
  display: flex; align-items: center; gap: 14px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
  letter-spacing: .24em; text-transform: uppercase; color: var(--text-faint);
}
.hero-rule span { flex: 1; height: 1px; background: var(--line); }
.hero-rule b { font-weight: 400; animation: nudge 2.6s ease-in-out infinite; }
@keyframes nudge { 0%,100% { opacity: .45; } 50% { opacity: 1; } }

/* ---------- layout ---------- */
.layout {
  max-width: 1220px; margin: 0 auto;
  padding: 0 24px;
  display: grid; grid-template-columns: 230px minmax(0, 1fr);
  gap: 52px; align-items: start;
}

/* ---------- rail (commit-graph navigation) ---------- */
.rail { position: sticky; top: 78px; padding: 40px 0 30px; }
.rail-scroll { max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 6px; }
.rail-scroll::-webkit-scrollbar { width: 4px; }
.rail-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

.rail-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 16px 26px;
}

.rail-nav { position: relative; }
.rail-nav::before {
  content: ""; position: absolute;
  left: 7px; top: 10px; bottom: 10px; width: 1.5px;
  background: var(--line);
}

.rail-link {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px 7px 26px;
  font-size: 13.5px; color: var(--text-dim);
  text-decoration: none; border-radius: 5px;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
.rail-link::before {
  content: ""; position: absolute;
  left: 3.5px; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--line-strong);
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease;
}
.rail-link:hover { color: var(--text); background: var(--bg-2); }
.rail-link:hover::before { border-color: var(--accent); }
.rail-link.active { color: var(--accent); font-weight: 500; }
.rail-link.active::before {
  background: var(--accent); border-color: var(--accent);
  transform: translateY(-50%) scale(1.25);
  box-shadow: 0 0 0 4px var(--glow);
}
.rail-count {
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  color: var(--text-faint); font-variant-numeric: tabular-nums;
}
.rail-link.dimmed { opacity: .3; }

.rail-scrim {
  position: fixed; inset: 0; z-index: 89;
  background: rgba(3, 12, 24, .6);
  backdrop-filter: blur(2px);
}

/* ---------- content ---------- */
.content { padding: 40px 0 60px; min-width: 0; }

.filter-note {
  position: sticky; top: 74px; z-index: 40;
  margin-bottom: 26px; padding: 10px 16px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-left: 2px solid var(--accent); border-radius: 5px;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; color: var(--text-dim);
}
.filter-note b { color: var(--accent); font-weight: 500; }

.section { margin-bottom: 72px; scroll-margin-top: 92px; }

.section-head { margin-bottom: 26px; }
.section-index {
  display: flex; align-items: center; gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 10px;
}
.section-index i {
  font-style: normal; color: var(--accent);
}
.section-index span { flex: 1; height: 1px; background: var(--line); }

.section-title {
  font-size: clamp(23px, 2.6vw, 29px);
  line-height: 1.1; margin-bottom: 10px;
}
.section-blurb { color: var(--text-dim); max-width: 62ch; margin: 0; font-size: 15.5px; }

/* ---------- command card ---------- */
.cards { display: flex; flex-direction: column; gap: 14px; }

.card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.card::after {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 2px; background: var(--accent); border-radius: 2px;
  opacity: 0; transition: opacity .25s ease;
}
.card:hover::after, .card.copied::after { opacity: 1; }

.cmd-row { display: flex; align-items: flex-start; gap: 12px; }

.cmd {
  flex: 1; min-width: 0;
  font-size: 14.5px; font-weight: 500; line-height: 1.55;
  color: var(--text);
  word-break: break-word;
}
.cmd .flag { color: var(--accent); }
.cmd .str { color: var(--good); }

.copy-btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid var(--line); border-radius: 5px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.copy-btn svg { width: 13px; height: 13px; }
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn.done { color: var(--good); border-color: var(--good); }
.copy-btn .tick { display: none; }
.copy-btn.done .tick { display: block; }
.copy-btn.done .sheet { display: none; }

.card-title {
  font-family: var(--font-display);
  font-size: 17.5px; font-weight: 700; line-height: 1.35; letter-spacing: -.012em;
  padding-left: 14px; position: relative;
}
.card-title::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.card-note::after { opacity: 1; background: var(--line-strong); }
.card-note:hover::after { background: var(--accent); }

.risk {
  display: inline-block; margin: 10px 0 0;
  padding: 3px 9px;
  font-family: "IBM Plex Mono", monospace; font-size: 10px;
  letter-spacing: .14em; text-transform: uppercase;
  border-radius: 3px; border: 1px solid currentColor;
}
.risk.warn { color: var(--warn); }
.risk.danger { color: var(--danger); }
.risk::before {
  content: ""; display: inline-block;
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; margin-right: 7px; vertical-align: 1px;
  animation: riskPulse 2s ease-in-out infinite;
}
@keyframes riskPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.card-desc { margin: 12px 0 0; font-size: 15px; color: var(--text); }

.card-use {
  margin: 10px 0 0; padding-left: 14px;
  border-left: 1px solid var(--line);
  font-size: 14.5px; color: var(--text-dim);
}
.card-use b {
  display: block;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-faint); font-weight: 400; margin-bottom: 3px;
}

.ex-toggle {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0; background: none; border: 0; cursor: pointer;
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint);
  transition: color .2s ease;
}
.ex-toggle:hover { color: var(--accent); }
.ex-toggle svg { width: 11px; height: 11px; transition: transform .25s ease; }
.ex-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.ex-toggle[aria-expanded="true"] { color: var(--accent); }

.ex-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.ex-wrap.open { grid-template-rows: 1fr; }
.ex-inner { overflow: hidden; }

.ex {
  position: relative;
  margin: 12px 0 2px; padding: 14px 44px 14px 16px;
  background: var(--bg-3);
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; line-height: 1.7; color: var(--text-dim);
  overflow-x: auto; white-space: pre;
}
.ex .comment { color: var(--text-faint); font-style: italic; }
.ex-copy {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--bg-2); color: var(--text-faint);
  border: 1px solid var(--line); border-radius: 4px; cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.ex-copy svg { width: 12px; height: 12px; }
.ex-copy:hover { color: var(--accent); border-color: var(--accent); }
.ex-copy.done { color: var(--good); border-color: var(--good); }

mark {
  background: var(--glow); color: var(--accent);
  padding: 0 2px; border-radius: 2px;
}

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}

/* ---------- empty state ---------- */
.empty { padding: 70px 0; text-align: center; }
.empty-head {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; margin: 0 0 8px;
}
.empty-body { color: var(--text-dim); margin: 0 auto 22px; max-width: 44ch; }
.empty-body b { color: var(--accent); font-weight: 500; }

.btn {
  padding: 10px 20px;
  background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 5px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  transition: filter .2s ease, transform .2s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ---------- error-to-fix assistant ---------- */
.fix-assistant { padding: 60px 24px; border-bottom: 1px solid var(--line); background: linear-gradient(135deg, var(--bg-2), var(--bg)); }
.fix-assistant-inner, .fix-result { max-width: 1172px; margin: 0 auto; }
.fix-assistant-inner { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 64px; align-items: start; }
.fix-assistant h2 { font-size: clamp(25px, 3vw, 35px); line-height: 1.15; margin: 6px 0 12px; }
.fix-assistant-copy > p:last-child { max-width: 48ch; margin: 0; color: var(--text-dim); }
.fix-form { padding: 18px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); }
.fix-form label, .fix-form-foot, .fix-samples { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.fix-form label { display: block; color: var(--text-faint); margin-bottom: 9px; }
.fix-form textarea { width: 100%; resize: vertical; min-height: 94px; padding: 12px 13px; color: var(--text); background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px; font: 13px/1.6 "IBM Plex Mono", monospace; }
.fix-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.fix-form-foot { display: flex; align-items: center; gap: 15px; margin-top: 12px; }
.text-btn { padding: 0; color: var(--accent); background: none; border: 0; cursor: pointer; font: 500 12px "IBM Plex Mono", monospace; }
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.fix-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; color: var(--text-faint); letter-spacing: .04em; text-transform: none; }
.fix-samples button { padding: 3px 7px; color: var(--text-dim); background: var(--bg-hover); border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font: inherit; letter-spacing: 0; }
.fix-samples button:hover { color: var(--accent); border-color: var(--accent); }
.fix-result { margin-top: 28px; padding: 22px; background: var(--bg-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); border-radius: 8px; }
.fix-result[hidden] { display: none; }
.fix-result-head h3 { font-size: 20px; margin: 4px 0 6px; }
.fix-result-head > p:last-child { max-width: 80ch; margin: 0; color: var(--text-dim); }
.fix-columns { display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px; margin: 20px 0; }
.fix-columns h4 { margin: 0 0 8px; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint); }
.fix-commands, .fix-steps { margin: 0; padding-left: 20px; color: var(--text-dim); }
.fix-commands li, .fix-steps li { margin: 7px 0; }
.fix-commands code, .fix-next code { color: var(--text); font-size: 12.5px; }
.mini-copy { margin-left: 8px; padding: 2px 6px; color: var(--text-faint); background: transparent; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font: 10px "IBM Plex Mono", monospace; text-transform: uppercase; }
.mini-copy:hover, .mini-copy.done { color: var(--accent); border-color: var(--accent); }
.fix-next { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding-top: 16px; border-top: 1px solid var(--line); }
.fix-next > span { margin-right: 2px; font: 500 11px "IBM Plex Mono", monospace; letter-spacing: .13em; text-transform: uppercase; color: var(--text-faint); }
.fix-next .text-btn { margin-left: auto; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }

.footer-inner {
  max-width: 1220px; margin: 0 auto; padding: 52px 24px 38px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
}
.footer-about { max-width: 42ch; }

.footer-brand {
  font-family: var(--font-display);
  font-size: 23px; font-weight: 800;
  letter-spacing: -.03em; margin: 0 0 10px;
}
.footer-brand em { font-style: normal; color: var(--accent); }
.footer-line { margin: 0; color: var(--text-dim); font-size: 14.5px; line-height: 1.65; }

.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-heading {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 2px;
}
.footer-col a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); text-decoration: none; font-size: 14.5px;
  width: fit-content;
  transition: color .2s ease, transform .2s ease;
}
.footer-col a:hover { color: var(--accent); transform: translateX(3px); }
.link-mark { width: 15px; height: 15px; flex-shrink: 0; }

.footer-base {
  max-width: 1220px; margin: 0 auto;
  padding: 20px 24px 40px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; flex-wrap: wrap;
}
.footer-credit { margin: 0; font-size: 14.5px; color: var(--text-dim); }
.footer-credit a {
  font-family: var(--font-display);
  font-weight: 700; font-size: 15.5px; letter-spacing: -.005em;
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.footer-credit a:hover { border-bottom-color: var(--accent); }
.footer-fine { margin: 0; font-size: 12.5px; color: var(--text-faint); }

/* ---------- floating controls ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--bg-2); color: var(--text-dim);
  border: 1px solid var(--line-strong); border-radius: 50%;
  cursor: pointer; box-shadow: var(--shadow);
  transition: color .2s ease, transform .2s ease, border-color .2s ease;
}
.to-top svg { width: 17px; height: 17px; }
.to-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 130;
  transform: translate(-50%, 24px);
  padding: 10px 20px;
  background: var(--text); color: var(--bg);
  border-radius: 6px;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: 88vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 54px; gap: 34px; }
  .fix-assistant-inner { gap: 34px; }
  .demo { order: -1; }
  .layout { grid-template-columns: 1fr; gap: 0; }
  .nav-toggle { display: grid; }

  .rail {
    position: fixed; inset: 0 auto 0 0; z-index: 90;
    width: 268px; padding: 20px 14px;
    background: var(--bg-2);
    border-right: 1px solid var(--line-strong);
    transform: translateX(-102%);
    transition: transform .3s cubic-bezier(.3,.8,.3,1);
    box-shadow: var(--shadow);
  }
  .rail.open { transform: none; }
  .rail-scroll { max-height: 100%; }
  .rail-title { margin-top: 46px; }
  .content { padding-top: 30px; }
  .filter-note { top: 70px; }
}

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; padding: 10px 16px; gap: 10px; }
  .brand { order: 1; }
  .topbar-actions { order: 2; margin-left: auto; }
  .search-shell { order: 3; max-width: none; width: 100%; }
  .search-key { display: none; }
  html { scroll-padding-top: 130px; }
  .section { scroll-margin-top: 130px; }
  .filter-note { top: 118px; }

  .hero-inner { padding: 38px 16px 30px; }
  .fix-assistant { padding: 42px 16px; }
  .fix-assistant-inner, .fix-columns { grid-template-columns: 1fr; gap: 22px; }
  .fix-result { padding: 17px; }
  .fix-next .text-btn { width: 100%; margin: 4px 0 0; text-align: left; }
  .hero-title { font-size: clamp(46px, 15vw, 68px); }
  .hero-stats { gap: 24px; }
  .layout, .hero-rule { padding-left: 16px; padding-right: 16px; }
  .footer-inner, .footer-fine { padding-left: 16px; padding-right: 16px; }

  .card { padding: 14px; }
  .cmd { font-size: 13.5px; }
  .copy-btn span { display: none; }
  .copy-btn { padding: 6px; }
  .section { margin-bottom: 54px; }
  .to-top { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .topbar, .rail, .to-top, .demo, .copy-btn, .ex-copy, .hero-jump, .gh-link { display: none !important; }
  body { background: #fff; color: #000; }
  .ex-wrap { grid-template-rows: 1fr; }
}

/* =========================================================
   Motion layer
   ========================================================= */

/* --- wordmark: letters rise in, then a slow wave crosses them --- */
.hero-title { display: block; }
.hero-title .ltr {
  display: inline-block;
  opacity: 0;
  animation: ltrIn .6s cubic-bezier(.2, .8, .25, 1) both var(--d, 0s);
}
.hero-title .ltr > i {
  display: inline-block; font-style: normal;
  animation: ltrWave 7s ease-in-out infinite var(--w, 0s);
}
.hero-title .accent { color: var(--accent); }
.hero-title .caret {
  display: inline-block; width: .07em; height: .74em;
  background: var(--accent); margin-left: .08em; vertical-align: -.02em;
  animation: caretBlink 1.05s steps(1) infinite;
}
@keyframes ltrIn {
  from { opacity: 0; transform: translateY(.34em) scale(.94); }
  to { opacity: 1; transform: none; }
}
@keyframes ltrWave {
  0%, 86%, 100% { transform: translateY(0); }
  91% { transform: translateY(-.12em); }
}
@keyframes caretBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

.brand-word em { transition: letter-spacing .3s ease; }
.brand:hover .brand-word em { letter-spacing: .06em; }

/* --- descriptions arrive word by word --- */
.hero-lede .word {
  display: inline-block;
  opacity: 0;
  animation: wordIn .5s ease both var(--d, 0s);
}
@keyframes wordIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

.section-head.reveal { opacity: 0; transform: translateY(14px); }
.section-head.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s cubic-bezier(.16, 1, .3, 1), transform .7s cubic-bezier(.16, 1, .3, 1);
}

/* --- terminal prompt and caret on each command --- */
.section-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 28px;
}
.section-head-text { min-width: 0; }

.prompt {
  flex-shrink: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 14.5px; font-weight: 600; line-height: 1.55;
  color: var(--accent); user-select: none;
  opacity: .55; transition: opacity .2s ease;
}
.card:hover .prompt { opacity: 1; }
.cmd::after {
  content: ""; display: inline-block;
  width: 7px; height: .95em;
  background: var(--accent); vertical-align: -2px; margin-left: 5px;
  opacity: 0;
}
.card:hover .cmd::after { animation: caretBlink 1.05s steps(1) infinite; }

.copy-btn.done { animation: copyPop .4s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes copyPop { 0% { transform: scale(1); } 45% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* --- per-section explainer animations --- */
.sec-anim {
  flex-shrink: 0;
  width: 150px; height: 44px;
  color: var(--text-faint); overflow: visible;
}
.sec-anim .ln {
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round;
}
.sec-anim .ac { stroke: var(--accent); }
.sec-anim .nd {
  fill: var(--bg); stroke: var(--accent); stroke-width: 1.5;
}
.sec-anim .sq {
  fill: var(--bg-2); stroke: currentColor; stroke-width: 1.5;
}
.sec-anim .fl { fill: var(--accent); }
.sec-anim * { animation-play-state: paused; }
.section.live .sec-anim * { animation-play-state: running; }

.fx-slide { animation: fxSlide var(--dur, 4s) ease-in-out infinite var(--d, 0s); }
.fx-lift  { animation: fxLift var(--dur, 3.6s) cubic-bezier(.5, 0, .3, 1) infinite var(--d, 0s); }
.fx-pop   { animation: fxPop var(--dur, 3.2s) ease-in-out infinite var(--d, 0s);
            transform-box: fill-box; transform-origin: center; }
.fx-draw  { stroke-dasharray: var(--len, 90); stroke-dashoffset: var(--len, 90);
            animation: fxDraw var(--dur, 3.6s) ease-in-out infinite var(--d, 0s); }
.fx-flow  { stroke-dasharray: 5 5; animation: fxFlow 1.1s linear infinite; }
.fx-blink { animation: fxBlink 2.4s ease-in-out infinite var(--d, 0s); }

@keyframes fxSlide {
  0%, 12% { transform: translateX(0); }
  52%, 68% { transform: translateX(var(--dx, 40px)); }
  100% { transform: translateX(0); }
}
@keyframes fxLift {
  0%, 12% { transform: translate(0, 0); }
  52%, 82% { transform: translate(var(--dx, 0px), var(--dy, -16px)); }
  100% { transform: translate(0, 0); }
}
@keyframes fxPop {
  0%, 18% { opacity: 0; transform: scale(.3); }
  38%, 78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.3); }
}
@keyframes fxDraw {
  0% { stroke-dashoffset: var(--len, 90); }
  48%, 82% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: var(--len, 90); }
}
@keyframes fxFlow { to { stroke-dashoffset: -20; } }
@keyframes fxBlink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

/* --- theme control --- */
.theme-btn { position: relative; }
.theme-btn .mode-label {
  position: absolute; top: calc(100% + 8px); right: 0;
  padding: 5px 9px; white-space: nowrap;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px;
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim);
  opacity: 0; pointer-events: none; transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.theme-btn:hover .mode-label, .theme-btn:focus-visible .mode-label {
  opacity: 1; transform: none;
}

@media (max-width: 720px) {
  .section-head { flex-direction: column-reverse; align-items: flex-start; gap: 16px; }
  .sec-anim { width: 130px; height: 38px; }
  .theme-btn .mode-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .ltr, .hero-lede .word { opacity: 1; }
  .section-head.reveal { opacity: 1; transform: none; }
  .sec-anim * { animation: none !important; }
  .sec-anim .fx-draw { stroke-dashoffset: 0; }
  .sec-anim .fx-pop { opacity: 1; }
  .cmd::after { display: none; }
}

/* =========================================================
   GitHub mark
   ========================================================= */

.gh-mark { fill: currentColor; }

.gh-link { color: var(--text-dim); }
.gh-link svg { width: 17px; height: 17px; }
.gh-link .gh-mark {
  transform-box: fill-box; transform-origin: center;
  transition: transform .35s cubic-bezier(.2, 1.2, .4, 1);
}
.gh-link:hover .gh-mark { transform: rotate(-14deg) scale(1.1); }

/* mark used inside a section explainer */
.sec-anim .gh-mark { fill: var(--text); }
.sec-anim .gh-scene {
  transform-box: fill-box; transform-origin: center;
  animation: ghBob 4s ease-in-out infinite;
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 40px 16px 30px; }
  .footer-base { padding: 18px 16px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .sec-anim .gh-scene { animation: none; }
}

/* =========================================================
   Hero demo — a real workflow, running
   ========================================================= */

.demo {
  margin: 0;
  display: flex; flex-direction: column; gap: 16px;
  will-change: transform;
}

.demo-win {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.demo-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.dot-1 { background: #ff5f57; } .dot-2 { background: #febc2e; } .dot-3 { background: #28c840; }

.demo-path {
  margin-left: 8px;
  font-family: "IBM Plex Mono", monospace; font-size: 11.5px;
  color: var(--text-faint);
}
.demo-branch {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  color: var(--accent);
  background: var(--glow); border-radius: 999px;
  transition: color .3s ease, background-color .3s ease;
}
.demo-branch::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}

.demo-body { height: 176px; overflow: hidden; }
.demo-lines {
  margin: 0; padding: 14px 16px; list-style: none;
  font-family: "IBM Plex Mono", monospace; font-size: 12.5px; line-height: 1.55;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}
.demo-lines li { margin-bottom: 9px; }
.demo-cmd { color: var(--text); word-break: break-word; }
.demo-cmd::before { content: "$ "; color: var(--accent); }
.demo-out {
  display: block; color: var(--text-faint); font-size: 11.8px;
  opacity: 0; transform: translateY(-2px);
  transition: opacity .35s ease, transform .35s ease;
}
.demo-out.on { opacity: 1; transform: none; }
.demo-out.ok { color: var(--good); }
.demo-cursor {
  display: inline-block; width: 7px; height: 1em;
  background: var(--accent); vertical-align: -2px; margin-left: 2px;
  animation: caretBlink 1.05s steps(1) infinite;
}

/* the graph beneath the terminal, drawn in step with the commands */
.demo-graph { width: 100%; height: auto; }
.demo-graph .g-line { fill: none; stroke: var(--line-strong); stroke-width: 2; }
.demo-graph .g-node {
  fill: var(--bg); stroke: var(--line-strong); stroke-width: 2;
}
.demo-graph .g-label {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
  fill: var(--text-faint);
}
.demo-graph .g-accent { fill: var(--accent); }

.demo-graph .g-draw {
  fill: none; stroke: var(--line-strong); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: var(--len, 120); stroke-dashoffset: var(--len, 120);
  transition: stroke-dashoffset .75s cubic-bezier(.4, 0, .2, 1);
}
.demo-graph .g-accent-s { stroke: var(--accent); }
.demo-graph .g-draw.on { stroke-dashoffset: 0; }

.demo-graph .g-pop,
.demo-graph .g-fade {
  opacity: 0;
  transform-box: fill-box; transform-origin: center;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, 1.4, .4, 1);
}
.demo-graph .g-pop { transform: scale(.2); }
.demo-graph .g-pop.on { opacity: 1; transform: scale(1); }
.demo-graph .g-fade.on { opacity: 1; }

.demo-graph .g-pop.g-node { stroke: var(--accent); }
.demo-graph .g-merged { fill: var(--accent); stroke: var(--accent); }
.demo-graph .g-remote { color: var(--text); }
.demo-graph .g-ring {
  stroke: var(--accent); opacity: .5;
  transform-box: fill-box; transform-origin: center;
  animation: ghOrbit 14s linear infinite;
}
.demo-graph .g-badge rect { fill: var(--purple); }
.demo-graph .g-badge text,
.demo-graph .g-tag text {
  font-family: "IBM Plex Mono", monospace; font-size: 10.5px;
  fill: #fff; text-anchor: middle; font-weight: 500;
}
.demo-graph .g-tag path { fill: var(--good); }

/* =========================================================
   Footer links — brand colour on hover
   ========================================================= */

.flink {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 5px 10px 5px 8px; margin-left: -8px;
  width: fit-content; border-radius: 7px;
  color: var(--text-dim); text-decoration: none; font-size: 14.5px;
  transition: color .25s ease, background-color .25s ease, transform .25s cubic-bezier(.16, 1, .3, 1);
}
.flink-icon {
  display: grid; place-items: center;
  width: 22px; height: 22px; flex-shrink: 0;
  color: var(--text-faint);
  transition: color .25s ease, transform .4s cubic-bezier(.2, 1.3, .4, 1);
}
.flink-icon svg { width: 17px; height: 17px; fill: currentColor; }
.flink-icon .li-text {
  font-family: var(--font-display); font-size: 12px; font-weight: 800;
  fill: var(--bg-2); text-anchor: middle;
}
.flink-text { position: relative; }
.flink-text::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}

.flink:hover { color: var(--text); background: var(--bg-hover); transform: translateX(4px); }
.flink:hover .flink-text::after { transform: scaleX(1); }
.flink:hover .flink-icon { transform: scale(1.14) rotate(-6deg); }

.flink[data-brand="git"]:hover .flink-icon { color: #F03C2E; }
.flink[data-brand="github"]:hover .flink-icon { color: #ffffff; }
:root[data-theme="light"] .flink[data-brand="github"]:hover .flink-icon { color: #181717; }
.flink[data-brand="linkedin"]:hover .flink-icon { color: #0A66C2; }
.flink[data-brand="mail"]:hover .flink-icon { color: #EA4335; }
.flink[data-brand="site"]:hover .flink-icon { color: var(--accent); }
.flink[data-brand="docs"]:hover .flink-icon { color: var(--accent); }

@media (max-width: 1000px) {
  .demo-body { height: 150px; }
}
@media (max-width: 720px) {
  .hero-title { font-size: clamp(34px, 11vw, 46px); }
  .demo-body { height: 132px; }
  .demo-lines { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-lines, .demo-out, .demo-graph * { transition: none !important; }
  .demo-graph .g-ring { animation: none; }
  .demo-cursor { display: none; }
}

/* ---------- live copy counter ---------- */
.stat-live b { color: var(--accent); }
.stat-live i { display: inline-flex; align-items: center; gap: 6px; }
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 0 var(--good);
  animation: livePulse 2.4s ease-out infinite;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); }
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
#copyCount { font-variant-numeric: tabular-nums; }

.footer-fine a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 2px; }
.footer-fine a:hover { color: var(--accent); }

@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* =========================================================
   Guided playbooks + recovery wizard
   ========================================================= */

.wizard { padding: 62px 24px; border-bottom: 1px solid var(--line); }
.wizard-inner { max-width: 1172px; margin: 0 auto; }
.wizard-head { max-width: 62ch; margin-bottom: 30px; }
.wizard-head h2 { font-size: clamp(25px, 3vw, 35px); line-height: 1.15; margin: 6px 0 12px; }
.wizard-head > p:last-child { margin: 0; color: var(--text-dim); }

.wizard-stage {
  padding: 26px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* breadcrumbs of the answers so far */
.wiz-crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  margin-bottom: 18px; padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.crumb {
  padding: 0; background: none; border: 0; cursor: pointer;
  font: 500 11.5px "IBM Plex Mono", monospace;
  letter-spacing: .04em; color: var(--text-faint);
  transition: color .2s ease;
}
.crumb:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.crumb-sep { color: var(--line-strong); font-size: 11px; }

.wiz-q {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700; letter-spacing: -.015em;
  margin: 0 0 18px;
}

.wiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 10px; }
.wiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px; text-align: left;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; font-family: inherit;
  transition: border-color .2s ease, transform .25s cubic-bezier(.16,1,.3,1), background-color .2s ease;
}
.wiz-option b { display: block; font-size: 14.5px; font-weight: 600; }
.wiz-option span { display: block; margin-top: 3px; font-size: 12.5px; color: var(--text-dim); }
.wiz-option > svg { width: 15px; height: 15px; margin-left: auto; flex-shrink: 0; color: var(--text-faint); transition: color .2s ease, transform .25s ease; }
.wiz-option:hover { border-color: var(--accent); background: var(--bg-hover); transform: translateX(3px); }
.wiz-option:hover > svg { color: var(--accent); transform: translateX(3px); }

/* the playbook itself */
.pb-head { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pb-kind {
  display: inline-block; margin: 0 0 9px; padding: 3px 9px;
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid currentColor; border-radius: 3px;
}
.pb-kind.rescue { color: var(--warn); }
.pb-kind.workflow { color: var(--accent); }
.pb-head h3 { font-size: clamp(20px, 2.4vw, 25px); line-height: 1.2; margin: 0 0 8px; }
.pb-goal { margin: 0 0 8px; color: var(--text); max-width: 72ch; }
.pb-when { margin: 0; font-size: 14px; color: var(--text-dim); }
.pb-when b {
  font: 500 10.5px "IBM Plex Mono", monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint);
  margin-right: 7px;
}
.pb-actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.btn-small { padding: 7px 14px; font-size: 12.5px; }

.pb-steps { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: pb; }
.pb-step { position: relative; display: flex; gap: 16px; padding-bottom: 24px; }
.pb-step:not(:last-child)::before {
  content: ""; position: absolute; left: 13px; top: 30px; bottom: 4px;
  width: 1.5px; background: var(--line);
}
.pb-num {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 27px; height: 27px; display: grid; place-items: center;
  background: var(--bg); color: var(--accent);
  border: 1.5px solid var(--line-strong); border-radius: 50%;
  font: 600 12px "IBM Plex Mono", monospace;
}
.pb-body { min-width: 0; flex: 1; padding-top: 2px; }
.pb-do { margin: 0 0 10px; font-size: 15px; }

.pb-check {
  margin: 0 0 10px; padding: 11px 13px;
  background: var(--bg-3); border: 1px dashed var(--line-strong); border-radius: 6px;
}
.pb-check-head {
  margin: 0 0 7px;
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: .15em; text-transform: uppercase; color: var(--good);
}
.pb-mini { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pb-mini code { font-size: 12.5px; color: var(--text); }
.pb-check > p:last-child { margin: 7px 0 0; font-size: 13px; color: var(--text-dim); }

.pb-cmd { position: relative; }
.pb-cmd pre {
  margin: 0; padding: 12px 46px 12px 14px;
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; line-height: 1.7; color: var(--text);
  overflow-x: auto; white-space: pre;
}
.pb-cmd .mini-copy { position: absolute; top: 8px; right: 8px; margin: 0; }

.pb-warn {
  display: flex; gap: 8px; margin: 10px 0 0;
  font-size: 13.5px; color: var(--danger);
}
.pb-warn::before { content: "!"; font-weight: 700; flex-shrink: 0; }

.pb-after { padding-top: 18px; border-top: 1px solid var(--line); }
.pb-after > p { margin: 0 0 14px; font-size: 14px; color: var(--text-dim); max-width: 78ch; }
.pb-related { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pb-related > span {
  font: 500 10.5px "IBM Plex Mono", monospace;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint);
}

/* direct-access chips */
.wizard-browse { margin-top: 26px; }
.wizard-browse-label {
  margin: 0 0 12px;
  font: 500 10.5px "IBM Plex Mono", monospace;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint);
}
.pb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pb-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px;
  background: var(--bg-2); color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; font: 13px "IBM Plex Sans", sans-serif;
  transition: color .2s ease, border-color .2s ease, transform .2s cubic-bezier(.16,1,.3,1);
}
.pb-chip::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0;
}
.pb-chip.rescue::before { background: var(--warn); }
.pb-chip.workflow::before { background: var(--accent); }
.pb-chip:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

.chip-lead { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   Interactive Studio Section Styles
   ========================================================= */

.studio {
  padding: 64px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}

.studio-inner {
  max-width: 1172px;
  margin: 0 auto;
}

.studio-head {
  margin-bottom: 32px;
}

.studio-head-copy {
  max-width: 72ch;
  margin-bottom: 24px;
}

.studio-head-copy h2 {
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1.15;
  margin: 6px 0 12px;
}

.studio-head-copy > p:last-child {
  margin: 0;
  color: var(--text-dim);
  font-size: 15.5px;
}

/* Main Studio Tabs Navigation */
.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}

.studio-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  background: var(--bg);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  top: 1px;
}

.studio-tab-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.studio-tab-btn code {
  font-size: 13px;
  font-weight: 500;
}

.studio-tab-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.studio-tab-btn.active {
  color: var(--accent);
  background: var(--bg-2);
  border-color: var(--line-strong) var(--line-strong) var(--bg-2) var(--line-strong);
  box-shadow: 0 -2px 0 0 var(--accent);
}

/* Studio Panels & Grid */
.studio-panel {
  display: none;
  animation: studioFadeIn .25s ease-out;
}

.studio-panel.active {
  display: block;
}

@keyframes studioFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

.studio-controls {
  padding: 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.studio-control-group {
  margin-bottom: 20px;
}
.studio-control-group:last-child {
  margin-bottom: 0;
}

.studio-label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
  font-weight: 600;
}

.studio-split-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.studio-split-label .studio-label {
  margin-bottom: 0;
}

.studio-quick-links {
  display: flex;
  gap: 10px;
}

/* Pills & Multi-Option Buttons */
.studio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studio-pill {
  padding: 6px 12px;
  background: var(--bg);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}

.studio-pill:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--bg-hover);
}

.studio-pill.active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  font-weight: 600;
}

/* Form Fields & Grid */
.studio-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.studio-field {
  min-width: 0;
}

.studio-input, .studio-select, .studio-textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.studio-input-inline {
  margin-top: 8px;
  max-width: 140px;
}

.studio-input-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.studio-input:focus, .studio-select:focus, .studio-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--glow);
}

.studio-select {
  cursor: pointer;
  appearance: auto;
}

.studio-textarea {
  resize: vertical;
}

/* Checkbox Labels & Cards */
.studio-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 14px;
}

.studio-check-grid-vertical {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.studio-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.studio-checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.studio-checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.studio-checkbox-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.studio-checkbox-card input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin-top: 2px;
  flex-shrink: 0;
}

.studio-checkbox-card b {
  display: block;
  font-size: 13.5px;
  color: var(--text);
}

.studio-checkbox-card p {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

.studio-ignore-group {
  margin-bottom: 18px;
}

.studio-ignore-cat-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
  margin: 0 0 8px;
}

/* Sub-tabs within tools */
.studio-subtabs {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.studio-subtab-btn {
  padding: 7px 15px;
  background: var(--bg);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}

.studio-subtab-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.studio-subtab-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
}

/* Studio Output & Code Cards */
.studio-output {
  position: sticky;
  top: 80px;
}

.studio-card {
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.studio-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.studio-card-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 600;
}

.studio-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-code-box {
  margin: 0;
  padding: 14px 16px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-x: auto;
}

.studio-code-box pre {
  margin: 0;
}

.studio-code-box code {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-all;
}

.studio-code-tall {
  max-height: 420px;
  overflow-y: auto;
}

.studio-code-tall code {
  white-space: pre;
  word-break: normal;
}

/* Flag Explanations */
.studio-expl-wrap {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.studio-expl-head {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 10px;
  font-weight: 600;
}

.studio-expl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-expl-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.studio-expl-flag {
  flex-shrink: 0;
  padding: 1px 6px;
  background: var(--bg-3);
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
}

.studio-expl-text {
  color: var(--text-dim);
}

.studio-raw-box {
  padding: 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.studio-raw-box pre {
  margin: 0;
}

.studio-raw-box code {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
  white-space: pre-wrap;
}

/* Tool 2: Undo Matrix Specific Styles */
.studio-undo-layout {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-top: 24px;
}

.studio-undo-step {
  padding: 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.studio-step-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 4px;
  font-weight: 600;
}

.studio-step-title {
  font-size: 18px;
  margin: 0 0 14px;
}

.studio-step-desc {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--text-dim);
}

.studio-pills-wrap {
  gap: 8px;
}

.studio-goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.studio-goal-card {
  padding: 14px 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}

.studio-goal-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.studio-goal-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg));
  box-shadow: 0 0 0 1px var(--accent);
}

.studio-goal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.studio-goal-head b {
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}

.studio-goal-risk {
  flex-shrink: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.studio-goal-risk.safe { color: var(--good); }
.studio-goal-risk.warn { color: var(--warn); }
.studio-goal-risk.danger { color: var(--danger); }

.studio-goal-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.45;
}

.studio-card-result {
  border-left: 3px solid var(--accent);
}

.studio-result-badges {
  display: flex;
  align-items: center;
  gap: 12px;
}

.studio-param-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-dim);
}

.studio-param-field label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  flex-shrink: 0;
}

.studio-check-banner {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--bg-3);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}

.studio-check-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--good);
  font-weight: 600;
  margin-bottom: 6px;
}

.studio-check-code code {
  font-size: 12.5px;
  color: var(--text);
}

.studio-check-why {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.studio-why-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.studio-why-head {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 6px;
  font-weight: 600;
}

.studio-why-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* Responsiveness */
@media (max-width: 960px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .studio-output {
    position: static;
  }
  .studio-fields-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .studio { padding: 44px 16px; }
  .studio-controls, .studio-card, .studio-undo-step { padding: 18px 14px; }
  .studio-tab-btn { padding: 8px 12px; font-size: 13px; }
  .studio-goals-grid { grid-template-columns: 1fr; }
  .studio-check-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wizard { padding: 44px 16px; }
  .wizard-stage { padding: 18px 15px; }
  .wiz-options { grid-template-columns: 1fr; }
  .pb-step { gap: 12px; }
  .pb-actions { flex-wrap: wrap; gap: 12px; }
}

/* =========================================================
   Developer Personalization & Toolkit Styles
   ========================================================= */

.cmd-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.star-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .15s ease;
}

.star-btn .star-icon {
  width: 14px;
  height: 14px;
}

.star-btn:hover {
  color: var(--warn);
  border-color: var(--warn);
  transform: scale(1.08);
}

.star-btn.starred {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 40%, var(--line));
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}

.star-filled {
  fill: currentColor;
}

/* Topbar Toolkit Button Badge */
.toolkit-btn {
  position: relative;
}

.toolkit-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  padding: 1px 5px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 9.5px "IBM Plex Mono", monospace;
  min-width: 15px;
  text-align: center;
  line-height: 1.3;
}

/* Pinned Favorites Banner */
.pinned-section {
  margin-bottom: 28px;
}

.pinned-banner {
  padding: 20px 22px;
  background: color-mix(in srgb, var(--warn) 5%, var(--bg-2));
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  border-left: 3px solid var(--warn);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.pinned-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.pinned-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pinned-icon {
  font-size: 16px;
}

.pinned-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.pinned-count {
  padding: 1px 7px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--warn);
  font: 700 11px "IBM Plex Mono", monospace;
}

.pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.pinned-card {
  padding: 13px 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .15s ease, transform .15s ease;
}

.pinned-card:hover {
  border-color: var(--warn);
  transform: translateY(-1px);
}

.pinned-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pinned-cat-tag {
  font: 500 10px "IBM Plex Mono", monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.pinned-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pinned-unpin-btn {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--text-faint);
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  transition: color .15s ease;
}

.pinned-unpin-btn:hover {
  color: var(--danger);
}

.pinned-cmd code {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  word-break: break-all;
}

.pinned-desc {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Toolkit Slide-Over Drawer */
.toolkit-scrim {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 9, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 150;
}

.toolkit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 500px;
  max-width: 92vw;
  background: var(--bg);
  border-left: 1px solid var(--line-strong);
  z-index: 160;
  box-shadow: -8px 0 32px rgba(1, 4, 9, .4);
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
  display: flex;
  flex-direction: column;
}

.toolkit-drawer.open {
  transform: translateX(0);
}

.toolkit-drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.toolkit-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}

.toolkit-drawer-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolkit-drawer-icon {
  font-size: 22px;
}

.toolkit-drawer-title {
  font-size: 18px;
  margin: 0;
}

.toolkit-drawer-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

.toolkit-close-btn {
  background: none;
  border: 0;
  font-size: 24px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 4px;
  transition: all .15s ease;
}

.toolkit-close-btn:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.toolkit-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow-x: auto;
}

.toolkit-tab-btn {
  flex: 1;
  padding: 12px 10px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all .2s ease;
}

.toolkit-tab-btn:hover {
  color: var(--text);
}

.toolkit-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg);
}

.toolkit-tab-badge {
  display: inline-block;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--bg-hover);
  font-size: 10px;
  color: var(--text-dim);
  margin-left: 4px;
}

.toolkit-tab-panel {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

.toolkit-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.toolkit-panel-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}

.toolkit-vault-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.toolkit-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toolkit-item-card {
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color .15s ease;
}

.toolkit-item-card:hover {
  border-color: var(--line-strong);
}

.toolkit-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.toolkit-item-head b {
  font-size: 13.5px;
  color: var(--text);
}

.toolkit-item-tag {
  font: 500 10.5px "IBM Plex Mono", monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}

.toolkit-item-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolkit-item-code {
  margin: 0 0 8px;
  padding: 10px 12px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12.5px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.toolkit-item-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.45;
}

.toolkit-icon-btn {
  background: none;
  border: 0;
  color: var(--text-faint);
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  border-radius: 3px;
  transition: color .15s ease;
}

.toolkit-icon-btn:hover {
  color: var(--accent);
}

.toolkit-icon-btn svg {
  width: 14px;
  height: 14px;
}

.toolkit-vault-form-wrap {
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  margin-bottom: 16px;
}

.toolkit-form-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-display);
}

.toolkit-empty {
  padding: 44px 16px;
  text-align: center;
}

.toolkit-empty-icon {
  font-size: 32px;
  margin: 0 0 8px;
}

.toolkit-empty-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px;
}

.toolkit-empty-desc {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 34ch;
  margin: 0 auto;
  line-height: 1.45;
}

.toolkit-history-item {
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.toolkit-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.toolkit-history-time {
  font: 500 11px "IBM Plex Mono", monospace;
  color: var(--text-faint);
}

.toolkit-history-code {
  margin: 0;
  padding: 8px 10px;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  color: var(--text);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.toolkit-alias-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.toolkit-alias-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .15s ease;
}

.toolkit-alias-card:hover {
  border-color: var(--accent);
}

.toolkit-alias-card input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.toolkit-alias-name code {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.toolkit-alias-desc {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* =========================================================
   Interactive Git Graph & Branch Visualizer Styles
   ========================================================= */

.visualizer {
  padding: 56px 24px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.visualizer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.visualizer-head {
  margin-bottom: 24px;
}

.visualizer-head-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 34px);
  margin: 4px 0 8px;
  letter-spacing: -.02em;
}

.visualizer-head-copy p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
  max-width: 68ch;
  margin: 0;
}

/* Scenario Selector Pills Bar */
.viz-scenario-bar {
  margin-top: 18px;
}

.viz-scenario-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.viz-scenario-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
  font-family: inherit;
}

.viz-scenario-pill span {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  color: var(--text);
}

.viz-scenario-pill i {
  font-style: normal;
  font-size: 12px;
  color: var(--text-faint);
}

.viz-scenario-pill:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.viz-scenario-pill.active {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 20%, transparent);
}

.viz-scenario-pill.active span {
  color: var(--accent);
}

.viz-sandbox-pill {
  background: color-mix(in srgb, var(--accent-ink, #238636) 15%, var(--bg));
  border-color: color-mix(in srgb, #3fb950 40%, var(--line));
}

.viz-sandbox-pill span {
  color: #3fb950;
}

.viz-sandbox-pill.active {
  background: color-mix(in srgb, #3fb950 20%, var(--bg));
  border-color: #3fb950;
  color: #3fb950;
  box-shadow: 0 0 12px rgba(63, 185, 80, .25);
}

/* Main Visualizer Stage Grid */
.viz-stage {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

.viz-stage-main {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Canvas Bar */
.viz-canvas-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  gap: 14px;
  flex-wrap: wrap;
}

.viz-scenario-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}

.viz-scenario-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
  max-width: 48ch;
  line-height: 1.4;
}

/* Stepper Controls */
.viz-stepper-ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.viz-ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all .15s ease;
}

.viz-ctrl-btn svg {
  width: 14px;
  height: 14px;
}

.viz-ctrl-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg));
}

.viz-ctrl-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.viz-play-btn.playing {
  background: color-mix(in srgb, var(--accent) 15%, var(--bg));
  border-color: var(--accent);
  color: var(--accent);
}

.viz-stepper-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
}

.viz-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--line-strong);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: all .2s ease;
}

.viz-dot:hover {
  background: var(--text-dim);
}

.viz-dot.active {
  width: 24px;
  background: var(--accent);
}

/* SVG Canvas */
.viz-canvas-wrap {
  position: relative;
  min-height: 280px;
  background: #06090f;
  padding: 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.viz-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 280px;
  overflow: visible;
  display: block;
}

/* SVG Node Styles */
.viz-node {
  cursor: pointer;
  transition: transform .2s ease;
  outline: none;
}

.viz-node:hover circle {
  filter: drop-shadow(0 0 10px currentColor);
}

.viz-node-sha {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  fill: #8b949e;
}

.viz-branch-text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
}

.viz-head-text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  font-weight: 700;
  fill: #0d1117;
}

.viz-edge {
  transition: stroke .3s ease;
}

.viz-glow {
  animation: vizPulse 2s infinite ease-in-out;
}

@keyframes vizPulse {
  0%, 100% { transform: scale(1); opacity: .4; }
  50% { transform: scale(1.18); opacity: .8; }
}

.viz-pop {
  animation: vizPop .3s cubic-bezier(.16, 1, .3, 1) forwards;
}

@keyframes vizPop {
  0% { opacity: 0; transform: scale(.6); }
  100% { opacity: 1; transform: scale(1); }
}

.viz-dim {
  opacity: .35;
}

/* Node Inspector Popover */
.viz-inspector {
  position: absolute;
  bottom: 14px;
  left: 18px;
  right: 18px;
  background: rgba(13, 17, 23, .94);
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px 16px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,.6);
}

.viz-insp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.viz-insp-sha code {
  color: var(--accent);
  font-weight: 600;
}

.viz-insp-branch {
  font: 600 11px "IBM Plex Mono", monospace;
  text-transform: uppercase;
}

.viz-insp-msg {
  margin: 0 0 4px;
  font-size: 13px;
  color: #c9d1d9;
}

.viz-insp-meta {
  font-size: 11.5px;
  color: #8b949e;
}

/* Sandbox Action Toolbar */
.viz-sandbox-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
  overflow: hidden;
}

.viz-sb-tag {
  font: 700 10.5px "IBM Plex Mono", monospace;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}

.viz-sb-btn {
  padding: 6px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 500 12px "IBM Plex Mono", monospace;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
}

.viz-sb-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
}

.viz-sb-reset {
  margin-left: auto;
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
}

.viz-sb-reset:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border-color: var(--danger);
}

/* Hide any accidental scrollbar inside visualizer component */
.visualizer * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.visualizer *::-webkit-scrollbar {
  display: none;
}

/* Sidebar: Step Card & Terminal */
.viz-stage-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.viz-step-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.viz-step-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font: 700 10.5px "IBM Plex Mono", monospace;
  margin-bottom: 8px;
}

.viz-step-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

/* Terminal Command Display */
.viz-terminal-box {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.viz-terminal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.viz-term-label {
  font: 600 10px "IBM Plex Mono", monospace;
  text-transform: uppercase;
  color: #8b949e;
  letter-spacing: .08em;
}

.viz-terminal-body {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
}

.viz-term-prompt {
  font-family: "IBM Plex Mono", monospace;
  color: #58a6ff;
  font-weight: 700;
  user-select: none;
}

.viz-terminal-body code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: #e6edf3;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
}

.viz-expl-box {
  margin-bottom: 12px;
}

.viz-expl-label {
  margin: 0 0 4px;
  font: 700 10.5px "IBM Plex Mono", monospace;
  text-transform: uppercase;
  color: var(--text-faint);
  letter-spacing: .08em;
}

.viz-expl-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}

.viz-tip-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.viz-tip-icon {
  font-size: 14px;
  line-height: 1.2;
}

.viz-tip-text {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Legend */
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.viz-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 11px "IBM Plex Mono", monospace;
  color: var(--text-dim);
}

.viz-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .viz-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .visualizer {
    padding: 40px 16px;
  }
  .viz-canvas-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .viz-stepper-ctrls {
    width: 100%;
    justify-content: space-between;
  }
}

/* =========================================================
   Git Security & Secret Shield Styles
   ========================================================= */

.security {
  padding: 56px 24px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.security-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.security-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.security-head-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 34px);
  margin: 4px 0 8px;
  letter-spacing: -.02em;
}

.security-head-copy p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
  max-width: 68ch;
  margin: 0;
}

/* Security Navigation Tabs */
.sec-nav-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sec-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s ease;
  font-family: inherit;
}

.sec-tab-btn svg {
  width: 15px;
  height: 15px;
}

.sec-tab-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.sec-tab-btn.active {
  background: color-mix(in srgb, var(--danger, #f85149) 12%, var(--bg-2));
  border-color: var(--danger, #f85149);
  color: var(--text);
  box-shadow: 0 0 12px color-mix(in srgb, var(--danger, #f85149) 20%, transparent);
}

.sec-tab-btn.active svg {
  color: var(--danger, #f85149);
}

/* Scanner Layout */
.sec-scanner-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 20px;
  align-items: start;
}

.sec-input-card, .sec-results-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.sec-input-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sec-input-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.sec-textarea {
  width: 100%;
  padding: 14px 16px;
  background: #0d1117;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
  resize: vertical;
  min-height: 190px;
  max-height: 480px;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.sec-textarea::-webkit-scrollbar {
  width: 5px;
}

.sec-textarea::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.sec-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.sec-samples-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.sec-samples-label {
  font: 700 11px "IBM Plex Mono", monospace;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.sec-sample-btn {
  padding: 3px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font: 500 11.5px "IBM Plex Mono", monospace;
  color: var(--text-dim);
  cursor: pointer;
  transition: all .15s ease;
}

.sec-sample-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.sec-privacy-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.sec-privacy-note svg {
  flex-shrink: 0;
  color: #3fb950;
}

/* Results Card */
.sec-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.sec-results-title {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}

.sec-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 99px;
  font: 700 11px "IBM Plex Mono", monospace;
}

.sec-badge-clean {
  background: color-mix(in srgb, #3fb950 18%, transparent);
  color: #3fb950;
  border: 1px solid color-mix(in srgb, #3fb950 40%, transparent);
}

.sec-badge-danger {
  background: color-mix(in srgb, var(--danger, #f85149) 20%, transparent);
  color: var(--danger, #f85149);
  border: 1px solid color-mix(in srgb, var(--danger, #f85149) 50%, transparent);
  animation: vizPulse 2s infinite ease-in-out;
}

.sec-empty-state, .sec-clean-state {
  padding: 36px 16px;
  text-align: center;
}

.sec-empty-state p {
  color: var(--text-faint);
  font-size: 13.5px;
  max-width: 32ch;
  margin: 0 auto;
}

.sec-clean-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.sec-clean-title {
  font-size: 16px;
  font-weight: 700;
  color: #3fb950;
  margin: 0 0 6px;
}

.sec-clean-desc {
  font-size: 12.5px;
  color: var(--text-dim);
  max-width: 44ch;
  margin: 0 auto;
  line-height: 1.45;
}

/* Detected Leaks List */
.sec-leaks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.sec-leaks-list::-webkit-scrollbar {
  width: 5px;
}

.sec-leaks-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}

.sec-leaks-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

.sec-leak-card {
  padding: 12px 14px;
  background: #0d1117;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, #30363d);
  border-left: 3px solid var(--danger);
  border-radius: 8px;
}

.sec-leak-card.high {
  border-left-color: var(--warn);
}

.sec-leak-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.sec-leak-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sec-severity-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font: 700 9.5px "IBM Plex Mono", monospace;
}

.sec-severity-tag.critical {
  background: color-mix(in srgb, var(--danger) 25%, transparent);
  color: var(--danger);
}

.sec-severity-tag.high {
  background: color-mix(in srgb, var(--warn) 25%, transparent);
  color: var(--warn);
}

.sec-leak-name {
  font-size: 13.5px;
  color: var(--text);
}

.sec-leak-line {
  font: 500 11px "IBM Plex Mono", monospace;
  color: var(--text-faint);
}

.sec-leak-match {
  padding: 2px 7px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 4px;
  font-size: 11.5px;
  color: var(--danger);
}

.sec-leak-snippet {
  margin: 6px 0;
  padding: 6px 10px;
  background: #161b22;
  border-radius: 4px;
  font-size: 11.5px;
  color: #c9d1d9;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  scrollbar-width: none;
}

.sec-leak-snippet::-webkit-scrollbar {
  display: none;
}

.sec-leak-action {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 6px;
}

.sec-leak-action strong {
  color: var(--text);
}

/* Purge Playbooks Layout */
.sec-purge-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}

.sec-purge-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sec-purge-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all .15s ease;
  font-family: inherit;
}

.sec-purge-tab-btn strong {
  font-size: 13.5px;
  color: var(--text);
}

.sec-purge-tab-btn span {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.35;
}

.sec-purge-tab-btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-2));
}

.sec-purge-tab-btn.active {
  background: var(--bg);
  border-color: var(--line);
  border-left-color: var(--accent);
  box-shadow: var(--shadow);
}

.sec-purge-tab-btn.active strong {
  color: var(--accent);
}

.sec-purge-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.sec-purge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.sec-purge-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
}

.sec-purge-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sec-purge-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sec-pstep-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-pstep-num {
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 700 11px "IBM Plex Mono", monospace;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sec-pstep-label {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.sec-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
}

.sec-code-box pre {
  margin: 0;
  overflow-x: auto;
  font-size: 12.5px;
}

.sec-code-box code {
  color: #e6edf3;
  font-family: "IBM Plex Mono", monospace;
}

.sec-pstep-why {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
  padding-left: 32px;
}

/* Hooks Generator Layout */
.sec-hooks-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

.sec-hook-meta {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.sec-hook-meta h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-family: var(--font-display);
}

.sec-hook-meta p {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* Checklist Layout */
.sec-checklist-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.sec-checklist-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sec-checklist-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
}

.sec-checklist-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.45;
}

.sec-checklist-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sec-check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
}

.sec-check-item:hover {
  border-color: var(--accent);
}

.sec-check-item input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--accent);
  cursor: pointer;
}

.sec-check-item.completed {
  opacity: .6;
  background: color-mix(in srgb, var(--accent) 5%, var(--bg));
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line));
}

.sec-check-item.completed strong {
  text-decoration: line-through;
  color: var(--text-dim);
}

.sec-check-text strong {
  display: block;
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 3px;
}

.sec-check-text p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.45;
}

/* =========================================================
   Terminal & CLI Companion Styles
   ========================================================= */

.cli-hub {
  padding: 56px 24px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.cli-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cli-head {
  margin-bottom: 28px;
}

.cli-head-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 34px);
  margin: 4px 0 8px;
  letter-spacing: -.02em;
}

.cli-head-copy p {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.55;
  max-width: 68ch;
  margin: 0;
}

.cli-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 24px;
  align-items: start;
}

.cli-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cli-method-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}

.cli-method-card:hover {
  border-color: var(--accent);
}

.cli-method-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cli-method-tag {
  padding: 2px 7px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  border-radius: 4px;
  font: 700 10.5px "IBM Plex Mono", monospace;
  text-transform: uppercase;
}

.cli-method-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

.cli-method-card p {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

.cli-code-snippet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
}

.cli-code-snippet code {
  color: #58a6ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  overflow-x: auto;
  white-space: nowrap;
}

/* Terminal Simulator Window */
.cli-simulator {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cli-term-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  background: #161b22;
  border-bottom: 1px solid #30363d;
}

.cli-term-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  display: inline-block;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.cli-term-title {
  font: 500 11.5px "IBM Plex Mono", monospace;
  color: #8b949e;
}

.cli-term-body {
  padding: 20px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #e6edf3;
  overflow-x: auto;
}

.cli-term-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.term-prompt {
  color: #58a6ff;
  font-weight: 700;
}

.term-cmd {
  color: #fff;
  font-weight: 600;
}

.cli-term-output {
  padding-left: 14px;
  border-left: 2px solid #30363d;
  margin-left: 2px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.term-brand {
  margin: 0;
  font-size: 11.5px;
  color: #8b949e;
  font-weight: 600;
}

.term-entry {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.term-entry-cmd {
  color: #3fb950;
  font-weight: 600;
}

.term-entry-desc {
  color: #c9d1d9;
  font-size: 12px;
}

.term-entry-risk {
  font-size: 11px;
  color: #8b949e;
}

.term-entry-code {
  color: #58a6ff;
  font-size: 12px;
}

.risk-safe {
  color: #3fb950;
  font-weight: 600;
}

/* Responsiveness */
@media (max-width: 960px) {
  .sec-scanner-layout, .sec-purge-layout, .sec-hooks-layout, .cli-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .security, .cli-hub {
    padding: 40px 16px;
  }
  .sec-tab-btn {
    flex: 1 1 calc(50% - 6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wiz-option, .wiz-option > svg, .pb-chip, .studio-pill, .studio-goal-card, .studio-tab-btn, .star-btn, .toolkit-drawer, .viz-scenario-pill, .viz-dot, .viz-ctrl-btn, .viz-node, .viz-pop, .viz-glow, .sec-tab-btn, .sec-badge-danger { transition: none; animation: none; }
}

