:root {
  --bg: var(--odv-background, #f5f1e8);
  --panel: var(--odv-surface, #fbfaf6);
  --panel-soft: var(--odv-panel-soft, #f1ebe3);
  --text: var(--odv-text, #171717);
  --muted: var(--odv-muted, #66625b);
  --line: var(--odv-border, #d8d1c6);
  --brand: var(--odv-action, var(--odv-accent, #9e3e2d));
  --brand-dark: var(--odv-accent-dark, #7f2e22);
  --brand-soft: #f5e8e1;
  --control-primary: #9e3e2d;
  --control-primary-hover: #7f2e22;
  --control-primary-text: #ffffff;
  --control-secondary-bg: #fbfaf6;
  --control-secondary-hover: #f5e8e1;
  --control-secondary-text: #7f2e22;
  --control-border: #d8d1c6;
  --control-focus: rgba(158, 62, 45, 0.18);
  --accent: var(--odv-link, #9e3e2d);
  --danger: #b54736;
  --shadow: 0 18px 45px rgba(17, 17, 17, 0.08);
  --hero-gradient: var(--odv-hero-gradient, linear-gradient(135deg, #8300cf 0%, #b13dec 52%, #8b00d8 100%));
  font-family:
    var(--odv-font-family, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 88% 16%, rgba(158, 62, 45, 0.08), transparent 26%),
    radial-gradient(circle at 7% 68%, rgba(158, 62, 45, 0.07), transparent 28%),
    var(--bg);
  color: var(--text);
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  right: 0;
  z-index: 55;
  width: 28px;
  height: 100vh;
  border-left: 1px solid #ededf0;
  background: #ffffff;
  box-shadow: -10px 0 26px rgba(17, 17, 17, 0.06);
  pointer-events: none;
  transition:
    opacity 220ms ease,
    transform 240ms ease;
}

body.assistant-open::after {
  opacity: 0;
  transform: translateX(28px);
}

button,
input {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

button:hover,
button:focus-visible {
  border-color: #111111;
  outline: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 312px minmax(0, 1fr);
  min-height: 100vh;
  padding-right: 28px;
  transition:
    grid-template-columns 240ms ease,
    padding-right 240ms ease;
}

body.assistant-open .app-shell {
  padding-right: 0;
}

.app-shell > * {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  align-self: start;
  width: 312px;
  height: 100vh;
  border-right: 1px solid #ededf0;
  background: var(--panel);
  padding: 24px 18px;
  transition:
    width 240ms ease,
    padding 240ms ease,
    box-shadow 240ms ease;
}

.sidebar-content {
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 0;
  scrollbar-width: none;
}

.sidebar-content::-webkit-scrollbar {
  display: none;
}

.sidebar-collapse-toggle {
  position: absolute;
  top: 22px;
  right: -15px;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 40px;
  min-height: 40px;
  border: 1px solid #dfd4e8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand-dark);
  box-shadow: 0 10px 22px rgba(17, 17, 17, 0.1);
}

.sidebar-collapse-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  transition: transform 220ms ease;
}

.sidebar-collapse-toggle:hover,
.sidebar-collapse-toggle:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(157, 0, 214, 0.12);
}

.brand-block {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  flex: 0 0 auto;
  min-width: 0;
  width: 100%;
  min-height: 92px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}

.brand-block::after {
  content: attr(data-identity);
  display: none;
  place-items: center;
  width: min(100%, 258px);
  min-height: 52px;
  border: 1px solid var(--odv-border, #eadff1);
  border-radius: 8px;
  background: var(--odv-surface, #fbf6ff);
  color: var(--odv-accent, var(--brand-dark));
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
}

.brand-block:hover,
.brand-block:focus-visible {
  border-color: transparent;
  outline: 3px solid rgba(157, 0, 214, 0.16);
  outline-offset: 6px;
}

.brand-logo {
  display: block;
  width: min(100%, 258px);
  height: auto;
  object-fit: contain;
}

body[data-portal-logo="fallback"] .brand-logo {
  display: none;
}

body[data-portal-logo="fallback"] .brand-block::after {
  display: grid;
}

.eyebrow,
.hero-kicker {
  margin: 0 0 6px;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--brand-dark);
}

.hero-kicker {
  color: rgba(255, 255, 255, 0.92);
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: 1.25rem;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.15;
}

h3 {
  font-size: 1.15rem;
}

.lens-nav,
.graph-nav,
.agent-nav,
.admin-nav,
.context-nav,
.lens-menu,
.resource-menu,
.admin-menu,
.about-menu {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.graph-nav,
.agent-nav,
.admin-nav,
.context-nav {
  gap: 8px;
  padding-top: 4px;
}

.graph-nav,
.admin-nav,
.context-nav {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.section-heading h2 {
  font-size: 1.15rem;
  line-height: 1.15;
}

.lens-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #111111;
  padding: 8px 12px;
  text-align: left;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.nav-item-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(157, 0, 214, 0.08);
  color: var(--brand-dark);
}

.nav-item-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.lens-option > .nav-item-icon,
.agent-resource > .nav-item-icon,
.context-resource > .nav-item-icon {
  display: none;
}

.lens-option strong {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f1e4ff;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 800;
}

.section-toggle,
.agent-resource,
.context-resource {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #22222a;
  padding: 7px 10px;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.section-toggle {
  min-height: 44px;
  border-color: var(--control-border);
  background: var(--control-secondary-bg);
  color: var(--control-secondary-text);
  padding: 8px 10px 8px 12px;
  font-size: 0.95rem;
  font-weight: 850;
}

.lens-option,
.agent-resource,
.context-resource {
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.25;
}

.section-toggle-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--control-border);
  border-radius: 7px;
  background: #ffffff;
  color: var(--control-secondary-text);
}

.section-toggle-icon svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  stroke-width: 2.2;
  fill: none;
  transition: transform 160ms ease;
}

.section-toggle[aria-expanded="false"] .section-toggle-icon svg {
  transform: rotate(-90deg);
}

.section-toggle:hover,
.section-toggle:focus-visible {
  border-color: var(--control-primary);
  outline: 3px solid var(--control-focus);
}

.lens-option:hover,
.lens-option:focus-visible,
.agent-resource:hover,
.agent-resource:focus-visible,
.context-resource:hover,
.context-resource:focus-visible {
  border-color: transparent;
  background: rgba(157, 0, 214, 0.06);
  color: var(--brand-dark);
  outline: none;
}

.lens-option.active,
.agent-resource.active,
.context-resource.active,
.section-toggle.active {
  background: #fbf6ff;
  color: var(--brand-dark);
}

.agent-resource strong,
.context-resource strong {
  min-width: 42px;
  border-radius: 7px;
  background: #f3e7fb;
  color: var(--brand-dark);
  padding: 4px 6px;
  font-size: 0.64rem;
  font-weight: 820;
  letter-spacing: 0.02em;
  text-align: center;
}

.agent-resource {
  min-height: 40px;
  padding: 7px 9px 7px 12px;
}

.context-resource {
  min-height: 38px;
}

.main-panel {
  display: grid;
  gap: 28px;
  align-content: start;
  min-width: 0;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 28px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  width: 28px;
  padding: 18px 0;
  box-shadow: 10px 0 26px rgba(17, 17, 17, 0.06);
}

body.sidebar-collapsed .sidebar-content {
  overflow: hidden;
  padding-right: 0;
}

body.sidebar-collapsed .sidebar-collapse-toggle {
  right: -17px;
}

body.sidebar-collapsed .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed .lens-nav,
body.sidebar-collapsed .graph-nav,
body.sidebar-collapsed .agent-nav,
body.sidebar-collapsed .admin-nav,
body.sidebar-collapsed .context-nav,
body.sidebar-collapsed .lens-menu,
body.sidebar-collapsed .resource-menu,
body.sidebar-collapsed .admin-menu,
body.sidebar-collapsed .about-menu {
  display: none;
}

body.sidebar-collapsed .brand-block {
  visibility: hidden;
  min-height: 0;
  height: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.hero-band {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: var(--hero-gradient);
  padding: 76px 28px 90px;
  text-align: center;
}

.hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(8, 10, 14, 0.28) 0%, rgba(8, 10, 14, 0.16) 48%, rgba(8, 10, 14, 0.28) 100%),
    linear-gradient(180deg, rgba(8, 10, 14, 0.06) 0%, rgba(8, 10, 14, 0.38) 100%),
    var(--portal-hero-image, var(--hero-gradient));
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 34%;
  background: linear-gradient(180deg, rgba(8, 10, 14, 0) 0%, rgba(8, 10, 14, 0.28) 100%);
  pointer-events: none;
}

.hero-graph-animation {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0.36;
  pointer-events: none;
}

.hero-band > * {
  position: relative;
  z-index: 2;
}

.hero-band > .hero-graph-animation {
  position: absolute;
  z-index: 1;
}

.hero-copy {
  display: grid;
  justify-items: center;
  max-width: 960px;
}

.hero-band h2 {
  max-width: 900px;
  color: #ffffff;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: 0;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.52);
}

.hero-description {
  max-width: 760px;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.93);
  font-size: 1rem;
  line-height: 1.5;
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.42);
}

body:not([data-active-view="index"]) .hero-band {
  justify-content: flex-start;
  min-height: 116px;
  padding: 22px 0;
  text-align: left;
}

body:not([data-active-view="index"]) .hero-band::before,
body:not([data-active-view="index"]) .hero-band::after {
  opacity: 0.24;
}

body:not([data-active-view="index"]) .hero-graph-animation {
  display: none;
}

body:not([data-active-view="index"]) .hero-band h2 {
  max-width: 760px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.15;
}

body:not([data-active-view="index"]) .hero-description {
  max-width: 760px;
  font-size: 0.95rem;
}

body:not([data-active-view="index"]) .hero-copy {
  width: min(100% - 64px, 1280px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  justify-items: start;
}

body:not([data-active-view="index"]) .hero-kicker {
  margin-bottom: 4px;
  font-size: 0.66rem;
}

.assistant-notice {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: min(292px, calc(100vw - 48px));
  border: 1px solid rgba(158, 62, 45, 0.18);
  border-radius: 12px;
  background: rgba(251, 250, 246, 0.98);
  color: #171717;
  padding: 14px 12px 14px 16px;
  box-shadow:
    0 18px 38px rgba(61, 48, 34, 0.16),
    0 6px 16px rgba(158, 62, 45, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition:
    opacity 220ms ease,
    transform 240ms ease;
}

.assistant-notice::after {
  content: "";
  position: absolute;
  top: -7px;
  left: calc(50% - 6px);
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(158, 62, 45, 0.18);
  border-right: 1px solid rgba(158, 62, 45, 0.18);
  background: rgba(251, 250, 246, 0.98);
  transform: rotate(45deg);
}

.assistant-notice.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

body.assistant-open .assistant-notice {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
}

.assistant-notice strong,
.assistant-notice span {
  display: block;
}

.assistant-notice strong {
  color: #7f2e22;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
}

.assistant-notice span {
  margin-top: 5px;
  color: #66625b;
  font-size: 0.82rem;
  font-weight: 560;
  line-height: 1.42;
}

.assistant-notice-close {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-height: 28px;
  border: 1px solid rgba(158, 62, 45, 0.16);
  border-radius: 8px;
  background: rgba(245, 232, 225, 0.88);
  color: #7f2e22;
}

.assistant-notice-close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.assistant-notice-close:hover,
.assistant-notice-close:focus-visible {
  border-color: #9e3e2d;
  outline: 3px solid rgba(158, 62, 45, 0.16);
}

.index-view,
.lens-home-view,
.lens-view,
.graph-explorer-view,
.graph-view,
.agent-home-view,
.about-view,
.why-exists-view,
.admin-use-cases-view,
.admin-use-case-form-view,
.admin-objectives-view,
.admin-objective-form-view,
.created-by-view {
  display: grid;
  gap: 28px;
  width: min(100% - 48px, 1280px);
  margin: 0 auto 36px;
}

.agent-resource-view {
  display: grid;
  gap: 24px;
  width: min(100% - 64px, 1280px);
  margin: 0 auto 36px;
}

.agent-home-view {
  display: grid;
  gap: 24px;
  width: min(100% - 64px, 1280px);
  margin: 0 auto 36px;
}


.lens-home-view {
  display: grid;
  gap: 24px;
  width: min(100% - 64px, 1280px);
  margin: 0 auto 36px;
}

.index-view {
  margin-top: -56px;
}

.capability-section {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 48px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 40px;
}

.capability-section-header {
  display: grid;
  place-items: center;
  text-align: center;
}

.capability-intro {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(100%, 880px);
}

.capability-section-header h3 {
  max-width: 860px;
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
  line-height: 1.12;
}

.capability-intro > p {
  margin: 0;
  color: #3f3f46;
  font-size: 1rem;
  line-height: 1.5;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.capability-box {
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 310px;
  border: 1px solid #dedee5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.07);
  padding: 32px;
}

.capability-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.capability-icon,
.capability-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.capability-icon {
  width: 54px;
  height: 54px;
  background: #f7f0fc;
  color: var(--brand-dark);
}

.capability-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.capability-number {
  min-width: 40px;
  height: 40px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 850;
}

.capability-box strong {
  color: var(--text);
  font-size: 1.36rem;
  line-height: 1.18;
}

.capability-box p {
  margin: 0;
  color: #34343b;
  font-size: 0.98rem;
  line-height: 1.45;
}

.capability-box small {
  display: block;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 650;
  line-height: 1.45;
}

.metrics-section {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 46px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ececef;
  box-shadow: var(--shadow);
  padding: 22px;
}

.metrics-section-header {
  display: grid;
  place-items: center;
  text-align: center;
}

.metrics-intro {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(100%, 760px);
}

.metrics-section-header h3 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.15;
}

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

.metric-card,
.workbench > *,
.detail-workspace,
.graph-explorer-workspace,
.lens-panel,
.canvas-controls,
.portfolio-sections > article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-card {
  display: grid;
  grid-template-rows: auto auto minmax(3.6em, 1fr) auto;
  align-content: stretch;
  justify-items: center;
  gap: 14px;
  min-height: 190px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(157, 0, 214, 0.08), rgba(255, 255, 255, 0) 54%),
    var(--panel);
  box-shadow: none;
  padding: 26px;
  text-align: center;
}

.metric-card-actionable {
  padding-bottom: 22px;
}

.metric-value {
  color: var(--brand-dark);
  font-size: clamp(2.35rem, 4vw, 3.75rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.98;
}

.metric-label {
  color: #24242b;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 620;
  line-height: 1.46;
}

.metric-card-cta {
  align-self: end;
  min-height: 38px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--control-secondary-bg);
  color: var(--control-secondary-text);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
  padding: 0 16px;
}

.metric-card-cta:hover,
.metric-card-cta:focus-visible {
  border-color: var(--control-primary);
  background: var(--control-secondary-hover);
  transform: translateY(-1px);
}

.portfolio-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

.summary-section-header {
  display: grid;
  place-items: center;
  text-align: center;
}

.portfolio-sections > article > .summary-section-header,
.portfolio-sections > article > .panel-header {
  margin: -22px -22px 0;
  border-bottom: 1px solid rgba(226, 226, 231, 0.9);
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(180deg, rgba(251, 247, 255, 0.98), rgba(255, 255, 255, 0.96)),
    #fbf7ff;
  padding: 44px 30px 40px;
}

.portfolio-sections > article > .panel-header {
  justify-content: center;
  text-align: center;
}

.summary-intro {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(100%, 760px);
}

.summary-section-header h3 {
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1.16;
}

.summary-explainer {
  max-width: 680px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.portfolio-sections .record-list {
  margin-top: 44px;
}

#summary-product-list,
#summary-use-case-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.graph-panel,
.detail-panel,
.lens-panel,
.canvas-controls,
.portfolio-sections > article {
  min-width: 0;
  padding: 22px;
}

.agent-resource-panel {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.agent-home-panel,
.agent-home-body,
.lens-home-panel,
.lens-home-body {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.agent-home-intro,
.agent-workflow-section,
.agent-resource-map-section,
.lens-home-intro,
.lens-workflow-section,
.lens-map-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.agent-home-intro,
.lens-home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: end;
  padding: 32px;
}

.agent-home-intro h3,
.lens-home-intro h3 {
  max-width: 820px;
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.12;
}

.agent-home-intro p,
.lens-home-intro p {
  max-width: 76ch;
  margin: 14px 0 0;
  color: #25252c;
  font-size: 1rem;
  line-height: 1.58;
}

.agent-home-snapshot,
.lens-home-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.agent-home-snapshot div,
.lens-home-snapshot div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8fa;
  padding: 14px;
}

.agent-home-snapshot dt,
.lens-home-snapshot dt {
  color: var(--brand-dark);
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  font-weight: 930;
  line-height: 1;
}

.agent-home-snapshot dd,
.lens-home-snapshot dd {
  margin: 0;
  color: #46464f;
  font-size: 0.76rem;
  font-weight: 820;
  line-height: 1.25;
  text-transform: uppercase;
}

.agent-workflow-section,
.agent-resource-map-section,
.lens-workflow-section,
.lens-map-section {
  display: grid;
  gap: 22px;
  min-width: 0;
  padding: 32px;
}

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

.agent-use-card,
.lens-use-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8fa;
  padding: 18px;
}

.agent-use-card span,
.lens-use-card span {
  color: #006c72;
  font-size: 0.76rem;
  font-weight: 900;
}

.agent-use-card strong,
.lens-use-card strong {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.22;
}

.agent-use-card p,
.lens-use-card p {
  margin: 0;
  color: #34343b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.agent-resource-group-list {
  display: grid;
  gap: 16px;
}

.agent-resource-group {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.agent-resource-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.agent-resource-group-copy {
  display: grid;
  align-content: start;
  gap: 8px;
}

.agent-resource-group-copy h5 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.24;
}

.agent-resource-group-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.agent-resource-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  min-width: 0;
}

.agent-resource-card {
  display: grid;
  justify-items: start;
  grid-template-rows: auto auto minmax(4.2em, 1fr) auto;
  gap: 8px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  text-align: left;
}

.agent-resource-card span {
  border-radius: 7px;
  background: #e7f6f5;
  color: #006c72;
  padding: 4px 7px;
  font-size: 0.68rem;
  font-weight: 880;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.agent-resource-card strong {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.22;
}

.agent-resource-card small {
  color: #474750;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.42;
}

.dev-agent-panel,
.dev-agent-body {
  display: grid;
  gap: 34px;
  min-width: 0;
}

.dev-agent-hero,
.dev-agent-section,
.dev-agent-trust,
.dev-agent-start {
  min-width: 0;
}

.dev-agent-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(440px, 1.04fr);
  gap: 56px;
  align-items: center;
  border-bottom: 1px solid rgba(216, 209, 198, 0.72);
  padding: 34px 8px 58px;
}

.dev-agent-hero-copy {
  display: grid;
  gap: 20px;
  align-content: center;
}

.dev-agent-kicker {
  margin: 0;
  color: #9e3e2d;
  font-size: 0.72rem;
  font-weight: 920;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dev-agent-hero h3,
.dev-agent-section h3,
.dev-agent-trust h3,
.dev-agent-start h3 {
  margin: 0;
  color: #05060a;
  font-size: 2.35rem;
  font-weight: 940;
  letter-spacing: 0;
  line-height: 1.02;
}

.dev-agent-hero h3 {
  max-width: 660px;
  font-size: 3.8rem;
  line-height: 0.98;
  text-transform: uppercase;
}

.dev-agent-hero-copy > p:not(.dev-agent-kicker),
.dev-agent-section-header > p,
.dev-agent-trust-copy p {
  max-width: 720px;
  margin: 0;
  color: #414653;
  font-size: 1.05rem;
  line-height: 1.56;
}

.dev-agent-readonly {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 680;
}

.dev-agent-readonly .dev-agent-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  color: #c0392b;
}

.dev-agent-model-card {
  border: 1px solid rgba(216, 209, 198, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 18px 46px rgba(61, 48, 34, 0.09);
  padding: 28px;
}

.dev-agent-model-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 0.84fr) minmax(0, 1fr);
  grid-template-rows: repeat(2, minmax(150px, auto));
  gap: 24px 38px;
  align-items: center;
}

.dev-agent-model-node {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 150px;
  border: 1px solid rgba(208, 218, 230, 0.95);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.82);
  padding: 18px;
}

.dev-agent-model-node:nth-child(2) {
  grid-row: 2;
}

.dev-agent-model-node:nth-child(3) {
  grid-column: 3;
}

.dev-agent-model-node:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.dev-agent-model-center {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid rgba(20, 91, 128, 0.12);
  border-radius: 999px;
  background: #eef7fb;
  padding: 34px 22px;
  text-align: center;
}

.dev-agent-model-center strong {
  color: #05060a;
  font-size: 1.35rem;
  font-weight: 940;
  line-height: 1.05;
}

.dev-agent-model-center small {
  color: #25252c;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.dev-agent-center-mark .dev-agent-icon {
  background: #ffffff;
  color: #9e3e2d;
}

.dev-agent-model-node strong,
.dev-agent-access-card strong,
.dev-agent-evidence-item strong,
.dev-agent-step strong,
.dev-agent-trust-card strong {
  color: #0b2345;
  font-size: 1rem;
  font-weight: 910;
  line-height: 1.12;
}

.dev-agent-model-node span:not(.dev-agent-icon),
.dev-agent-access-card p,
.dev-agent-evidence-item p,
.dev-agent-step p,
.dev-agent-trust-card span {
  margin: 0;
  color: #414653;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.38;
}

.dev-agent-section {
  display: grid;
  gap: 28px;
  padding: 22px 0 8px;
}

.dev-agent-section-header {
  display: grid;
  gap: 9px;
}

.dev-agent-section-header.split {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: 32px;
  align-items: end;
}

.dev-agent-section-header.split > p {
  justify-self: end;
  max-width: 500px;
  padding-bottom: 8px;
}

.dev-agent-access-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.dev-agent-access-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  min-height: 146px;
  border: 1px solid rgba(216, 209, 198, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 18px;
}

.dev-agent-access-card button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  color: #334155;
  padding: 0;
}

.dev-agent-access-card button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.dev-agent-access-card button:hover,
.dev-agent-access-card button:focus-visible {
  background: #f5e8e1;
  color: #7f2e22;
  outline: 3px solid rgba(158, 62, 45, 0.16);
}

.dev-agent-access-card div {
  display: grid;
  gap: 9px;
}

.dev-agent-evidence-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(216, 209, 198, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.dev-agent-evidence-item {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 10px;
  min-height: 176px;
  border-right: 1px solid rgba(216, 209, 198, 0.86);
  padding: 24px 18px 20px;
  text-align: center;
}

.dev-agent-evidence-item:last-child {
  border-right: 0;
}

.dev-agent-evidence-item span:not(.dev-agent-icon) {
  margin-top: auto;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 860;
}

.dev-agent-workflow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.dev-agent-step {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 178px;
  border: 1px solid rgba(216, 209, 198, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  padding: 18px;
}

.dev-agent-step > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dev-agent-step > div > span {
  color: #667085;
  font-size: 0.8rem;
  font-weight: 920;
}

.dev-agent-step-arrow {
  color: #64748b;
  font-size: 1.4rem;
  font-weight: 500;
}

.dev-agent-trust {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  border-top: 1px solid rgba(216, 209, 198, 0.72);
  padding: 34px 0 0;
}

.dev-agent-trust-copy {
  display: grid;
  gap: 10px;
}

.dev-agent-trust-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dev-agent-trust-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 92px;
  border: 1px solid rgba(216, 209, 198, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.dev-agent-trust-card span:not(.dev-agent-icon) {
  grid-column: 2;
  color: #475569;
  font-size: 0.78rem;
  line-height: 1.26;
}

.dev-agent-trust-rules {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 54px minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  border: 1px solid rgba(50, 129, 204, 0.32);
  border-radius: 8px;
  background: rgba(239, 248, 255, 0.72);
  padding: 20px 28px;
}

.dev-agent-trust-rules strong,
.dev-agent-trust-rules span {
  display: block;
}

.dev-agent-trust-rules strong {
  color: #0b2345;
  font-size: 0.84rem;
  font-weight: 910;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dev-agent-trust-rules span {
  margin-top: 4px;
  color: #475569;
  font-size: 0.86rem;
}

.dev-agent-trust-rules ul {
  display: grid;
  gap: 4px;
  margin: 0;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.35;
}

.dev-agent-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 4px 0 0;
}

.dev-agent-start h3 {
  font-size: 1.65rem;
  line-height: 1.12;
}

.dev-agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.dev-agent-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #eaf4ff;
  color: #1368bf;
}

.dev-agent-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.dev-agent-model-node.red .dev-agent-icon,
.dev-agent-access-card.red .dev-agent-icon,
.dev-agent-evidence-item.red .dev-agent-icon,
.dev-agent-step.red .dev-agent-icon,
.dev-agent-trust-card.red .dev-agent-icon {
  background: #f9e7e2;
  color: #b33a2c;
}

.dev-agent-model-node.green .dev-agent-icon,
.dev-agent-access-card.green .dev-agent-icon,
.dev-agent-evidence-item.green .dev-agent-icon,
.dev-agent-step.green .dev-agent-icon,
.dev-agent-trust-card.green .dev-agent-icon {
  background: #dff7ee;
  color: #087f5b;
}

.dev-agent-model-node.purple .dev-agent-icon,
.dev-agent-access-card.purple .dev-agent-icon,
.dev-agent-evidence-item.purple .dev-agent-icon,
.dev-agent-step.purple .dev-agent-icon,
.dev-agent-trust-card.purple .dev-agent-icon {
  background: #eee7ff;
  color: #6d42d9;
}

.lens-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  min-width: 0;
}

.lens-home-card {
  display: grid;
  justify-items: start;
  grid-template-rows: auto auto minmax(5.6em, 1fr) auto auto;
  gap: 10px;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
  text-align: left;
}

.lens-home-card span {
  border-radius: 7px;
  background: #fff8e8;
  color: #6f4808;
  padding: 4px 7px;
  font-size: 0.68rem;
  font-weight: 880;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lens-home-card strong {
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.22;
}

.lens-home-card p {
  margin: 0;
  color: #34343b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.lens-home-card small {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  color: #474750;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.42;
}

.landing-card-cta {
  align-self: end;
  justify-self: start;
  min-height: 38px;
  border: 1px solid var(--control-primary);
  border-radius: 8px;
  background: var(--control-primary);
  color: var(--control-primary-text);
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 840;
  line-height: 1.1;
  text-align: left;
}

.landing-card-cta:hover,
.landing-card-cta:focus-visible {
  border-color: var(--control-primary-hover);
  background: var(--control-primary-hover);
  outline: 3px solid var(--control-focus);
}

.resource-intro-section,
.resource-stewardship,
.resource-capability-section,
.resource-access-section,
.resource-preview-section,
.dialog-canvas {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.chat-workspace {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.agent-resource-body {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.resource-intro-section,
.resource-access-section,
.resource-preview-section {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 32px;
}

.resource-stewardship {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  min-width: 0;
  padding: 32px;
}

.resource-stewardship > *,
.resource-capability-section > *,
.resource-access-section > *,
.resource-preview-section > * {
  min-width: 0;
}

.stewardship-logo-frame {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px solid rgba(26, 26, 31, 0.08);
  border-radius: 8px;
  background: #ffffff;
  padding: 22px;
}

.stewardship-logo-frame img {
  display: block;
  width: min(100%, 210px);
  height: auto;
}

.resource-stewardship span,
.resource-section-heading span {
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resource-stewardship h4,
.resource-section-heading h4 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
  line-height: 1.16;
}

.resource-stewardship p {
  margin: 10px 0 14px;
  color: #25252c;
  font-size: 1rem;
  line-height: 1.48;
}

.resource-stewardship a {
  color: var(--brand-dark);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.resource-capability-section {
  display: grid;
  gap: 24px;
  min-width: 0;
  padding: 32px;
}

.resource-section-heading {
  display: grid;
  gap: 8px;
}

.resource-capability-card span {
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resource-capability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.resource-capability-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f8fa;
  padding: 20px;
}

.resource-capability-card strong {
  color: var(--text);
  font-size: 1.06rem;
  line-height: 1.2;
}

.resource-capability-card p {
  margin: 0;
  color: #34343b;
  font-size: 0.9rem;
  line-height: 1.45;
}

.code-preview-shell {
  display: grid;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #2b3040;
  border-radius: 8px;
  background: #0f1320;
  box-shadow: 0 18px 40px rgba(12, 15, 25, 0.18);
}

.code-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  border-bottom: 1px solid #2b3040;
  background: #151a2a;
  padding: 10px 14px;
}

.code-preview-toolbar span,
.code-preview-toolbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 820;
}

.code-preview-toolbar span {
  color: #cbd5e1;
}

.code-preview-toolbar strong {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(157, 0, 214, 0.26);
  color: #f3d8ff;
  padding: 5px 9px;
}

.code-preview {
  max-height: 470px;
  margin: 0;
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    #0f1320;
  background-size: 44px 44px;
  color: #d7deea;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.58;
  tab-size: 2;
}

.code-preview code {
  display: block;
  min-width: max-content;
  padding: 16px 18px;
  white-space: pre;
}

.token-key {
  color: #8bd5ff;
}

.token-string {
  color: #c6f6a8;
}

.token-number {
  color: #f8c572;
}

.token-literal {
  color: #ff9bd5;
}

.token-comment {
  color: #aab4c5;
}

.token-punctuation {
  color: #7f8ba3;
}

.chat-view {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 140;
  width: min(760px, 100vw);
  min-width: 520px;
  max-width: 760px;
  height: 100vh;
  background: #f5f1e8;
  border-left: 1px solid rgba(23, 23, 23, 0.14);
  box-shadow:
    -32px 0 54px rgba(61, 48, 34, 0.2),
    -6px 0 18px rgba(61, 48, 34, 0.12);
  transform: translateX(108%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 260ms ease,
    opacity 220ms ease;
}

body.assistant-open .chat-view {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(251, 250, 246, 0.98) 0%, rgba(245, 241, 232, 0.98) 100%);
  padding: 0;
}

.chat-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
  background: rgba(251, 250, 246, 0.96);
  padding: 22px 28px 18px;
}

.chat-drawer-header h3 {
  color: #171717;
  font-size: 1.42rem;
  font-weight: 920;
  line-height: 1.2;
}

.assistant-action-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-clear-button,
.chat-close-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 8px;
  background: #fbfaf6;
  color: #171717;
}

.chat-clear-button {
  min-height: 38px;
  padding: 0 14px;
  font-weight: 850;
  font-size: 0.82rem;
}

.chat-close-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
}

.chat-close-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.chat-clear-button:hover,
.chat-clear-button:focus-visible,
.chat-close-button:hover,
.chat-close-button:focus-visible {
  border-color: #9e3e2d;
  background: #ffffff;
  outline: 3px solid rgba(158, 62, 45, 0.16);
}

.chat-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding: 18px 28px 24px;
}

.chat-message span,
.chat-composer span {
  color: #9e3e2d;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-canvas {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
}

.chat-thread {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 4px 0 0;
}

.chat-message {
  display: grid;
  gap: 7px;
  max-width: min(72ch, 92%);
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: #fbfaf6;
  padding: 14px 16px;
  box-shadow: 0 12px 28px rgba(61, 48, 34, 0.06);
}

.user-message {
  justify-self: end;
  border-color: rgba(158, 62, 45, 0.22);
  background: #f5e8e1;
}

.assistant-brief-message {
  max-width: 100%;
  border-color: rgba(23, 23, 23, 0.14);
  background:
    linear-gradient(135deg, rgba(251, 250, 246, 0.98) 0%, rgba(255, 255, 255, 0.98) 58%, rgba(245, 232, 225, 0.86) 100%);
  padding: 20px 22px;
}

.chat-message[dir="rtl"] {
  text-align: right;
}

.chat-message[dir="rtl"] ul,
.chat-message[dir="rtl"] ol {
  padding-right: 20px;
  padding-left: 0;
}

.chat-message[dir="rtl"] li > ul,
.chat-message[dir="rtl"] li > ol {
  padding-right: 18px;
  padding-left: 0;
}

.assistant-message.is-pending {
  color: var(--muted);
  background: #faf8fc;
}

.assistant-thinking {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 750;
}

.assistant-thinking span::after {
  content: ".";
  display: inline-block;
  min-width: 1.2em;
  animation: assistant-thinking-dots 1.15s steps(4, end) infinite;
}

@keyframes assistant-thinking-dots {
  0% {
    content: "";
  }

  25% {
    content: ".";
  }

  50% {
    content: "..";
  }

  75%,
  100% {
    content: "...";
  }
}

.assistant-message.is-error {
  border-color: rgba(191, 18, 60, 0.28);
  background: #fff6f8;
}

.chat-message p,
.chat-message li {
  margin: 0;
  color: #25252c;
  font-size: 0.95rem;
  line-height: 1.5;
}

.chat-message ul,
.chat-message ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.chat-message li > ul,
.chat-message li > ol {
  margin-top: 6px;
  padding-left: 18px;
}

.chat-message li strong,
.chat-message p strong {
  color: #15151b;
  font-weight: 850;
}

.chat-message a {
  color: var(--control-primary);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.chat-message a:hover,
.chat-message a:focus-visible {
  color: #6f291e;
}

.chat-message code {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  border: 1px solid #e1dde8;
  border-radius: 5px;
  background: #f8f8fb;
  padding: 0 4px;
  color: #2c2735;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.chat-message h5 {
  margin: 10px 0 2px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.25;
}

.chat-message > h5:first-of-type {
  margin-top: 0;
}

.message-prompt-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.message-prompt-starters button {
  min-height: 34px;
  border: 1px solid rgba(158, 62, 45, 0.22);
  border-radius: 999px;
  background: #fbfaf6;
  padding: 6px 12px;
  color: #7f2e22;
  font-size: 0.8rem;
  font-weight: 780;
}

.message-prompt-starters button:hover,
.message-prompt-starters button:focus-visible {
  border-color: #9e3e2d;
  outline: 3px solid rgba(158, 62, 45, 0.16);
}

.chat-composer {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(23, 23, 23, 0.14);
  border-radius: 8px;
  background: #fbfaf6;
  padding: 14px;
  box-shadow: 0 16px 34px rgba(61, 48, 34, 0.08);
}

.chat-composer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
  align-items: end;
  gap: 12px;
  min-width: 0;
}

.chat-composer-label {
  color: #171717;
  font-size: 0.95rem;
  font-weight: 850;
  line-height: 1.25;
}

.chat-composer-label span {
  color: inherit;
  font-size: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.chat-persona-control {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.chat-persona-control span {
  color: #9e3e2d;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-persona-control select {
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 0 34px 0 10px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
}

.chat-persona-control select:focus {
  border-color: #9e3e2d;
  outline: 3px solid rgba(158, 62, 45, 0.16);
}

.chat-composer-field {
  display: grid;
  grid-template-rows: minmax(92px, auto) auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(23, 23, 23, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.chat-composer textarea {
  width: 100%;
  min-height: 96px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  padding: 12px;
  resize: vertical;
  font: inherit;
}

.chat-composer textarea:focus {
  outline: none;
}

.chat-composer textarea:disabled {
  color: var(--muted);
  background: #f5f3f7;
}

.chat-composer-field:focus-within {
  border-color: #9e3e2d;
  outline: 3px solid rgba(158, 62, 45, 0.16);
}

.chat-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-top: 1px solid var(--line);
  padding: 8px 10px;
}

.chat-composer button {
  min-height: 44px;
  border-radius: 8px;
  background: #9e3e2d;
  color: #ffffff;
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 820;
}

.chat-composer .chat-voice-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  border-color: transparent;
  background: transparent;
  color: #7f2e22;
  padding: 0;
}

.chat-composer button:disabled {
  background: #e4e4e8;
  color: #62626c;
  cursor: not-allowed;
}

.chat-composer .chat-voice-button.is-listening {
  border-color: #9e3e2d;
  background: #9e3e2d;
  color: #ffffff;
}

.chat-voice-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-voice-button .voice-icon-stop {
  display: none;
  fill: currentColor;
  stroke: none;
}

.chat-voice-button.is-listening .voice-icon-mic {
  display: none;
}

.chat-voice-button.is-listening .voice-icon-stop {
  display: block;
}

.chat-voice-status {
  grid-column: 1 / -1;
  min-height: 1.1em;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.site-footer {
  width: 100%;
  margin-top: 28px;
  background: #0b0b10;
  color: #f7f4fb;
  padding: 42px 32px 26px;
}

.site-footer-inner {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(3, minmax(160px, 0.8fr));
  gap: 34px;
  width: min(100%, 1280px);
  margin: 0 auto;
}

.footer-brand,
.footer-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.footer-kicker,
.footer-column h3 {
  margin: 0;
  color: #d9a7ff;
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-brand h2 {
  max-width: 560px;
  color: #ffffff;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.14;
}

.footer-brand p:not(.footer-kicker) {
  max-width: 62ch;
  margin: 0;
  color: #c9c5d0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.footer-link {
  justify-self: start;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f4edf8;
  padding: 2px 0;
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
  outline: none;
}

.site-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 1280px);
  margin: 34px auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  color: #aaa4b2;
  font-size: 0.84rem;
  line-height: 1.4;
}

.footer-link-inline {
  color: #d9a7ff;
  font-size: 0.84rem;
}

.admin-login-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 12, 0.56);
  padding: 24px;
}

.admin-login-card {
  display: grid;
  gap: 18px;
  width: min(100%, 460px);
  border: 1px solid rgba(226, 226, 231, 0.95);
  border-radius: 14px;
  background: #ffffff;
  padding: 26px;
  box-shadow: 0 28px 80px rgba(8, 8, 12, 0.34);
}

.admin-login-card h3 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1.12;
}

.admin-login-card header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.admin-login-field {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 820;
}

.admin-login-field input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfafc;
  padding: 10px 12px;
  color: var(--text);
  font: inherit;
}

.admin-login-error {
  margin: 0;
  color: #a53122;
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.4;
}

.admin-login-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.about-view {
  gap: 22px;
}

.why-exists-view {
  gap: 22px;
}

.created-by-view {
  gap: 24px;
  width: min(100% - 64px, 1280px);
}

.about-intro,
.about-section,
.catalogue-process,
.creator-profile {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.about-intro {
  display: grid;
  gap: 12px;
  padding: 26px;
}

.about-intro h3 {
  max-width: 780px;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.15;
}

.about-intro p,
.about-copy p {
  max-width: 76ch;
  margin: 0;
  color: #25252c;
  font-size: 1rem;
  line-height: 1.58;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
}

.about-copy {
  display: grid;
  gap: 10px;
}

.about-copy h3 {
  font-size: 1.24rem;
  line-height: 1.22;
}

.catalogue-process {
  box-sizing: border-box;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
}

.catalogue-process img {
  display: block;
  width: 100%;
  height: auto;
}

.creator-profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
  padding: 0;
}

.creator-copy {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 0;
  min-width: 0;
}

.creator-profile-header {
  width: 100%;
  border-bottom: 1px solid rgba(226, 226, 231, 0.9);
  background:
    linear-gradient(180deg, rgba(251, 247, 255, 0.98), rgba(255, 255, 255, 0.96)),
    #fbf7ff;
  padding: 36px 32px 30px;
}

.creator-profile-body {
  display: grid;
  justify-items: start;
  gap: 18px;
  padding: 28px 32px 32px;
}

.creator-copy h3 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
}

.creator-copy p {
  max-width: 74ch;
  margin: 0;
  color: #25252c;
  font-size: 1rem;
  line-height: 1.58;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 820;
  text-decoration: none;
}

.profile-link:hover,
.profile-link:focus-visible {
  background: var(--brand-dark);
  outline: 3px solid rgba(157, 0, 214, 0.18);
}

.creator-photo-frame {
  align-self: stretch;
  display: grid;
  place-items: center;
  width: 100%;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(rgba(157, 0, 214, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 0, 214, 0.08) 1px, transparent 1px),
    #fbfbfc;
  background-size: 28px 28px;
  overflow: hidden;
  padding: 28px;
}

.creator-photo {
  display: block;
  width: min(100%, 164px);
  height: auto;
  aspect-ratio: 1;
  border: 8px solid #f0def7;
  border-radius: 18px;
  background: #ffffff;
  object-fit: cover;
}

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

.creator-contribution-grid article {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 24px;
}

.creator-contribution-grid h4 {
  font-size: 1.12rem;
  line-height: 1.25;
}

.creator-contribution-grid p:last-child {
  margin: 0;
  color: #3d3d45;
  font-size: 0.94rem;
  line-height: 1.52;
}

.mini-illustration,
.pipeline-strip,
.relationship-map,
.llm-boundary,
.standards-stack,
.agent-layers,
.value-flow,
.agent-first-stack {
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(rgba(0, 108, 114, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 108, 114, 0.07) 1px, transparent 1px),
    #fbfbfc;
  background-size: 28px 28px;
}

.source-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 22px;
}

.source-flow span,
.pipeline-strip span,
.relationship-map div,
.llm-boundary span,
.standards-stack span,
.agent-layers span,
.value-flow span,
.agent-first-stack span {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: #1d1d24;
  padding: 10px;
  font-size: 0.86rem;
  font-weight: 820;
  text-align: center;
  box-shadow: 0 10px 20px rgba(17, 17, 17, 0.05);
}

.source-flow i {
  position: relative;
  height: 2px;
  background: var(--brand);
}

.source-flow i::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -5px;
  width: 11px;
  height: 11px;
  border-top: 2px solid var(--brand);
  border-right: 2px solid var(--brand);
  transform: rotate(45deg);
}

