:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --ink: #0d1b2f;
  --muted: #667085;
  --line: #dbe3ef;
  --blue: #156fec;
  --blue-deep: #062a67;
  --cyan: #1fb6d5;
  --green: #16a36a;
  --amber: #d8891c;
  --red: #cf3e45;
  --shadow: 0 18px 48px rgba(13, 27, 47, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

button,
input,
table {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--blue);
  text-decoration: none;
}

.lucide-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  line-height: 0;
  color: inherit;
}

.lucide-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.brand {
  text-decoration: none;
}

.account-menu {
  position: relative;
}

.vpn-menu {
  position: relative;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px 0 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.user-chip svg,
.user-chip .lucide-icon {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.user-chip span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.user-chip b {
  font-size: 13px;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: none;
  width: 230px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.account-menu-open .account-menu .account-dropdown {
  display: grid;
}

.vpn-menu-open .vpn-menu .vpn-dropdown {
  display: grid;
}

.account-summary {
  display: grid;
  gap: 3px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid #edf1f7;
  margin-bottom: 6px;
}

.account-summary-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.account-summary-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-tier-tag {
  flex: 0 0 auto;
  padding: 2px 7px;
  border: 1px solid #cfe1ff;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue-deep);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
}

.account-summary small {
  color: var(--muted);
}

.account-dropdown a,
.account-dropdown button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #344054;
  font-weight: 800;
  text-align: left;
}

.account-dropdown a:hover,
.account-dropdown button:hover {
  background: var(--surface-soft);
  color: var(--blue-deep);
}

.account-dropdown svg,
.account-dropdown .lucide-icon {
  width: 16px;
  height: 16px;
}

#account-vpn-actions {
  display: grid;
  gap: 4px;
}

.vpn-dropdown {
  width: 248px;
}

.vpn-dropdown #account-vpn-actions {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.vpn-status-summary {
  margin-bottom: 0;
}

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

.vpn-status-refresh-button {
  flex: 0 0 auto;
}

.vpn-status-refresh-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.vpn-status-refresh-button.is-spinning svg,
.vpn-status-refresh-button.is-spinning .lucide-icon {
  animation: vpnStatusSpin 1s linear infinite;
}

.vpn-status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.vpn-status-tag.is-connected {
  background: #dcfae6;
  color: #166534;
}

.vpn-status-tag.is-disconnected {
  background: #eef2f7;
  color: #475467;
}

.vpn-status-tag.is-warning {
  background: #fff4db;
  color: #9a6700;
}

.vpn-status-tag.is-disabled {
  background: #f4f4f5;
  color: #52525b;
}

.vpn-status-details {
  display: grid;
  gap: 4px;
}

.vpn-status-details small {
  display: block;
}

@keyframes vpnStatusSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.landing-page {
  min-width: 0;
  background: #f7f9fc;
}

.landing-page .primary-button,
.landing-page .secondary-button {
  text-decoration: none;
}

.landing-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
  padding: 0 clamp(22px, 5vw, 72px);
  border-bottom: 1px solid rgba(219, 227, 239, 0.82);
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(18px);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--blue-deep);
  font-size: 18px;
  font-weight: 800;
}

.landing-brand img {
  width: 38px;
  height: 38px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  object-fit: contain;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}

.landing-language-toggle,
.nav-login,
.nav-signup {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #344054;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.landing-session-chip {
  text-decoration: none;
}

#landing-auth-slot {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.landing-stats,
.landing-cta,
.landing-actions {
  flex-wrap: wrap;
}

.landing-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 88vh;
  padding: 78px clamp(22px, 5vw, 72px) 76px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f7f9fc;
}

.landing-hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 58vw);
}

.landing-hero h1 {
  margin: 96px auto 28px;
  color: #08172c;
  font-size: clamp(54px, 7vw, 94px);
  line-height: 0.98;
}

.landing-lead {
  max-width: 670px;
  margin: 0 auto 30px;
  color: #475467;
  font-size: 19px;
  line-height: 1.78;
}

.landing-lead span {
  display: block;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 38px;
}

.landing-cta .primary-button,
.landing-cta .secondary-button {
  min-width: 156px;
  padding: 0 28px;
}

.landing-explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto 8px;
}

.landing-explainer-grid article {
  min-width: 0;
  min-height: 224px;
  padding: 16px;
  border: 1px solid rgba(207, 224, 247, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(13, 27, 47, 0.08);
  text-align: left;
}

.explainer-visual {
  position: relative;
  display: grid;
  min-height: 138px;
  align-items: stretch;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #d5e4fb;
  border-radius: 8px;
  background:
    linear-gradient(rgba(21, 111, 236, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 111, 236, 0.08) 1px, transparent 1px),
    #f8fafc;
  background-size: 22px 22px, 22px 22px, auto;
  color: var(--blue-deep);
}

.explainer-visual::before {
  position: absolute;
  inset: auto -18% -44% 38%;
  height: 92px;
  border-radius: 999px;
  background: rgba(21, 111, 236, 0.1);
  content: "";
  filter: blur(26px);
}

.explainer-visual > * {
  position: relative;
  z-index: 1;
}

.explainer-visual svg,
.explainer-visual .lucide-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--blue);
}

.build-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-self: center;
}

.build-node {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 64px;
  place-items: center;
  gap: 6px;
  padding: 8px 5px;
  border: 1px solid #d5e4fb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(13, 27, 47, 0.08);
  text-align: center;
}

.build-node:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -9px;
  width: 9px;
  height: 1px;
  background: #a9c5ee;
  content: "";
}

.build-node b {
  min-width: 0;
  overflow: hidden;
  color: #1d2939;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-node.verify svg,
.build-node.verify .lucide-icon {
  color: var(--green);
}

.build-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.build-status {
  align-self: end;
  justify-content: center;
  margin-top: 10px;
}

.build-status span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #cfe1ff;
  border-radius: 999px;
  background: #fff;
  color: #344054;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.isolation-map {
  position: relative;
  display: grid;
  grid-template-columns: 0.84fr 0.72fr 1fr;
  gap: 10px;
  min-height: 100%;
  align-items: center;
}

.isolation-link {
  position: absolute;
  z-index: 0;
  border-top: 2px dotted #a9c5ee;
  transform-origin: left center;
}

.link-user-a {
  top: 38%;
  left: 22%;
  width: 28%;
  transform: rotate(12deg);
}

.link-user-b {
  top: 59%;
  left: 20%;
  width: 30%;
  transform: rotate(-13deg);
}

.link-inst-a {
  top: 39%;
  left: 50%;
  width: 29%;
  transform: rotate(-18deg);
}

.link-inst-b {
  top: 57%;
  left: 50%;
  width: 32%;
  transform: rotate(16deg);
}

.tenant-stack,
.instance-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  align-content: center;
}

