:root {
  color-scheme: dark;
  --bg: #090b0b;
  --panel: #141817;
  --panel-strong: #1d2421;
  --line: #31423d;
  --text: #fbf5e8;
  --muted: #aab9b0;
  --amber: #f1bd63;
  --green: #64ffb2;
  --red: #ef7470;
  --blue: #1fe8ff;
  --rose: #ff38d1;
  --violet: #8a63ff;
  --lime: #b7ff2a;
  --accent: #f1bd63;
  --ink: #080a0a;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(0deg, rgba(255,255,255,0.014) 1px, transparent 1px) 0 0 / 42px 42px,
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

.entry-hero {
  min-height: 92vh;
  padding: 26px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(183, 255, 74, 0.24), transparent 26%),
    radial-gradient(circle at 78% 18%, rgba(50, 217, 255, 0.20), transparent 28%),
    radial-gradient(circle at 86% 76%, rgba(255, 94, 188, 0.16), transparent 32%),
    linear-gradient(115deg, rgba(9, 11, 11, 0.44), rgba(9, 11, 11, 0.97) 62%),
    repeating-linear-gradient(120deg, rgba(183, 255, 74, 0.12) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(35deg, rgba(50, 217, 255, 0.10) 0 1px, transparent 1px 28px),
    #0a0d0d;
  border-bottom: 1px solid var(--line);
}

.entry-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent, rgba(9, 11, 11, 0.62)),
    linear-gradient(90deg, rgba(50, 217, 255, 0.18), transparent 35%, rgba(255, 94, 188, 0.14));
  pointer-events: none;
}

.hero-nav,
.hero-stage {
  position: relative;
  z-index: 1;
}

.hero-nav {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 1280px;
  margin: 0 auto;
}

.brand-sigil {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(183, 255, 42, 0.18), rgba(31, 232, 255, 0.08) 45%, rgba(255, 56, 209, 0.18)),
    #0b0e0e;
  border: 1px solid rgba(251, 245, 232, 0.18);
  box-shadow:
    0 0 30px rgba(183, 255, 42, 0.34),
    0 18px 52px rgba(255, 56, 209, 0.18);
}

.brand-sigil img {
  width: 42px;
  height: 42px;
  display: block;
  filter:
    drop-shadow(0 0 10px rgba(183, 255, 42, 0.38))
    drop-shadow(0 0 16px rgba(31, 232, 255, 0.18));
}

.hero-nav strong,
.hero-nav span {
  display: block;
}

.hero-nav strong {
  font-size: 19px;
  font-style: italic;
  letter-spacing: -0.01em;
}

.hero-nav span {
  color: var(--muted);
  font-size: 13px;
}

.nav-pill,
.primary-link,
.secondary-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 820;
  padding: 0 14px;
}

.nav-pill {
  margin-left: auto;
  color: var(--text);
  border: 1px solid rgba(251, 245, 232, 0.25);
  background: rgba(251, 245, 232, 0.06);
}