.pipeline-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 18px;
}

.pipeline-strip span:nth-child(2),
.pipeline-strip span:nth-child(4),
.standards-stack span:nth-child(2),
.agent-layers span:nth-child(2) {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.relationship-map {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(52px, auto));
  gap: 12px;
  padding: 18px;
}

.relationship-map div:nth-child(1) {
  grid-column: 1 / 3;
}

.relationship-map div:nth-child(2) {
  grid-column: 3 / 5;
}

.relationship-map div:nth-child(3) {
  grid-column: 5 / 7;
}

.relationship-map div:nth-child(4) {
  grid-column: 2 / 5;
  background: #fff8e8;
  color: #6f4808;
}

.relationship-map div:nth-child(5) {
  grid-column: 5 / 7;
}

.llm-boundary,
.standards-stack,
.agent-layers,
.value-flow,
.agent-first-stack {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 18px;
}

.value-flow,
.agent-first-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.value-flow span:first-child,
.agent-first-stack span:nth-child(3) {
  grid-column: 1 / -1;
  background: #e7f6f5;
  color: #006c72;
}

.value-flow span:nth-child(3),
.agent-first-stack span:nth-child(4) {
  background: #fff8e8;
  color: #6f4808;
}

.llm-boundary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.llm-boundary span:nth-child(1) {
  background: #fff8e8;
  color: #6f4808;
}

