/* valley.space — Valley theme (earthy topographic). Light default, dark aware.
   Variable NAMES are unchanged from the old dark theme so every component below
   inherits the new palette automatically; only the values are swapped. */

:root {
  /* surface palette — Valley "ground/surface/card" */
  --bg:        #f2f4f0;   /* ground */
  --bg-1:      #fafbf9;   /* surface */
  --bg-2:      #ffffff;   /* card */
  --bg-3:      #e9ede7;   /* hover surface */
  --surface:   #ffffff;
  --surface-elev: #ffffff;
  --border:    #dde4dc;   /* line */
  --border-strong: #ccd6cd; /* contour */
  --border-2:  #e6ebe3;
  /* text */
  --text:      #17211d;   /* ink */
  --text-dim:  #4c5a53;   /* ink-2 */
  --text-mute: #7d8a83;   /* muted */
  /* accent — teal is interactive, amber is identity */
  --accent:    #1f7a66;   /* teal */
  --accent-2:  #1f7a66;
  --accent-cy: #1f7a66;
  --accent-dim: rgba(31, 122, 102, 0.14);
  --amber:     #b97c2e;
  /* status */
  --green:     #1f7a4d;
  --yellow:    #9a7415;
  --red:       #b23b2e;
  --orange:    #b5611c;
  --magenta:   #9c5bb0;
  /* effects — identity gradient runs teal→amber (the Valley landscape) */
  --grad:      linear-gradient(135deg, #1f7a66 0%, #b97c2e 100%);
  --grad-warm: linear-gradient(135deg, #b97c2e 0%, #d0a24f 100%);
  --contour:   #ccd6cd;
  --shadow-sm: 0 1px 2px rgba(20, 30, 25, 0.06);
  --shadow:    0 8px 24px -16px rgba(20, 30, 25, 0.26),
               0 1px 0 rgba(255, 255, 255, 0.5) inset;
  --shadow-lg: 0 24px 48px -26px rgba(20, 30, 25, 0.32);
  --shadow-glow: 0 0 0 3px rgba(31, 122, 102, 0.14);
  /* shape & motion */
  --radius:    10px;
  --radius-lg: 14px;
  --radius-sm: 6px;
  --ease:      cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast:  120ms;
  --dur:       220ms;
  --dur-slow:  420ms;
  /* type — system fonts, matching the landing */
  --mono:      ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans:      system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1210; --bg-1: #0f1815; --bg-2: #101b17; --bg-3: #16241f;
    --surface: #101b17; --surface-elev: #14211c;
    --border: #1a2a24; --border-strong: #24382f; --border-2: #16231e;
    --text: #e9eeea; --text-dim: #a7b5ad; --text-mute: #6d7c74;
    --accent: #57c4a7; --accent-2: #57c4a7; --accent-cy: #57c4a7;
    --accent-dim: rgba(87, 196, 167, 0.16); --amber: #e0a458;
    --green: #5ad0b0; --yellow: #e0b04f; --red: #e0715f; --orange: #e0975f; --magenta: #c98fd6;
    --grad: linear-gradient(135deg, #57c4a7 0%, #e0a458 100%);
    --grad-warm: linear-gradient(135deg, #e0a458 0%, #f0c07a 100%);
    --contour: #1d332c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 0 3px rgba(87, 196, 167, 0.18);
  }
}
::selection { background: var(--accent-dim); color: var(--text); }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  /* Topographic contour backdrop — the same basin motif as the landing/auth. */
  background:
    repeating-radial-gradient(circle at 50% 118%,
      transparent 0, transparent 46px,
      var(--contour) 46px, var(--contour) 47px),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent-2); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: 12px; }
/* Never let long unbreakable tokens (URLs, tokens) bleed past their container. */
code, pre { overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
pre { overflow-x: auto; }
.hairline { height: 1px; background: var(--border); border: 0; }
.eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-mute);
}

/* ── top nav ─────────────────────────────────────────────────────────── */
.topnav {
  display: flex; align-items: center;
  gap: 18px;
  padding: 12px 24px;
  /* Translucent surface that adapts to light/dark via the theme variable. */
  background: color-mix(in srgb, var(--bg-1) 82%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 300; font-size: 16px; letter-spacing: 0.22em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
/* Valley logo (topographic-basin favicon) + canonical wordmark (thin,
   letter-spaced, amber middot). */
.brand .logo-img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.brand .wm b { color: var(--amber); font-weight: 400; }
.topnav .grow { flex: 1; }
.topnav .navlink {
  color: var(--text-dim);
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--dur-fast) var(--ease);
}
.topnav .navlink:hover {
  background: var(--bg-2); color: var(--text); text-decoration: none;
}
.topnav .navlink.active {
  background: var(--bg-2); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}
.topnav .btn { margin-left: 4px; }
.topnav .nav-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase;
  background: var(--accent-dim); color: var(--accent-cy);
  padding: 2px 6px; border-radius: 4px;
  vertical-align: 1px;
  border: 1px solid rgba(31, 122, 102, 0.22);
}

/* ── buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:hover {
  background: var(--bg-3); border-color: var(--border-strong);
  text-decoration: none;
}
.btn:active { transform: translateY(0.5px); }
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, var(--shadow-sm);
}
.btn-primary:hover {
  filter: brightness(1.06);
}
.btn-success {
  background: rgba(126, 231, 135, 0.16); border-color: rgba(126, 231, 135, 0.4);
  color: var(--green);
}
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--bg-2); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn:disabled, .btn[disabled] {
  opacity: 0.45; cursor: not-allowed; transform: none;
}
.btn .arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
}
.btn:hover .arrow { transform: translateX(2px); }

/* ── landing ─────────────────────────────────────────────────────────── */
.landing {
  min-height: calc(100vh - 52px);
  display: grid; place-items: center;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
}
.landing::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(31, 122, 102,.18), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 60%, rgba(185, 124, 46,.12), transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(63,185,80,.10), transparent 70%);
  pointer-events: none;
}
.landing-inner { position: relative; max-width: 1100px; text-align: center; }
.tagline {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--text-dim);
  font-size: 12px;
  margin-bottom: 28px;
  font-family: var(--mono);
}
.tagline .dot { color: var(--green); }
h1.hero {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 24px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h1.hero .small { display: block; font-size: 0.42em; font-weight: 500; color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); margin-top: 18px; letter-spacing: 0; }
.lead {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 auto 40px;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-row .btn { padding: 12px 22px; font-size: 14px; }

.features {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  text-align: left;
}
.feature {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 15px;
  display: flex; align-items: center; gap: 8px;
}
.feature .icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(31, 122, 102, .12);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 16px;
}
.feature p { margin: 0; color: var(--text-dim); font-size: 13px; }

/* ── dashboard / home ────────────────────────────────────────────────── */
.dashboard {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
}
.sidecol {
  display: flex; flex-direction: column; gap: 16px;
}
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card h4 {
  margin: 0 0 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}

.maincol h2 {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 600;
}
.repo-grid { display: grid; gap: 12px; }
.repo-row {
  display: block;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all .15s;
}
.repo-row:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
}
.repo-row .title {
  font-size: 16px; font-weight: 600;
  color: var(--accent-2);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.repo-row .tag-pill {
  font-size: 10px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.repo-row p { margin: 0 0 12px; color: var(--text-dim); font-size: 13px; }
.repo-row .meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 12px; color: var(--text-mute);
}
.repo-row .meta span { display: inline-flex; align-items: center; gap: 5px; }
.swatch {
  display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  color: var(--text-mute);
}
.empty code {
  display: inline-block;
  background: var(--bg-2);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text);
  border: 1px solid var(--border);
}

/* ── repo view ───────────────────────────────────────────────────────── */
.repo-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}
.repo-header-inner {
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px 24px 0;
}
.repo-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px;
}
.repo-title .owner { color: var(--accent-2); text-decoration: none; }
.repo-title .owner:hover { text-decoration: underline; }
.repo-title .sep { color: var(--text-mute); }
.repo-title .name { font-weight: 700; color: var(--accent-2); text-decoration: none; }
.repo-title .name:hover { text-decoration: underline; }
.repo-desc {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 13px;
}
.repo-tabs {
  display: flex;
  gap: 4px;
  margin-top: 18px;
  overflow-x: auto;
}
.repo-tab {
  padding: 10px 14px;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.repo-tab:hover { color: var(--text); text-decoration: none; }
.repo-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 500;
}
.repo-tab .count {
  display: inline-block;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text-dim);
}

/* ── three-pane repo layout: sidebar | CANVAS | sidebar ─────────────── */
.repo-body {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 0;
  height: calc(100vh - 170px);
  min-height: 600px;
}
.pane {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 18px;
  background: var(--bg-1);
}
.pane.right { border-right: none; border-left: 1px solid var(--border); }