.hero-stage {
  max-width: 1280px;
  width: 100%;
  min-height: calc(92vh - 100px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  gap: 42px;
  align-items: center;
}

.hero-copy,
.memory-core,
.diagram-showcase,
.frisky-diagram,
.diagram-copy {
  min-width: 0;
}

.hero-copy h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(54px, 7.2vw, 104px);
  line-height: 0.9;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-lede {
  max-width: 720px;
  margin: 24px 0 0;
  color: #d7dfd9;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.35;
}

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

.primary-link {
  color: var(--ink);
  background: linear-gradient(135deg, var(--lime), var(--amber));
  box-shadow:
    0 0 24px rgba(183, 255, 74, 0.24),
    0 18px 50px rgba(241, 189, 99, 0.16);
}

.secondary-link {
  color: var(--text);
  border: 1px solid rgba(50, 217, 255, 0.34);
  background: rgba(50, 217, 255, 0.08);
}

.memory-core {
  border: 1px solid rgba(50, 217, 255, 0.28);
  border-radius: 8px;
  min-height: 560px;
  background:
    linear-gradient(135deg, rgba(50, 217, 255, 0.11), rgba(255, 94, 188, 0.07) 50%, rgba(183, 255, 74, 0.07)),
    rgba(10, 14, 13, 0.78);
  box-shadow:
    0 0 48px rgba(31, 232, 255, 0.16),
    0 0 92px rgba(255, 56, 209, 0.12),
    var(--shadow);
  padding: 22px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 20px;
  backdrop-filter: blur(14px);
}

.core-topline,
.core-metrics {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.core-topline span,
.core-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.core-topline strong {
  color: var(--lime);
  text-shadow: 0 0 18px rgba(183, 255, 74, 0.44);
}

.core-orbit {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 10px;
  min-height: 390px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 54px 54px,
    linear-gradient(0deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 54px 54px;
  border: 1px solid rgba(251, 245, 232, 0.10);
  border-radius: 8px;
  padding: 14px;
}

.core-center {
  grid-column: 3 / 5;
  grid-row: 3 / 5;
  border: 1px solid rgba(183, 255, 74, 0.72);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  background: linear-gradient(135deg, rgba(183, 255, 74, 0.18), rgba(50, 217, 255, 0.10));
  box-shadow: 0 0 28px rgba(183, 255, 74, 0.14);
}

.core-center small,
.core-center strong {
  display: block;
}

.core-center small {
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 850;
}

.core-center strong {
  color: var(--lime);
  font-size: 28px;
}

.core-node {
  border: 1px solid rgba(251, 245, 232, 0.16);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 850;
  min-width: 0;
  padding: 8px;
}

.node-command {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  background: rgba(241, 189, 99, 0.13);
}

.node-security {
  grid-column: 5 / 7;
  grid-row: 2 / 3;
  background: rgba(255, 94, 188, 0.15);
}

.node-engineering {
  grid-column: 1 / 3;
  grid-row: 5 / 6;
  background: rgba(100, 255, 178, 0.14);
}

.node-media {
  grid-column: 4 / 7;
  grid-row: 6 / 7;
  background: rgba(50, 217, 255, 0.14);
}

.node-brand {
  grid-column: 3 / 5;
  grid-row: 1 / 2;
  background: rgba(155, 124, 255, 0.14);
}

.core-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.core-metrics span {
  border: 1px solid rgba(251, 245, 232, 0.13);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
}

.core-metrics strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 4px;
}

.diagram-showcase {
  padding: 34px 26px 42px;
  display: grid;
  grid-template-columns: minmax(280px, 0.55fr) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  background:
    linear-gradient(180deg, rgba(9, 11, 11, 0.96), rgba(9, 11, 11, 0.90)),
    #090b0b;
  border-bottom: 1px solid var(--line);
}

.diagram-copy {
  display: grid;
  align-content: center;
  max-width: 520px;
}

.diagram-copy h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
  text-transform: uppercase;
}

.diagram-copy p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 17px;
}