.llm-boundary span:nth-child(2) {
  background: #f0f0f3;
}

.llm-boundary span:nth-child(3) {
  background: #e7f6f5;
  color: #006c72;
}

.standards-stack,
.agent-layers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.standards-stack span:first-child {
  grid-column: 1 / -1;
  min-height: 72px;
  background: #e7f6f5;
  color: #006c72;
  font-size: 1rem;
}

.update-section {
  align-items: start;
}

.update-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: update-step;
}

.update-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  counter-increment: update-step;
}

.update-steps li::before {
  content: counter(update-step);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 840;
}

.update-steps code {
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8f8fa;
  padding: 9px 10px;
  color: #1d1d24;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.agent-resource-body p {
  max-width: 72ch;
  margin: 0;
  color: #25252c;
  font-size: 1rem;
  line-height: 1.55;
}

.agent-resource-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.agent-resource-detail-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f8fa;
  padding: 14px;
}

.agent-resource-detail-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.agent-resource-detail-grid strong {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.resource-open-link {
  justify-self: start;
  border-radius: 999px;
  background: var(--brand);
  color: #ffffff;
  padding: 11px 16px;
  font-size: 0.88rem;
  font-weight: 820;
  text-decoration: none;
}

.resource-open-link:hover,
.resource-open-link:focus-visible {
  outline: 3px solid rgba(157, 0, 214, 0.18);
  outline-offset: 2px;
}

.search-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.search-control input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: #f7f7f8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search-control input:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(157, 0, 214, 0.14);
}