.tenant-node,
.instance-node {
  display: grid;
  place-items: center;
  border: 1px solid #d5e4fb;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(13, 27, 47, 0.08);
  color: #344054;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}

.tenant-node {
  grid-auto-flow: column;
  gap: 4px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
}

.tenant-node svg,
.tenant-node .lucide-icon {
  width: 12px;
  height: 12px;
  color: var(--blue);
}

.tenant-a {
  justify-self: end;
  min-width: 62px;
}

.tenant-b {
  justify-self: start;
  min-width: 62px;
}

.isolation-router {
  position: relative;
  z-index: 2;
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px solid #bfe8cd;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0 82%, transparent 83%),
    conic-gradient(from 20deg, rgba(22, 163, 106, 0.78), rgba(21, 111, 236, 0.82), rgba(22, 163, 106, 0.78));
  box-shadow: 0 14px 34px rgba(13, 27, 47, 0.12);
}

.vpn-shield {
  position: relative;
  display: grid;
  place-items: center;
  color: var(--green);
}

.vpn-shield .lucide-icon {
  width: 40px;
  height: 40px;
}

.vpn-shield .lucide-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.2;
}

.vpn-shield b {
  position: absolute;
  color: #166534;
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.instance-node {
  width: 84px;
  height: 46px;
  gap: 4px;
  align-content: center;
  justify-items: center;
  justify-self: start;
  border-radius: 999px;
  color: var(--blue-deep);
}

.instance-b {
  justify-self: end;
}

.instance-title {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  line-height: 1;
}

.instance-title svg,
.instance-title .lucide-icon {
  width: 11px;
  height: 11px;
  color: var(--blue);
}

.instance-title b {
  overflow: hidden;
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instance-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.08;
}

.instance-net {
  color: var(--blue);
}

.instance-flag {
  color: var(--green);
}

.api-visual {
  padding: 14px;
}

.api-visual-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  align-self: stretch;
}

.api-endpoint,
.api-code-section {
  min-width: 0;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 0 rgba(21, 111, 236, 0.08);
}

.api-endpoint {
  overflow: hidden;
  padding: 7px 8px;
  color: #344054;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-endpoint b {
  color: var(--blue);
  font-weight: 900;
}

.api-code-section {
  display: grid;
  gap: 3px;
  padding: 6px 8px;
}

.api-code-section span {
  color: var(--blue);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.api-code-section code {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #344054;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-explainer-grid h3 {
  margin: 0 0 10px;
  color: var(--blue-deep);
  font-size: 17px;
}

.landing-explainer-grid p {
  margin: 12px 0 0;
  color: #556172;
  font-size: 13px;
  line-height: 1.65;
}

.landing-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(650px, 100%);
  border-top: 1px solid var(--line);
}

.landing-stats div {
  padding: 20px 24px 0 0;
}

.landing-stats strong,
.landing-stats span {
  display: block;
}

.landing-stats strong {
  color: var(--blue-deep);
  font-size: 26px;
}

.landing-stats span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-scene {
  position: absolute;
  inset: 0 0 auto auto;
  width: min(58vw, 860px);
  height: 88vh;
  min-height: 650px;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-grid {
  position: absolute;
  inset: 0;
  opacity: 0.78;
  background:
    linear-gradient(rgba(21, 111, 236, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21, 111, 236, 0.1) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}

.scene-node {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 8px rgba(21, 111, 236, 0.12);
}

.node-a {
  top: 24%;
  right: 34%;
}

.node-b {
  top: 47%;
  right: 18%;
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(22, 163, 106, 0.12);
}

.node-c {
  top: 62%;
  right: 48%;
  background: var(--amber);
  box-shadow: 0 0 0 8px rgba(216, 137, 28, 0.13);
}

.node-d {
  top: 75%;
  right: 28%;
  background: var(--blue-deep);
  box-shadow: 0 0 0 8px rgba(6, 42, 103, 0.13);
}

.scene-path {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: rgba(21, 111, 236, 0.36);
}

.path-a {
  top: 31%;
  right: 22%;
  width: 230px;
  transform: rotate(31deg);
}

.path-b {
  top: 55%;
  right: 26%;
  width: 310px;
  transform: rotate(-18deg);
}

.path-c {
  top: 71%;
  right: 18%;
  width: 250px;
  transform: rotate(20deg);
}

.scene-console {
  position: absolute;
  right: clamp(24px, 7vw, 110px);
  bottom: 10vh;
  width: min(430px, 82%);
  border: 1px solid rgba(207, 224, 247, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.scene-top {
  display: flex;
  gap: 7px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}

.scene-top span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #98a2b3;
}

.scene-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border-bottom: 1px solid #edf1f7;
  font-size: 14px;
}

.scene-row:last-child {
  border-bottom: 0;
}

.scene-row em {
  font-style: normal;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.scene-row em.ok {
  color: var(--green);
}

.scene-row em.warn {
  color: var(--amber);
}

.landing-section {
  padding: 74px clamp(22px, 5vw, 72px);
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 28px;
}

.section-heading h2,
.workflow-copy h2 {
  max-width: 720px;
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 52px);
}

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

.feature-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-card svg {
  width: 26px;
  height: 26px;
  color: var(--blue);
}

.feature-card h3 {
  margin: 20px 0 10px;
}

.feature-card p,
.workflow-copy p {
  margin-bottom: 0;
  color: #556172;
  line-height: 1.72;
}

.workflow-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 48px;
  align-items: center;
  border-top: 1px solid var(--line);
  background: #f7f9fc;
}

.workflow-copy p {
  max-width: 650px;
  margin-top: 20px;
  font-size: 16px;
}

.workflow-steps {
  display: grid;
  gap: 12px;
}

.workflow-steps div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workflow-steps span {
  color: var(--blue);
  font-weight: 900;
}

.workflow-steps strong {
  font-size: 18px;
}

.evaluation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1120px);
  justify-content: center;
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
  min-height: auto;
  text-align: center;
}

.evaluation-hero .landing-hero-content {
  width: 100%;
  max-width: 1040px;
  justify-self: center;
}

.hero-subtitle {
  max-width: 820px;
  margin: 0 auto 34px;
  color: var(--blue-deep);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  line-height: 1.22;
}

.landing-signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 780px;
  margin: 12px auto 0;
}

.landing-signal-strip span {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

.landing-signal-strip svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--blue);
}

.landing-proof-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  justify-self: center;
  padding: 24px;
  border: 1px solid rgba(207, 224, 247, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 54px rgba(13, 27, 47, 0.14);
  backdrop-filter: blur(16px);
}

.proof-panel-header,
.api-panel-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.proof-panel-header h2 {
  max-width: 420px;
  margin: 0;
  color: var(--blue-deep);
  font-size: 25px;
  line-height: 1.2;
}

.proof-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #bfe8cd;
  border-radius: 999px;
  background: #e9f8ef;
  color: #166534;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

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

.proof-grid article,
.capability-grid article,
.audience-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.proof-grid article {
  min-height: 132px;
  padding: 16px;
}

.proof-grid span,
.api-panel-top span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.proof-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--blue-deep);
  font-size: 16px;
  line-height: 1.25;
}

