/* ============================================================
   ZALPHA — Operating space
   Black + sea blue. Logged-in workspace aesthetic.
   ============================================================ */

:root {
  /* Type */
  --f-display: "Cabinet Grotesk", "General Sans", ui-sans-serif, system-ui, sans-serif;
  --f-sans: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Sea blue accents */
  --blue-50: #eaf1fc;
  --blue-100: #cfdcf3;
  --blue-300: #7ea3d8;
  --blue-400: #5b8de0;
  --blue-500: #3a73c7;
  --blue-600: #2456a1;
  --blue-700: #1d3f78;
  --blue-800: #15315e;
  --blue-900: #0d1f3d;

  /* Black + neutrals */
  --ink-0: #ffffff;
  --ink-50: #f4f5f7;
  --ink-100: #d7dce4;
  --ink-200: #aab2bf;
  --ink-300: #7c8595;
  --ink-400: #5a626f;
  --ink-500: #3b4250;
  --ink-700: #1b202b;
  --ink-800: #11151d;
  --ink-900: #06080d;
  --ink-950: #03050a;

  /* Semantic (dark) */
  --bg: var(--ink-950);
  --bg-1: #07090f;
  --bg-2: #0b0f17;
  --panel: rgba(13, 17, 25, 0.72);
  --panel-solid: #0c111a;
  --line: rgba(255, 255, 255, 0.06);
  --line-2: rgba(255, 255, 255, 0.1);
  --line-3: rgba(255, 255, 255, 0.16);
  --text: #e7ebf2;
  --text-muted: #8c95a4;
  --text-faint: #5e6776;
  --accent: var(--blue-400);
  --accent-strong: var(--blue-500);
  --accent-deep: var(--blue-700);

  /* Radii / shadows */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 30px 60px -30px rgba(0, 0, 0, 0.7), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

/* Light mode (optional toggle) */
[data-theme="light"] {
  --bg: #f5f6f9;
  --bg-1: #eef0f4;
  --bg-2: #ffffff;
  --panel: rgba(255, 255, 255, 0.85);
  --panel-solid: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --line-2: rgba(15, 23, 42, 0.12);
  --line-3: rgba(15, 23, 42, 0.18);
  --text: #0b1220;
  --text-muted: #4a5365;
  --text-faint: #7a8395;
  --accent: var(--blue-600);
  --accent-strong: var(--blue-700);
  --accent-deep: var(--blue-800);
  --shadow-2: 0 30px 60px -30px rgba(15, 23, 42, 0.18), 0 6px 18px -10px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "cv11";
  min-height: 100vh;
  letter-spacing: -0.005em;
}

body.intro-active {
  overflow: hidden;
}

body.intro-active .chrome,
body.intro-active .rail,
body.intro-active .canvas {
  opacity: 0;
  transform: translateY(10px);
}

.chrome,
.rail,
.canvas {
  transition: opacity .55s ease, transform .55s ease;
}

/* Startup globe — ZALPHA branded, Comet-inspired without copying */
.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(42vw 42vw at 50% 38%, rgba(36, 86, 161, .24), transparent 62%),
    radial-gradient(70vw 44vw at 50% 110%, rgba(91, 141, 224, .10), transparent 70%),
    linear-gradient(180deg, #020409 0%, #06080d 52%, #020409 100%);
  color: #e7ebf2;
  transition: opacity .5s ease, visibility .5s ease;
}

body:not(.intro-active) .intro-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-skip {
  position: absolute;
  right: 20px;
  top: 18px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  color: rgba(231, 235, 242, .82);
  font: 600 12px/1 var(--f-sans);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.intro-skip:hover {
  background: rgba(91, 141, 224, .12);
  border-color: rgba(91, 141, 224, .38);
  color: #fff;
}

.intro-stage {
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: translateY(-2vh);
}

.intro-globe {
  position: relative;
  width: clamp(178px, 28vw, 286px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 37% 30%, rgba(159, 187, 233, .24), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(91, 141, 224, .13), rgba(3, 5, 10, .02) 58%, rgba(91, 141, 224, .08) 76%, transparent 77%);
  box-shadow:
    0 0 0 1px rgba(159, 187, 233, .16) inset,
    0 0 70px rgba(36, 86, 161, .35),
    0 30px 100px rgba(0, 0, 0, .65);
  overflow: hidden;
}

.intro-globe::before,
.intro-globe::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 999px;
  border: 1px solid rgba(159, 187, 233, .2);
}

.intro-globe::after {
  inset: 4%;
  border-color: rgba(91, 141, 224, .15);
  filter: blur(.2px);
}

.globe-orbit,
.globe-grid {
  position: absolute;
  inset: 9%;
  border-radius: 999px;
  pointer-events: none;
}

.globe-orbit {
  border: 1px solid rgba(126, 163, 216, .26);
  animation: globeSpin 2.4s linear infinite;
}

.globe-orbit--one {
  transform: rotateX(66deg) rotateZ(12deg);
}

.globe-orbit--two {
  transform: rotateY(62deg) rotateZ(-24deg);
  animation-duration: 3.1s;
  animation-direction: reverse;
}

.globe-orbit--three {
  inset: 16%;
  transform: rotateX(74deg) rotateZ(72deg);
  border-color: rgba(159, 187, 233, .18);
  animation-duration: 3.7s;
}

.globe-grid--lat {
  background:
    linear-gradient(transparent 30%, rgba(126, 163, 216, .16) 31%, transparent 32%),
    linear-gradient(transparent 50%, rgba(126, 163, 216, .22) 51%, transparent 52%),
    linear-gradient(transparent 70%, rgba(126, 163, 216, .16) 71%, transparent 72%);
  animation: globeDrift 2.9s ease-in-out infinite alternate;
}

.globe-grid--lng {
  background:
    radial-gradient(ellipse at center, transparent 53%, rgba(126, 163, 216, .18) 54%, transparent 56%),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(126, 163, 216, .10) 29px, transparent 31px);
  mask-image: radial-gradient(circle, #000 58%, transparent 70%);
  animation: globeSlide 2.7s linear infinite;
}

.intro-mark {
  position: relative;
  z-index: 3;
  filter: drop-shadow(0 10px 26px rgba(4, 8, 16, .75));
  animation: markPulse 1.85s ease-in-out infinite;
}

.intro-word {
  font: 800 clamp(28px, 4.6vw, 54px)/.9 var(--f-display);
  letter-spacing: -.045em;
  background: linear-gradient(90deg, #eaf1fc, #7ea3d8 48%, #2456a1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.intro-line {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(231, 235, 242, .56);
}

@keyframes globeSpin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

@keyframes globeDrift {
  from { transform: translateY(-5px); opacity: .58; }
  to { transform: translateY(5px); opacity: .92; }
}

@keyframes globeSlide {
  from { background-position: 0 0; }
  to { background-position: 60px 0; }
}

@keyframes markPulse {
  0%, 100% { transform: scale(.98); opacity: .92; }
  50% { transform: scale(1.035); opacity: 1; }
}

/* Backdrop layers — subtle, calm */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 35%, rgba(0,0,0,0) 70%);
}
[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(to right, rgba(11,18,32,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,18,32,0.045) 1px, transparent 1px);
}
.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60vw 40vh at 50% -10%, rgba(36, 86, 161, 0.28), transparent 70%),
    radial-gradient(40vw 30vh at 100% 110%, rgba(29, 63, 120, 0.16), transparent 70%);
}
[data-theme="light"] .bg-glow {
  background:
    radial-gradient(60vw 40vh at 50% -10%, rgba(36, 86, 161, 0.10), transparent 70%);
}