.frisky-diagram {
  position: relative;
  border: 1px solid rgba(50, 217, 255, 0.22);
  border-radius: 8px;
  min-height: 470px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(0deg, rgba(255,255,255,0.035) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(circle at 18% 20%, rgba(183, 255, 74, 0.12), transparent 28%),
    radial-gradient(circle at 76% 70%, rgba(255, 56, 209, 0.13), transparent 32%),
    #0b0e0e;
  box-shadow:
    inset 0 0 0 1px rgba(251, 245, 232, 0.04),
    0 0 72px rgba(31, 232, 255, 0.14),
    0 0 96px rgba(255, 56, 209, 0.08),
    var(--shadow);
  overflow: hidden;
}

.frisky-diagram::before,
.frisky-diagram::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.frisky-diagram::before {
  background:
    linear-gradient(105deg, transparent 0 38%, rgba(50, 217, 255, 0.13) 47%, rgba(183, 255, 74, 0.10) 50%, transparent 62%),
    radial-gradient(circle at var(--scan-x, 18%) 40%, rgba(255, 94, 188, 0.16), transparent 22%);
  mix-blend-mode: screen;
  opacity: 0.78;
  animation: diagram-scan 8s ease-in-out infinite;
}

.frisky-diagram::after {
  background:
    radial-gradient(circle at 24% 20%, rgba(183, 255, 74, 0.08), transparent 24%),
    radial-gradient(circle at 78% 72%, rgba(50, 217, 255, 0.10), transparent 28%);
  animation: diagram-depth 12s ease-in-out infinite alternate;
}

.diagram-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 18px 18px 0;
  flex-wrap: wrap;
}

.tab-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 245, 232, 0.12);
  border-radius: 999px;
  color: #d7dfd9;
  background: rgba(251, 245, 232, 0.04);
  padding: 0 14px;
  font-weight: 820;
}

.tab-pill.active {
  color: var(--ink);
  border-color: transparent;
  background: linear-gradient(135deg, var(--lime), var(--amber));
  box-shadow: 0 0 24px rgba(183, 255, 74, 0.18);
}

.diagram-canvas {
  position: relative;
  height: 390px;
  margin: 18px;
  z-index: 1;
}

.diagram-node {
  position: absolute;
  min-width: 150px;
  min-height: 78px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: rgba(10, 14, 13, 0.82);
  color: var(--blue);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 0 24px color-mix(in srgb, currentColor 12%, transparent);
  animation: node-breathe 5.6s ease-in-out infinite;
  animation-delay: var(--node-delay, 0s);
}

.diagram-node small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  margin-top: 4px;
}

.node-user { left: 4%; top: 36px; color: #ff5b39; --node-delay: -0.4s; }
.node-codex { left: 5%; bottom: 28px; color: var(--green); --node-delay: -1.6s; }
.node-router { left: 34%; top: 150px; color: var(--blue); --node-delay: -2.4s; }
.node-specialists { right: 29%; top: 46px; color: var(--violet); --node-delay: -3.2s; }
.node-memory { right: 7%; top: 154px; color: var(--rose); --node-delay: -4s; }
.node-cloud { right: 28%; bottom: 28px; color: var(--lime); --node-delay: -4.8s; }

.route {
  position: absolute;
  border-top: 2px dashed rgba(251, 245, 232, 0.48);
  transform-origin: left center;
  filter: drop-shadow(0 0 10px rgba(50, 217, 255, 0.24));
  animation: route-flow 1.8s linear infinite;
}

.route::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(183, 255, 74, 0.9);
  animation: signal-pulse 1.8s ease-in-out infinite;
}

.route-a { left: 19%; top: 84px; width: 270px; transform: rotate(20deg); }
.route-b { left: 20%; bottom: 78px; width: 255px; transform: rotate(-20deg); }
.route-c { left: 49%; top: 188px; width: 220px; }
.route-d { right: 20%; bottom: 96px; width: 190px; transform: rotate(-28deg); }

@keyframes diagram-scan {
  0%, 100% {
    --scan-x: 12%;
    transform: translateX(-38%);
    opacity: 0.42;
  }
  48% {
    --scan-x: 74%;
    transform: translateX(24%);
    opacity: 0.88;
  }
}

@keyframes diagram-depth {
  from {
    transform: translate3d(-10px, -6px, 0) scale(1);
    opacity: 0.58;
  }
  to {
    transform: translate3d(12px, 8px, 0) scale(1.03);
    opacity: 0.86;
  }
}

@keyframes node-breathe {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 0 18px color-mix(in srgb, currentColor 10%, transparent);
  }
  50% {
    transform: translateY(-4px);
    box-shadow:
      0 0 24px color-mix(in srgb, currentColor 22%, transparent),
      inset 0 0 18px color-mix(in srgb, currentColor 8%, transparent);
  }
}