.proof-grid small {
  display: block;
  margin-top: 9px;
  color: #667085;
  line-height: 1.48;
}

.api-trace {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #d5e4fb;
  border-radius: 8px;
  background: #f5f9ff;
}

.api-trace div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.api-trace span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.api-trace code,
.agent-api-panel code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.api-trace code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #1d2939;
  font-size: 12px;
}

.section-note {
  max-width: 520px;
  margin: 0;
  color: #556172;
  line-height: 1.68;
}

.audience-grid,
.capability-grid {
  display: grid;
  gap: 14px;
}

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

.audience-card {
  min-height: 190px;
  padding: 24px;
}

.audience-card svg,
.audience-card .lucide-icon,
.capability-grid svg,
.capability-grid .lucide-icon {
  width: 24px;
  height: 24px;
  color: var(--blue);
}

.audience-card h3 {
  margin: 22px 0 10px;
  color: var(--blue-deep);
}

.audience-card p {
  margin: 0;
  color: #556172;
  line-height: 1.7;
}

.capability-band {
  border-top: 1px solid var(--line);
  background: #f7f9fc;
}

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

.capability-grid article {
  display: grid;
  min-height: 184px;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.capability-grid strong {
  color: var(--blue-deep);
  font-size: 16px;
}

.capability-grid span {
  color: #556172;
  line-height: 1.62;
}

.corpus-section {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.corpus-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 22px;
  align-items: center;
  padding: 24px;
  border: 1px solid #d5e4fb;
  border-radius: 8px;
  background: #f5f9ff;
}

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

.corpus-sources span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #cfe1ff;
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.corpus-panel p {
  margin: 0;
  color: #344054;
  font-size: 16px;
  line-height: 1.82;
}

.evaluation-workflow {
  grid-template-columns: minmax(0, 0.86fr) minmax(460px, 1fr);
}

.evaluation-flow {
  display: grid;
  gap: 10px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.evaluation-flow li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px 16px;
  min-height: 74px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.evaluation-flow span {
  grid-row: span 2;
  color: var(--blue);
  font-weight: 900;
}

.evaluation-flow strong {
  color: var(--blue-deep);
}

.evaluation-flow small {
  color: #667085;
  line-height: 1.45;
}

.agent-api-panel {
  min-width: 0;
  padding: 22px;
  border: 1px solid #cfe1ff;
  border-radius: 8px;
  background: #08172c;
  color: #eaf2ff;
  box-shadow: 0 24px 54px rgba(13, 27, 47, 0.18);
}

.api-panel-top {
  margin-bottom: 18px;
}

.api-panel-top b {
  color: #86efac;
  font-size: 12px;
  text-transform: uppercase;
}

.agent-api-panel pre {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}

.agent-api-panel code {
  display: block;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.72;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.catalog-toolbar {
  margin-bottom: 0;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.catalog-toolbar .search-box {
  width: min(560px, 100%);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(460px, 100%);
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

.search-box svg,
.search-box .lucide-icon {
  width: 17px;
  height: 17px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-dropdown {
  position: relative;
}

.filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 178px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.filter-trigger span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.filter-trigger strong {
  max-width: 128px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-trigger svg,
.filter-trigger .lucide-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  display: none;
  width: max(220px, 100%);
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(13, 27, 47, 0.14);
}

.filter-dropdown.is-open .filter-menu {
  display: grid;
}

.filter-menu button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  border-radius: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}

.filter-menu button:hover,
.filter-menu button.active {
  background: #eef4ff;
  color: var(--blue-deep);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--surface-soft);
  color: var(--blue-deep);
}

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

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination-controls button {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.pagination-controls button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.pagination-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pagination-ellipsis {
  display: inline-grid;
  min-width: 28px;
  height: 34px;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.pagination-controls svg,
.pagination-controls .lucide-icon {
  width: 16px;
  height: 16px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 900;
}

.challenge-card,
.feature-card {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.challenge-card {
  display: flex;
  min-height: 196px;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.challenge-card:hover,
.feature-card:hover {
  border-color: #b9d2f8;
  box-shadow: 0 18px 38px rgba(13, 27, 47, 0.08);
  transform: translateY(-1px);
}

.card-topline,
.card-meta,
.card-foot,
.detail-actions {
  display: flex;
  align-items: center;
}

.card-topline {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-topline-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.access-tier-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.access-tier-pill.free {
  border-color: #bfe8cd;
  background: #e9f8ef;
  color: #166534;
}

.access-tier-pill.vip {
  border-color: #cfe1ff;
  background: #eef5ff;
  color: #174ea6;
}

.access-tier-pill.svip {
  border-color: #f6c58b;
  background: #fff2df;
  color: #9a4d00;
}

.challenge-card h3 {
  min-width: 0;
  margin-bottom: 8px;
  color: var(--blue-deep);
  font-size: 19px;
}

.source-badge {
  max-width: 46%;
  overflow: hidden;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill.idle {
  background: #f6f8fb;
  color: var(--muted);
}

.challenge-card p {
  flex: 1;
  color: #556172;
  line-height: 1.58;
}

.card-meta {
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.card-meta span,
.tag-row span,
.scope-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

.api-access-hero {
  margin-bottom: 18px;
}

.key-config-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.key-config-form label {
  display: grid;
  gap: 8px;
}

.key-config-form .static-field {
  display: grid;
  gap: 8px;
}

.key-config-form label.full,
.key-config-form .full,
.key-config-form .static-field.full {
  grid-column: 1 / -1;
}

.key-config-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.key-config-form input,
.key-config-form select,
.key-config-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
}

.key-config-form textarea {
  min-height: 100px;
  padding: 12px;
  resize: vertical;
}

.key-config-form .static-field strong {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0 2px;
  color: #66758a;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.form-actions {
  display: flex;
  justify-content: flex-start;
}

.docs-link-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #edf1f7;
}

.docs-link-card p {
  margin: 0;
  color: #556172;
  line-height: 1.7;
}

.docs-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.api-policy-list {
  padding-top: 0;
}

.card-foot {
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #edf1f7;
  color: var(--muted);
  font-size: 12px;
}

.card-foot strong {
  color: var(--ink);
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(238, 244, 255, 0.94), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(21, 111, 236, 0.08) 0 1px, transparent 1px 72px);
  box-shadow: var(--shadow);
}

.detail-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-entry-inline {
  color: var(--blue-deep);
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.detail-heading-link {
  color: inherit;
  text-decoration: none;
}

.detail-heading-link:hover {
  color: var(--blue);
  text-decoration: underline;
}

.detail-hero h2 {
  margin: 16px 0 12px;
  font-size: 34px;
}

.detail-hero p {
  max-width: 780px;
  margin-bottom: 16px;
  color: #475467;
  line-height: 1.72;
}

.detail-jump-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue-deep);
  font-weight: 800;
}

.detail-jump-link:hover {
  border-color: #9ec2f5;
  background: #ffffff;
  color: var(--blue);
}

.detail-jump-link svg,
.detail-jump-link .lucide-icon {
  width: 15px;
  height: 15px;
}

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

.detail-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: 280px;
}

.detail-note {
  width: 100%;
  margin: 4px 0 0;
  color: #556172;
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.writeup-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(12, 22, 38, 0.58);
}

.writeup-dialog {
  width: min(960px, 100%);
  max-height: min(82vh, 820px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #d8e4f5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 35, 70, 0.28);
  overflow: hidden;
}

.writeup-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf1f7;
}

.writeup-dialog-header h3 {
  margin: 4px 0;
  font-size: 20px;
  line-height: 1.3;
}

.writeup-dialog-header span {
  color: var(--muted);
  font-size: 12px;
}

.writeup-content {
  min-height: 260px;
  margin: 0;
  padding: 24px 28px;
  overflow: auto;
  background: #fbfdff;
  color: #1c2b3d;
  font-size: 14px;
  line-height: 1.72;
}

.acceptance-summary-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body > *:last-child {
  margin-bottom: 0;
}

.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5 {
  margin: 26px 0 12px;
  color: #12243a;
  line-height: 1.25;
}

.markdown-body h2 {
  padding-bottom: 8px;
  border-bottom: 1px solid #dfe9f7;
  font-size: 24px;
}

.markdown-body h3 {
  font-size: 20px;
}

.markdown-body h4,
.markdown-body h5 {
  font-size: 16px;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol,
.markdown-body blockquote,
.markdown-body .markdown-code {
  margin: 0 0 16px;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 22px;
}

.markdown-body li + li {
  margin-top: 6px;
}

.markdown-body code {
  padding: 2px 5px;
  border: 1px solid #d9e5f5;
  border-radius: 5px;
  background: #eef5ff;
  color: #173f70;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.92em;
}

.markdown-body .markdown-code {
  padding: 16px;
  border: 1px solid #d7e4f6;
  border-radius: 8px;
  background: #102033;
  color: #edf6ff;
  overflow: auto;
  white-space: pre;
}

.markdown-body .markdown-code code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.markdown-body blockquote {
  padding: 12px 14px;
  border-left: 4px solid var(--blue);
  border-radius: 0 8px 8px 0;
  background: #eef5ff;
  color: #344761;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: #fff1f2;
  color: var(--red);
  font-weight: 800;
}

.inline-text-button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.inline-text-button:hover {
  text-decoration: underline;
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.primary-button.is-busy svg,
.primary-button.is-busy .lucide-icon,
.danger-button.is-busy svg,
.danger-button.is-busy .lucide-icon {
  animation: spin 900ms linear infinite;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
  margin-bottom: 18px;
}

.detail-grid.challenge-detail-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
}

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

.challenge-reference-stack {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.challenge-reference-panel {
  display: flex;
  flex-direction: column;
  height: 240px;
  overflow: hidden;
}

.challenge-reference-body {
  min-height: 0;
  overflow: auto;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-tab.active {
  border-color: rgba(21, 111, 236, 0.28);
  background: rgba(21, 111, 236, 0.08);
  color: var(--blue);
}

.acceptance-summary {
  margin-bottom: 18px;
}

.acceptance-queue-card {
  position: relative;
}

.acceptance-queue-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
}

.acceptance-queue-card strong.good,
.acceptance-queue-card small.good {
  color: var(--green);
}

.acceptance-queue-card strong.warn,
.acceptance-queue-card small.warn {
  color: var(--amber);
}

.acceptance-queue-card .compact {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.acceptance-queue-card .compact svg,
.acceptance-queue-card .compact .lucide-icon {
  width: 15px;
  height: 15px;
}

.acceptance-panel {
  margin-bottom: 18px;
}

.acceptance-toolbar {
  align-items: center;
  grid-template-columns: minmax(260px, 1fr) auto;
}

.acceptance-detail-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
}

.acceptance-hero .tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  background: #f4f7fb;
  color: #435166;
  font-size: 12px;
  font-weight: 800;
}

.acceptance-actions {
  display: grid;
  gap: 16px;
}

.acceptance-button-row {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.acceptance-button-row .primary-button,
.acceptance-button-row .danger-button {
  width: 100%;
}

.agent-chart-panel {
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(238, 244, 255, 0.92), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(21, 111, 236, 0.07) 0 1px, transparent 1px 72px);
  box-shadow: var(--shadow);
}

.chart-header,
.chart-body {
  display: flex;
  gap: 20px;
}

.chart-header {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.chart-header h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.chart-note {
  max-width: 780px;
  margin: 0;
  color: #556172;
  font-size: 14px;
  line-height: 1.55;
}

.chart-body {
  align-items: flex-start;
}

.chart-plot {
  position: relative;
  min-width: 0;
  flex: 1;
  aspect-ratio: 49 / 15;
  min-height: clamp(220px, 28vw, 320px);
  overflow: hidden;
  border: 1px solid rgba(207, 224, 247, 0.92);
  border-radius: 8px;
  background: #fff;
}

.chart-plot svg {
  display: block;
  width: 100%;
  height: 100%;
}

.chart-hover-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.chart-hover-layer.is-visible {
  opacity: 1;
}

.chart-cursor-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(6, 42, 103, 0.56);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.chart-tooltip {
  position: absolute;
  top: 22px;
  width: 260px;
  padding: 14px;
  border: 1px solid rgba(13, 27, 47, 0.1);
  border-radius: 8px;
  background: rgba(12, 25, 48, 0.72);
  color: #f8fbff;
  box-shadow: 0 18px 42px rgba(13, 27, 47, 0.16);
  backdrop-filter: blur(10px) saturate(1.25);
}

.tooltip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.tooltip-head span {
  color: #c8d7f2;
  font-weight: 800;
}

.tooltip-head strong {
  margin-left: auto;
  text-align: right;
}

.tooltip-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.tooltip-row span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.tooltip-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.tooltip-row em {
  color: #f8fbff;
  font-style: normal;
  font-weight: 900;
}

.axis line {
  stroke: rgba(102, 112, 133, 0.28);
  stroke-width: 1;
}

.axis text,
.x-labels text,
.axis-title {
  fill: #667085;
  font-size: 13px;
  font-weight: 700;
}

.agent-line {
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(21, 111, 236, 0.16));
}

.chart-legend {
  display: grid;
  align-content: center;
  gap: 10px;
  width: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.chart-legend div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
}

.chart-legend span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.chart-legend strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.chart-legend small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.info-list {
  display: grid;
  gap: 0;
  padding: 6px 18px 18px;
}

.info-list div {
  display: grid;
  gap: 6px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f7;
}

.info-list div:last-child {
  border-bottom: 0;
}

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

.info-list strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 8px 20px 20px;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid #edf1f7;
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline li > span {
  position: absolute;
  top: 18px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(21, 111, 236, 0.11);
}

.timeline small {
  color: var(--muted);
}

.summary-strip.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.agent-bars {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.agent-bar {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(260px, 1fr) 48px;
  align-items: center;
  gap: 18px;
}

.agent-bar strong,
.agent-bar span {
  display: block;
}

.agent-bar span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef8;
}

.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.failure-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.failure-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fbfcff;
}

.failure-list span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.failure-list strong {
  font-size: 22px;
}

.matrix-table td,
.matrix-table th {
  min-width: 180px;
}

.matrix-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.matrix-status.solved {
  background: rgba(22, 163, 106, 0.11);
  color: var(--green);
}

.matrix-status.running {
  background: rgba(21, 111, 236, 0.11);
  color: var(--blue);
}

.matrix-status.expired {
  background: rgba(216, 137, 28, 0.13);
  color: var(--amber);
}

.matrix-status.failed {
  background: #fff1f2;
  color: var(--red);
}

.matrix-page-panel {
  overflow: hidden;
  padding: 16px 18px 18px;
  border-color: #dbe5f1;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(21, 111, 236, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 252, 255, 0.98));
  box-shadow: 0 22px 48px rgba(13, 27, 47, 0.06);
}

.matrix-stage {
  display: grid;
  gap: 16px;
}

.matrix-loading-panel {
  overflow: hidden;
}

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

.matrix-header-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 240px;
  padding-top: 8px;
}

.matrix-header-meta strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.matrix-header-meta small {
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

.matrix-header-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(22, 163, 106, 0.12);
}

.matrix-hero-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 880px;
}

.matrix-kicker,
.matrix-section-head p {
  margin: 0;
  color: #2d63d7;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matrix-hero-copy h2 {
  margin: 0;
  max-width: none;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.matrix-hero-copy > p:last-of-type {
  max-width: 760px;
  margin: 0;
  color: #526173;
  font-size: 16px;
  line-height: 1.65;
}

.matrix-toolbar-ribbon {
  margin-top: 0;
  padding: 4px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.matrix-toolbar-ribbon-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(5, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: stretch;
}

.matrix-ribbon-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.matrix-ribbon-field-toggle {
  min-width: 0;
}

.toolbar-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.matrix-ribbon-field select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.segmented-control {
  display: inline-flex;
  width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.segmented-control button {
  flex: 1 1 0;
  min-height: 32px;
  min-width: 0;
  padding: 0 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.segmented-control button.active {
  background: var(--surface-soft);
  color: var(--blue-deep);
}

.matrix-ribbon-refresh {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-bottom: 2px;
}

.matrix-highlight-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(6, 42, 103, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.matrix-highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(21, 111, 236, 0.1);
  color: var(--blue-deep);
}

.matrix-highlight-icon .lucide-icon {
  width: 24px;
  height: 24px;
}

.matrix-highlight-icon.good {
  background: rgba(22, 163, 106, 0.12);
  color: var(--green);
}

.matrix-highlight-icon.warn {
  background: rgba(216, 137, 28, 0.14);
  color: var(--amber);
}

.matrix-highlight-icon.danger {
  background: rgba(207, 62, 69, 0.12);
  color: var(--red);
}

.matrix-highlight-copy {
  min-width: 0;
}

.matrix-highlight-card span,
.matrix-metric-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matrix-highlight-card strong {
  display: -webkit-box;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.24;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.matrix-highlight-card b {
  display: block;
  margin-top: 3px;
  color: var(--blue-deep);
  font-size: 18px;
  line-height: 1.05;
}

.matrix-highlight-card small,
.matrix-metric-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.matrix-story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.matrix-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(360px, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.matrix-map-card,
.matrix-side-rail,
.matrix-outcome-card,
.matrix-detail-card,
.matrix-ranking-card,
.matrix-scatter-card {
  border: 1px solid rgba(6, 42, 103, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
}

.matrix-side-rail {
  display: grid;
  gap: 14px;
  border: 0;
  background: transparent;
}

.matrix-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 0;
}

.matrix-section-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.matrix-map-card .matrix-section-head h3 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.matrix-section-head small {
  color: var(--muted);
  font-size: 12px;
}

.matrix-heatmap-legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.matrix-heatmap-head-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.matrix-heatmap-legend span {
  width: 116px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ef6a63 0%, #f6d58c 45%, #9ed4a8 100%);
}

.matrix-heatmap-row-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  white-space: nowrap;
}

.matrix-heatmap-inline-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.matrix-table-scroll {
  overflow-x: auto;
  padding: 8px 14px 14px;
}

.matrix-heatmap-table {
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.matrix-heatmap-table th,
.matrix-heatmap-table td {
  padding: 0;
  border-bottom: 0;
  white-space: normal;
}

.matrix-heatmap-table thead th {
  padding: 0 0 8px;
  text-align: center;
  vertical-align: bottom;
}

.matrix-heatmap-table thead th strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 13px;
  text-transform: none;
}

.matrix-heatmap-table thead th small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-transform: none;
}

.matrix-heatmap-rowhead {
  min-width: 144px;
  padding-right: 10px !important;
  text-align: left !important;
  color: var(--muted);
}

.matrix-heatmap-rowhead span {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.matrix-agent-marker {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.matrix-heatmap-table tbody td {
  padding: 0 1px 1px 0;
  vertical-align: stretch;
}

.matrix-heatmap-label {
  min-width: 144px;
  padding: 10px 10px 10px 0 !important;
  background: transparent;
}

.matrix-heatmap-label strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  word-break: break-word;
}

.matrix-heatmap-label small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.matrix-heat-cell {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  width: 100%;
  min-height: 64px;
  padding: 8px 6px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 0;
  text-align: center;
  cursor: pointer;
  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease,
    filter 120ms ease;
}

.matrix-heat-cell em {
  font-style: normal;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.matrix-heat-cell small {
  color: inherit;
  opacity: 0.8;
  font-size: 10px;
}

.matrix-heat-cell:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
}

.matrix-heat-cell.is-selected {
  border-color: rgba(6, 42, 103, 0.28);
  box-shadow: inset 0 0 0 1px rgba(6, 42, 103, 0.12);
}

.matrix-heat-cell.is-empty {
  background: #f5f8fc;
  color: #9aa8bb;
}

.matrix-heat-cell.tone-strong {
  background: linear-gradient(180deg, rgba(204, 234, 205, 0.95), rgba(227, 242, 225, 0.95));
  color: #0b7a4b;
}

.matrix-heat-cell.tone-good {
  background: linear-gradient(180deg, rgba(231, 241, 222, 0.96), rgba(243, 248, 233, 0.96));
  color: #3f6f2d;
}

.matrix-heat-cell.tone-warn {
  background: linear-gradient(180deg, rgba(251, 233, 181, 0.96), rgba(253, 243, 214, 0.96));
  color: #9a5d06;
}

.matrix-heat-cell.tone-danger {
  background: linear-gradient(180deg, rgba(248, 198, 184, 0.96), rgba(253, 226, 217, 0.96));
  color: #b4232d;
}

.matrix-scatter-shell {
  display: grid;
  gap: 10px;
  padding: 8px 14px 14px;
}

.matrix-scatter {
  position: relative;
  overflow: visible;
  border: 1px solid rgba(6, 42, 103, 0.06);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(250, 252, 255, 1), rgba(245, 249, 255, 1));
}

.matrix-scatter svg {
  width: 100%;
  height: auto;
  display: block;
}

.matrix-scatter .axis line {
  stroke: #d9e4f1;
  stroke-width: 1;
}

.matrix-scatter .axis text {
  fill: #526173;
  font-size: 12px;
}

.matrix-scatter-hitbox {
  fill: rgba(0, 0, 0, 0.001);
  cursor: pointer;
  pointer-events: all;
}

.matrix-scatter-tooltip {
  width: 212px;
  padding: 10px 11px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 2;
}

.matrix-tooltip-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.matrix-scatter-tooltip .tooltip-head {
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 7px;
}

.matrix-scatter-tooltip .tooltip-head span {
  font-size: 11px;
}

.matrix-scatter-tooltip .tooltip-head strong {
  font-size: 13px;
}

.matrix-scatter-tooltip .tooltip-row {
  min-height: 22px;
  gap: 7px;
}

.matrix-scatter-tooltip .tooltip-row strong,
.matrix-scatter-tooltip .tooltip-row em {
  font-size: 11px;
}

.matrix-scatter-hint {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.matrix-ranking-list {
  display: grid;
  gap: 0;
  padding: 6px 14px 10px;
}

.matrix-ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
  background: transparent;
}

.matrix-ranking-row:last-child {
  border-bottom: 0;
}

.matrix-rank-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(21, 111, 236, 0.12);
  color: var(--blue-deep);
  font-weight: 900;
}

.matrix-ranking-copy strong {
  display: block;
  font-size: 13px;
  word-break: break-word;
}

.matrix-ranking-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.matrix-ranking-row b {
  font-size: 15px;
  color: var(--blue-deep);
}

.matrix-outcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 4px 14px 10px;
}

.matrix-outcome-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.matrix-outcome-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.matrix-outcome-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.matrix-outcome-legend .solved {
  background: var(--green);
}

.matrix-outcome-legend .wrong {
  background: var(--blue);
}

.matrix-outcome-legend .expired {
  background: var(--amber);
}

.matrix-outcome-legend .failed {
  background: var(--red);
}

.matrix-outcome-legend .empty {
  background: #cbd5e1;
}

.matrix-outcome-row {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  padding: 2px 0;
  border-bottom: 0;
  background: transparent;
}

.matrix-outcome-row:last-child {
  border-bottom: 0;
}

.matrix-outcome-head,
.matrix-detail-toolbar,
.matrix-detail-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.matrix-outcome-head {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.matrix-outcome-head small,
.matrix-detail-toolbar p,
.matrix-detail-toolbar-actions small {
  color: var(--muted);
  font-size: 12px;
}

.matrix-outcome-head strong {
  min-width: 0;
  font-size: 13px;
  white-space: nowrap;
}

.matrix-outcome-head small {
  white-space: nowrap;
}

.matrix-outcome-bar {
  display: flex;
  overflow: hidden;
  min-height: 16px;
  border-radius: 999px;
  background: #edf2f8;
}

.matrix-outcome-bar span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.matrix-outcome-bar .solved {
  background: var(--green);
}

.matrix-outcome-bar .wrong {
  background: var(--blue);
}

.matrix-outcome-bar .expired {
  background: var(--amber);
}

.matrix-outcome-bar .failed {
  background: var(--red);
}

.matrix-outcome-bar .empty {
  background: #cbd5e1;
}

.matrix-detail-toolbar {
  padding: 12px 14px 0;
}

.matrix-detail-toolbar p {
  margin: 0;
}

.matrix-cohort-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 0;
}

.matrix-cohort-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(21, 111, 236, 0.1);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
}

.matrix-cohort-meta {
  color: var(--muted);
  font-size: 13px;
}

.matrix-detail-table th,
.matrix-detail-table td {
  padding: 13px 16px;
}

.matrix-detail-table td:first-child small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
}

.matrix-agent-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: middle;
}

@media (max-width: 1320px) {
  .matrix-toolbar-ribbon-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .matrix-ribbon-refresh {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .matrix-main-grid {
    grid-template-columns: 1fr;
  }

  .matrix-side-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .matrix-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-header {
    flex-direction: column;
  }

  .matrix-header-meta {
    justify-items: start;
    min-width: 0;
    padding-top: 0;
  }

  .matrix-header-meta small {
    max-width: none;
    text-align: left;
  }
}

.scope-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.scope-option {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  cursor: pointer;
}

.scope-option input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue);
}

.scope-option span {
  min-height: 34px;
}

.created-token-card {
  margin: 0 18px 18px;
  border: 1px solid #d9e4f1;
  border-radius: 12px;
}

.token-secret {
  display: block;
  overflow-wrap: anywhere;
  padding: 12px 14px;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 13px;
  line-height: 1.5;
}

.muted-text {
  color: var(--muted);
}

.compact-link {
  min-height: 34px;
  padding: 0 12px;
}

.table-wrap td small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.empty-state.compact {
  min-height: 0;
  padding: 24px 0;
}

.hero-entry-panel {
  margin-bottom: 18px;
  border-color: #bcd3f6;
  box-shadow: var(--shadow);
}

.instance-link-list {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.instance-link-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #fbfdff;
  color: var(--ink);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.instance-link-card:hover {
  border-color: #b9d2f8;
  box-shadow: 0 14px 32px rgba(13, 27, 47, 0.08);
  transform: translateY(-1px);
}

.instance-link-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.instance-link-card small {
  color: var(--muted);
  font-size: 12px;
}

.challenge-instance-list {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  flex: 1 1 auto;
  gap: 0;
  min-height: 0;
  max-height: 420px;
  overflow-y: auto;
  padding: 10px 18px 18px;
}

.challenge-instances-panel {
  display: flex;
  flex-direction: column;
  height: 496px;
  overflow: hidden;
}

.challenge-instance-row {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f7;
  color: var(--ink);
}

.challenge-instance-row:last-child {
  border-bottom: 0;
}

.challenge-instance-row:hover strong {
  text-decoration: underline;
}

.challenge-instance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.challenge-instance-row small {
  color: var(--muted);
  font-size: 12px;
}

.instance-entry {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background:
    linear-gradient(140deg, rgba(238, 244, 255, 0.78), rgba(255, 255, 255, 0.98));
}

.instance-entry.compact {
  gap: 6px;
  padding: 10px 12px;
}

.instance-entry.empty {
  color: var(--muted);
  font-weight: 800;
}

.instance-entry span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.instance-entry a,
.instance-entry strong {
  color: var(--blue-deep);
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
}

.compact-code {
  overflow: hidden;
}

.auth-page {
  min-width: 0;
  background:
    linear-gradient(120deg, rgba(238, 244, 255, 0.92), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(21, 111, 236, 0.08) 0 1px, transparent 1px 72px);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 56px;
  align-items: center;
  min-height: 100vh;
  padding: 48px clamp(22px, 6vw, 92px);
}

.auth-copy {
  display: grid;
  gap: 48px;
}

.auth-copy h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
}

.auth-copy p {
  max-width: 620px;
  color: #475467;
  font-size: 18px;
  line-height: 1.75;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-deep);
  font-weight: 800;
}

.auth-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.form-error {
  margin: 0;
  color: #cf3e45;
  font-size: 0.92rem;
}

.form-success {
  margin: 0;
  color: #137a4b;
  font-size: 0.92rem;
  font-weight: 800;
}

.password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.password-rules span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.password-rules span.ok {
  border-color: rgba(19, 122, 75, 0.32);
  background: rgba(19, 122, 75, 0.08);
  color: #137a4b;
}

.auth-link {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-link a {
  color: var(--blue);
  font-weight: 900;
}

.auth-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.auth-card input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.table-wrap select {
  min-width: 112px;
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: #fbfcff;
  transition:
    width 180ms ease,
    padding 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px;
}

.brand img {
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: white;
}

.brand strong {
  display: block;
  color: var(--blue-deep);
  font-size: 19px;
  line-height: 1.1;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  color: #344054;
  font-size: 14px;
}

.nav-item svg,
.nav-item .lucide-icon,
button svg,
button .lucide-icon,
.section-kicker svg,
.section-kicker .lucide-icon {
  width: 17px;
  height: 17px;
  stroke-width: 1.9;
}

.nav-item.active {
  background: var(--surface-soft);
  color: var(--blue-deep);
  font-weight: 700;
}

.runtime-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.collapse-sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  min-height: 42px;
  margin-top: auto;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  transition:
    background 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.collapse-sidebar:hover {
  background: var(--surface-soft);
  color: var(--blue-deep);
}

.collapse-sidebar svg,
.collapse-sidebar .lucide-icon {
  width: 17px;
  height: 17px;
}

.runtime-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 106, 0.12);
}