/* ============================================================
   App chrome (browser-like header)
   ============================================================ */
.chrome {
  position: sticky; top: 0; z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(8,11,17,0.92), rgba(8,11,17,0.72));
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
[data-theme="light"] .chrome {
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
}

.chrome-left { display: flex; align-items: center; gap: 12px; }
.window-dots { display: inline-flex; gap: 6px; padding: 0 2px; }
.window-dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #2a3140;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.window-dots span:nth-child(1) { background: #3b3037; }
.window-dots span:nth-child(2) { background: #3a3528; }
.window-dots span:nth-child(3) { background: #283a31; }

.chrome-nav {
  height: 28px; width: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chrome-nav:hover { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--line); }

.chrome-address {
  display: flex; align-items: center; gap: 10px;
  height: 32px;
  padding: 0 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  font-family: var(--f-mono);
  letter-spacing: 0;
}
[data-theme="light"] .chrome-address { background: rgba(15,23,42,0.04); }
.chrome-address .ico { color: var(--accent); }
.chrome-address .addr-host { color: var(--text); }
.chrome-address .addr-path { color: var(--text-faint); }

.chrome-right { display: flex; align-items: center; gap: 8px; }
.chip-action {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: 500 12.5px/1 var(--f-sans);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.chip-action:hover { background: rgba(91, 141, 224, 0.08); border-color: rgba(91, 141, 224, 0.35); }
.chip-action:active { transform: translateY(1px); }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font: 600 11.5px/1 var(--f-sans);
  letter-spacing: 0.04em;
  color: #eaf1fc;
  background: linear-gradient(140deg, var(--blue-600), var(--blue-800));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

/* ============================================================
   Rail (desktop sidebar)
   ============================================================ */
.rail {
  position: fixed; left: 0; top: 53px; bottom: 0;
  width: 56px;
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0 14px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8,11,17,0.6), rgba(8,11,17,0.2));
  z-index: 10;
}
[data-theme="light"] .rail { background: rgba(255,255,255,0.5); }

.rail-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  margin-bottom: 10px;
  transition: transform .2s ease;
}
.rail-logo:hover { transform: translateY(-1px); }
.rail-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; align-items: center; padding-top: 6px; }
.rail-foot { padding-bottom: 4px; }
.rail-item {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.rail-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.rail-item.is-active {
  color: var(--text);
  background: rgba(91,141,224,0.10);
  border-color: rgba(91,141,224,0.28);
  box-shadow: inset 0 0 0 1px rgba(91,141,224,0.06);
}

/* ============================================================
   Canvas — main content
   ============================================================ */
.canvas {
  position: relative; z-index: 1;
  margin-left: 56px;
  padding: 28px clamp(20px, 4vw, 56px) 80px;
  max-width: 1280px;
}

.workspace-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  border-radius: 999px;
  font: 500 12px/1 var(--f-mono);
  color: var(--text-muted);
  letter-spacing: 0;
}
.workspace-tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ad29a;
  box-shadow: 0 0 0 4px rgba(74,210,154,0.12);
  display: inline-block;
}
.workspace-tag .sep { color: var(--text-faint); }
.workspace-tag .muted { color: var(--text-faint); }