.canvas-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
}

.filter-search {
  min-width: 0;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 9px;
}

.filter-control {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 178px;
}

.filter-control > span,
.domain-menu-search span,
.filter-menu-search span,
.active-filter-row > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-menu-button,
.clear-filters-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f8;
  color: var(--text);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 780;
}

.filter-menu-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  flex: 0 0 auto;
}

.filter-menu-button[aria-expanded="true"] {
  border-color: var(--brand);
  background: #ffffff;
  color: var(--brand-dark);
  outline: 3px solid rgba(157, 0, 214, 0.1);
}

.clear-filters-button {
  justify-content: center;
  min-width: 72px;
}

.filter-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 40px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.14);
}

.domain-menu-search,
.filter-menu-search {
  display: grid;
  gap: 7px;
}

.domain-menu-search input,
.filter-menu-search input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f8;
  padding: 0 11px;
  font: inherit;
}

.domain-menu-search input:focus,
.filter-menu-search input:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(157, 0, 214, 0.12);
}

.filter-menu-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.filter-menu-actions button {
  min-height: 30px;
  border-radius: 7px;
  background: #f0f0f3;
  color: var(--brand-dark);
  padding: 0 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.domain-option-list,
.filter-option-list {
  display: grid;
  gap: 2px;
  max-height: 280px;
  overflow: auto;
  padding-right: 2px;
}

.domain-option,
.filter-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  border-radius: 7px;
  padding: 5px 7px;
  color: var(--text);
  font-size: 0.84rem;
}

.domain-option:hover,
.domain-option:focus-within,
.filter-option:hover,
.filter-option:focus-within {
  background: #f7f7f8;
}

.domain-option input,
.filter-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.domain-option span,
.filter-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-option strong,
.filter-option strong {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.active-filter-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding-top: 2px;
}

.active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  border: 1px solid #d7c6e5;
  border-radius: 7px;
  background: #fbf6ff;
  color: var(--brand-dark);
  padding: 3px 8px;
  font-size: 0.78rem;
  font-weight: 780;
}

.canvas-controls .panel-header {
  align-items: flex-start;
}

.canvas-controls .eyebrow {
  margin-bottom: 3px;
  font-size: 0.66rem;
}

.canvas-controls h3 {
  font-size: 0.98rem;
}

#clear-domain {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.lens-count {
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 820;
}

.record-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
  margin-top: 18px;
  min-width: 0;
}

.record-card {
  position: relative;
  display: grid;
  align-content: start;
  gap: 18px;
  min-height: 196px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: var(--panel);
  box-shadow: 0 10px 25px rgba(17, 17, 17, 0.06);
}

.product-candidate-card,
.use-case-card,
.objective-card,
.dataset-card {
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: stretch;
}

.selectable-card {
  cursor: pointer;
}

.record-card-header {
  display: grid;
  align-items: start;
  height: 90px;
  overflow: hidden;
  margin: -22px -22px 0;
  border-bottom: 1px solid rgba(226, 226, 231, 0.9);
  border-radius: 16px 16px 0 0;
  background: var(--panel-soft);
  padding: 20px 22px 18px;
}

.record-card-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.rank-badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.8rem;
  font-weight: 820;
}

.record-card h4 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.3;
}

.product-candidate-card h4,
.use-case-card h4,
.objective-card h4,
.dataset-card h4 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.record-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.5;
}

.product-candidate-card > p,
.use-case-card > p,
.objective-card > p,
.dataset-card > p {
  display: -webkit-box;
  min-height: 5.28rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  padding-top: 2px;
}

.product-metric-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  min-width: 0;
}

.product-metric-row {
  display: grid;
  grid-template-columns: minmax(68px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border: 1px solid #ece8f2;
  border-radius: 10px;
  background: #fbfafc;
  padding: 8px 12px;
}

.product-metric-row strong {
  color: var(--brand-dark);
  font-size: 1.32rem;
  font-weight: 930;
  letter-spacing: 0;
  line-height: 1;
}

.product-metric-row span {
  color: #3f3f48;
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.2;
}

.record-card-cta {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  align-self: end;
  min-height: 36px;
  border: 1px solid var(--control-primary);
  border-radius: 8px;
  background: var(--control-primary);
  color: var(--control-primary-text);
  padding: 0 16px;
  font-size: 0.82rem;
  font-weight: 850;
}

.record-card-cta:hover,
.record-card-cta:focus-visible {
  border-color: var(--control-primary-hover);
  background: var(--control-primary-hover);
  outline: 3px solid var(--control-focus);
}

.primary-action,
.secondary-action,
.admin-action-button {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 0 16px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
}

.primary-action {
  border: 1px solid var(--control-primary);
  background: var(--control-primary);
  color: var(--control-primary-text);
}

.secondary-action,
.admin-action-button {
  border: 1px solid var(--control-border);
  background: #ffffff;
  color: var(--control-secondary-text);
}

.admin-action-button.danger {
  color: #9f1239;
}

.primary-action:hover,
.primary-action:focus-visible,
.secondary-action:hover,
.secondary-action:focus-visible,
.admin-action-button:hover,
.admin-action-button:focus-visible {
  outline: 3px solid var(--control-focus);
}

.primary-action:hover,
.primary-action:focus-visible {
  border-color: var(--control-primary-hover);
  background: var(--control-primary-hover);
}

.secondary-action:hover,
.secondary-action:focus-visible,
.admin-action-button:hover,
.admin-action-button:focus-visible {
  border-color: var(--control-primary);
  background: var(--control-secondary-hover);
}

.admin-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(17, 17, 17, 0.08);
}