.pane h5 {
  margin: 0 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.pane .branch-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  margin-bottom: 12px;
}
.pane .branch-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.commit-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-2);
  font-size: 12px;
}
.commit-row:last-child { border-bottom: none; }
.commit-row .msg {
  color: var(--text);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.commit-row .meta {
  color: var(--text-mute);
  font-family: var(--mono);
  font-size: 10px;
  display: flex; gap: 8px;
}
.commit-row .hash {
  color: var(--yellow);
}

/* center canvas: Figma-style with floating toolbar */
.canvas {
  position: relative;
  background:
    radial-gradient(ellipse at center, rgba(31, 122, 102,.05), transparent 70%),
    var(--bg-1);
  overflow: hidden;
}
.canvas iframe {
  width: 100%; height: 100%;
  border: none;
  display: block;
}
.canvas-overlay {
  position: absolute;
  top: 14px; left: 14px;
  display: flex; gap: 8px;
  z-index: 20;
}
.canvas-overlay .chip {
  background: color-mix(in srgb, var(--bg-2) 90%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
}
.canvas-overlay .chip.pulse .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.canvas-loading {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  pointer-events: none;
}

/* right pane: activity / agents */
.agent-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border-2);
}
.agent-row:last-child { border-bottom: none; }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--grad);
  display: grid; place-items: center;
  color: white; font-weight: 600; font-size: 11px;
  flex-shrink: 0;
}
.agent-row .who { font-weight: 500; color: var(--text); }
.agent-row .sub { color: var(--text-mute); font-size: 11px; }

/* ── issues / pulls / insights / settings ───────────────────────────── */
.tab-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px;
}
.tab-body h2 { margin: 0 0 20px; font-size: 22px; }

.issue-card, .pr-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 10px;
}
.issue-card .title, .pr-card .title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.issue-card .meta, .pr-card .meta {
  font-size: 12px;
  color: var(--text-mute);
  display: flex; gap: 12px;
}
.state-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.state-pill.open { background: rgba(63,185,80,.15); color: var(--green); }
.state-pill.closed { background: rgba(248,81,73,.15); color: var(--red); }

.form-row { margin-bottom: 12px; }
.form-row label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
input[type=text], textarea {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}
input[type=text]:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 122, 102, .12);
}
textarea { min-height: 100px; resize: vertical; }

.insights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.stat .num { font-size: 28px; font-weight: 700; color: var(--text); }
.stat .lbl { font-size: 12px; color: var(--text-mute); margin-top: 4px; }

.bar-list .bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 50px;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}
.bar-list .bar-row .label { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-list .bar-row .bar {
  height: 8px;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
}
.bar-list .bar-row .fill {
  height: 100%;
  background: var(--grad);
  border-radius: 4px;
}
.bar-list .bar-row .count { text-align: right; color: var(--text); font-family: var(--mono); }

/* ── toast ───────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 1000;
  display: none;
}
.toast.show { display: block; animation: slideup .3s ease; }
@keyframes slideup {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1100px) {
  .repo-body { grid-template-columns: 240px 1fr; }
  .pane.right { display: none; }
  .dashboard { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: repeat(2, 1fr); }
}

/* -- auth pages ----------------------------------------------------------- */
.auth-page {
  display: flex; justify-content: center; align-items: center;
  min-height: calc(100vh - 52px); padding: 40px 16px;
}
.auth-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px 32px; width: 100%;
  max-width: 400px; box-shadow: var(--shadow);
}
.auth-card h2 {
  margin: 0 0 24px; font-size: 22px; text-align: center;
}
.auth-card label {
  display: block; font-size: 13px; color: var(--text-dim);
  margin-bottom: 6px; margin-top: 14px;
}
.auth-card input[type="text"],
.auth-card input[type="email"],
.auth-card input[type="password"] {
  width: 100%; padding: 10px 12px; font-size: 14px;
  background: var(--bg-1); color: var(--text);
  border: 1px solid var(--border); border-radius: 6px;
  outline: none; transition: border-color .15s;
}
.auth-card input:focus {
  border-color: var(--accent);
}
.auth-error {
  background: rgba(248, 81, 73, 0.12); border: 1px solid var(--red);
  color: var(--red); border-radius: 6px; padding: 10px 14px;
  font-size: 13px; margin-bottom: 8px;
}
.auth-switch {
  text-align: center; margin-top: 20px; font-size: 13px;
  color: var(--text-dim);
}
.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════
   refresh 2026-05 — additive components & polish
   ═══════════════════════════════════════════════════════════════════════ */

/* refined cards */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.card:hover { border-color: var(--border-strong); }
.card h4 {
  margin: 0 0 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-mute);
  font-weight: 600;
}