/* Hero */
.hero {
  padding: 12px 0 40px;
  max-width: 880px;
}
.prompt-title {
  font: 700 clamp(34px, 5.4vw, 56px) / 1.04 var(--f-display);
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 14px;
}
.prompt-title .zmark {
  background: linear-gradient(180deg, var(--blue-300), var(--blue-500));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-weight: 800;
}
.prompt-sub {
  font: 500 17px/1.5 var(--f-sans);
  color: var(--text-muted);
  margin: 0 0 28px;
  max-width: 56ch;
}

/* Command box */
.command { display: block; }
.command-box {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 14px;
  height: 58px;
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.command-box:focus-within {
  border-color: rgba(91,141,224,0.55);
  box-shadow: 0 0 0 4px rgba(58,115,199,0.15), var(--shadow-2);
}
.command-ico { color: var(--accent); flex-shrink: 0; }
.command-input {
  flex: 1;
  background: transparent;
  border: 0; outline: 0;
  color: var(--text);
  font: 500 16px/1.4 var(--f-sans);
}
.command-input::placeholder { color: var(--text-faint); }
.kbd {
  font: 500 11px/1 var(--f-mono);
  padding: 5px 7px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
}
.command-go {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
  color: #ffffff;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 16px -6px rgba(36,86,161,0.55);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.command-go:hover { filter: brightness(1.06); }
.command-go:active { transform: translateY(1px); }

.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 14px;
}
.chip {
  display: inline-flex; align-items: center;
  height: 30px; padding: 0 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  font: 500 13px/1 var(--f-sans);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.chip:hover {
  background: rgba(91,141,224,0.08);
  border-color: rgba(91,141,224,0.32);
  color: var(--text);
}
.chip:active { transform: translateY(1px); }

/* Result preview (skeleton) */
.result {
  margin-top: 20px;
  background: var(--panel-solid);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  animation: rise .35s cubic-bezier(0.22,1,0.36,1);
}
.result.hidden { display: none; }
.result-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font: 500 13px/1 var(--f-sans);
  color: var(--text-muted);
}
.result-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(91,141,224,0.18);
  animation: pulse 1.4s ease-in-out infinite;
}
.result-close {
  margin-left: auto; background: transparent; border: 0;
  color: var(--text-muted); font-size: 18px; cursor: pointer; line-height: 1;
  padding: 0 4px;
}
.result-close:hover { color: var(--text); }
.result-body { padding: 16px; display: grid; gap: 10px; }
.bone {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.bone-a { width: 86%; }
.bone-b { width: 64%; }
.bone-c { width: 48%; }

@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.85); opacity: 0.7; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   Sections
   ============================================================ */