.runtime-card strong {
  display: block;
  margin-top: 10px;
}

.runtime-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.workspace {
  min-width: 0;
  margin-left: 210px;
  padding: 24px 28px 40px;
  transition: margin-left 180ms ease;
}

.sidebar-collapsed .sidebar {
  width: 70px;
  padding: 28px 14px;
}

.sidebar-collapsed .workspace {
  margin-left: 70px;
}

.sidebar-collapsed .brand {
  justify-content: center;
  padding: 4px 0;
  gap: 0;
}

.sidebar-collapsed .nav-item,
.sidebar-collapsed .collapse-sidebar span {
  font-size: 0;
}

.sidebar-collapsed .brand div,
.sidebar-collapsed .collapse-sidebar span {
  display: none;
}

.sidebar-collapsed .nav-item {
  justify-content: center;
  gap: 0;
  padding: 0;
}

.sidebar-collapsed .nav-item svg,
.sidebar-collapsed .nav-item .lucide-icon,
.sidebar-collapsed .collapse-sidebar svg,
.sidebar-collapsed .collapse-sidebar .lucide-icon {
  width: 18px;
  height: 18px;
}

.sidebar-collapsed .collapse-sidebar {
  width: 42px;
  margin-right: auto;
  margin-left: auto;
  padding: 0;
  justify-content: center;
  background: var(--surface-soft);
  color: var(--blue-deep);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
}