.admin-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(226, 226, 231, 0.9);
  background: #fbf7ff;
  padding: 30px 32px;
}

.admin-panel-header h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.admin-panel-header p:last-child {
  max-width: 680px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.admin-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 22px 32px 0;
}

.admin-summary-strip span {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfafc;
  padding: 14px 16px;
  color: #55545d;
  font-size: 0.78rem;
  font-weight: 820;
  text-transform: uppercase;
}

.admin-summary-strip strong {
  color: var(--brand-dark);
  font-size: 1.6rem;
  line-height: 1;
}

.admin-table-wrap {
  overflow-x: auto;
  padding: 24px 32px 32px;
}

.admin-use-case-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.admin-use-case-table th,
.admin-use-case-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.admin-use-case-table th {
  background: #f7f4fa;
  color: #3f3f48;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.admin-use-case-table tr:last-child td {
  border-bottom: 0;
}

.admin-use-case-table h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.admin-use-case-table p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.admin-source-pill {
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: #f0edf4;
  padding: 5px 8px;
  color: #414047;
  font-size: 0.76rem;
  font-weight: 820;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-form {
  display: grid;
  gap: 18px;
  padding: 30px 32px 32px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: #24242a;
  font-size: 0.82rem;
  font-weight: 850;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
  margin-top: 2px;
}

.admin-score-note {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfafc;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.admin-score-note span {
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.admin-score-note strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 850;
}

.admin-score-note small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.35;
}

.admin-domain-select {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfafc;
  padding: 16px;
}

.admin-use-case-select {
  margin-top: 18px;
}

.admin-domain-select legend {
  padding: 0 6px;
  color: #24242a;
  font-size: 0.82rem;
  font-weight: 850;
}

.admin-domain-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.admin-domain-toolbar input {
  min-height: 46px;
}

.admin-domain-toolbar .secondary-action {
  min-height: 46px;
  padding-inline: 14px;
}

.admin-domain-summary {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 820;
}

.admin-domain-option-list {
  max-height: 214px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 6px;
}

.form-error {
  margin: 0;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: #fff1f2;
  color: #9f1239;
  padding: 12px 14px;
  font-size: 0.88rem;
  font-weight: 760;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 2px;
}

.portfolio-rebuild-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 12, 0.56);
  padding: 24px;
}

.portfolio-rebuild-card {
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgba(226, 226, 231, 0.95);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(8, 8, 12, 0.34);
}

.portfolio-rebuild-header {
  border-bottom: 1px solid var(--line);
  background: #fbf7ff;
  padding: 24px 26px 22px;
}

.portfolio-rebuild-header h3 {
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.12;
}

.portfolio-rebuild-header p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.portfolio-rebuild-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 22px 26px;
  list-style: none;
}

.portfolio-rebuild-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfafc;
  padding: 8px 12px;
}

.portfolio-rebuild-steps span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f0edf4;
  color: var(--brand-dark);
  font-size: 0.76rem;
  font-weight: 860;
}

.portfolio-rebuild-steps strong {
  color: var(--text);
  font-size: 0.92rem;
}

.portfolio-rebuild-steps em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 820;
  text-transform: uppercase;
}

.portfolio-rebuild-steps li.is-active {
  border-color: rgba(157, 0, 214, 0.35);
  box-shadow: 0 0 0 3px rgba(157, 0, 214, 0.09);
}

.portfolio-rebuild-steps li.is-active span {
  background: var(--brand);
  color: #ffffff;
}

.portfolio-rebuild-steps li.is-done span {
  background: #eaf8ee;
  color: #166534;
}

.portfolio-rebuild-steps li.is-failed {
  border-color: rgba(190, 18, 60, 0.32);
  background: #fff5f7;
}

.portfolio-rebuild-steps li.is-failed span {
  background: #be123c;
  color: #ffffff;
}

.portfolio-rebuild-steps li.is-failed em {
  color: #be123c;
}

.portfolio-rebuild-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 16px 26px 22px;
}

.portfolio-rebuild-actions span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.product-files-modal {
  position: fixed;
  inset: 0;
  z-index: 84;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 12, 0.5);
  padding: 24px;
}

.product-files-card {
  width: min(100%, 620px);
  max-height: min(86vh, 780px);
  overflow: hidden;
  border: 1px solid rgba(226, 226, 231, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(8, 8, 12, 0.3);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.product-files-header {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #fbf7ff;
  padding: 24px 26px;
}

.product-files-header h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.12;
}

.product-files-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.product-files-status {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  overflow: auto;
  padding: 22px 26px;
}

.product-files-status strong {
  color: var(--text);
  font-size: 1rem;
}

.product-files-status span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.product-files-details {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.product-files-details section {
  display: grid;
  gap: 8px;
}

.product-files-details h4 {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-files-details ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-files-details li {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(226, 226, 231, 0.9);
  border-radius: 8px;
  background: #fbfbfd;
  padding: 10px 12px;
}

.product-files-details li strong {
  font-size: 0.88rem;
}

.product-files-details li span,
.product-files-details li em,
.product-files-truncated {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  line-height: 1.35;
}

.product-files-details .has-warnings li {
  border-color: rgba(190, 18, 60, 0.28);
  background: #fff5f7;
  color: #8f1234;
}

.product-files-details .has-no-warnings li {
  border-color: rgba(22, 163, 74, 0.24);
  background: #f3fbf6;
  color: #166534;
}

.product-files-truncated {
  margin: 0;
}

.product-files-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #e8e0ef;
  border-top-color: var(--brand);
  border-radius: 999px;
  animation: product-files-spin 0.9s linear infinite;
}

.product-files-modal.is-complete .product-files-spinner,
.product-files-modal.is-failed .product-files-spinner {
  animation: none;
  border-color: transparent;
  background: var(--brand);
}

.product-files-modal.is-failed .product-files-spinner {
  background: #be123c;
}

.product-files-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 16px 26px 22px;
}

.product-files-button {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  min-height: 38px;
  border: 1px solid var(--control-primary);
  border-radius: 8px;
  background: var(--control-primary);
  color: var(--control-primary-text);
  padding: 0 14px;
  font-size: 0.82rem;
  font-weight: 850;
}

.product-files-button:hover,
.product-files-button:focus-visible {
  border-color: var(--control-primary-hover);
  background: var(--control-primary-hover);
  outline: 3px solid var(--control-focus);
}

@keyframes product-files-spin {
  to {
    transform: rotate(360deg);
  }
}

.selection-limit-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 12, 0.46);
  padding: 24px;
}

.selection-limit-card {
  width: min(100%, 440px);
  overflow: hidden;
  border: 1px solid rgba(226, 226, 231, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(8, 8, 12, 0.3);
}

.selection-limit-card header {
  display: grid;
  gap: 8px;
  background: #fbf7ff;
  padding: 24px 26px;
}

.selection-limit-card h3 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.12;
}

.selection-limit-card p:last-child {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
}

.selection-limit-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding: 16px 26px 20px;
}

.tag {
  border-radius: 8px;
  background: #f0f0f3;
  color: #42424a;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 720;
}

.tag.warn {
  background: #fff3dd;
  color: #7d510d;
}

.tag.danger {
  background: #ffe7e0;
  color: var(--danger);
}

.gap-card p {
  margin: 0;
}

.gap-action {
  color: var(--brand-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.gap-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.gap-examples button,
.inline-action {
  min-height: 30px;
  border-radius: 999px;
  background: #f3f3f5;
  color: var(--brand-dark);
  padding: 5px 10px;
  font-size: 0.76rem;
  font-weight: 750;
  text-align: left;
}

.inline-action {
  justify-self: start;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 22px;
}

.detail-workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 22px;
}

.graph-explorer-view {
  width: min(100% - 48px, 1480px);
}

.graph-explorer-workspace {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 22px;
}

.graph-explorer-workspace:fullscreen {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border-radius: 0;
  background: #f4f3f6;
  padding: 18px;
}

.graph-tab-layout:fullscreen,
.graph-tab-layout:-moz-full-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  gap: 18px;
  align-items: stretch;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #f4f3f6;
  padding: 18px;
}

.graph-tab-layout:fullscreen .graph-panel,
.graph-tab-layout:-moz-full-screen .graph-panel,
.graph-tab-layout:fullscreen .graph-node-rail,
.graph-tab-layout:-moz-full-screen .graph-node-rail {
  height: calc(100vh - 36px);
  min-height: 0;
}

.graph-tab-layout:fullscreen .graph-container,
.graph-tab-layout:-moz-full-screen .graph-container {
  height: calc(100vh - 70px);
  min-height: 0;
}

.graph-explorer-workspace:fullscreen .graph-explorer-layout {
  min-height: 0;
  height: calc(100vh - 178px);
}

.graph-explorer-workspace:fullscreen .graph-explorer-container,
.graph-explorer-workspace:fullscreen .graph-explorer-rail {
  height: 100%;
  min-height: 0;
}

.graph-explorer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.graph-explorer-domain {
  display: grid;
  gap: 7px;
  min-width: 210px;
  flex: 0 0 240px;
}

.graph-explorer-domain span {
  color: var(--brand-dark);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-explorer-domain select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 0 12px;
  font: inherit;
  font-size: 0.86rem;
}

.graph-explorer-domain select {
  color: var(--ink);
  font-weight: 760;
}

.graph-explorer-domain select:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(157, 0, 214, 0.12);
}

.graph-explorer-toolbar .graph-type-filters {
  flex: 0 1 auto;
  width: auto;
}

.graph-explorer-layout {
  grid-template-columns: minmax(0, 1fr);
}

.graph-tab-layout.graph-explorer-layout {
  grid-template-columns: minmax(0, 1fr);
}