.section { margin-top: 56px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 12px;
}
.section-head h2 {
  font: 600 22px/1.2 var(--f-display);
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--text);
}
.section-meta { font: 500 12.5px/1 var(--f-mono); color: var(--text-faint); }

/* Tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.tile {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.tile:hover {
  transform: translateY(-2px);
  border-color: rgba(91,141,224,0.32);
  background: linear-gradient(180deg, rgba(91,141,224,0.06), rgba(91,141,224,0.02));
}
[data-theme="light"] .tile { background: #ffffff; }
[data-theme="light"] .tile:hover { background: #ffffff; }

.tile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.tile-badge {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  color: var(--accent);
}
.tile-badge--recruit { color: #9fc2ff; background: rgba(58,115,199,0.10); border-color: rgba(58,115,199,0.28); }
.tile-badge--global { color: #b5d2ff; background: rgba(36,86,161,0.14); border-color: rgba(36,86,161,0.32); }
.tile-badge--govcore { color: #e0ebff; background: rgba(13,31,61,0.6); border-color: rgba(91,141,224,0.30); }

.tile-eyebrow {
  font: 500 10.5px/1 var(--f-mono);
  letter-spacing: 0.16em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.tile-title h3 { font: 700 22px/1.1 var(--f-display); margin: 4px 0 0; letter-spacing: -0.01em; }

.tile-copy { font: 400 14.5px/1.55 var(--f-sans); color: var(--text-muted); margin: 0; }
.tile-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tile-list li {
  position: relative;
  padding-left: 18px;
  font: 500 13.5px/1.45 var(--f-sans);
  color: var(--text);
}
.tile-list li::before {
  content: "";
  position: absolute; left: 2px; top: 9px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(45deg);
  opacity: 0.85;
}
.tile-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }

/* Buttons */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700));
  color: #ffffff;
  font: 600 13.5px/1 var(--f-sans);
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 18px -8px rgba(36,86,161,0.55);
  transition: transform .15s ease, filter .15s ease;
  text-decoration: none;
}
.btn-primary:hover { filter: brightness(1.07); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  background: transparent;
  color: var(--text);
  font: 500 13.5px/1 var(--f-sans);
  border: 1px solid var(--line-2);
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); border-color: var(--line-3); }
[data-theme="light"] .btn-ghost:hover { background: rgba(15,23,42,0.04); }