.topbar-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.mobile-console-bar,
.mobile-sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

.mobile-console-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blue-deep);
  font-size: 17px;
  font-weight: 800;
}

.mobile-console-brand img {
  width: 34px;
  height: 34px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.eyebrow,
.section-kicker {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.15;
  min-width: 0;
}

#page-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-title-back-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.page-title-back-link:hover {
  color: var(--blue);
}

.page-title-back-link svg,
.page-title-back-link .lucide-icon {
  width: 22px;
  height: 22px;
}

#page-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-hidden {
  display: none !important;
}

h2 {
  max-width: 620px;
  margin-bottom: 14px;
  font-size: 36px;
  line-height: 1.14;
}

h3 {
  margin-bottom: 0;
  font-size: 17px;
}

.topbar-actions,
.hero-actions,
.panel-header,
.legend,
.runtime-head {
  display: flex;
}

.topbar-actions,
.hero-actions {
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.icon-button,
.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
}

.icon-button {
  width: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.icon-button.compact {
  width: 36px;
  min-height: 36px;
}

.icon-button.is-spinning svg,
.icon-button.is-spinning .lucide-icon {
  animation: spin 1s linear infinite;
}

.primary-button {
  padding: 0 15px;
  background: var(--blue);
  color: white;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(21, 111, 236, 0.22);
}

.secondary-button,
.ghost-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
}

