/* =========================================================
   KERXEL.DEV - workshop aesthetic
   - dark warm canvas + electric chartreuse accent
   - Bricolage Grotesque (display/body) + JetBrains Mono (technical)
   ========================================================= */

:root {
  --bg:         #0c0c0e;
  --bg-soft:    #131318;
  --surface:    #16161c;
  --surface-2:  #1b1b22;
  --line:       #25252e;
  --line-soft:  #1f1f27;
  --ink:        #f1ede1;
  --ink-2:      #d9d4c5;
  --muted:      #8a847a;
  --muted-2:    #5d5851;
  --accent:     #d4ff3d;        /* electric chartreuse */
  --accent-ink: #0c0c0e;
  --warn:       #ff6e4a;
  --info:       #7ec8ff;

  --shadow-lg:  0 30px 80px -30px rgba(0,0,0,.6), 0 12px 30px -12px rgba(0,0,0,.5);
  --shadow-md:  0 14px 38px -18px rgba(0,0,0,.55);

  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-body:    'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius:    14px;
  --radius-sm: 9px;

  --pad-x: clamp(22px, 4vw, 56px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: 'ss01' on, 'ss02' on, 'cv11' on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(800px 500px at 80% -10%, rgba(212,255,61,.07), transparent 60%),
    radial-gradient(900px 600px at 5% 20%,  rgba(126,200,255,.04), transparent 70%),
    var(--bg);
  min-height: 100vh;
  position: relative;
}

/* ===== Background ornament ===== */
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.bg-glow {
  position: fixed;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(212,255,61,.10), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

main, .topbar, .footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* ===== Topbar ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad-x);
  gap: 28px;
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(8px);
  background: rgba(12,12,14,.7);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.02em;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 26px; height: 26px;
  display: inline-grid; place-items: center;
  background: var(--accent);
  border-radius: 7px;
  position: relative;
  box-shadow: 0 0 0 1px rgba(212,255,61,.4), 0 6px 20px -6px rgba(212,255,61,.5);
}
.brand-mark-inner {
  width: 12px; height: 12px;
  background: var(--accent-ink);
  border-radius: 3px;
  transform: rotate(45deg);
  position: relative;
}
.brand-mark-inner::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--accent);
  border-radius: 1px;
}
.brand-tld { color: var(--muted); font-weight: 400; }

.top-nav {
  display: flex;
  gap: 28px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-2);
}
.top-nav a {
  position: relative;
  padding: 4px 0;
  transition: color .15s ease;
}
.top-nav a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.top-nav a:hover { color: var(--ink); }
.top-nav a:hover::after { transform: scaleX(1); }

.top-actions { display: flex; align-items: center; gap: 12px; }

.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
  color: var(--ink-2);
  transition: border-color .2s ease, background .2s ease;
}
.kbd-hint:hover { border-color: var(--accent); background: var(--surface-2); }
.kbd-hint-label { color: var(--muted); margin-left: 4px; }

.kbd {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  line-height: 1;
}

.ghost-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink-2);
  background: var(--surface);
  transition: color .15s, background .15s, border-color .15s;
}
.ghost-btn:hover { color: var(--accent); border-color: var(--accent); }


/* ===== Hero ===== */
.hero {
  padding: clamp(64px, 9vw, 120px) var(--pad-x) clamp(40px, 6vw, 70px);
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
}
.hero.in-view { opacity: 1; transform: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(22,22,28,.5);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(212,255,61,.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212,255,61,.18); }
  50%      { box-shadow: 0 0 0 6px rgba(212,255,61,.05); }
}

.headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 7.2vw, 96px);
  line-height: 0.96;
  letter-spacing: -.045em;
  margin: 28px auto 24px;
  max-width: 14ch;
  font-variation-settings: 'wdth' 100;
}
.headline em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-family: 'Bricolage Grotesque', serif;
}
.headline-accent {
  display: inline-block;
  color: var(--bg);
  background: var(--accent);
  padding: 0 .18em .04em;
  border-radius: 6px;
  transform: rotate(-1.2deg);
  margin-top: .15em;
  box-shadow: 0 8px 30px -8px rgba(212,255,61,.45);
}

.sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 58ch;
  margin: 0 auto 36px;
}

/* command-bar CTA */
.cmd-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 16px 16px 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  cursor: text;
  font-size: 15px;
  color: var(--ink-2);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  box-shadow: var(--shadow-md);
}
.cmd-bar:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 22px 50px -22px rgba(212,255,61,.25), var(--shadow-md);
}
.cmd-bar-icon { color: var(--muted); display: inline-flex; }
.cmd-bar-text { flex: 1; font-family: var(--font-mono); font-size: 14px; }
.cmd-bar-cursor {
  display: inline-block;
  width: 7px; height: 16px;
  margin-left: 3px;
  background: var(--accent);
  vertical-align: -3px;
  animation: blink 1.05s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.cmd-bar-kbds { display: inline-flex; gap: 4px; }

.hero-quick {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
}
.hero-quick-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-right: 6px;
}
.chip {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }


/* ===== Showcase / live preview ===== */
.showcase {
  padding: 0 var(--pad-x) clamp(60px, 7vw, 100px);
  max-width: 1180px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.showcase.in-view { opacity: 1; transform: none; }

.showcase-intro {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto 32px;
}
.showcase-intro .section-kicker { margin-bottom: 14px; }
.showcase-title {
  font-size: clamp(26px, 3vw, 36px);
  margin: 0 0 12px;
}
.showcase-sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.showcase-tab {
  font: inherit;
  cursor: pointer;
  border: 0;
}

.sc-textarea {
  width: 100%;
  min-height: 240px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  padding: 14px 20px 20px;
}
.sc-textarea::placeholder { color: var(--muted-2); }

.sc-output {
  min-height: 240px;
  padding: 14px 20px 20px;
  margin: 0;
}

.pane-err {
  background: rgba(255,110,74,.03);
}
.pane-err .pane-label-accent { color: var(--warn); }
.t-err-line {
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 13px;
}

.showcase-frame {
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.015), transparent 50%),
    var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.showcase-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.showcase-bar-tabs { display: flex; gap: 4px; }
.showcase-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 6px;
  color: var(--muted);
  cursor: default;
  transition: color .15s, background .15s;
}
.showcase-tab:hover { color: var(--ink-2); background: var(--surface-2); }
.showcase-tab.is-active {
  color: var(--ink);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.showcase-bar-meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted-2);
}
.led-on {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.showcase-body {
  display: grid;
  grid-template-columns: 1fr 32px 1fr;
  gap: 0;
  background: var(--bg);
}
.pane {
  padding: 18px 20px 22px;
  min-height: 220px;
  position: relative;
}
.pane + .pane-arrow + .pane { border-left: 1px dashed var(--line-soft); }
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pane-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.pane-label-accent {
  color: var(--accent);
}
.pane-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}
.code {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-all;
}
.pane-out .code { white-space: pre; word-break: normal; }
.t-k { color: #c5d0e0; }       /* keys */
.t-s { color: #b6e8a8; }       /* strings */
.t-n { color: #ffb86c; }       /* numbers */
.t-b { color: var(--info); }   /* booleans */
.t-p { color: var(--muted); }  /* punctuation */

.pane-arrow {
  display: grid; place-items: center;
  color: var(--muted);
  background: var(--bg);
}

.showcase-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
}
.showcase-foot-stats {
  display: flex; gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.showcase-foot-stats strong { color: var(--ink); font-weight: 500; }
.showcase-foot-actions { display: flex; gap: 6px; }
.mini-btn {
  padding: 7px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink-2);
  background: var(--surface);
  transition: border-color .15s, color .15s, background .15s;
}
.mini-btn:hover { border-color: var(--accent); color: var(--accent); }
.mini-btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}
.mini-btn-accent:hover {
  background: #e2ff5b;
  color: var(--accent-ink);
}

/* ===== Section heads ===== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  padding: 0 0 36px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 40px;
}
.section-head-tight {
  border: 0;
  padding-bottom: 24px;
  margin-bottom: 24px;
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -.03em;
  margin: 0;
  line-height: 1.05;
}
.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
}
.section-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ===== Tools section ===== */
.tools {
  padding: 0 var(--pad-x) clamp(60px, 7vw, 100px);
  max-width: 1280px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.tools.in-view { opacity: 1; transform: none; }

.section-filter {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.filter {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 7px;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.filter:hover { color: var(--ink-2); }
.filter.is-active {
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 500;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.tool-card {
  position: relative;
  display: block;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.tool-card.is-hidden { display: none; }
.tool-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(220px 120px at var(--mx,80%) var(--my,0%), rgba(212,255,61,.07), transparent 60%);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}
.tool-card:hover {
  border-color: rgba(212,255,61,.35);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.tool-card:hover::before { opacity: 1; }

.tc-icon {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.tc-icon-format  { color: #d4ff3d; background: rgba(212,255,61,.06); border-color: rgba(212,255,61,.25); }
.tc-icon-convert { color: #7ec8ff; background: rgba(126,200,255,.06); border-color: rgba(126,200,255,.25); }
.tc-icon-decode  { color: #ff8bbd; background: rgba(255,139,189,.06); border-color: rgba(255,139,189,.28); }
.tc-icon-test    { color: #ff9d6e; background: rgba(255,157,110,.06); border-color: rgba(255,157,110,.25); }
.tc-icon-gen     { color: #c590ff; background: rgba(197,144,255,.06); border-color: rgba(197,144,255,.25); }
.tc-icon-inspect { color: #f5cf6c; background: rgba(245,207,108,.06); border-color: rgba(245,207,108,.28); }

/* "Soon" status */
.tool-card-soon {
  opacity: .55;
  cursor: not-allowed;
}
.tool-card-soon:hover {
  border-color: var(--line);
  transform: none;
  background: var(--surface);
}
.tc-soon {
  position: absolute;
  top: 14px; right: 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--bg-soft);
  z-index: 1;
}
.tool-card-soon .tc-arrow { color: var(--muted-2); }

.p-soon {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}
.p-item.is-soon {
  opacity: .6;
}

.tc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.tc-head h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: -.02em;
  margin: 0;
}
.tc-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}
.tc-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 18px;
}
.tc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tc-kbd { display: inline-flex; gap: 3px; opacity: .7; }
.tc-arrow {
  font-family: var(--font-mono);
  color: var(--muted-2);
  transition: transform .25s ease, color .25s ease;
}
.tool-card:hover .tc-arrow { color: var(--accent); transform: translateX(4px); }


/* ===== Stats ===== */
.stats {
  padding: 0 var(--pad-x) clamp(60px, 7vw, 100px);
  max-width: 1280px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.stats.in-view { opacity: 1; transform: none; }

.stats-head {
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 32px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
}
.stat {
  padding: 28px 26px;
  border-right: 1px solid var(--line-soft);
}
.stat:last-child { border-right: 0; }
.stat-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 56px;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 4px;
}
.stat-unit {
  font-size: .45em;
  margin-left: 2px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin-bottom: 14px;
}
.stat-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

@media (max-width: 760px) {
  .stat { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .stat:last-child { border-bottom: 0; }
}

/* ===== Shortcuts ===== */
.shortcuts {
  padding: 0 var(--pad-x) clamp(70px, 8vw, 120px);
  max-width: 1280px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.shortcuts.in-view { opacity: 1; transform: none; }

.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}
.sc-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.sc-keys { display: inline-flex; gap: 4px; flex-shrink: 0; }
.sc-desc { font-size: 14px; color: var(--ink-2); }


/* ===== Footer ===== */
.footer {
  padding: clamp(50px, 6vw, 80px) var(--pad-x) 38px;
  border-top: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255,255,255,.012), transparent 30%),
    var(--bg-soft);
  margin-top: 30px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .7s ease, transform .7s ease;
}
.footer.in-view { opacity: 1; transform: none; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  max-width: 1280px;
  margin: 0 auto 50px;
}
@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .footer-col-brand { grid-column: 1 / -1; }
}

.brand-foot { font-size: 22px; }
.footer-blurb {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 38ch;
  margin: 16px 0 0;
}
.footer-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 10px;
  font-size: 14px;
}
.footer-col ul a { color: var(--ink-2); transition: color .15s; }
.footer-col ul a:hover { color: var(--accent); }

.footer-rule {
  height: 1px;
  background: var(--line-soft);
  max-width: 1280px;
  margin: 0 auto 22px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  max-width: 1280px;
  margin: 0 auto;
}
.footer-bottom-mid { color: var(--muted-2); }
.footer-status { display: inline-flex; align-items: center; gap: 6px; }


/* ===== Command palette ===== */
.palette {
  position: fixed; inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: opacity .18s ease, visibility 0s linear .18s;
}
.palette.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity .18s ease;
}
.palette-backdrop {
  position: absolute; inset: 0;
  background: rgba(7,7,9,.7);
  backdrop-filter: blur(8px);
}
.palette-card {
  position: relative;
  width: min(620px, calc(100% - 28px));
  margin: 12vh auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(8px) scale(.985);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
}
.palette.is-open .palette-card { transform: none; opacity: 1; }

.palette-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
.palette-search input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}
.palette-search input::placeholder { color: var(--muted-2); }
.palette-esc { color: var(--muted); }

.palette-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}
.p-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-2);
}
.p-item:hover, .p-item.is-active {
  background: var(--surface-2);
  color: var(--ink);
}
.p-item.is-active { box-shadow: inset 0 0 0 1px rgba(212,255,61,.35); }
.p-name { flex: 1; }
.p-cat {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 2px 7px;
  border-radius: 4px;
}
.p-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
}
.p-item.is-active .p-arrow { color: var(--accent); }
.p-empty {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.palette-foot {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.palette-foot span { display: inline-flex; align-items: center; gap: 6px; }
.palette-foot-right { margin-left: auto; }


/* ===== Responsive tweaks ===== */
@media (max-width: 760px) {
  .top-nav { display: none; }
  .kbd-hint-label { display: none; }
  .showcase-body { grid-template-columns: 1fr; }
  .pane + .pane-arrow + .pane { border-left: 0; border-top: 1px dashed var(--line-soft); }
  .pane-arrow { transform: rotate(90deg); padding: 8px 0; }
  .section-head { align-items: flex-start; }
}

/* hover-tracking for tool-card glow */
@media (hover: hover) {
  .tool-card { --mx: 50%; --my: 0%; }
}