@keyframes route-flow {
  from {
    border-color: rgba(251, 245, 232, 0.22);
    border-image: repeating-linear-gradient(90deg, rgba(183, 255, 74, 0.92) 0 18px, rgba(50, 217, 255, 0.78) 18px 30px, transparent 30px 48px) 1;
  }
  to {
    border-color: rgba(251, 245, 232, 0.52);
    border-image: repeating-linear-gradient(90deg, transparent 0 18px, rgba(183, 255, 74, 0.92) 18px 36px, rgba(50, 217, 255, 0.78) 36px 48px) 1;
  }
}

@keyframes signal-pulse {
  0%, 100% {
    transform: scale(0.72);
    opacity: 0.44;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: 100vh;
  scroll-margin-top: 0;
}

.sidebar {
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 11%, transparent), transparent 36%),
    #131717;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-block h1,
.topbar h2,
.panel-head h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand-block h1 {
  font-size: 34px;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand-note {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.4;
  max-width: 260px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.search-wrap {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.search-wrap input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(7, 10, 10, 0.82);
  color: var(--text);
  border-radius: 8px;
  outline: none;
}

.search-wrap input {
  height: 42px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 170px;
  max-height: 360px;
  padding: 14px;
  line-height: 1.45;
}

.search-wrap input:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

.specialist-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.specialist-button {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  min-height: 92px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.specialist-button:hover {
  background: rgba(251, 245, 232, 0.045);
}

.specialist-button.active {
  background: var(--panel-strong);
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.specialist-mark,
.selected-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 15%, color-mix(in srgb, var(--accent) 40%, transparent), transparent 42%),
    color-mix(in srgb, var(--accent) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  color: var(--accent);
  font-weight: 900;
  isolation: isolate;
}

.specialist-mark::after,
.selected-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), transparent 36%, rgba(0, 0, 0, 0.3));
  z-index: 2;
  pointer-events: none;
}

.specialist-mark img,
.selected-mark img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.08);
}