.toast {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 44px rgba(13, 27, 47, 0.16);
  animation: toastIn 160ms ease-out;
}

.toast.danger {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: color-mix(in srgb, var(--red) 8%, white);
}

.toast.is-closing {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
}

.toast.danger strong {
  color: var(--red);
}

.toast small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
}

.toast button svg,
.toast button .lucide-icon {
  width: 15px;
  height: 15px;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  min-height: 92px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric span,
.metric small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 26px;
  line-height: 1;
}

.metric .good {
  color: var(--green);
}

.metric .warn {
  color: var(--amber);
}

.metric .danger {
  color: var(--red);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.55fr);
  gap: 32px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 30px;
  border: 1px solid #cfe0f7;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(238, 244, 255, 0.92), rgba(255, 255, 255, 0.98)),
    repeating-linear-gradient(90deg, rgba(21, 111, 236, 0.08) 0 1px, transparent 1px 72px);
  box-shadow: var(--shadow);
}

.hero-copy p {
  max-width: 650px;
  margin-bottom: 24px;
  color: #475467;
  font-size: 16px;
  line-height: 1.7;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-deep);
}

.signal-map {
  padding: 18px;
  border: 1px solid rgba(6, 42, 103, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.signal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.signal-top strong {
  color: var(--ink);
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.cell {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 1px solid rgba(13, 27, 47, 0.06);
}

.cell.solved,
.legend .solved,
.status-line.solved {
  background: var(--green);
}

.cell.running,
.legend .running,
.status-line.running {
  background: var(--blue);
}

.cell.expired,
.legend .expired {
  background: var(--amber);
}

.cell.failed,
.legend .failed,
.status-line.failed {
  background: var(--red);
}

.legend {
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend b {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  gap: 18px;
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(13, 27, 47, 0.05);
}

.panel.wide {
  grid-row: span 2;
}

.dashboard-scroll-panel {
  display: flex;
  flex-direction: column;
  height: 430px;
  overflow: hidden;
}

.panel-header {
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.panel-header-icon.is-static {
  cursor: default;
  pointer-events: none;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 20px;
  border-bottom: 1px solid #edf1f7;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.table-subtext {
  display: block;
  max-width: 360px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill.running {
  background: rgba(21, 111, 236, 0.11);
  color: var(--blue);
}

.pill.solved {
  background: rgba(22, 163, 106, 0.11);
  color: var(--green);
}

.pill.expired {
  background: rgba(216, 137, 28, 0.13);
  color: var(--amber);
}

.pill.failed {
  background: rgba(207, 62, 69, 0.12);
  color: var(--red);
}

.acceptance-plain-status {
  background: transparent;
  color: inherit;
}

.verdict-list {
  display: grid;
  gap: 2px;
  padding: 10px;
}

.leaderboard-list,
.activity-feed {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  flex: 1;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 18px 18px;
}

.activity-feed.table-wrap {
  padding: 0;
}

.activity-feed .activity-event-cell {
  white-space: normal;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 34px minmax(160px, 1fr) minmax(130px, 0.7fr) 44px;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #edf1f7;
}

.leaderboard-row:last-child,
.activity-item:last-child {
  border-bottom: 0;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 900;
}

.leaderboard-row strong,
.leaderboard-row small {
  display: block;
}

.leaderboard-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.leaderboard-row b {
  color: var(--blue-deep);
}

.accuracy-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef8;
}

.accuracy-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.activity-item {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #edf1f7;
}

.activity-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.verdict-item {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 10px;
  border-radius: 8px;
}

.verdict-item:hover {
  background: #f7f9fd;
}

.status-line {
  width: 4px;
  border-radius: 999px;
}

.verdict-item strong,
.verdict-item small {
  display: block;
}

.verdict-item small {
  margin-top: 4px;
  color: var(--muted);
}

.api-panel pre {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  color: #c8d7f2;
  background: #0c1930;
  border-radius: 0 0 8px 8px;
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .landing-nav {
    height: auto;
    min-height: 74px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 14px 12px;
  }

  .landing-brand {
    flex: 1 1 auto;
  }

  .landing-actions {
    justify-content: flex-end;
    gap: 10px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    display: block;
    width: auto;
    padding: 14px;
  }

  .nav-list,
  .runtime-card {
    display: none;
  }

  .workspace {
    margin-left: 0;
    padding: 20px 14px 28px;
  }

  .sidebar-collapsed .sidebar {
    width: auto;
    padding: 14px;
  }

  .sidebar-collapsed .workspace {
    margin-left: 0;
  }

  .hero-panel,
  .content-grid,
  .dashboard-lower-grid,
  .detail-grid,
  .detail-grid.three,
  .auth-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .user-chip b {
    display: none;
  }

  .summary-strip,
  .summary-strip.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .segmented {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .filter-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-trigger,
  .filter-menu {
    width: 100%;
  }

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

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-controls {
    overflow-x: auto;
  }

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

  .chart-header,
  .chart-body {
    display: grid;
    grid-template-columns: 1fr;
  }

  .chart-legend {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .dashboard-scroll-panel {
    height: 360px;
  }

  .agent-bar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .leaderboard-row {
    grid-template-columns: 34px minmax(0, 1fr) 44px;
  }

  .leaderboard-row .accuracy-meter {
    grid-column: 2 / -1;
  }

  .matrix-table td,
  .matrix-table th {
    min-width: 150px;
  }

  .matrix-page-panel {
    padding: 16px;
  }

  .matrix-main-grid,
  .matrix-side-rail {
    grid-template-columns: 1fr;
  }

  .matrix-story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-toolbar-ribbon-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .matrix-detail-toolbar,
  .matrix-detail-toolbar-actions,
  .matrix-outcome-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .matrix-outcome-row {
    grid-template-columns: 1fr;
  }

  .matrix-outcome-meta {
    grid-column: auto;
  }

  .matrix-ribbon-refresh {
    justify-content: flex-start;
  }

  .matrix-heatmap-table {
    min-width: 680px;
  }

  .matrix-ribbon-field {
    min-width: 0;
  }

  .auth-shell {
    min-height: auto;
    gap: 28px;
    padding: 28px 18px;
  }

  .auth-copy {
    gap: 28px;
  }

  .landing-nav {
    height: auto;
    flex-wrap: wrap;
    padding: 14px;
    position: sticky;
  }

  .landing-actions {
    gap: 10px;
  }

  .landing-language-toggle,
  .nav-login,
  .nav-signup {
    min-height: 34px;
  }

  .key-config-form {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    width: min(82vw, 288px);
    display: flex;
    padding: 22px 16px;
    transform: translateX(-100%);
    box-shadow: 0 24px 48px rgba(13, 27, 47, 0.2);
    transition:
      transform 180ms ease,
      box-shadow 180ms ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .nav-list {
    display: grid;
  }

  .collapse-sidebar {
    display: none;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(6, 18, 36, 0.42);
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
  }

  .mobile-console-bar {
    position: sticky;
    top: 0;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -20px -14px 14px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(219, 227, 239, 0.92);
    background: rgba(251, 252, 255, 0.96);
    backdrop-filter: blur(16px);
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
  }

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

  .topbar-title-group {
    justify-content: flex-start;
    min-width: 0;
    flex: 1 1 auto;
  }

  .topbar-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .user-chip {
    padding-right: 9px;
  }

  #page-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 22px;
  }

  .landing-hero {
    min-height: auto;
    padding: 58px 18px 52px;
    align-items: start;
  }

  .evaluation-hero {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .landing-hero-content {
    width: 100%;
  }

  .landing-hero h1 {
    margin: 64px auto 18px;
    font-size: 50px;
  }

  .landing-lead {
    font-size: 16px;
  }

  .hero-subtitle {
    font-size: 25px;
  }

  .hero-scene {
    top: 330px;
    right: 0;
    width: 100%;
    height: 480px;
    min-height: 480px;
    opacity: 0.86;
  }

  .scene-console {
    right: 18px;
    bottom: 42px;
  }

  .landing-stats,
  .feature-grid,
  .workflow-band,
  .landing-explainer-grid,
  .landing-signal-strip,
  .audience-grid,
  .capability-grid,
  .corpus-panel,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .corpus-sources {
    grid-template-columns: 1fr;
  }

  .landing-explainer-grid article {
    min-height: auto;
  }

  .landing-proof-panel,
  .agent-api-panel {
    padding: 18px;
  }

  .proof-panel-header {
    display: grid;
  }

  .api-trace div {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .landing-stats div {
    padding-top: 16px;
  }

  .section-heading {
    display: block;
  }

  .landing-section {
    padding: 52px 18px;
  }

  .workflow-band {
    gap: 26px;
  }

  .evaluation-workflow {
    grid-template-columns: 1fr;
  }

  .evaluation-flow li {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .agent-api-panel code {
    font-size: 12px;
  }

  h1 {
    font-size: 26px;
  }

  h2 {
    font-size: 27px;
  }
}

@media (max-width: 640px) {
  .matrix-story-grid {
    grid-template-columns: 1fr;
  }

  .matrix-toolbar-ribbon-inner {
    grid-template-columns: 1fr;
  }

  .matrix-ribbon-field,
  .matrix-ribbon-field select {
    width: 100%;
  }

  .matrix-ribbon-field select {
    min-width: 0;
  }

  .matrix-hero-copy h2 {
    font-size: 38px;
  }

  .matrix-side-rail {
    grid-template-columns: 1fr;
  }
}