.graph-explorer-container {
  width: 100%;
  min-height: 690px;
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.graph-explorer-layout .graph-panel {
  padding-right: 0;
  padding-left: 0;
}

.graph-mode-heading {
  max-width: 860px;
  margin-bottom: 22px;
}

.graph-mode-heading h4,
.graph-mode-empty h4 {
  margin-top: 4px;
  font-size: 1.35rem;
}

.graph-mode-heading p:not(.eyebrow),
.graph-mode-empty p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

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

.graph-domain-overview {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: none;
}

.graph-overview-heading {
  width: 100%;
  max-width: none;
}

.graph-overview-heading p:not(.eyebrow) {
  width: 100%;
  max-width: none;
  white-space: nowrap;
}

.graph-overview-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.graph-overview-kpi {
  display: grid;
  gap: 5px;
  min-height: 86px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 14px;
}

.graph-overview-kpi strong {
  color: var(--brand-dark);
  font-size: 1.8rem;
  line-height: 1;
}

.graph-overview-kpi span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.graph-overview-domains {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.graph-overview-domains .graph-mode-heading,
.graph-overview-domains .graph-domain-empty {
  grid-column: 1 / -1;
}

.graph-overview-domains .graph-mode-heading {
  margin-bottom: 2px;
}

.graph-overview-domain-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 12px;
  min-height: 190px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  padding: 16px;
  text-align: left;
  box-shadow: 0 14px 28px rgba(31, 22, 45, 0.05);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.graph-overview-domain-card:hover,
.graph-overview-domain-card:focus-visible {
  border-color: rgba(157, 0, 214, 0.38);
  box-shadow: 0 18px 34px rgba(83, 22, 112, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.graph-overview-domain-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.graph-overview-domain-rank {
  display: inline-grid;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: #f1dcff;
  color: var(--brand-dark);
  font-size: 0.82rem;
  font-weight: 950;
}

.graph-overview-domain-title strong {
  color: var(--brand-dark);
  font-size: 0.88rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.graph-overview-domain-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.graph-overview-domain-total b {
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.graph-overview-domain-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-content: start;
}

.graph-overview-domain-metrics span {
  border: 1px solid rgba(31, 22, 45, 0.08);
  border-radius: 7px;
  background: #f7f7f8;
  color: var(--muted);
  padding: 5px 7px;
  font-size: 0.7rem;
  font-weight: 880;
}

.graph-overview-domain-action {
  align-self: end;
  color: var(--control-secondary-text);
  font-size: 0.76rem;
  font-weight: 950;
}

.graph-explorer-node-panel,
.graph-domain-card {
  display: grid;
  gap: 7px;
  width: 100%;
  min-height: 118px;
  border: 1px solid var(--node-border, var(--line));
  border-radius: 10px;
  background: var(--node-bg, #ffffff);
  box-shadow: 0 12px 24px var(--node-shadow, rgba(31, 22, 45, 0.06));
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.graph-explorer-node-panel.focus {
  min-height: 150px;
}

.graph-explorer-node-panel.active {
  border-width: 2px;
}

.graph-explorer-node-panel span,
.graph-domain-card span {
  color: var(--node-accent, var(--brand-dark));
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-explorer-node-panel strong,
.graph-domain-card strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.graph-explorer-node-panel small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.3;
}

.graph-domain-card {
  min-height: 166px;
}

.graph-domain-detail {
  display: grid;
  gap: 22px;
  width: 100%;
}

.graph-domain-information {
  max-width: 860px;
  border: 1px solid rgba(157, 0, 214, 0.18);
  border-radius: 14px;
  background: #ffffff;
  padding: 22px;
}

.graph-domain-information h4 {
  margin-top: 4px;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.graph-domain-information p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.graph-domain-selection {
  max-width: 620px;
}

.graph-domain-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.graph-domain-tabs button {
  min-height: 38px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--control-secondary-bg);
  color: var(--control-secondary-text);
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 840;
}

.graph-domain-tabs button.active {
  border-color: var(--control-primary);
  background: var(--control-primary);
  color: var(--control-primary-text);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.graph-domain-tabs button:hover,
.graph-domain-tabs button:focus-visible {
  border-color: var(--control-primary);
  outline: 3px solid var(--control-focus);
}

.graph-domain-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.graph-domain-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.graph-domain-column h5 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-domain-column h5 span {
  display: inline-grid;
  min-width: 28px;
  place-items: center;
  border-radius: 999px;
  background: #f1dcff;
  color: var(--brand-dark);
  padding: 3px 8px;
}

.graph-domain-column > div {
  display: grid;
  gap: 8px;
}

.graph-domain-record {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 94px;
  border: 1px solid var(--node-border, var(--line));
  border-radius: 9px;
  background: var(--node-bg, #ffffff);
  color: var(--ink);
  padding: 12px;
  text-align: left;
}

.graph-domain-record.active {
  border-width: 2px;
  box-shadow: 0 0 0 3px var(--node-focus, rgba(157, 0, 214, 0.12));
}

.graph-domain-record span {
  color: var(--node-accent, var(--brand-dark));
  font-size: 0.64rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-domain-record strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.graph-domain-record small,
.graph-domain-empty {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.graph-domain-relationships {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.graph-domain-golden {
  display: grid;
  gap: 18px;
  width: 100%;
}

.graph-domain-golden-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.graph-domain-golden-card {
  display: grid;
  grid-template-rows: auto minmax(4.8em, 1fr) auto auto;
  gap: 16px;
  min-height: 310px;
  border: 1px solid rgba(182, 129, 36, 0.28);
  border-radius: 10px;
  background: #fffaf1;
  padding: 18px;
  box-shadow: 0 14px 28px rgba(88, 62, 15, 0.06);
}

.graph-domain-golden-card header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}

.graph-domain-golden-card header > span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #f7e4bc;
  color: #8a5a0b;
  font-size: 0.88rem;
  font-weight: 950;
}

.graph-domain-golden-card h5 {
  margin-top: 4px;
  color: var(--ink);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  line-height: 1.18;
}

.graph-domain-golden-card > p {
  color: var(--ink);
  line-height: 1.45;
}

.graph-domain-golden-metrics {
  display: grid;
  gap: 8px;
}

.graph-domain-golden-metrics div {
  display: grid;
  grid-template-columns: minmax(76px, auto) 1fr;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  border: 1px solid rgba(182, 129, 36, 0.2);
  border-radius: 8px;
  background: #ffffff;
  padding: 8px 10px;
}

.graph-domain-golden-metrics strong {
  color: var(--brand-dark);
  font-size: 1.25rem;
  line-height: 1;
}

.graph-domain-golden-metrics span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.graph-domain-graph-panel {
  display: grid;
  gap: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  overflow: hidden;
}

.graph-domain-graph {
  width: 100%;
  min-width: 100%;
  min-height: 620px;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.graph-mode-heading.compact {
  margin: 0;
  padding: 18px 18px 0;
}

.graph-domain-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0 0;
}

.graph-domain-card dl div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f8;
  padding: 8px;
}

.graph-domain-card dt {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.graph-domain-card dd {
  margin: 2px 0 0;
  color: var(--brand-dark);
  font-size: 1.2rem;
  font-weight: 950;
}

.graph-relationship-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.graph-relationship-table th,
.graph-relationship-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.graph-relationship-table thead th {
  background: #f4f1f7;
  color: #3f414a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.graph-relationship-table tbody th {
  width: 28%;
}

.graph-relationship-table tbody th button,
.graph-relationship-products button {
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--control-secondary-bg);
  color: var(--control-secondary-text);
  padding: 8px 10px;
  font-weight: 860;
  text-align: left;
}

.graph-relationship-table tbody th span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.graph-relationship-products {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.graph-mode-empty {
  border: 1px dashed rgba(126, 103, 153, 0.28);
  border-radius: 12px;
  background: #ffffff;
  padding: 22px;
}

.graph-mode-empty.compact {
  padding: 16px;
}

.detail-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.detail-workspace-header h3 {
  max-width: 780px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1.14;
}

.detail-tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.detail-tab {
  min-height: 38px;
  border: 1px solid var(--control-border);
  border-radius: 8px;
  background: var(--control-secondary-bg);
  color: var(--control-secondary-text);
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 840;
}

.detail-tab.active {
  border-color: var(--control-primary);
  background: var(--control-primary);
  color: var(--control-primary-text);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.detail-tab:hover,
.detail-tab:focus-visible {
  border-color: var(--control-primary);
  outline: 3px solid var(--control-focus);
}

.detail-tab-panel {
  min-width: 0;
}

.detail-tab-panel.active {
  display: block;
}

.view-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.view-actions button,
#clear-domain {
  border: 1px solid var(--control-border);
  background: var(--control-secondary-bg);
  color: var(--control-secondary-text);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.graph-container {
  position: relative;
  height: min(74vh, 820px);
  min-height: 640px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(rgba(157, 0, 214, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(157, 0, 214, 0.07) 1px, transparent 1px),
    #fbfbfc;
  background-size: 32px 32px;
  overflow: hidden;
}

.graph-container canvas {
  cursor: grab;
}

.graph-container.dragging-node canvas {
  cursor: grabbing;
}

.graph-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  display: inline-flex;
  gap: 6px;
  border: 1px solid rgba(157, 0, 214, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(31, 22, 45, 0.12);
  padding: 6px;
}

.graph-controls button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--control-secondary-bg);
  color: var(--control-secondary-text);
  padding: 0;
}

.graph-controls button:hover,
.graph-controls button:focus-visible {
  border-color: var(--control-primary);
  background: var(--control-secondary-hover);
  outline: 3px solid var(--control-focus);
}

.graph-controls svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.graph-filter-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.graph-type-filters {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
  margin: 0;
  border: 0;
  padding: 0;
}

.graph-type-filters legend {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 34px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-type-filters label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbfc;
  color: #3f414a;
  padding: 0 10px;
  font-size: 0.74rem;
  font-weight: 850;
}

.graph-type-filters input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.graph-type-filters label:hover,
.graph-type-filters label:focus-within {
  border-color: var(--brand);
  background: #fbf2ff;
}

.graph-tab-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: stretch;
}

.graph-node-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.graph-edge-overlay-svg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.graph-cluster-label {
  position: absolute;
  display: inline-grid;
  gap: 2px;
  min-width: 168px;
  max-width: 320px;
  transform: translate(-50%, calc(-100% - 14px));
  z-index: 1;
  border: 1px solid rgba(157, 0, 214, 0.34);
  border-radius: 8px;
  background: rgba(251, 242, 255, 0.96);
  box-shadow: 0 8px 18px rgba(31, 22, 45, 0.08);
  padding: 7px 10px;
  text-align: center;
  pointer-events: none;
}

.graph-cluster-label strong {
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.graph-cluster-label span {
  color: #636670;
  font-size: 0.64rem;
  font-weight: 800;
}

.graph-node-box {
  position: absolute;
  display: grid;
  gap: 2px;
  z-index: 2;
  width: 152px;
  min-height: 48px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--node-border, rgba(126, 103, 153, 0.22));
  border-radius: 8px;
  background: var(--node-bg, rgba(255, 255, 255, 0.96));
  box-shadow: 0 10px 24px var(--node-shadow, rgba(31, 22, 45, 0.1));
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.graph-node-box strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-node-box span {
  color: var(--node-accent, var(--brand-dark));
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-node-box.active {
  border-color: var(--node-active, var(--brand));
  background: var(--node-active-bg, #fbf2ff);
  box-shadow: 0 0 0 3px var(--node-focus, rgba(157, 0, 214, 0.14)), 0 14px 30px var(--node-shadow, rgba(91, 0, 129, 0.18));
}

.graph-container.dragging-node .graph-node-box {
  cursor: grabbing;
}

.graph-node-rail {
  height: min(74vh, 820px);
  min-height: 640px;
  max-height: none;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.graph-node-rail::-webkit-scrollbar {
  display: none;
}

.graph-node-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.graph-node-group {
  display: grid;
  gap: 8px;
}

.graph-node-card-wrap {
  display: grid;
  gap: 6px;
}

.graph-node-group h5 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: #5d6069;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-node-group h5 span {
  border-radius: 999px;
  background: #f0e1fb;
  color: var(--brand-dark);
  padding: 3px 8px;
  font-size: 0.68rem;
  letter-spacing: 0;
}

.graph-node-card {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--node-border, var(--line));
  border-radius: 8px;
  background: var(--node-bg, #fbfbfc);
  padding: 11px 12px;
  color: var(--ink);
  text-align: left;
}

.graph-node-card span {
  color: var(--node-accent, var(--brand-dark));
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-node-card strong {
  font-size: 0.92rem;
  line-height: 1.25;
}

.graph-node-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
}

.graph-node-card:hover,
.graph-node-card:focus-visible {
  border-color: var(--node-active, var(--brand));
  outline: 3px solid var(--node-focus, rgba(157, 0, 214, 0.12));
}

.graph-node-card.active {
  border-color: var(--node-active, var(--brand));
  background: var(--node-active-bg, #fbf2ff);
  box-shadow: 0 0 0 3px var(--node-focus, rgba(157, 0, 214, 0.12));
}

.type-objective {
  --node-accent: #5b21b6;
  --node-active: #6d28d9;
  --node-bg: #f4efff;
  --node-active-bg: #ece2ff;
  --node-border: rgba(91, 33, 182, 0.34);
  --node-focus: rgba(91, 33, 182, 0.18);
  --node-shadow: rgba(91, 33, 182, 0.16);
}

.type-use-case {
  --node-accent: #0077b6;
  --node-active: #006ba4;
  --node-bg: #eaf7ff;
  --node-active-bg: #d7efff;
  --node-border: rgba(0, 119, 182, 0.36);
  --node-focus: rgba(0, 119, 182, 0.18);
  --node-shadow: rgba(0, 119, 182, 0.16);
}

.type-data-product {
  --node-accent: #b68124;
  --node-active: #c48719;
  --node-bg: #fff6e7;
  --node-active-bg: #ffefd3;
  --node-border: rgba(182, 129, 36, 0.36);
  --node-focus: rgba(182, 129, 36, 0.18);
  --node-shadow: rgba(182, 129, 36, 0.16);
}

.type-dataset {
  --node-accent: #60727d;
  --node-active: #566a77;
  --node-bg: #f0f4f6;
  --node-active-bg: #e7eef2;
  --node-border: rgba(96, 114, 125, 0.3);
  --node-focus: rgba(96, 114, 125, 0.16);
  --node-shadow: rgba(96, 114, 125, 0.14);
}

.type-need {
  --node-accent: #6b7f2a;
  --node-active: #728725;
  --node-bg: #f4f8e8;
  --node-active-bg: #ecf4d4;
  --node-border: rgba(107, 127, 42, 0.32);
  --node-focus: rgba(107, 127, 42, 0.16);
  --node-shadow: rgba(107, 127, 42, 0.14);
}

.type-capability {
  --node-accent: #7e6799;
  --node-active: #8060a2;
  --node-bg: #f5f0fa;
  --node-active-bg: #eee4f8;
  --node-border: rgba(126, 103, 153, 0.32);
  --node-focus: rgba(126, 103, 153, 0.16);
  --node-shadow: rgba(126, 103, 153, 0.14);
}

.graph-node-action-menu {
  display: flex;
  justify-content: flex-end;
  border: 1px solid rgba(157, 0, 214, 0.14);
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
}

.graph-node-action-menu button {
  min-height: 32px;
  border: 1px solid var(--control-primary);
  border-radius: 7px;
  background: var(--control-primary);
  color: var(--control-primary-text);
  padding: 0 12px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
}

.graph-node-action-menu button:hover,
.graph-node-action-menu button:focus-visible {
  background: var(--control-primary-hover);
  outline: 3px solid var(--control-focus);
}

.fallback-graph {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.fallback-node {
  background: var(--panel);
  padding: 8px 10px;
}

.detail-body {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.summary-brief {
  display: grid;
  gap: 18px;
}

.summary-brief-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(157, 0, 214, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(157, 0, 214, 0.08), rgba(0, 108, 114, 0.05)),
    #ffffff;
  padding: 22px;
}

.summary-node-type {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.summary-brief-hero h4 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2.15rem);
  line-height: 1.08;
}

.summary-brief-hero p:last-child {
  max-width: 860px;
  margin: 12px 0 0;
  color: #30323a;
  font-size: 1rem;
  line-height: 1.55;
}

.summary-status-card {
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  padding: 18px;
}

.summary-status-card span,
.summary-detail-card > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-status-card strong {
  color: var(--brand-dark);
  font-size: 1.1rem;
  line-height: 1.15;
}

.summary-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-metric-card {
  display: grid;
  gap: 4px;
  min-height: 92px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfc;
  padding: 16px;
}

.summary-metric-card strong {
  color: var(--brand-dark);
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  line-height: 1;
}

.summary-metric-card span {
  color: #555761;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-detail-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
}

.summary-detail-card-wide {
  grid-column: 1 / -1;
}

.summary-detail-card p,
.summary-detail-card strong {
  margin: 0;
  line-height: 1.45;
}

.detail-row {
  display: grid;
  gap: 4px;
}

.detail-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-row strong,
.detail-row p {
  margin: 0;
}

.score-grid,
.relationship-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.score-cell,
.relationship-row {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f8fa;
  padding: 10px;
}

.score-cell strong,
.relationship-row strong {
  color: var(--brand-dark);
}

.compact-list {
  display: grid;
  gap: 8px;
}

.compact-list p,
.linked-list button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f8fa;
  padding: 10px;
}

.compact-list p span,
.linked-list button span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: none;
}

.linked-list button {
  display: grid;
  width: 100%;
  min-height: 0;
  text-align: left;
}

.linked-list button:hover,
.linked-list button:focus-visible,
.selectable-card:hover,
.selectable-card:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(157, 0, 214, 0.12);
}

.evidence-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.evidence-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(20, 20, 24, 0.05);
}

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

.evidence-card-header span {
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evidence-card-header button {
  min-height: 32px;
  border: 1px solid rgba(157, 0, 214, 0.22);
  border-radius: 8px;
  background: #fbf7ff;
  color: var(--brand-dark);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
}

.evidence-card-header button:hover,
.evidence-card-header button:focus-visible {
  border-color: var(--brand);
  outline: 3px solid rgba(157, 0, 214, 0.14);
}

.evidence-card h5 {
  margin: 0;
  color: #17171d;
  font-size: 1rem;
  line-height: 1.28;
}

.evidence-card p {
  margin: 0;
  color: #3f414a;
  font-size: 0.92rem;
  line-height: 1.48;
}

.evidence-card-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.evidence-card-metrics div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(226, 226, 231, 0.9);
  border-radius: 8px;
  background: #f8f8fa;
  padding: 9px;
}

.evidence-card-metrics span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.evidence-card-metrics strong {
  color: var(--brand-dark);
  font-size: 0.92rem;
}

.empty-text {
  color: var(--muted);
  font-size: 0.88rem;
}

.gap-review-empty,
.gap-review-summary {
  display: grid;
  gap: 18px;
}

.gap-review-empty {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  align-items: stretch;
  border: 1px solid rgba(0, 108, 114, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(0, 108, 114, 0.07), rgba(157, 0, 214, 0.04)),
    #ffffff;
  padding: 22px;
}

.gap-review-empty span,
.gap-review-header span,
.gap-detail-card-header span {
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gap-review-empty h4,
.gap-review-header h4,
.gap-detail-card h4 {
  margin: 0;
}

.gap-review-empty p,
.gap-detail-card p {
  margin: 0;
  color: #30323a;
  line-height: 1.5;
}

.gap-review-empty > div:first-child {
  display: grid;
  align-content: center;
  gap: 10px;
}

.gap-check-list {
  display: grid;
  gap: 10px;
}

.gap-check-list p {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.gap-check-list span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.gap-review-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(157, 0, 214, 0.14);
  border-radius: 16px;
  background: #fbf7ff;
  padding: 18px;
}

.gap-review-header strong {
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand-dark);
  padding: 10px 12px;
  font-size: 1.25rem;
}

.gap-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gap-detail-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 16px;
}

.gap-detail-card.high {
  border-color: rgba(190, 18, 60, 0.28);
  background: #fff7f8;
}

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

.gap-detail-card-header strong {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.gap-detail-card .gap-action {
  border-top: 1px solid var(--line);
  color: #3f414a;
  padding-top: 12px;
  font-weight: 850;
}

/* Public generated portfolio shell */
.app-shell {
  display: block;
  min-height: 100vh;
  padding-right: 0;
  background: transparent;
}

body::after,
.sidebar {
  display: none;
}

body.assistant-open::after {
  display: block;
  inset: 0;
  z-index: 120;
  width: auto;
  height: auto;
  border-left: 0;
  background: rgba(23, 23, 23, 0.34);
  box-shadow: none;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.portfolio-public-header {
  position: fixed;
  top: 12px;
  right: 0;
  left: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  width: min(100% - 104px, 1460px);
  margin: 0 auto;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 18px;
  background: rgba(251, 250, 246, 0.86);
  padding: 0 26px;
  box-shadow: 0 14px 42px rgba(61, 48, 34, 0.08);
  backdrop-filter: blur(16px);
}

.public-brand,
.public-nav-link,
.overview-stat-card,
.quick-access-item {
  appearance: none;
}

.public-brand {
  display: inline-grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 62px;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: left;
}

.public-brand:hover,
.public-brand:focus-visible,
.public-nav-link:hover,
.public-nav-link:focus-visible {
  border-color: transparent;
  outline: none;
}

.public-brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.public-brand-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

body[data-portal-logo="fallback"] .public-brand-logo {
  display: block;
}

.public-brand strong,
.public-brand small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-brand strong {
  color: #171717;
  font-size: 1.18rem;
  font-weight: 920;
  line-height: 1.05;
  text-transform: uppercase;
}

.public-brand small {
  margin-top: 4px;
  color: #66625b;
  font-size: 0.84rem;
  font-weight: 620;
  line-height: 1.1;
}

.public-primary-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.public-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.public-assistant-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.public-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 82px;
  border: 0;
  border-radius: 0;
  color: #171717;
  padding: 0 15px;
  font-size: 0.95rem;
  font-weight: 760;
}

.public-nav-link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 4px;
  border-radius: 999px 999px 0 0;
  background: transparent;
}

.public-nav-link.active {
  color: #7f2e22;
}

.public-nav-link.active::after {
  background: #9e3e2d;
}

.public-nav-link .nav-item-icon {
  width: 21px;
  height: 21px;
  color: currentColor;
}

.public-assistant-button {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-height: 48px;
  border: 1px solid rgba(158, 62, 45, 0.2);
  border-radius: 14px;
  background: rgba(245, 232, 225, 0.95);
  color: #7f2e22;
  box-shadow: 0 10px 24px rgba(61, 48, 34, 0.08);
}

.public-assistant-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.public-assistant-button:hover,
.public-assistant-button:focus-visible,
.public-assistant-button.active {
  border-color: #9e3e2d;
  background: #ffffff;
  outline: 3px solid rgba(158, 62, 45, 0.16);
}

.main-panel {
  display: block;
}

.topbar {
  display: block;
}

.hero-band {
  min-height: 560px;
  padding: 162px 64px 78px;
  text-align: center;
}

.hero-band::before {
  background:
    linear-gradient(90deg, rgba(5, 24, 45, 0.68) 0%, rgba(5, 24, 45, 0.38) 42%, rgba(5, 24, 45, 0.04) 82%),
    linear-gradient(180deg, rgba(5, 24, 45, 0.1) 0%, rgba(5, 24, 45, 0.18) 100%),
    var(--portal-hero-image, var(--hero-gradient));
  background-position: center;
  background-size: cover;
}

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

.hero-copy {
  justify-items: center;
  width: min(100%, 940px);
  max-width: 940px;
  margin: 0 auto;
}

.hero-kicker {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.94rem;
  letter-spacing: 0.26em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.36);
}

.hero-band h2 {
  max-width: 1120px;
  font-size: clamp(3.2rem, 5.4vw, 5.05rem);
  line-height: 0.96;
  font-weight: 940;
  hyphens: none;
  overflow-wrap: normal;
  text-wrap: balance;
  word-break: normal;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.38);
}

.hero-description {
  max-width: 840px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(1.15rem, 1.65vw, 1.55rem);
  line-height: 1.3;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.36);
}

.hero-graph-animation {
  opacity: 0.16;
}

body:not([data-active-view="index"]) .hero-band {
  min-height: 320px;
  padding: 132px 64px 52px;
  text-align: center;
}

body:not([data-active-view="index"]) .hero-band::before {
  opacity: 1;
}

body:not([data-active-view="index"]) .hero-copy {
  width: min(100%, 1100px);
  margin: 0 auto;
  padding: 0;
  justify-items: center;
}

body:not([data-active-view="index"]) .hero-band h2 {
  max-width: 920px;
  font-size: clamp(2.2rem, 4vw, 4rem);
  line-height: 1;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

body:not([data-active-view="index"]) .hero-description {
  max-width: 760px;
}


.index-view,
.lens-home-view,
.lens-view,
.graph-explorer-view,
.graph-view,
.agent-home-view,
.agent-resource-view,
.about-view,
.why-exists-view,
.admin-use-cases-view,
.admin-use-case-form-view,
.admin-objectives-view,
.admin-objective-form-view,
.created-by-view {
  width: min(100% - 96px, 1520px);
  margin: 0 auto 56px;
}

.index-view {
  margin-top: 0;
  gap: 48px;
}

.lens-home-view,
.lens-view,
.graph-explorer-view,
.graph-view,
.agent-home-view,
.agent-resource-view,
.about-view,
.why-exists-view,
.admin-use-cases-view,
.admin-use-case-form-view,
.admin-objectives-view,
.admin-objective-form-view,
.created-by-view {
  margin-top: 34px;
}

.lens-view {
  gap: 44px;
}

.portfolio-overview-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 56px;
  border-bottom: 1px solid rgba(23, 23, 23, 0.14);
  padding: 52px 0 48px;
}

.overview-main-copy {
  display: grid;
  align-content: start;
  gap: 14px;
}

.overview-main-copy h3 {
  max-width: 850px;
  color: #171717;
  font-size: clamp(2.1rem, 3.5vw, 3.35rem);
  line-height: 1.03;
  font-weight: 940;
}

.overview-main-copy p:not(.eyebrow) {
  max-width: 910px;
  margin: 0;
  color: #66625b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.55vw, 1.28rem);
  line-height: 1.38;
}

.overview-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.overview-stat-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 15px;
  min-height: 92px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  border-radius: 8px;
  background: rgba(251, 250, 246, 0.92);
  padding: 18px 22px;
  text-align: left;
}

button.overview-stat-card:hover,
button.overview-stat-card:focus-visible {
  border-color: rgba(158, 62, 45, 0.38);
  outline: 3px solid rgba(158, 62, 45, 0.14);
}

.overview-stat-icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: #f5e8e1;
}

.overview-stat-icon svg,
.quick-access-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.overview-stat-icon.blue,
.quick-access-icon.blue {
  color: #9e3e2d;
  background: #f5e8e1;
}

.overview-stat-icon.green {
  color: #2f7a54;
  background: #e7efe6;
}

.overview-stat-icon.teal,
.quick-access-icon.teal {
  color: #66744f;
  background: #ecefe2;
}

.overview-stat-icon.gold,
.quick-access-icon.gold {
  color: #9e3e2d;
  background: #f8eee4;
}

.overview-stat-card strong {
  color: #171717;
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  font-weight: 940;
  line-height: 1;
}

.overview-stat-card > span:last-child {
  color: #66625b;
  font-size: 0.92rem;
  font-weight: 680;
}

.quick-access-panel {
  display: grid;
  align-content: start;
  gap: 0;
  border-left: 1px solid rgba(23, 23, 23, 0.16);
  padding-left: 46px;
}

.quick-access-panel > .eyebrow {
  margin: 0 0 12px;
  color: #9e3e2d;
}

.quick-access-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  border: 0;
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 0;
  color: #171717;
  padding: 10px 0;
  text-align: left;
}

.quick-access-item:hover,
.quick-access-item:focus-visible {
  border-color: rgba(158, 62, 45, 0.34);
  outline: none;
}

.quick-access-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 12px;
}

.quick-access-item strong,
.quick-access-item small {
  display: block;
}

.quick-access-item strong {
  font-size: 1rem;
  font-weight: 860;
  line-height: 1.12;
}

.quick-access-item small {
  margin-top: 3px;
  color: #647083;
  font-size: 0.88rem;
  font-weight: 620;
  line-height: 1.2;
}

.quick-access-arrow {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #12233d;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.capability-section {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 28px 0 0;
}

.metrics-section {
  border-radius: 8px;
}

@media (max-width: 1100px) {
  .graph-overview-heading p:not(.eyebrow) {
    white-space: normal;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-content {
    height: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  body.sidebar-collapsed .sidebar {
    width: 28px;
    height: 100vh;
    padding: 18px 0;
    min-height: 0;
  }

  body.sidebar-collapsed .sidebar-content {
    overflow: hidden;
  }

  .sidebar-collapse-toggle {
    right: 18px;
  }

  body.sidebar-collapsed .sidebar-collapse-toggle {
    right: 18px;
  }

  .hero-band {
    min-height: 440px;
    padding: 142px 24px 82px;
  }

  body:not([data-active-view="index"]) .hero-band {
    min-height: 330px;
    padding: 142px 24px 52px;
  }

  body:not([data-active-view="index"]) .hero-copy {
    padding: 0 24px;
  }

  .metrics-grid,
  .workbench,
  .graph-tab-layout,
  .detail-workspace-header,
  .canvas-controls,
  .dev-agent-hero,
  .dev-agent-section-header.split,
  .dev-agent-trust,
  .dev-agent-trust-rules,
  .dev-agent-start,
  .site-footer-inner,
  .about-section,
  .creator-profile,
  .creator-contribution-grid,
  .lens-home-intro,
  .agent-home-intro,
  .agent-resource-group,
  .resource-stewardship,
  .resource-capability-grid,
  .agent-resource-detail-grid,
  .chat-layout,
  .chat-composer,
  .summary-brief-hero,
  .summary-section-grid,
  .gap-review-empty,
  .gap-review-grid,
  .admin-summary-strip,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .summary-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-composer-header {
    grid-template-columns: 1fr;
  }

  .chat-persona-control {
    grid-template-columns: 1fr;
  }

  .site-footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .chat-composer button:not(.chat-voice-button) {
    width: 100%;
  }

  .graph-node-rail {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .graph-filter-row {
    justify-content: flex-start;
  }

  .graph-type-filters {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .graph-explorer-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .graph-explorer-domain {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
  }

  .graph-explorer-toolbar .graph-type-filters {
    width: 100%;
  }

  .agent-use-grid,
  .lens-use-grid,
  .dev-agent-access-grid,
  .dev-agent-trust-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dev-agent-model-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .dev-agent-model-node,
  .dev-agent-model-node:nth-child(2),
  .dev-agent-model-node:nth-child(3),
  .dev-agent-model-node:nth-child(4),
  .dev-agent-model-center {
    grid-column: auto;
    grid-row: auto;
  }

  .dev-agent-model-center {
    border-radius: 8px;
    padding: 24px;
  }

  .dev-agent-section-header.split > p {
    justify-self: start;
  }

  .dev-agent-evidence-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dev-agent-evidence-item {
    border-right: 1px solid rgba(216, 209, 198, 0.86);
    border-bottom: 1px solid rgba(216, 209, 198, 0.86);
  }

  .dev-agent-workflow {
    grid-template-columns: 1fr;
  }

  .dev-agent-step-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .filter-bar {
    align-items: end;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter-control {
    min-width: min(240px, 82vw);
  }

  .capability-section-header,
  .capability-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-strip,
  .llm-boundary,
  .standards-stack,
  .agent-layers,
  .value-flow,
  .agent-first-stack {
    grid-template-columns: 1fr;
  }

  .standards-stack span:first-child,
  .value-flow span:first-child,
  .agent-first-stack span:nth-child(3) {
    grid-column: auto;
  }

  .resource-intro-section,
  .resource-stewardship,
  .resource-capability-section,
  .resource-access-section,
  .resource-preview-section {
    padding: 24px;
  }

  .dialog-canvas {
    min-height: 0;
  }

  #summary-product-list,
  #summary-use-case-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graph-domain-golden-grid {
    grid-template-columns: 1fr;
  }

  .graph-overview-domains {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .portfolio-public-header {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    width: min(100% - 20px, 420px);
    min-height: 112px;
    padding: 8px 10px 0;
    overflow: hidden;
  }

  .public-brand {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
    min-height: 48px;
  }

  .public-brand-mark {
    width: 42px;
    height: 42px;
  }

  .public-brand strong {
    font-size: 0.92rem;
    line-height: 1;
  }

  .public-brand small {
    font-size: 0.72rem;
    line-height: 1.15;
  }

  .public-primary-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .public-primary-nav::-webkit-scrollbar {
    display: none;
  }

  .public-nav-link {
    flex: 0 0 auto;
    min-height: 44px;
    gap: 6px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .public-nav-link::after {
    right: 8px;
    left: 8px;
  }

  .public-header-actions {
    justify-content: end;
  }

  .public-assistant-button {
    width: 44px;
    height: 44px;
  }

  .assistant-notice {
    display: none;
  }

  .sidebar {
    padding: 16px 14px;
  }

  .brand-logo {
    width: 190px;
  }

  .brand-block {
    min-height: 72px;
  }

  .hero-band {
    min-height: 430px;
    padding: 150px 18px 76px;
  }

  body:not([data-active-view="index"]) .hero-band {
    min-height: 360px;
    padding: 150px 18px 48px;
  }

  body:not([data-active-view="index"]) .hero-copy {
    width: min(100% - 24px, 1280px);
    padding: 0 18px;
  }

  .hero-band h2 {
    font-size: 2rem;
  }

  .index-view,
  .lens-home-view,
  .lens-view,
  .graph-explorer-view,
  .graph-view,
  .agent-home-view,
  .agent-resource-view,
  .about-view,
  .why-exists-view,
  .admin-use-cases-view,
  .admin-use-case-form-view,
  .admin-objectives-view,
  .admin-objective-form-view,
  .created-by-view {
    width: min(100% - 24px, 1280px);
    margin-bottom: 24px;
  }

  .dev-agent-view {
    padding-top: 140px;
  }

  .resource-intro-section,
  .dev-agent-model-card,
  .dev-agent-section,
  .dev-agent-trust-rules,
  .lens-home-intro,
  .lens-workflow-section,
  .lens-map-section,
  .agent-home-intro,
  .agent-workflow-section,
  .agent-resource-map-section,
  .resource-stewardship,
  .resource-capability-section,
  .resource-access-section,
  .resource-preview-section,
  .dialog-canvas,
  .admin-panel-header,
  .admin-form {
    padding: 18px;
  }

  .dev-agent-hero {
    gap: 28px;
    padding: 22px 0 34px;
  }

  .dev-agent-hero h3,
  .dev-agent-section h3,
  .dev-agent-trust h3 {
    max-width: 100%;
    font-size: 1.86rem;
    line-height: 1.04;
    overflow-wrap: break-word;
    text-wrap: auto;
  }

  .dev-agent-access-grid,
  .dev-agent-evidence-strip,
  .dev-agent-trust-cards {
    grid-template-columns: 1fr;
  }

  .dev-agent-access-card,
  .dev-agent-trust-card {
    grid-template-columns: 46px minmax(0, 1fr) auto;
  }

  .dev-agent-trust-card span:not(.dev-agent-icon) {
    grid-column: 2 / -1;
  }

  .dev-agent-model-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dev-agent-evidence-item {
    min-height: 0;
    border-right: 0;
  }

  .dev-agent-start {
    align-items: start;
  }

  .dev-agent-actions {
    justify-content: flex-start;
  }

  .admin-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-domain-toolbar {
    grid-template-columns: 1fr;
  }

  .portfolio-rebuild-modal {
    padding: 14px;
  }

  .portfolio-rebuild-header,
  .portfolio-rebuild-steps,
  .portfolio-rebuild-actions {
    padding-inline: 18px;
  }

  .portfolio-rebuild-steps li,
  .portfolio-rebuild-actions {
    align-items: flex-start;
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .portfolio-rebuild-steps em {
    grid-column: 2;
  }

  .portfolio-rebuild-actions {
    flex-direction: column;
  }

  .admin-summary-strip,
  .admin-table-wrap {
    padding-inline: 18px;
  }

  .chat-view {
    width: 100vw;
    min-width: 0;
    max-width: none;
  }

  .chat-workspace {
    padding: 14px;
  }

  .code-preview-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .chat-message {
    max-width: 100%;
  }

  .index-view {
    margin-top: -28px;
  }

  .canvas-controls {
    padding: 12px;
  }

  .filter-bar {
    margin-right: -12px;
    padding-right: 12px;
  }

  .filter-menu {
    position: fixed;
    inset: auto 12px 16px;
    width: auto;
    max-height: min(520px, calc(100vh - 96px));
    overflow: auto;
  }

  .domain-option-list {
    max-height: 340px;
  }

  .metrics-section,
  .metric-card {
    padding: 18px;
  }

  .site-footer {
    padding: 32px 18px 22px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 28px;
  }

  .agent-home-snapshot,
  .lens-home-snapshot,
  .agent-use-grid,
  .lens-use-grid,
  .lens-card-grid,
  .agent-resource-card-list {
    grid-template-columns: 1fr;
  }

  .agent-use-card,
  .lens-use-card,
  .lens-home-card,
  .agent-resource-card {
    min-height: 0;
  }

  .metric-card {
    min-height: 0;
  }

  .metric-card p {
    max-width: 34rem;
  }

  .capability-box {
    min-height: 0;
  }

  .capability-section {
    gap: 32px;
    padding: 24px;
  }

  .capability-section-header {
    gap: 18px;
  }

  .capability-grid {
    gap: 18px;
  }

  .metrics-section {
    gap: 32px;
  }

  .portfolio-sections .record-list {
    margin-top: 28px;
  }

  #summary-product-list,
  #summary-use-case-list {
    grid-template-columns: 1fr;
  }

  .capability-box {
    gap: 14px;
    padding: 24px;
  }

  .panel-header,
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .graph-container {
    height: 430px;
    min-height: 430px;
  }

  .graph-explorer-workspace {
    padding: 16px;
  }

  .graph-explorer-container {
    height: 520px;
    min-height: 520px;
  }

  .summary-brief-hero,
  .summary-detail-card {
    padding: 16px;
  }

  .summary-metric-grid {
    grid-template-columns: 1fr;
  }

  .summary-metric-card {
    min-height: 0;
  }

  .graph-node-box {
    width: 124px;
    min-height: 42px;
    padding: 7px 8px;
  }

  .graph-node-box strong {
    font-size: 0.62rem;
  }

  .graph-node-box span {
    font-size: 0.52rem;
  }

  .about-intro,
  .about-section {
    padding: 18px;
  }

  .creator-profile {
    padding: 0;
  }

  .creator-profile-header,
  .creator-profile-body {
    padding-inline: 18px;
  }

  .creator-photo-frame {
    min-height: 220px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .source-flow {
    grid-template-columns: 1fr;
  }

  .source-flow i {
    justify-self: center;
    width: 2px;
    height: 36px;
  }

  .source-flow i::after {
    right: -5px;
    top: auto;
    bottom: -2px;
    transform: rotate(135deg);
  }

  .pipeline-strip {
    grid-template-columns: 1fr;
  }

  .relationship-map {
    grid-template-columns: 1fr;
  }

  .relationship-map div:nth-child(n) {
    grid-column: auto;
  }
}