/* feature banner — narrow inline call-out used on home + repo pages */
.feature-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px;
  margin: 0 0 24px;
  background:
    linear-gradient(135deg, rgba(31, 122, 102, 0.14), rgba(31, 122, 102, 0.10) 70%,
                    transparent),
    var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.feature-banner::before {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 220px;
  background: radial-gradient(ellipse at right, rgba(31, 122, 102, 0.18), transparent 70%);
  pointer-events: none;
}
.feature-banner .badge {
  flex-shrink: 0;
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 8px;
  background: var(--accent-dim);
  color: var(--accent-cy);
  border: 1px solid rgba(31, 122, 102, 0.30);
  border-radius: 4px;
}
.feature-banner .title {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-right: auto;
  position: relative;
}
.feature-banner .title span {
  display: block;
  font-size: 12px; font-weight: 400; color: var(--text-dim);
  margin-top: 2px; letter-spacing: 0.01em;
}
.feature-banner .btn { position: relative; }

/* canvas controls — replaces inline-styled projection-pills + search-form */
.canvas-bar {
  position: absolute; top: 14px;
  z-index: 11;
  display: flex; align-items: center; gap: 6px;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
}
.canvas-bar.center { left: 50%; transform: translateX(-50%); }
.canvas-bar.right  { right: 14px; padding: 5px 8px; }
.canvas-bar .bar-label {
  color: var(--text-mute); align-self: center;
  margin: 0 6px 0 4px;
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.canvas-bar .pill {
  display: inline-flex; align-items: center;
  padding: 5px 12px; border-radius: 5px;
  font-size: 12px; color: var(--text-dim);
  background: transparent;
  transition: all var(--dur-fast) var(--ease);
}
.canvas-bar .pill:hover { background: rgba(20, 30, 25, 0.05); color: var(--text); text-decoration: none; }
.canvas-bar .pill.active {
  background: var(--bg-3); color: var(--text);
  box-shadow: 0 0 0 1px var(--border-strong) inset;
}
.canvas-bar .pill.cta {
  color: var(--accent-cy);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px rgba(31, 122, 102, 0.30) inset;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.canvas-bar .pill.cta:hover {
  background: rgba(31, 122, 102, 0.26);
}
.canvas-bar .search-input {
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 12px;
  width: 200px;
  font-family: inherit;
  transition: border-color var(--dur-fast) var(--ease);
}
.canvas-bar .search-input:focus {
  outline: none; border-color: var(--accent-cy);
}
.canvas-bar .clear-btn {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 14px;
  padding: 0 6px;
  line-height: 1;
}
.canvas-bar .clear-btn:hover { color: var(--text); text-decoration: none; }

/* landing page refresh */
.tagline {
  display: inline-flex; align-items: center; gap: 8px;
}
.tagline .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.lead { letter-spacing: -0.005em; }
.hero-meta {
  display: flex; gap: 28px; justify-content: center;
  margin-top: 36px;
  font-family: var(--mono);
  font-size: 11px; color: var(--text-mute);
  flex-wrap: wrap;
}
.hero-meta b { color: var(--text); font-weight: 600; }
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--dur) var(--ease);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
}
.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.feature h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.feature .icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent-cy);
  display: grid; place-items: center;
  font-size: 16px;
  border: 1px solid rgba(31, 122, 102, 0.18);
}
.feature p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.55; }
.feature .new-pill {
  font-size: 9px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: auto;
}

/* repo cards — denser, more polished */
.repo-row {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: all var(--dur) var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.repo-row:hover {
  border-color: var(--border-strong);
  background: var(--surface-elev);
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.repo-row .title {
  font-size: 15px; font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.repo-row .title strong { color: var(--accent-2); }
.repo-row p {
  margin: 0 0 12px;
  color: var(--text-dim); font-size: 13px;
  line-height: 1.5;
}
.repo-row .meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.01em;
}
.repo-row .meta span { display: inline-flex; align-items: center; gap: 5px; }
.tag-pill {
  font-size: 9px; font-weight: 600;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-2);
}

/* refined repo-header tab strip */
.repo-tab {
  padding: 11px 14px;
  color: var(--text-dim);
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 7px;
  transition: all var(--dur-fast) var(--ease);
  border-radius: 4px 4px 0 0;
}
.repo-tab:hover {
  color: var(--text); text-decoration: none;
  background: rgba(20, 30, 25, 0.04);
}
.repo-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent-cy);
  font-weight: 600;
}

/* keyboard hint */
kbd.ms-kbd {
  display: inline-block; font-family: var(--mono);
  font-size: 10px; padding: 2px 5px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
  vertical-align: 1px;
}

/* small spinner usable anywhere */
.ms-spinner {
  display: inline-block; width: 11px; height: 11px;
  border: 1.5px solid currentColor; border-right-color: transparent;
  border-radius: 50%; vertical-align: -1px; margin-right: 6px;
  animation: ms-spin 0.7s linear infinite;
}
@keyframes ms-spin { to { transform: rotate(360deg); } }
