:root {
  --ink: #18202a;
  --muted: #687385;
  --line: #d9dee7;
  --panel: #ffffff;
  --page: #f4f6f9;
  --nav: #111827;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --gold: #b7791f;
  --red: #b42318;
  --blue: #2563eb;
  --green-soft: #dff4ee;
  --gold-soft: #fff3d6;
  --red-soft: #fde8e4;
  --blue-soft: #e7eefc;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Arial, Helvetica, sans-serif;
}

button,
select,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

body.nav-collapsed .app-shell {
  grid-template-columns: 84px minmax(0, 1fr);
}

.sidebar {
  background: rgba(255, 255, 255, 0.84);
  color: #1d1d1f;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #1d1d1f;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

body.nav-collapsed .brand h1,
body.nav-collapsed .brand p,
body.nav-collapsed .nav-section-toggle span,
body.nav-collapsed .nav-section-toggle strong,
body.nav-collapsed .nav-tab span:last-child,
body.nav-collapsed .sidebar-foot {
  display: none;
}

body.nav-collapsed .sidebar {
  align-items: center;
}

body.nav-collapsed .brand {
  justify-content: center;
}

body.nav-collapsed .sidebar-toggle {
  margin-left: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.panel h3 {
  margin: 0;
}

.brand h1 {
  font-size: 22px;
}

.brand p {
  margin-top: 3px;
  color: #86868b;
  font-size: 13px;
}

.nav-tabs {
  display: grid;
  gap: 14px;
}

.old-flat-nav {
  display: none;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-section-toggle {
  width: 100%;
  border: 0;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #7b7f86;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-section-items {
  display: none;
  gap: 4px;
}

.nav-group.expanded .nav-section-items {
  display: grid;
}

.nav-tab {
  width: 100%;
  border: 0;
  color: #4b5563;
  background: transparent;
  padding: 12px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

body.nav-collapsed .nav-tab {
  justify-content: center;
  padding: 10px;
}

.nav-tab span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f0f2f5;
  color: #1d1d1f;
}

.nav-tab.active,
.nav-tab:hover {
  background: #eaf3f0;
  color: var(--accent-strong);
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  background: #ffffff;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.current-project-picker {
  min-width: 260px;
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.current-project-picker span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.current-project-picker select {
  min-width: 0;
  width: 100%;
  height: 32px;
  border: 0;
  padding: 0;
  color: var(--ink);
  font-weight: 800;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar h2 {
  margin-top: 6px;
  font-size: 28px;
}

.score-strip {
  min-width: 190px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.score-strip span {
  color: var(--muted);
  font-size: 13px;
}

.score-strip strong {
  font-size: 28px;
  color: var(--accent-strong);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.control-row {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.control-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select {
  min-width: min(520px, 55vw);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

.primary-button {
  height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr) minmax(340px, 1.08fr);
  gap: 16px;
  align-items: start;
}

.workbench-input,
.question-panel,
.generated-panel {
  min-height: 620px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.mode-switch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.mode-switch-panel strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
}

.mode-switch-panel p,
.quiet-copy {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f7f9;
}

.segment-button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.segment-button.active {
  color: #ffffff;
  background: var(--accent);
}

.existing-pbi-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.existing-pbi-picker label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel h3 {
  font-size: 17px;
}

.status-pill,
.confidence {
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.high {
  color: var(--red);
  background: var(--red-soft);
}

.status-pill.medium,
.status-pill.warning {
  color: var(--gold);
  background: var(--gold-soft);
}

.status-pill.neutral {
  color: var(--blue);
  background: var(--blue-soft);
}

.confidence {
  color: var(--accent-strong);
  background: var(--green-soft);
}

.summary-block {
  display: grid;
  gap: 12px;
}

.summary-title {
  font-size: 22px;
  font-weight: 800;
}

.summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfcfe;
  font-size: 13px;
}

.stack-list {
  display: grid;
  gap: 10px;
}

.readiness-card {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fbfcfe;
}

.readiness-card strong {
  font-size: 18px;
}

.readiness-card span {
  color: var(--muted);
  font-size: 13px;
}

.question-list {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.fallback-notice {
  margin-bottom: 14px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 10px 12px;
  color: #6f470d;
  background: var(--gold-soft);
  font-size: 13px;
  line-height: 1.4;
}

.question-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.question-card.answered {
  border-color: #a7d8ca;
  background: #f4fbf8;
}

.answered-section {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
}

.answered-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.answered-list {
  display: grid;
  gap: 10px;
}

.answered-card {
  display: grid;
  gap: 7px;
  border: 1px solid #a7d8ca;
  border-radius: 8px;
  padding: 12px;
  background: #f4fbf8;
}

.answered-card p,
.answered-card blockquote {
  margin: 0;
}

.answered-card p {
  font-weight: 700;
}

.answered-card blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.question-meta strong,
.question-meta em {
  font-size: 12px;
  font-style: normal;
  text-transform: uppercase;
}

.question-meta strong {
  color: var(--accent-strong);
}

.question-meta em {
  color: var(--muted);
}

.generated-preview {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.generated-preview p,
.generated-preview li {
  color: var(--muted);
  line-height: 1.45;
}

.generated-preview ul {
  margin: 0;
  padding-left: 20px;
}

.generated-preview h4 {
  margin: 8px 0 0;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.generated-title {
  font-size: 22px;
  font-weight: 800;
}

.empty-state {
  border: 1px dashed #b8c4d5;
  border-radius: 8px;
  padding: 16px;
  color: var(--muted);
  background: #fbfcfe;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.list-item strong {
  display: block;
  margin-bottom: 5px;
}

.list-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.evidence-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfe;
}

.evidence-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.decision-box {
  display: grid;
  gap: 14px;
}

.decision-metric {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: center;
}

.meter {
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.meter > span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.graph-panel {
  min-height: 520px;
}

.graph-canvas {
  position: relative;
  min-height: 430px;
  border: 1px dashed #c7cfdb;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(24, 32, 42, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(24, 32, 42, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
}

.graph-node {
  position: absolute;
  width: 150px;
  min-height: 64px;
  border: 2px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  padding: 10px;
  box-shadow: var(--shadow);
}

.graph-node span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.graph-node strong {
  display: block;
  margin-top: 5px;
}

.graph-link {
  position: absolute;
  height: 2px;
  background: #8ea0b6;
  transform-origin: left center;
}

.setup-panel {
  max-width: 920px;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.form-grid select {
  min-width: 0;
  width: 100%;
}

.full-field {
  grid-column: 1 / -1;
}

.two-column-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.result-panel {
  margin-top: 14px;
}

.result-panel:empty {
  display: none;
}

.connector-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.connector-hero h3 {
  margin-top: 4px;
  font-size: 24px;
}

.connector-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.connector-card {
  min-height: 250px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.connector-card.active-connector {
  border-color: #a7d8ca;
  background: #fbfffd;
}

.connector-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.connector-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.connector-mark.azure {
  background: #2563eb;
}

.connector-mark.jira {
  background: #0f766e;
}

.connector-mark.git {
  background: #111827;
}

.connector-mark.docs {
  background: #7c3aed;
}

.connector-mark.teams {
  background: #4f46e5;
}

.connector-mark.cicd {
  background: #b7791f;
}

.connector-mark.tests {
  background: #0e7490;
}

.connector-mark.incidents {
  background: #b42318;
}

.connector-mark.telemetry {
  background: #475569;
}

.connector-mark.design {
  background: #be185d;
}

.connector-card h3,
.connector-card p {
  margin: 0;
}

.connector-card p {
  color: var(--muted);
  line-height: 1.48;
}

.connector-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.connector-scope span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
}

.json-output {
  margin: 0;
  margin-top: 12px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #dbeafe;
  padding: 14px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

body.landing-page {
  background: #f7f8fb;
}

.landing-page a {
  color: inherit;
  text-decoration: none;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(217, 222, 231, 0.86);
  background: rgba(247, 248, 251, 0.92);
  backdrop-filter: blur(16px);
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 170px;
}

.landing-brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--nav);
  color: #ffffff;
  font-weight: 800;
}

.landing-brand strong,
.landing-brand small {
  display: block;
}

.landing-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.landing-nav nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 30px);
  color: #465364;
  font-size: 14px;
  font-weight: 700;
}

.landing-nav nav a:hover {
  color: var(--accent-strong);
}

.nav-cta,
.hero-primary,
.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
}

.nav-cta,
.hero-primary {
  padding: 0 20px;
  color: #ffffff;
  background: var(--accent);
}

.nav-cta:hover,
.hero-primary:hover {
  background: var(--accent-strong);
}

.landing-hero {
  position: relative;
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: clamp(54px, 8vw, 92px) clamp(18px, 5vw, 72px) clamp(42px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(247, 248, 251, 0.98) 0%, rgba(247, 248, 251, 0.92) 42%, rgba(247, 248, 251, 0.58) 70%, rgba(247, 248, 251, 0.9) 100%),
    linear-gradient(135deg, #ffffff 0%, #edf4f2 44%, #eef3fb 100%);
}

.landing-hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -28%;
  width: 64%;
  height: 62%;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.14) 1px, transparent 1px),
    linear-gradient(0deg, rgba(37, 99, 235, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: rotate(-7deg);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
}

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

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  color: #111827;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 680px;
  margin: 24px 0 0;
  color: #465364;
  font-size: 20px;
  line-height: 1.55;
}

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

.hero-secondary {
  padding: 0 20px;
  border: 1px solid #c6d0dc;
  background: rgba(255, 255, 255, 0.76);
  color: #1f2937;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  gap: 12px;
  width: min(650px, 100%);
  margin-top: 34px;
}

.hero-metrics div {
  min-height: 88px;
  padding: 14px;
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
}

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

.hero-metrics strong {
  color: var(--nav);
  font-size: 30px;
}

.hero-metrics span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.hero-product {
  position: absolute;
  z-index: 1;
  right: clamp(-240px, -12vw, -90px);
  top: 50%;
  width: min(790px, 62vw);
  transform: translateY(-50%) rotate(-2deg);
}

.product-window {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.18);
}

.window-top {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.window-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.window-top span:nth-child(1) {
  background: var(--red);
}

.window-top span:nth-child(2) {
  background: var(--gold);
}

.window-top span:nth-child(3) {
  background: var(--accent);
}

.window-top strong {
  margin-left: 8px;
  color: #334155;
  font-size: 13px;
}

.brain-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 12px;
  padding: 16px;
  background: #f4f6f9;
}

.brain-card {
  min-height: 145px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.brain-main {
  grid-row: span 3;
  min-height: 490px;
}

.card-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.brain-card h2,
.brain-card h3,
.brain-card p {
  margin: 0;
}

.brain-card h2 {
  color: #111827;
  font-size: 28px;
  line-height: 1.1;
}

.brain-card h3 {
  color: #111827;
  font-size: 21px;
}

.brain-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.context-map {
  position: relative;
  height: 280px;
  margin-top: 28px;
  border: 1px dashed #c7cfdb;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(24, 32, 42, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(24, 32, 42, 0.04) 1px, transparent 1px);
  background-size: 26px 26px;
}

.node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 88px;
  min-height: 48px;
  border: 2px solid currentColor;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.node-core {
  left: calc(50% - 44px);
  top: calc(50% - 24px);
  color: var(--accent);
}

.node-blue {
  left: 28px;
  top: 34px;
  color: var(--blue);
}

.node-gold {
  right: 32px;
  top: 44px;
  color: var(--gold);
}

.node-red {
  left: 42px;
  bottom: 40px;
  color: var(--red);
}

.node-teal {
  right: 42px;
  bottom: 32px;
  color: var(--accent-strong);
}

.confidence-bar {
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.confidence-bar span {
  display: block;
  width: 74%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--blue));
}

.landing-section {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading h2,
.value-copy h2,
.trust-panel h2,
.final-cta h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading p:not(.landing-eyebrow),
.value-copy p,
.trust-panel p,
.final-cta p {
  color: #556274;
  font-size: 18px;
  line-height: 1.55;
}

.proof-grid,
.role-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.proof-card,
.role-grid article {
  min-height: 230px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.proof-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.proof-icon.teal {
  background: var(--accent);
}

.proof-icon.blue {
  background: var(--blue);
}

.proof-icon.gold {
  background: var(--gold);
}

.proof-icon.red {
  background: var(--red);
}

.proof-card h3,
.role-grid h3 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}

.proof-card p,
.role-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.value-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: start;
  background: #111827;
}

.value-copy h2,
.value-copy p {
  color: #f8fafc;
}

.value-copy p {
  color: #cbd5e1;
}

.value-list {
  display: grid;
  gap: 12px;
}

.value-list div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.value-list strong,
.value-list span {
  display: block;
}

.value-list strong {
  color: #ffffff;
  font-size: 18px;
}

.value-list span {
  margin-top: 7px;
  color: #cbd5e1;
  line-height: 1.45;
}

.workflow-section {
  background: #ffffff;
}

.workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.workflow div {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.workflow div::before {
  content: "";
  display: block;
  width: 38px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--accent);
}

.workflow strong,
.workflow span {
  display: block;
}

.workflow strong {
  color: #111827;
  font-size: 18px;
}

.workflow span {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.trust-section {
  background: #eef3fb;
}

.trust-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 28px;
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid #cdd7e6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
}

.trust-checks {
  display: grid;
  gap: 10px;
  align-content: center;
}

.trust-checks span {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  color: #334155;
  background: #fbfcfe;
  font-weight: 700;
}

.final-cta {
  padding: clamp(56px, 8vw, 92px) clamp(18px, 5vw, 72px);
  text-align: center;
  background: #f7f8fb;
}

.final-cta p {
  max-width: 720px;
  margin: 16px auto 26px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    padding: 16px;
  }

  .nav-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar-foot {
    display: none;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .control-row,
  .mode-switch-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    width: 100%;
  }

  .segment-button {
    flex: 1;
  }

  select {
    min-width: 100%;
    width: 100%;
  }

  .analysis-grid,
  .workbench-grid,
  .split-layout,
  .evidence-grid,
  .connector-grid {
    grid-template-columns: 1fr;
  }

  .connector-hero {
    flex-direction: column;
  }

  .landing-nav {
    position: static;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .landing-nav nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .landing-hero {
    min-height: auto;
    padding-top: 44px;
  }

  .hero-product {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    margin-top: 34px;
    transform: none;
  }

  .landing-hero::after {
    display: none;
  }

  .hero-metrics,
  .proof-grid,
  .role-grid,
  .value-section,
  .workflow,
  .trust-panel {
    grid-template-columns: 1fr;
  }

  .brain-grid {
    grid-template-columns: 1fr;
  }

  .brain-main {
    grid-row: auto;
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .landing-brand {
    min-width: 0;
  }

  .nav-cta {
    width: 100%;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-lede {
    font-size: 18px;
  }

  .hero-actions,
  .hero-primary,
  .hero-secondary {
    width: 100%;
  }

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

  .context-map {
    height: 250px;
  }

  .node {
    width: 76px;
    font-size: 12px;
  }
}