.btn-link {
  background: transparent;
  border: 0;
  color: var(--accent);
  font: 500 13px/1 var(--f-sans);
  cursor: pointer;
  padding: 4px 0;
}
.btn-link:hover { color: var(--blue-300); }

/* ============================================================
   Tabs (ops)
   ============================================================ */
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 10px; }
[data-theme="light"] .tabs { background: rgba(15,23,42,0.04); }
.tab {
  height: 28px; padding: 0 12px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font: 500 12.5px/1 var(--f-sans);
  border-radius: 7px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  background: rgba(91,141,224,0.14);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(91,141,224,0.30);
}

/* ============================================================
   Ops cards
   ============================================================ */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.ops-card {
  padding: 18px;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex; flex-direction: column; gap: 14px;
  min-height: 240px;
}
.ops-card--wide { grid-column: span 3; min-height: auto; }
.ops-card-head {
  display: flex; align-items: center; justify-content: space-between;
}
.ops-eyebrow {
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font: 500 11.5px/1 var(--f-sans);
}
.status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}
.status--live { background: rgba(74,210,154,0.10); color: #6fd6a9; }
.status--live::before { background: #4ad29a; box-shadow: 0 0 0 3px rgba(74,210,154,0.18); }
.status--warn { background: rgba(244,176,90,0.10); color: #f0b970; }
.status--warn::before { background: #f0b970; }
.status--info { background: rgba(91,141,224,0.10); color: var(--blue-300); }
.status--info::before { background: var(--blue-400); }
.status--muted { background: rgba(255,255,255,0.04); color: var(--text-muted); }
.status--muted::before { background: var(--text-faint); }

.ops-stat { display: flex; align-items: baseline; gap: 10px; }
.stat-num {
  font: 700 38px/1 var(--f-display);
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-label { font: 500 13px/1 var(--f-sans); color: var(--text-muted); }

.ops-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ops-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 500 13px/1.2 var(--f-sans);
}
.ops-list .ll { color: var(--text); }
.ops-list .lr { color: var(--text-muted); font-family: var(--f-mono); font-size: 12px; }
.pill {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  font: 500 11.5px/1 var(--f-sans);
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text);
}
.pill--rental { color: #b9d3ff; background: rgba(58,115,199,0.10); border-color: rgba(58,115,199,0.30); }
.pill--smallbiz { color: #f0c98a; background: rgba(244,176,90,0.08); border-color: rgba(244,176,90,0.25); }
.pill--scholar { color: #8fe2bf; background: rgba(74,210,154,0.08); border-color: rgba(74,210,154,0.25); }

.ops-foot { margin-top: auto; padding-top: 4px; }

/* Progress rows */
.prog { display: grid; gap: 8px; }
.prog-row {
  display: grid;
  grid-template-columns: 110px 1fr 42px;
  align-items: center; gap: 10px;
  font: 500 12.5px/1.2 var(--f-sans);
  color: var(--text-muted);
}
.bar {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden;
}
.fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 999px;
}
.prog-val { font-family: var(--f-mono); color: var(--text); font-size: 12px; text-align: right; }

/* Activity feed */
.activity { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.act {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: baseline; gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px dashed var(--line);
  font: 500 13.5px/1.5 var(--f-sans);
  color: var(--text);
}
.act:last-child { border-bottom: 0; }
.act-time { font-family: var(--f-mono); font-size: 12px; color: var(--text-faint); }
.act-text strong { font-weight: 600; }
.act-text em { font-style: normal; color: var(--text-muted); }
.tag {
  display: inline-block;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(91,141,224,0.10);
  color: var(--blue-300);
  border: 1px solid rgba(91,141,224,0.24);
  font: 500 11.5px/1 var(--f-sans);
  margin-left: 4px;
}

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px;
  align-items: stretch;
}
.about-copy { padding: 8px 0; }
.eyebrow { display: inline-block; font: 500 11px/1 var(--f-mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.about-copy h2 { font: 700 clamp(28px, 3.4vw, 38px)/1.1 var(--f-display); letter-spacing: -0.02em; margin: 0 0 14px; max-width: 22ch; }
.about-copy p { font: 400 15px/1.6 var(--f-sans); color: var(--text-muted); margin: 0 0 12px; max-width: 60ch; }
.about-copy p.muted { color: var(--text-faint); }
.about-actions { display: flex; gap: 8px; margin-top: 18px; }

.about-card {
  padding: 20px;
  background: linear-gradient(180deg, rgba(91,141,224,0.05), rgba(13,31,61,0.4));
  border: 1px solid rgba(91,141,224,0.18);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column; gap: 14px;
}
[data-theme="light"] .about-card { background: #fbfcfe; }
.about-card-head { display: flex; align-items: center; justify-content: space-between; }
.logo-strip {
  padding: 14px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid rgba(91,141,224,0.18);
  display: flex; align-items: center; justify-content: center;
}
.logo-strip img { max-width: 100%; height: auto; max-height: 130px; object-fit: contain; }
.about-quote { font: 500 14px/1.5 var(--f-sans); color: var(--text); margin: 0; font-style: italic; }
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin: 0;
}
.about-stats > div {
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  border-radius: 9px;
}
.about-stats dt { font: 500 10.5px/1 var(--f-mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-faint); margin-bottom: 6px; }
.about-stats dd { margin: 0; font: 600 13px/1.2 var(--f-sans); color: var(--text); }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  margin-top: 64px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.footer-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font: 500 12.5px/1 var(--f-sans);
  color: var(--text-muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; }
.footer-links { display: inline-flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color .15s ease; }
.footer-links a:hover { color: var(--text); }
.footer-meta { color: var(--text-faint); font-family: var(--f-mono); font-size: 12px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .tiles { grid-template-columns: 1fr; }
  .ops-grid { grid-template-columns: 1fr 1fr; }
  .ops-card--wide { grid-column: span 2; }
  .about-grid { grid-template-columns: 1fr; }
  .chrome-address { max-width: 100%; }
}
@media (max-width: 700px) {
  .intro-skip { right: 14px; top: 14px; }
  .intro-stage { gap: 14px; }
  .intro-globe { width: min(68vw, 230px); }
  .intro-mark { width: 74px; height: 74px; }
  .rail { display: none; }
  .canvas { margin-left: 0; padding: 22px 18px 60px; }
  .chrome { grid-template-columns: auto 1fr auto; padding: 10px 12px; }
  .window-dots { display: none; }
  .chrome-address .addr-path { display: none; }
  .chip-action span, .chip-action { font-size: 12px; }
  /* Hide labels on Invite-style chip, but keep icon-only buttons visible */
  .chip-action[data-testid="button-invite"] svg { display: inline-flex; }
  .chip-action[data-testid="button-invite"] { font-size: 0; padding: 0; width: 30px; justify-content: center; }
  .chip-action[data-testid="button-theme-toggle"] { width: 30px; padding: 0; justify-content: center; }
  .ops-grid { grid-template-columns: 1fr; }
  .ops-card--wide { grid-column: span 1; }
  .workspace-tag { font-size: 11px; padding: 5px 10px; }
  .workspace-tag .sep, .workspace-tag .muted { display: none; }
  .prompt-title { font-size: clamp(30px, 8vw, 40px); }
  .command-box { height: 54px; }
  .command-input { font-size: 15px; }
  .kbd { display: none; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .section-meta { font-size: 11.5px; }
  .tabs { overflow-x: auto; max-width: 100%; }
}
@media (max-width: 420px) {
  .footer-row { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* Focus rings (accessibility) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 8px;
}