.specialist-mark > span,
.selected-mark > span {
  position: relative;
  z-index: 3;
  display: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.specialist-mark.no-image > span,
.selected-mark.no-image > span {
  display: inline;
}

.specialist-mark {
  width: 48px;
  height: 48px;
  font-size: 12px;
}

.specialist-copy {
  min-width: 0;
}

.specialist-button strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.specialist-button span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.specialist-type {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 5px;
}

.specialist-motto {
  display: block;
  margin-top: 3px;
  color: #d7ded8;
  font-size: 12px;
  line-height: 1.3;
}

.workspace {
  min-width: 0;
  padding: 32px;
  display: grid;
  gap: 20px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(251, 245, 232, 0.035), transparent 40%),
    transparent;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.topbar h2 {
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.95;
  max-width: 980px;
  text-transform: uppercase;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.selected-mark {
  width: clamp(48px, 6vw, 68px);
  height: clamp(48px, 6vw, 68px);
  font-size: clamp(14px, 1.8vw, 20px);
  flex: 0 0 auto;
}

.status-stack {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill,
.mcp-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 0 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.status-pill.ok {
  color: var(--green);
  border-color: rgba(110, 198, 167, 0.5);
}

.status-pill.bad {
  color: var(--red);
  border-color: rgba(223, 107, 100, 0.5);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  position: relative;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 54%),
    rgba(20, 24, 23, 0.82);
  box-shadow: var(--shadow);
}

.lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
  max-width: 980px;
}

.category-line {
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 14px;
}

.motto-line {
  margin: -6px 0 16px;
  color: var(--text);
  font-size: 16px;
  font-weight: 760;
}

.starter-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.starter-chip {
  border: 1px solid var(--line);
  background: rgba(251, 245, 232, 0.055);
  color: var(--text);
  border-radius: 8px;
  min-height: 36px;
  padding: 0 13px;
  cursor: pointer;
}

.starter-chip:hover {
  border-color: var(--accent);
}

.quick-stats {
  border-left: 1px solid var(--line);
  padding-left: 22px;
  display: grid;
  align-content: center;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
  border-radius: 8px;
  padding: 18px;
}

.quick-stats span {
  font-size: 52px;
  line-height: 1;
  color: var(--accent);
  font-weight: 850;
}

.quick-stats p {
  margin: 6px 0 0;
  color: var(--muted);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.consult-panel,
.detail-panel {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 42%),
    var(--panel);
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.toggle-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.button-row {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

button {
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--ink);
  border-radius: 8px;
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 760;
}

button.secondary,
.tab {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

button:hover {
  filter: brightness(1.06);
}

.output,
.details {
  margin: 0;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent),
    #0b0e0e;
  border-radius: 8px;
  color: #e8efe9;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.output {
  min-height: 210px;
  max-height: 440px;
  padding: 14px;
}

.details {
  height: min(680px, calc(100vh - 330px));
  min-height: 430px;
  padding: 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab {
  min-height: 36px;
}

.tab.active {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 980px) {
  .hero-stage,
  .diagram-showcase,
  .app-shell,
  .tool-grid,
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .entry-hero {
    min-height: auto;
  }

  .hero-stage {
    display: block;
    min-height: auto;
    padding: 68px 0 28px;
    width: min(100%, calc(100vw - 36px));
    max-width: calc(100vw - 36px);
    overflow: hidden;
  }

  .memory-core {
    min-height: 480px;
  }

  .diagram-copy {
    max-width: 720px;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: none;
    height: auto;
    position: relative;
  }

  .specialist-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-height: 330px;
  }

  .quick-stats {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }
}

@media (max-width: 620px) {
  .entry-hero {
    padding: 18px;
  }

  .hero-nav {
    align-items: flex-start;
  }

  .nav-pill {
    display: none;
  }

  .hero-copy h1 {
    font-size: clamp(40px, 12.2vw, 46px);
    line-height: 0.94;
    max-width: 10.5ch;
    overflow-wrap: normal;
  }

  .hero-copy,
  .hero-lede {
    width: min(100%, calc(100vw - 36px));
  }

  .hero-lede {
    font-size: 18px;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .memory-core {
    margin-top: 40px;
    width: min(100%, calc(100vw - 36px));
    max-width: 100%;
    justify-self: start;
    overflow: hidden;
    min-height: 430px;
    padding: 14px;
  }

  .core-orbit {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    min-height: 300px;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .core-center,
  .node-command,
  .node-security,
  .node-engineering,
  .node-media,
  .node-brand {
    grid-column: auto;
    grid-row: auto;
  }

  .core-node {
    min-height: 62px;
    word-break: break-word;
    max-width: 100%;
    min-width: 0;
  }

  .core-center strong {
    font-size: clamp(20px, 7vw, 26px);
  }

  .core-center small,
  .core-center strong {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .core-metrics {
    grid-template-columns: 1fr;
  }

  .diagram-showcase {
    padding: 24px 18px 32px;
  }

  .diagram-copy h2 {
    font-size: 34px;
  }

  .frisky-diagram {
    min-height: 620px;
  }

  .diagram-canvas {
    height: 530px;
  }

  .diagram-node {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    margin-bottom: 10px;
    animation: none;
  }

  .route {
    display: none;
  }

  .workspace,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .panel-head,
  .button-row {
    flex-direction: column;
    align-items: stretch;
  }

  .status-stack {
    justify-content: flex-start;
  }

  .title-row {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .frisky-diagram::before,
  .frisky-diagram::after,
  .diagram-node,
  .route,
  .route::after {
    animation: none;
  }
}
