:root {
  --ss-bg-primary: #032d29;
  --ss-surface-1: rgba(5, 45, 48, 0.55);
  --ss-surface-2: rgba(4, 32, 39, 0.72);
  --ss-surface-3: rgba(2, 24, 29, 0.86);
  --ss-border: rgba(120, 255, 235, 0.2);
  --ss-border-active: rgba(120, 255, 235, 0.48);
  --ss-text-primary: #f2fffd;
  --ss-text-secondary: rgba(235, 255, 252, 0.72);
  --ss-text-muted: rgba(220, 250, 247, 0.48);
  --ss-accent: #6efff0;
  --ss-accent-blue: #68cfff;
  --ss-accent-purple: #a98bff;
  --ss-success: #6efff0;
  --ss-success-bg: rgba(110, 255, 240, 0.12);
  --ss-warning: #ffd27a;
  --ss-warning-bg: rgba(255, 210, 122, 0.14);
  --ss-error: #ffad9f;
  --ss-error-bg: rgba(255, 173, 159, 0.13);
  --ss-info: #68cfff;
  --ss-info-bg: rgba(104, 207, 255, 0.13);
  --ss-shadow-sm: 0 8px 20px rgba(2, 24, 29, 0.16);
  --ss-shadow-md: 0 18px 45px rgba(2, 24, 29, 0.24);
  --ss-shadow-lg: 0 26px 84px rgba(2, 24, 29, 0.34);
  --ss-glow-sm: 0 0 14px rgba(110, 255, 240, 0.12);
  --ss-glow-md: 0 0 28px rgba(104, 207, 255, 0.16);
  --ss-glow-router: 0 0 40px rgba(40, 220, 200, 0.18);
  --ss-blur-sm: 6px;
  --ss-blur-md: 14px;
  --ss-blur-lg: 18px;

  --paper: var(--ss-bg-primary);
  --paper-bright: var(--ss-surface-1);
  --ink: var(--ss-text-primary);
  --muted: var(--ss-text-secondary);
  --line: var(--ss-border);
  --green: var(--ss-accent);
  --green-dark: var(--ss-accent);
  --aqua: var(--ss-accent);
  --sky: var(--ss-accent-blue);
  --yellow: var(--ss-warning);
  --coral: var(--ss-error);
  --red: var(--ss-error);
  --shadow: var(--ss-shadow-md);
  --radius: 7px;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(rgba(11, 110, 87, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 110, 87, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(11, 122, 174, 0.36);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

code,
pre,
.workspace-label,
.crumb,
.eyebrow,
.rail-heading,
.request-messages-heading,
.response-header,
.endpoint-line span,
.helper-text,
.playground-run-state,
.route-index,
.doc-number {
  font-family: "DM Mono", monospace;
}

code {
  padding: 0.08rem 0.28rem;
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.09);
  border-radius: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 14px 16px;
  color: #e5f2ea;
  background: #14231f;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 8px 38px;
  color: #f7fbf6;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 152px;
  max-width: 100%;
  height: auto;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  gap: 3px;
  align-items: end;
  height: 20px;
}

.brand-mark span {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--yellow);
}

.brand-mark span:nth-child(1) { height: 9px; }
.brand-mark span:nth-child(2) { height: 16px; background: #6dd5bd; }
.brand-mark span:nth-child(3) { height: 12px; }

.workspace-label,
.rail-heading {
  padding: 0 10px;
  color: #90a69c;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.nav-list {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

.nav-divider {
  margin-top: 31px;
}

[hidden] {
  display: none !important;
}

.nav-item,
.text-action,
.icon-button,
.small-icon-button,
.command-button,
.secondary-button,
.new-chat-button,
.send-button,
.code-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
}

.nav-item {
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  padding: 0 10px;
  color: #bfd0c7;
  background: transparent;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}

.nav-item svg,
.text-action svg,
.new-chat-button svg,
.command-button svg,
.send-button svg,
.secondary-button svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.nav-item:hover,
.nav-item.is-active {
  color: #ffffff;
  background: rgba(229, 242, 234, 0.12);
}

.nav-item.is-active {
  box-shadow: inset 3px 0 0 var(--yellow);
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding: 17px 10px 5px;
  border-top: 1px solid rgba(229, 242, 234, 0.14);
}

.gateway-indicator,
.connection-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #a7bdb2;
  font-size: 11px;
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 3px rgba(11, 157, 151, 0.16);
}

.status-dot.is-offline {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(207, 91, 61, 0.16);
}

.text-action {
  justify-content: flex-start;
  width: fit-content;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.sidebar .text-action {
  color: #dcebe2;
}

.text-action:hover {
  color: var(--green);
}

.sidebar .text-action:hover {
  color: var(--yellow);
}

.main-stage {
  height: 100vh;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 246, 241, 0.93);
  backdrop-filter: blur(14px);
}

.crumb {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.connection-state {
  color: var(--muted);
}

.icon-button,
.small-icon-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.small-icon-button {
  width: 29px;
  height: 29px;
}

.icon-button:hover,
.small-icon-button:hover {
  color: var(--green);
  border-color: var(--green);
  background: rgba(11, 110, 87, 0.06);
}

.icon-button svg,
.small-icon-button svg {
  width: 16px;
  height: 16px;
}

.command-button,
.secondary-button,
.new-chat-button,
.send-button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
}

.command-button {
  color: var(--ink);
  background: var(--yellow);
}

.command-button:hover {
  background: #ffd958;
}

.secondary-command {
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.08);
  border: 1px solid rgba(11, 110, 87, 0.2);
}

.secondary-command:hover {
  background: rgba(11, 110, 87, 0.15);
}

.user-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 3px 0 3px 3px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  text-align: left;
}

.user-button:hover strong {
  color: var(--green);
}

.user-button > svg {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.user-avatar,
.account-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  place-items: center;
  color: var(--green-dark);
  background: rgba(241, 202, 69, 0.4);
  border: 1px solid rgba(133, 99, 0, 0.18);
  border-radius: 50%;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
}

.user-button.is-signed-in .user-avatar {
  color: #eef9f2;
  background: var(--green);
  border-color: var(--green);
}

.user-button-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.user-button-copy strong,
.user-button-copy span {
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-button-copy strong {
  font-size: 11px;
  font-weight: 800;
}

.user-button-copy span {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.view {
  display: none;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 48px 44px 56px;
}

.view.is-active {
  display: block;
  animation: view-in 220ms ease-out;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  margin: -48px -44px -56px;
}

.conversation-rail {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 72px);
  padding: 25px 13px 18px;
  border-right: 1px solid var(--line);
  background: rgba(252, 253, 249, 0.66);
}

.new-chat-button {
  width: 100%;
  margin-bottom: 25px;
  color: #ffffff;
  background: var(--green);
}

.new-chat-button:hover,
.send-button:hover {
  background: var(--green-dark);
}

.conversation-list {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}

.conversation-item {
  display: block;
  width: 100%;
  min-height: 39px;
  padding: 0 9px;
  overflow: hidden;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-item:hover,
.conversation-item.is-active {
  color: var(--ink);
  background: rgba(11, 110, 87, 0.08);
  border-left-color: var(--green);
}

.rail-note {
  display: flex;
  gap: 7px;
  margin-top: auto;
  padding: 12px 6px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.5;
}

.rail-note svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--green);
}

.chat-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 51px clamp(24px, 5vw, 76px) 34px;
}

.chat-title-row,
.section-heading,
.split-heading {
  display: flex;
  gap: 30px;
  align-items: flex-end;
  justify-content: space-between;
}

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 730px;
  margin: 5px 0 0;
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
}

.section-heading p {
  max-width: 640px;
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.model-select-wrap {
  flex: 0 0 205px;
}

.chat-mode-tabs {
  display: flex;
  gap: 4px;
  margin: 24px 0 4px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
}

.chat-mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 11px;
  font-weight: 700;
}

.chat-mode-tab svg {
  width: 14px;
  height: 14px;
}

.chat-mode-tab:hover,
.chat-mode-tab.is-active {
  color: var(--green-dark);
}

.chat-mode-tab.is-active {
  border-bottom-color: var(--green);
}

.chat-debug-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(20, 35, 31, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
}

.chat-debug-panels .debug-request-panel,
.chat-debug-panels .debug-key-info-panel {
  min-height: 0;
  padding: 15px;
  border-left: 0;
}

.chat-debug-panels .debug-request-panel pre,
.chat-debug-panels .debug-key-info-panel pre {
  min-height: 120px;
  max-height: 220px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.secret-input-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.secret-input-wrap input {
  flex: 1;
  min-width: 0;
}

select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
textarea {
  width: 100%;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 5px;
}

select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="datetime-local"] {
  min-height: 39px;
  padding: 0 10px;
}

textarea {
  display: block;
  min-height: 75px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.route-strip {
  display: flex;
  align-items: center;
  max-width: 540px;
  margin: 34px 0 20px;
  color: var(--muted);
}

.route-node {
  display: grid;
  gap: 4px;
  min-width: 84px;
  font-size: 11px;
  font-weight: 700;
}

.route-node-active {
  color: var(--green);
}

.route-index {
  font-size: 10px;
}

.route-line {
  display: block;
  flex: 1;
  height: 1px;
  margin: 0 10px;
  background: var(--line);
}

.message-feed {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  min-height: 270px;
  padding: 12px 0 28px;
}

.empty-chat {
  display: grid;
  place-items: center start;
  min-height: 210px;
  color: var(--muted);
}

.empty-chat-inner {
  max-width: 420px;
  padding-left: 20px;
  border-left: 3px solid var(--yellow);
}

.empty-chat strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 15px;
}

.empty-chat p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.message {
  max-width: min(770px, 90%);
  animation: message-in 180ms ease-out;
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.user {
  align-self: flex-end;
}

.message-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.message.user .message-meta {
  justify-content: flex-end;
}

.message-body {
  padding: 14px 16px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.message.user .message-body {
  color: #effaf3;
  background: var(--green);
  border-color: var(--green);
}

.message.error .message-body {
  color: #8c3029;
  background: #fff2ed;
  border-color: #efc5b9;
}

.message.is-thinking .message-body {
  color: var(--muted);
}

.thinking-dots::after {
  content: "...";
  display: inline-block;
  width: 1.5em;
  overflow: hidden;
  vertical-align: bottom;
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  to { width: 0; }
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 13px;
}

.suggestions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 10px;
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.05);
  border: 1px solid rgba(11, 110, 87, 0.19);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.suggestions button:hover {
  background: rgba(11, 110, 87, 0.12);
}

.suggestions svg {
  width: 13px;
  height: 13px;
}

.composer {
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(20, 35, 31, 0.06);
}

.composer textarea {
  min-height: 92px;
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: transparent;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 10px 9px 13px;
  border-top: 1px solid var(--line);
}

.composer-settings,
.composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-control {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.compact-select-control {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.compact-select-control select {
  width: 128px;
  min-height: 27px;
  padding: 0 22px 0 7px;
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.05);
  border-color: rgba(11, 110, 87, 0.2);
  font-size: 10px;
  font-weight: 700;
}

.image-generation-settings .compact-select-control {
  flex-wrap: wrap;
}

.image-generation-settings .chat-image-custom-size {
  width: 104px;
  min-height: 27px;
  padding: 0 7px;
  font-size: 10px;
}

.video-generation-settings {
  flex-wrap: wrap;
  gap: 8px 12px;
}

.video-generation-settings .compact-select-control {
  flex-wrap: wrap;
}

.video-reference-control {
  display: inline-flex;
  flex: 1 1 190px;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.video-reference-control input {
  width: min(250px, 100%);
  min-height: 27px;
  padding: 0 7px;
  font-size: 10px;
}

.audio-generation-settings {
  padding: 0 13px 10px;
}

.audio-advanced-options {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(11, 110, 87, 0.035);
}

.audio-advanced-options summary {
  padding: 8px 10px;
  color: var(--green-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.audio-options-content {
  display: grid;
  gap: 9px;
  padding: 0 10px 10px;
}

.audio-reference-header,
.audio-reference-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.audio-reference-header > label,
.audio-config-heading {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.audio-reference-tools a,
.audio-options-help {
  color: var(--muted);
  font-size: 10px;
}

.audio-reference-tools a {
  color: var(--green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.audio-reference-tools select {
  min-height: 28px;
  max-width: 150px;
  padding: 0 22px 0 7px;
  font-size: 10px;
}

.audio-template-button {
  min-height: 28px;
  padding: 0 8px;
  font-size: 10px;
}

.audio-options-content textarea {
  width: 100%;
  min-height: 100px;
  padding: 9px;
  color: var(--ink);
  background: rgba(2, 24, 29, 0.04);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  line-height: 1.5;
  resize: vertical;
}

.audio-options-help {
  margin: 0;
  line-height: 1.5;
}

.audio-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
}

.audio-config-grid label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
}

.audio-config-grid select,
.audio-config-grid input:not([type="checkbox"]) {
  width: 100%;
  min-height: 29px;
  padding: 0 7px;
  font-size: 11px;
}

.audio-config-grid .audio-subtitle-control {
  display: flex;
  align-items: center;
  gap: 7px;
  align-self: end;
  min-height: 29px;
}

.compact-control output,
.range-with-value output {
  min-width: 24px;
  color: var(--green);
  font-family: "DM Mono", monospace;
}

input[type="range"] {
  width: 77px;
  accent-color: var(--green);
}

.switch-control {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.switch-control input {
  position: absolute;
  opacity: 0;
}

.switch-control > span:nth-of-type(1) {
  position: relative;
  display: inline-block;
  width: 27px;
  height: 15px;
  background: #c6d0c9;
  border-radius: 9px;
  transition: background 160ms ease;
}

.switch-control > span:nth-of-type(1)::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 9px;
  height: 9px;
  background: #fff;
  border-radius: 50%;
  content: "";
  transition: transform 160ms ease;
}

.switch-control input:checked + span:nth-of-type(1) {
  background: var(--green);
}

.switch-control input:checked + span:nth-of-type(1)::after {
  transform: translateX(12px);
}

.helper-text {
  color: var(--muted);
  font-size: 10px;
}

.send-button {
  color: #fff;
  background: var(--green);
}

.section-heading {
  margin-bottom: 34px;
}

.playground-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-bright);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.request-builder,
.response-panel {
  min-width: 0;
  padding: 24px;
}

.response-panel {
  display: flex;
  flex-direction: column;
  background: #162722;
}

.debug-request-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
  background: #202a31;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.debug-request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: #d5e0e5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.debug-request-badge {
  padding: 4px 6px;
  color: #b9d5c8;
  border: 1px solid rgba(185, 213, 200, 0.35);
  border-radius: 3px;
  font-size: 9px;
}

.debug-request-panel pre {
  flex: 1;
  min-height: 300px;
  margin: 0;
  overflow: auto;
  color: #c7d5da;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.field-row {
  display: grid;
  gap: 18px;
}

.two-columns {
  grid-template-columns: 1fr 1fr;
}

.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.range-with-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 10px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.range-with-value input {
  flex: 1;
}

.request-messages-heading,
.response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.playground-messages {
  display: grid;
  gap: 10px;
}

.playground-message {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 29px;
  gap: 8px;
  align-items: start;
}

.playground-message select {
  min-width: 0;
}

.playground-message textarea {
  min-height: 54px;
}

.playground-message .remove-message {
  margin-top: 13px;
}

.request-builder-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.response-header {
  margin-top: 0;
  color: #b7cabf;
}

.response-header .text-action {
  color: #d8e8de;
}

.response-panel pre,
.code-block-wrap pre {
  margin: 0;
  overflow: auto;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.response-panel pre {
  flex: 1;
  color: #d7e8df;
}

.playground-run-state,
.model-count {
  flex: 0 0 auto;
  padding: 7px 9px;
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.09);
  border: 1px solid rgba(11, 110, 87, 0.18);
  border-radius: 4px;
  font-size: 10px;
}

.model-heading-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.model-admin-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.model-admin-actions .secondary-button,
.model-admin-actions .command-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.model-grid {
  display: grid;
  gap: 18px;
}

.model-vendor-section {
  display: grid;
  gap: 10px;
}

.model-vendor-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.model-vendor-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.model-vendor-tools .text-action.reject,
.model-card-actions .text-action.reject {
  color: var(--coral);
}

.model-vendor-heading {
  color: var(--green-dark);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.model-vendor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.model-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 257px;
  padding: 22px;
  overflow: hidden;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(20, 35, 31, 0.045);
}

.model-card::after {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 120px;
  height: 120px;
  border: 18px solid var(--card-accent, var(--green));
  border-radius: 50%;
  content: "";
  opacity: 0.12;
}

.model-card:nth-child(2) { --card-accent: var(--sky); }
.model-card:nth-child(3) { --card-accent: var(--coral); }
.model-card:nth-child(4) { --card-accent: var(--yellow); }

.model-card-top,
.model-card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.provider-identity {
  display: flex;
  gap: 13px;
  align-items: center;
}

.provider-logo {
  width: 39px;
  height: 39px;
  padding: 5px;
  object-fit: contain;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.provider-logo--kimi {
  padding: 4px;
  background: #14231f;
  border-color: #14231f;
}

.provider-name {
  font-size: 17px;
  font-weight: 800;
}

.provider-vendor {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.status-badge {
  padding: 5px 7px;
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
}

.status-badge.ready {
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.12);
}

.status-badge.pending {
  color: #856300;
  background: rgba(241, 202, 69, 0.23);
}

.status-badge.suspended {
  color: #962e29;
  background: #fde8e2;
}

.model-description {
  position: relative;
  z-index: 1;
  max-width: 81%;
  margin: 28px 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.model-cost {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding: 11px 0 10px;
  border-top: 1px solid var(--line);
}

.model-cost--two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.model-cost > div {
  min-width: 0;
}

.model-cost span {
  display: block;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.model-cost strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--green-dark);
  font-family: "DM Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-pricing-note {
  position: relative;
  z-index: 1;
  min-height: 32px;
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.model-route {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
}

.model-route code {
  display: block;
  max-width: 195px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-card .text-action {
  position: relative;
  z-index: 1;
  color: var(--green);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.metric {
  min-height: 128px;
  padding: 19px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-top: 3px solid var(--metric-accent, var(--green));
  border-radius: var(--radius);
}

.metric:nth-child(2) { --metric-accent: var(--sky); }
.metric:nth-child(3) { --metric-accent: var(--coral); }
.metric:nth-child(4) { --metric-accent: var(--yellow); }

.metric-label {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.metric-value {
  display: block;
  margin-top: 14px;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.metric-detail {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.usage-table-wrap {
  overflow-x: auto;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.usage-table-wrap.with-top-scrollbar {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.table-top-scrollbar {
  overflow-x: auto;
  overflow-y: hidden;
  height: 14px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

.table-top-scrollbar-spacer {
  height: 1px;
}

.usage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.usage-table th,
.usage-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.usage-table th {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
}

.usage-table tbody tr:last-child td {
  border-bottom: 0;
}

.pricing-table {
  min-width: 1488px;
}

.pricing-table td {
  vertical-align: middle;
}

.pricing-table .text-action {
  color: var(--green);
}

.purchase-key-action {
  min-width: 88px;
}

.purchase-key-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.purchase-key-detail-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--ss-surface-1);
}

.purchase-key-detail-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.purchase-key-detail-item strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
}

.purchase-key-detail-item-total {
  grid-column: 1 / -1;
}
.purchase-key-action span {
  white-space: nowrap;
}

.pricing-note-cell {
  min-width: 240px;
  max-width: 340px;
  color: var(--muted);
  line-height: 1.5;
  white-space: normal !important;
}

.pricing-purchase-cell {
  min-width: 220px;
  color: var(--muted);
  line-height: 1.45;
  white-space: normal !important;
}

.pricing-earn-cell {
  min-width: 180px;
  color: var(--green-dark);
  font-weight: 600;
  white-space: nowrap;
}

.pricing-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin: -5px 0 16px;
  color: var(--muted);
  font-size: 11px;
}

.pricing-legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.pricing-legend svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.email-config-source {
  padding: 7px 9px;
  color: var(--muted);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0;
}

.email-admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 14px;
  align-items: start;
}

.email-config-panel,
.email-template-panel {
  min-width: 0;
  padding: 23px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(20, 35, 31, 0.045);
}

.email-panel-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
}

.email-panel-heading strong {
  display: block;
  margin-top: 9px;
  font-size: 21px;
  line-height: 1.2;
}

.email-enabled-toggle {
  margin-top: 22px;
}

.email-form-fields {
  margin-top: 15px;
}

.email-transport-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.email-transport-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.email-transport-option > span:nth-of-type(1) {
  flex-shrink: 0;
}

.email-field-caption {
  color: var(--muted);
  font-size: 11px;
  margin-right: 4px;
}

.email-test-block {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.email-test-block .email-panel-heading strong {
  font-size: 16px;
}

.email-test-row {
  align-items: end;
  margin-top: 15px;
}

.email-test-row .secondary-button {
  min-height: 39px;
}

.email-template-variable-note {
  color: var(--muted);
  font-size: 10px;
}

.email-template-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 22px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.email-template-tab {
  min-height: 36px;
  padding: 6px 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}

.email-template-tab.is-active {
  color: var(--green-dark);
  background: var(--paper-bright);
  box-shadow: 0 2px 5px rgba(20, 35, 31, 0.09);
}

.email-template-variable-box {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-top: 15px;
  padding: 10px 11px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
}

.email-template-variable-box code {
  overflow-wrap: anywhere;
  color: var(--green);
  background: transparent;
}

.email-template-fields {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.email-template-locale {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.email-locale-label {
  color: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.email-template-locale label {
  margin-top: 0;
}

.email-template-locale textarea {
  min-height: 145px;
  resize: vertical;
  line-height: 1.55;
}

.email-save-actions {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-users-table td {
  vertical-align: middle;
}

.admin-users-table .text-action {
  color: var(--green);
}

.admin-users-table .text-action:disabled {
  color: var(--muted);
}

.recharge-table {
  min-width: 920px;
}

.recharge-table td {
  vertical-align: middle;
}
.admin-recharge-form {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.25fr 1fr 1.25fr auto;
  align-items: end;
  margin: 0 0 14px;
}
.admin-recharge-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}
.admin-recharge-form .form-error {
  grid-column: 1 / -1;
  margin: 0;
}
.admin-recharge-form .send-button {
  white-space: nowrap;
}

.recharge-review-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.recharge-review-actions .text-action {
  color: var(--green);
}

.recharge-review-actions .text-action.reject {
  color: var(--coral);
}

.user-email-cell {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.role-badge {
  display: inline-block;
  padding: 4px 6px;
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.1);
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(280px, 1.05fr);
  gap: 14px;
}

.account-profile,
.account-usage-panel,
.account-credit-panel,
.account-model-panel,
.account-key-panel,
.signed-out-account {
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(20, 35, 31, 0.045);
}

.account-profile,
.account-usage-panel {
  min-height: 210px;
  padding: 23px;
}

.account-credit-panel {
  grid-column: 1 / -1;
  padding: 23px;
}

.account-model-panel {
  grid-column: 1 / -1;
  padding: 23px;
}

.account-profile-top {
  display: flex;
  gap: 13px;
  align-items: center;
}

.account-avatar {
  width: 47px;
  height: 47px;
  color: #eef9f2;
  background: var(--green);
  border-color: var(--green);
  font-size: 13px;
}

.profile-name {
  font-size: 17px;
  font-weight: 800;
}

.profile-email {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.account-profile-top .role-badge {
  margin-left: auto;
}

.account-profile-meta {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 11px;
}

.account-profile-meta span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.account-profile-meta svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.account-panel-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
}

.account-panel-heading strong {
  display: block;
  margin-top: 10px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.account-token-total {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.account-panel-heading .text-action {
  color: var(--green);
}

.account-credit-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
}

.account-credit-heading > div > strong {
  display: block;
  margin-top: 10px;
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
}

.account-credit-heading .text-action {
  color: var(--green);
}

.account-credit-total {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.account-credit-total strong {
  color: var(--ink);
  font-weight: 500;
}

.account-model-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.account-model-heading strong {
  display: block;
  margin-top: 9px;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.15;
}

.account-model-note {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.account-model-table-wrap {
  margin-top: 18px;
}

.account-model-table {
  min-width: 900px;
}

.account-model-table td {
  vertical-align: middle;
}

.account-credit-content {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 23px;
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.recharge-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  align-items: end;
}

.recharge-form label {
  min-width: 0;
  margin: 0;
}

.recharge-form .form-error {
  grid-column: 1 / -1;
  min-height: 0;
  margin: 0;
}

.recharge-form .send-button {
  grid-column: 1 / -1;
  min-height: 39px;
  justify-self: start;
  white-space: nowrap;
}

.account-recharge-history {
  min-width: 0;
  padding-left: 23px;
  border-left: 1px solid var(--line);
}

.admin-user-recharge-history {
  padding-left: 0;
  border-left: 0;
}

.account-recharge-history-heading {
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.account-recharge-rows {
  margin-top: 10px;
}

.account-recharge-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  border-top: 1px solid var(--line);
}

.account-recharge-row:first-child {
  border-top: 0;
}

.account-recharge-copy,
.account-recharge-state {
  min-width: 0;
}

.account-recharge-copy strong,
.account-recharge-copy span,
.account-recharge-state span:last-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-recharge-copy strong {
  color: var(--green-dark);
  font-size: 13px;
}

.account-recharge-copy span,
.account-recharge-state span:last-child,
.recharge-history-empty {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.account-recharge-state {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 4px;
}

.recharge-history-empty {
  margin-bottom: 0;
}

.account-usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.account-usage-grid div {
  min-width: 0;
  padding: 10px;
  background: var(--paper);
}

.account-usage-grid span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-usage-grid strong {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-key-panel {
  display: flex;
  grid-column: 1 / -1;
  gap: 26px;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 176px;
  padding: 23px;
  color: #effaf3;
  background: #14231f;
  border-color: #14231f;
}

.account-key-panel .eyebrow {
  color: #6dd5bd;
}

.account-key-panel h2 {
  max-width: 500px;
  margin: 7px 0 7px;
  font-size: 19px;
  font-weight: 800;
}

.account-key-panel p {
  max-width: 630px;
  margin: 0;
  color: #b7cabf;
  font-size: 12px;
  line-height: 1.65;
}

.account-key-panel .send-button {
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--yellow);
}

.account-key-panel .send-button:hover {
  background: #ffd958;
}

.account-security-panel,
.account-smtp-panel {
  grid-column: 1 / -1;
  padding: 23px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(20, 35, 31, 0.045);
}

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.security-subheading {
  margin-bottom: 10px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.security-session-list,
.security-event-list {
  display: grid;
  gap: 7px;
  min-height: 54px;
  margin-bottom: 13px;
}

.security-session,
.security-event {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.security-session strong,
.security-event strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-session span,
.security-event span,
.security-event time {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-session em,
.security-event time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.security-session em.is-current {
  color: var(--green);
  font-weight: 800;
}

.security-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.change-password-form,
.smtp-test-form {
  margin-top: 23px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.change-password-form .secondary-button,
.smtp-test-form .secondary-button {
  margin-top: 13px;
}

.smtp-state {
  margin-top: 8px;
  color: var(--muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
}

.smtp-state.is-ready { color: var(--green); }
.smtp-state.is-disabled { color: var(--yellow); }

.signed-out-account {
  display: flex;
  gap: 25px;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 202px;
  padding: 25px;
}

.account-callout {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  max-width: 610px;
}

.account-callout > svg {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--green);
}

.account-callout strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}

.account-callout p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.account-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.usage-empty td {
  padding: 35px 16px;
  color: var(--muted);
  text-align: center;
}

.status-code {
  display: inline-block;
  padding: 3px 5px;
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.1);
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.status-code.error {
  color: #962e29;
  background: #fde8e2;
}

.api-overview {
  display: grid;
  gap: 1px;
  margin-bottom: 22px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.endpoint-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 55px;
  padding: 10px 14px;
  background: var(--paper-bright);
}

.endpoint-line span {
  width: 100px;
  color: var(--muted);
  font-size: 10px;
}

.endpoint-line code {
  overflow-wrap: anywhere;
}

.endpoint-line .small-icon-button {
  margin-left: auto;
}

.code-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 8px;
}

.code-tab {
  min-height: 30px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.code-tab:hover,
.code-tab.is-active {
  color: var(--ink);
  background: rgba(11, 110, 87, 0.1);
}

.code-block-wrap {
  position: relative;
  min-height: 280px;
  padding: 22px;
  overflow: hidden;
  background: #162722;
  border-radius: var(--radius);
}

.code-block-wrap pre {
  color: #d7e8df;
}

.code-block-wrap .code-copy {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  color: #d8e8de;
  border-color: rgba(216, 232, 222, 0.3);
}

.environment-grid,
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 27px;
}

.environment-note,
.doc-section {
  min-height: 170px;
  padding: 20px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.environment-note > svg {
  width: 20px;
  height: 20px;
  color: var(--green);
}

.environment-note h2,
.doc-section h2 {
  margin: 13px 0 6px;
  font-size: 14px;
  font-weight: 800;
}

.environment-note p,
.doc-section p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.docs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}

.doc-section {
  min-height: 185px;
}

.doc-number {
  display: inline-block;
  color: var(--green);
  font-size: 11px;
}

.connection-dialog {
  width: min(470px, calc(100vw - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(20, 35, 31, 0.28);
}

.auth-dialog,
.api-key-dialog,
.admin-user-dialog,
.pricing-dialog,
.purchase-keys-dialog {
  width: min(470px, calc(100vw - 32px));
  padding: 0;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(20, 35, 31, 0.28);
}

.pricing-dialog {
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
}

.connection-dialog::backdrop,
.auth-dialog::backdrop,
.api-key-dialog::backdrop,
.admin-user-dialog::backdrop,
.pricing-dialog::backdrop,
.purchase-keys-dialog::backdrop {
  background: rgba(20, 35, 31, 0.46);
  backdrop-filter: blur(4px);
}

.connection-form {
  padding: 23px;
}

.dialog-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.dialog-header h2 {
  margin: 4px 0 0;
  font-size: 23px;
}

.connection-form > p {
  margin: 16px 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.connection-form > label {
  margin-top: 14px;
}

.connection-form > .model-capabilities-fieldset {
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.model-capabilities-fieldset legend {
  margin-bottom: 7px;
  padding: 0;
}

.model-capability-dropdown {
  position: relative;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
}

.model-capability-dropdown summary {
  position: relative;
  min-height: 39px;
  padding: 11px 36px 10px 10px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-capability-dropdown summary::-webkit-details-marker {
  display: none;
}

.model-capability-dropdown summary::after {
  position: absolute;
  top: 50%;
  right: 13px;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: translateY(-70%) rotate(45deg);
}

.model-capability-dropdown[open] summary::after {
  transform: translateY(-20%) rotate(225deg);
}

.model-capability-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 220px;
  padding: 5px;
  overflow-y: auto;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(20, 35, 31, 0.16);
}

.model-capability-option {
  display: flex;
  min-height: 34px;
  gap: 9px;
  align-items: center;
  padding: 6px 8px;
  color: var(--ink);
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

.model-capability-option:hover {
  background: rgba(11, 110, 87, 0.06);
}

.model-capability-option input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}

.model-capabilities-fieldset:disabled .model-capability-dropdown summary {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.75;
}

.pricing-rate-fields {
  margin-top: 14px;
}

.pricing-rate-fields label {
  margin-top: 0;
}

.pricing-media-section {
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.pricing-media-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink);
  font-size: 12px;
}

.pricing-media-heading span {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.pricing-media-fields {
  margin-top: 10px;
}

.pricing-media-fields label {
  margin-top: 0;
}

.pricing-media-summary {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.pricing-approximate {
  width: fit-content;
  margin-top: 17px !important;
}

.purchase-keys-dialog {
  width: min(1220px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow: auto;
}

.purchase-keys-panel {
  padding: 23px;
}

.purchase-keys-intro {
  max-width: 700px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.purchase-key-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 14px;
}

.purchase-key-summary {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.purchase-key-list-wrap {
  max-height: 360px;
}

.purchase-keys-table {
  min-width: 1050px;
}

.purchase-keys-table td {
  vertical-align: middle;
}

.purchase-rate-cell {
  min-width: 130px;
}

.purchase-rate {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.purchase-rate:first-child {
  color: var(--ink);
  font-weight: 700;
}

.purchase-validity-cell {
  min-width: 250px;
}

.purchase-schedule-summary {
  display: block;
  max-width: 300px;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.purchase-key-secret-state {
  display: inline-block;
  padding: 4px 6px;
  color: var(--green-dark);
  background: rgba(11, 110, 87, 0.1);
  border-radius: 3px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
}

.purchase-key-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.purchase-key-actions .text-action {
  color: var(--green);
}

.purchase-key-actions .text-action.reject {
  color: var(--coral);
}

.purchase-key-form {
  margin-top: 17px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.purchase-key-form > label {
  margin-top: 14px;
}

.purchase-key-form-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.purchase-key-form-header h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.field-hint {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.purchase-key-rate-fields,
.purchase-key-window-fields,
.purchase-key-details-fields {
  margin-top: 14px;
}

.purchase-key-media-section {
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.purchase-key-media-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--ink);
  font-size: 12px;
}

.purchase-key-media-heading span {
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}

.purchase-key-media-fields {
  margin-top: 10px;
}

.purchase-key-media-fields label {
  margin-top: 0;
}

.purchase-key-rate-fields label,
.purchase-key-window-fields label,
.purchase-key-details-fields label {
  margin-top: 0;
}

.purchase-key-schedule-switch {
  width: fit-content;
  margin-top: 17px !important;
}

.purchase-key-schedule-fields {
  display: grid;
  gap: 16px;
  margin-top: 15px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.purchase-key-schedule-fields > label {
  max-width: 380px;
}

.purchase-day-schedule {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.purchase-day-schedule.is-disabled {
  opacity: 0.55;
}

.purchase-day-schedule-heading {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
}

.purchase-day-schedule-heading > div {
  display: grid;
  gap: 3px;
}

.purchase-day-schedule-heading strong {
  color: var(--ink);
  font-size: 12px;
}

.purchase-day-schedule-heading > div span {
  color: var(--muted);
  font-size: 10px;
}

.purchase-day-schedule-heading label {
  width: min(235px, 52%);
}

.purchase-time-range-list {
  display: grid;
  gap: 9px;
  max-width: 560px;
  margin-top: 13px;
}

.purchase-time-range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 29px;
  gap: 8px;
  align-items: end;
}

.purchase-time-range-row label {
  margin: 0 !important;
}

.purchase-time-range-separator {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.purchase-time-range-row .small-icon-button {
  margin-bottom: 5px;
  color: var(--coral);
}

.purchase-add-time-range {
  margin-top: 11px;
  color: var(--green);
}

.purchase-add-time-range:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

.auth-form {
  padding: 23px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 18px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.auth-tab {
  min-height: 33px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
}

.auth-tab.is-active {
  color: var(--green-dark);
  background: var(--paper-bright);
  box-shadow: 0 2px 5px rgba(20, 35, 31, 0.09);
}

.auth-form > label {
  margin-top: 14px;
}

.form-error {
  min-height: 18px;
  margin: 14px 0 0;
  color: #962e29;
  font-size: 11px;
  line-height: 1.5;
}

.auth-submit {
  width: 100%;
  margin-top: 18px;
}

.auth-forgot-link,
.auth-back-link,
.auth-reset-request-link {
  margin-top: 11px;
  color: var(--green);
  font-size: 11px;
}

.auth-flow-copy,
.auth-flow-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.auth-flow-copy {
  margin: 16px 0 18px;
}

.auth-flow-note {
  margin: 12px 0 0;
  padding: 10px 11px;
  color: var(--ink);
  background: rgba(110, 255, 240, 0.08);
  border: 1px solid rgba(110, 255, 240, 0.2);
  border-radius: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 10px 22px rgba(2, 24, 29, 0.14);
  backdrop-filter: blur(4px);
}

.auth-flow-note.is-warning {
  position: relative;
  padding: 12px 14px 12px 38px;
  color: #5b4308;
  background: linear-gradient(180deg, #fff8e8 0%, #fff1d0 100%);
  border: 1px solid #f3c76a;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(245, 184, 63, 0.12);
}

.auth-flow-note.is-warning::before {
  content: "!";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f6c765;
  color: #5b4308;
  font-size: 12px;
  font-weight: 800;
}

.auth-flow-note.is-success {
  color: var(--ss-text-primary);
  background: var(--ss-success-bg);
  border-color: rgba(110, 255, 240, 0.26);
}

.auth-email-help {
  margin-top: 13px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.auth-email-help strong {
  color: var(--ink);
  font-size: 11px;
}

.auth-email-help ul {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding-left: 16px;
}

.password-strength {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.password-strength > span {
  display: block;
  width: 52px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
}

.password-strength[data-strength="weak"] > span { background: var(--coral); }
.password-strength[data-strength="medium"] > span { background: var(--yellow); }
.password-strength[data-strength="strong"] > span { background: var(--green); }

.password-strength[data-strength="medium"] > span { box-shadow: 18px 0 0 var(--yellow); }
.password-strength[data-strength="strong"] > span { box-shadow: 18px 0 0 var(--green), 36px 0 0 var(--green); }

.signup-command {
  color: var(--green-dark);
  border-color: rgba(11, 110, 87, 0.28);
}

.register-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 0.75fr);
  gap: clamp(38px, 8vw, 120px);
  align-items: center;
  min-height: min(690px, calc(100vh - 170px));
  max-width: 1080px;
  margin: 0 auto;
}

.register-intro {
  max-width: 490px;
}

.register-intro h1 {
  max-width: 460px;
  margin: 12px 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.register-intro > p {
  max-width: 410px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.register-benefits {
  display: grid;
  gap: 17px;
  margin-top: 42px;
}

.register-benefits div {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.register-benefits svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: var(--green);
}

.register-card {
  padding: 28px;
  background: var(--paper-bright);
  border: 1px solid var(--line);
  box-shadow: 0 24px 54px rgba(20, 35, 31, 0.12);
}

.register-card-heading {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  justify-content: space-between;
}

.register-card-heading h2 {
  margin: 5px 0 0;
  font-size: 26px;
}

.register-method-tabs {
  margin-top: 24px;
}

.verification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.verification-row .secondary-button {
  min-height: 39px;
  white-space: nowrap;
}

.agreement-field {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.agreement-field input {
  width: auto;
  margin-top: 2px;
}

.agreement-field a {
  color: var(--green-dark);
}

.register-method-placeholder {
  padding: 34px 10px 26px;
  text-align: center;
}

.register-method-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 17px;
  place-items: center;
  color: var(--green);
  background: rgba(11, 110, 87, 0.1);
  border-radius: 50%;
}

.register-method-icon svg {
  width: 20px;
  height: 20px;
}

.register-method-placeholder h3 {
  margin: 0;
  font-size: 17px;
}

.register-method-placeholder p {
  margin: 10px auto 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.social-login-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.social-login-row .secondary-button {
  justify-content: center;
  min-height: 38px;
}

.social-mark {
  color: #4285f4;
  font-size: 15px;
  font-weight: 800;
}

.register-legal {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.issued-key {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  padding: 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.issued-key code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  color: var(--green-dark);
  background: transparent;
  border-radius: 0;
  font-size: 10px;
  white-space: nowrap;
}

.key-notice {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 10px;
}

.key-notice svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 24px;
}

.secondary-button {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
}

.secondary-button:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 11px 14px;
  color: #f7fbf6;
  background: #14231f;
  border-radius: 5px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Public Hero */
.public-site {
  --site-header-height: 95px;
  --hero-bg: var(--ss-bg-primary);
  --hero-surface: var(--ss-surface-1);
  --hero-line: var(--ss-border);
  --hero-text: var(--ss-text-primary);
  --hero-muted: var(--ss-text-secondary);
  --hero-blue: var(--ss-accent);
  --hero-purple: var(--ss-accent-purple);
  --hero-amber: var(--ss-accent-blue);
  --activity-emerald-gradient: linear-gradient(135deg, #4da982 0%, #398f6d 52%, #2c7359 100%);
  --activity-emerald-gradient-soft: linear-gradient(135deg, rgba(63, 168, 131, 0.28), rgba(40, 118, 92, 0.34));
  --activity-emerald-border: rgba(143, 232, 193, 0.78);
  --activity-emerald-glow: 0 0 24px rgba(58, 169, 128, 0.28), 0 8px 22px rgba(3, 47, 36, 0.3), inset 0 0 16px rgba(187, 255, 222, 0.12);
  --activity-emerald-text: #effff7;
  min-height: 100vh;
  overflow: clip;
  color: var(--hero-text);
  background: var(--hero-bg);
}

.app-shell[hidden] {
  display: none;
}

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  width: 100%;
  height: var(--site-header-height);
  margin-bottom: calc(-1 * var(--site-header-height));
  background: rgba(3, 45, 41, 0.88);
  border-bottom: 1px solid rgba(101, 233, 203, 0.14);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.site-header.is-scrolled {
  background: rgba(3, 45, 41, 0.96);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.site-header-inner {
  display: flex;
  width: min(100%, 1360px);
  height: 100%;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 80px);
}

.site-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--hero-text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.site-brand b {
  color: var(--hero-blue);
  font-weight: 700;
}

.site-brand-mark {
  display: inline-flex;
  height: 24px;
  align-items: flex-end;
  gap: 3px;
}

.site-brand-mark i {
  display: block;
  width: 4px;
  background: linear-gradient(180deg, var(--hero-blue), var(--hero-purple));
  border-radius: 4px;
}

.site-brand-mark i:nth-child(1) { height: 11px; }
.site-brand-mark i:nth-child(2) { height: 21px; }
.site-brand-mark i:nth-child(3) { height: 15px; }

.site-language-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hero-muted);
  font-size: 12px;
}

.site-language-picker svg {
  width: 15px;
  height: 15px;
}

.site-language-picker select {
  padding: 7px 24px 7px 8px;
  color: var(--hero-text);
  background: rgba(7, 61, 53, 0.8);
  border: 1px solid var(--hero-line);
  border-radius: 6px;
  font-size: 12px;
}

.site-auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.site-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 7px 10px;
  color: #e9fff8;
  background: rgba(7, 61, 53, 0.68);
  border: 1px solid var(--hero-line);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.site-auth-link:hover {
  color: #ffffff;
  border-color: rgba(101, 233, 203, 0.62);
}

.site-auth-link.is-primary {
  color: #1f1500;
  background: linear-gradient(120deg, rgba(255, 183, 94, 0.92), rgba(255, 142, 48, 0.9));
  border-color: rgba(255, 194, 126, 0.88);
}

.hero-section {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 132px clamp(40px, 3vw, 60px) 84px;
  background:
    radial-gradient(circle at 76% 46%, rgba(42, 208, 172, 0.2), transparent 25%),
    radial-gradient(circle at 58% 80%, rgba(255, 160, 74, 0.16), transparent 28%),
    linear-gradient(135deg, #03322d 0%, #07493f 52%, #0d6b57 100%);
}

.hero-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.2;
  background-image: linear-gradient(rgba(120, 235, 208, 0.11) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 235, 208, 0.11) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.hero-copy {
  max-width: 620px;
}

.hero-eyebrow {
  margin: 0 0 22px;
  color: var(--hero-blue);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 0;
  color: var(--hero-text);
  font-size: clamp(48px, 5.4vw, 72px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero-subtitle {
  max-width: 600px;
  margin: 28px 0 0;
  color: #d9def4;
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.35;
}

.hero-description {
  max-width: 620px;
  margin: 19px 0 0;
  color: var(--hero-muted);
  font-size: 15px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.hero-button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  gap: 10px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
}

.hero-button svg {
  width: 16px;
  height: 16px;
}

.hero-button-primary {
  color: #043126;
  background: linear-gradient(120deg, #39e0b7 0%, #19c696 100%);
  box-shadow: 0 0 28px rgba(38, 215, 173, 0.34);
}

.hero-button-primary:hover {
  background: linear-gradient(120deg, #4be7c1 0%, #23d6a5 100%);
}

.hero-button-secondary {
  color: var(--hero-text);
  background: rgba(8, 67, 57, 0.56);
  border-color: var(--hero-line);
}

.hero-button-secondary:hover {
  background: rgba(12, 92, 76, 0.72);
  border-color: rgba(127, 238, 212, 0.55);
}

.hero-visual {
  display: grid;
  width: 100%;
  gap: 20px;
  min-width: 0;
}

.hero-code-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--hero-surface);
  border: 1px solid var(--hero-line);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.hero-code-heading {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  color: #95a5d7;
  border-bottom: 1px solid var(--hero-line);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hero-code-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6fe0be;
  box-shadow: 0 0 12px rgba(111, 224, 190, 0.8);
}

.hero-code-copy {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-left: auto;
  place-items: center;
  color: #95a5d7;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
}

.hero-code-copy:hover {
  color: var(--hero-text);
  border-color: var(--hero-line);
}

.hero-code-copy svg {
  width: 14px;
  height: 14px;
}

.hero-code-card pre {
  min-width: 0;
  margin: 0;
  padding: 23px 22px 25px;
  overflow-x: auto;
  color: #d7e3ff;
  font-family: "DM Mono", monospace;
  font-size: clamp(10px, 1.1vw, 12px);
  line-height: 1.75;
  white-space: pre;
}

.hero-code-card code {
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
}

.router-visual {
  position: relative;
  width: 100%;
  min-height: 320px;
  overflow: hidden;
  margin: 0;
  background: rgba(4, 37, 34, 0.72);
  border: 1px solid rgba(119, 222, 198, 0.2);
  border-radius: 10px;
  isolation: isolate;
}

.router-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.48;
  background-image: linear-gradient(rgba(119, 222, 198, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(119, 222, 198, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
}

.router-input {
  position: absolute;
  z-index: 2;
  top: 5%;
  left: 50%;
  display: flex;
  min-height: 31px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  color: #d9f6eb;
  background: rgba(7, 61, 53, 0.94);
  border: 1px solid rgba(119, 222, 198, 0.25);
  border-radius: 6px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.04em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.router-input-dot,
.router-provider-status i,
.router-core-status i {
  font: inherit;
  font-weight: 600;
}

.router-connections {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.router-incoming-path,
.router-provider-path,
.router-mobile-incoming-path,
.router-mobile-outgoing-path {
  fill: none;
  stroke: rgba(95, 199, 175, 0.34);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.router-incoming-path {
  stroke-dasharray: 4 7;
}

.router-provider-path {
  stroke: rgba(95, 199, 175, 0.26);
  transition: stroke 240ms ease, filter 240ms ease, stroke-width 240ms ease;
}

.router-mobile-incoming-path,
.router-mobile-outgoing-path { display: none; }

.router-provider-path.is-active {
  stroke: #69e3c2;
  stroke-width: 2.5;
  stroke-dasharray: 6 5;
  filter: drop-shadow(0 0 4px rgba(105, 227, 194, 0.72));
  animation: router-flow 800ms linear infinite;
}

.router-core {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  width: 190px;
  min-height: 116px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 10px;
  color: var(--hero-text);
  background: linear-gradient(145deg, rgba(12, 91, 76, 0.98), rgba(5, 50, 47, 0.98));
  border: 1px solid rgba(108, 230, 197, 0.52);
  border-radius: 13px;
  box-shadow: 0 0 28px rgba(44, 210, 169, 0.14), inset 0 0 24px rgba(255, 255, 255, 0.035);
  transform: translate(-50%, -50%);
  transition: box-shadow 240ms ease, border-color 240ms ease;
}

.router-core[data-phase="policy"],
.router-core[data-phase="selected"] {
  border-color: rgba(122, 177, 255, 0.78);
  box-shadow: 0 0 34px rgba(51, 152, 239, 0.25), inset 0 0 24px rgba(255, 255, 255, 0.06);
}

.router-core-brand {
  color: #9ee8d2;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.19em;
}

.router-core > strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.router-core-status {
  display: inline-flex;
  min-height: 21px;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: #c7ebdf;
  font-size: 10px;
  line-height: 1.35;
}

.router-core-status i {
  width: 6px;
  height: 6px;
}

.router-core[data-phase="request"] .router-core-status i,
.router-core[data-phase="policy"] .router-core-status i {
  background: #77b5ff;
  box-shadow: 0 0 9px rgba(119, 181, 255, 0.72);
}

.router-policy {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  display: flex;
  width: max-content;
  max-width: 220px;
  justify-content: center;
  gap: 4px 9px;
  color: #d9e7ff;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  opacity: 0;
  transform: translate(-50%, -3px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.router-core[data-phase="policy"] .router-policy {
  opacity: 1;
  transform: translate(-50%, 0);
}

.router-providers {
  position: absolute;
  z-index: 1;
  inset: 0;
}

.router-provider {
  position: absolute;
  display: flex;
  width: min(142px, 27%);
  min-height: 51px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px 10px;
  color: #f3fff9;
  text-align: left;
  background: rgba(8, 54, 49, 0.94);
  border: 1px solid rgba(119, 222, 198, 0.25);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  transition: transform 220ms ease, border-color 220ms ease, background-color 220ms ease, box-shadow 220ms ease;
}

.router-provider:disabled {
  cursor: default;
  opacity: 0.74;
}

.router-provider[aria-disabled="true"] { cursor: default; opacity: 0.74; }

.router-provider--1 { top: 20%; left: 2%; }
.router-provider--2 { top: 20%; right: 2%; }
.router-provider--3 { top: 50%; left: 2%; transform: translateY(-50%); }
.router-provider--4 { top: 50%; right: 2%; transform: translateY(-50%); }
.router-provider--5 { bottom: 5%; left: 2%; }
.router-provider--6 { right: 2%; bottom: 5%; }

.router-provider-name {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.router-provider-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a9d9ca;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  line-height: 1.3;
}

.router-provider-status i {
  width: 6px;
  height: 6px;
}

.router-provider.is-unconfigured .router-provider-status i {
  background: #e0b87b;
  box-shadow: none;
}

.router-provider.is-selected {
  z-index: 3;
  background: rgba(14, 78, 67, 0.98);
  border-color: rgba(111, 229, 193, 0.82);
  box-shadow: 0 0 22px rgba(60, 219, 174, 0.22);
}

.router-provider--3.is-selected,
.router-provider--4.is-selected {
  transform: translateY(-50%) scale(1.025);
}

.router-provider-more {
  position: absolute;
  z-index: 3;
  right: 50%;
  bottom: 5%;
  padding: 5px 9px;
  color: #c8e8dc;
  background: rgba(7, 61, 53, 0.96);
  border: 1px solid rgba(119, 222, 198, 0.22);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  transform: translateX(50%);
  white-space: nowrap;
}

.router-more-tablet,
.router-more-desktop { display: none; }

@media (min-width: 1024px) {
  .router-provider-more[data-desktop-more="0"] { display: none; }
  .router-more-desktop { display: inline; }
}

.router-visual[data-phase="request"] .router-incoming-path {
  stroke: #a8e9d6;
  animation: router-flow 720ms linear infinite;
}

.router-visual[data-phase="request"] .router-input-dot {
  background: #8fc0ff;
  box-shadow: 0 0 10px rgba(143, 192, 255, 0.9);
}

.router-visual[data-phase="selected"] .router-core,
.router-visual[data-phase="response"] .router-core {
  border-color: rgba(111, 229, 193, 0.88);
  box-shadow: 0 0 36px rgba(60, 219, 174, 0.25), inset 0 0 24px rgba(255, 255, 255, 0.06);
}

.router-visual[data-phase="response"] .router-core-status i {
  background: #8ee7c9;
  box-shadow: 0 0 10px rgba(142, 231, 201, 0.84);
}

@keyframes router-flow {
  to { stroke-dashoffset: -22; }
}

/* Screen 02: Problem */
.problem-section {
  position: relative;
  width: 100%;
  padding: 112px clamp(40px, 3vw, 60px) 128px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 18% 8%, rgba(45, 214, 176, 0.15), transparent 25%),
    radial-gradient(circle at 86% 78%, rgba(255, 155, 67, 0.13), transparent 30%),
    linear-gradient(180deg, #0a4a41 0%, #03332f 100%);
  box-sizing: border-box;
}

.problem-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image: linear-gradient(rgba(120, 235, 208, 0.11) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 235, 208, 0.11) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, transparent 95%);
}

.problem-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  box-sizing: border-box;
}

.problem-heading {
  max-width: 720px;
  margin-bottom: 52px;
}

.problem-eyebrow {
  margin: 0 0 18px;
  color: var(--hero-blue);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.problem-heading h2 {
  max-width: 720px;
  margin: 0;
  color: var(--hero-text);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.08;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.problem-card {
  display: flex;
  min-width: 0;
  min-height: 390px;
  flex-direction: column;
  padding: 24px;
  background: rgba(8, 69, 60, 0.68);
  border: 1px solid var(--hero-line);
  border-radius: 10px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.problem-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.problem-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--hero-blue);
  background: rgba(98, 165, 255, 0.1);
  border: 1px solid rgba(98, 165, 255, 0.25);
  border-radius: 8px;
}

.problem-icon svg {
  width: 20px;
  height: 20px;
}

.problem-index {
  color: #7180b3;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.problem-card h3 {
  min-height: 58px;
  margin: 0;
  color: var(--hero-text);
  font-size: 19px;
  line-height: 1.25;
}

.problem-card p {
  margin: 15px 0 0;
  color: var(--hero-muted);
  font-size: 13px;
  line-height: 1.7;
}

.problem-card code {
  color: #c9d7ff;
  background: rgba(98, 165, 255, 0.12);
}

.problem-card-callout {
  display: block;
  margin-top: auto;
  padding-top: 22px;
  color: #d9e4ff;
  font-size: 12px;
  line-height: 1.5;
}

.provider-pills {
  display: flex;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.provider-pills span {
  padding: 5px 7px;
  color: #b7c7f0;
  background: rgba(98, 165, 255, 0.08);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.failover-flow {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 21px;
  flex-wrap: wrap;
  color: #b9c6ec;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.failover-flow svg {
  width: 12px;
  height: 12px;
  color: var(--hero-blue);
}

.failover-error {
  color: #f19aaf;
}

.failover-success {
  color: #8ee4c7;
}

.failover-success b {
  margin-left: 3px;
  color: #b9c6ec;
  font-weight: 400;
}

.cost-compare {
  display: grid;
  gap: 5px;
  margin-top: 20px;
  padding: 11px;
  color: #91a0ce;
  background: rgba(7, 11, 27, 0.45);
  border: 1px solid rgba(142, 164, 255, 0.13);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.cost-compare > span {
  margin-bottom: 3px;
  color: #d2dcfa;
}

.cost-compare div {
  display: flex;
  justify-content: space-between;
}

.cost-compare b {
  color: #b7c7f0;
  font-weight: 400;
}

.cost-compare em {
  color: #8ee4c7;
  font-style: normal;
}

.integration-code {
  display: grid;
  gap: 3px;
  margin-top: 24px;
  padding: 13px;
  color: #a9bce9;
  background: rgba(7, 11, 27, 0.45);
  border-left: 2px solid var(--hero-purple);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.6;
}

.integration-code b {
  color: #8fc1ff;
  font-weight: 500;
}

.integration-code i {
  color: #8ee4c7;
  font-style: normal;
}

@media (max-width: 1023px) {
  .problem-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .problem-section { padding: 78px 18px 88px; }
  .problem-heading { margin-bottom: 36px; }
  .problem-heading h2 { font-size: clamp(32px, 9vw, 44px); }
  .problem-grid { grid-template-columns: 1fr; }
  .problem-card { min-height: 0; }
}

@media (max-width: 375px) {
  .problem-section { padding-right: 15px; padding-left: 15px; }
}

/* Screen 03: Unified AI Gateway */
.gateway-section {
  position: relative;
  width: 100%;
  padding: 112px clamp(40px, 3vw, 60px) 128px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 205, 104, 0.2), transparent 23%),
    radial-gradient(circle at 88% 72%, rgba(255, 112, 98, 0.16), transparent 28%),
    linear-gradient(135deg, #087b7a 0%, #079c88 46%, #086b83 100%);
  box-sizing: border-box;
}

.gateway-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  box-sizing: border-box;
}

.gateway-heading {
  max-width: 720px;
  margin-bottom: 56px;
}

.gateway-eyebrow {
  margin: 0 0 18px;
  color: #ffe08a;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.gateway-heading h2 {
  margin: 0;
  color: #fff9e8;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 6px 24px rgba(0, 50, 58, 0.28);
}

.gateway-canvas {
  position: relative;
  isolation: isolate;
  min-height: 0;
  aspect-ratio: 2560 / 1429;
  overflow: hidden;
  background-color: #031d20;
  border: 1px solid rgba(255, 226, 145, 0.56);
  border-radius: 16px;
  box-shadow: 0 26px 84px rgba(0, 47, 54, 0.42), 0 0 0 1px rgba(255, 133, 103, 0.18), 0 0 36px rgba(255, 211, 112, 0.1);
}

.gateway-visual-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  mix-blend-mode: normal;
}

.gateway-flow-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gateway-flow-link {
  fill: none;
  stroke: rgba(170, 255, 224, 0.94);
  stroke-width: 2.2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(74, 255, 207, 0.82)) drop-shadow(0 0 10px rgba(255, 170, 92, 0.2));
}

.gateway-flow-link.is-active {
  stroke-dasharray: 2 11;
  stroke-linecap: round;
  animation: gateway-data-flow 900ms linear infinite;
}

.gateway-architecture {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  min-height: 0;
  padding: 0;
}

.gateway-stage {
  position: absolute;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
}

.gateway-access-stage {
  top: 20%;
  left: 0.5%;
  width: 13%;
  height: 60%;
}
.gateway-network-stage { top: 25%; left: 18%; width: 20%; height: 52%; }
.gateway-china-stage { top: 12%; left: 54%; width: 24%; height: 76%; }
.gateway-model-stage { top: 18%; right: 1.5%; width: 19%; height: 66%; }

.gateway-access-stage .gateway-stage-label {
  position: absolute;
  top: -8%;
  left: 0;
  width: 100%;
}

.gateway-stage-label {
  display: inline-block;
  margin: 0 0 8px;
  padding: 5px 9px;
  color: #fff1bd;
  background: rgba(3, 65, 74, 0.29);
  border: 1px solid rgba(255, 223, 143, 0.42);
  border-radius: 6px;
  box-shadow: 0 5px 14px rgba(0, 36, 43, 0.2), inset 0 0 12px rgba(255, 211, 112, 0.08);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-shadow: 0 1px 8px rgba(0, 36, 43, 0.95);
}

.gateway-access-nodes,
.gateway-network-nodes,
.gateway-model-list {
  display: grid;
  gap: 5px;
}

.gateway-section .gateway-access-node,
.gateway-section .gateway-gateway-node,
.gateway-section .gateway-enterprise-node,
.gateway-section .gateway-model-node,
.gateway-section .gateway-router-instance {
  display: flex;
  min-width: 0;
  min-height: 29px;
  align-items: center;
  justify-content: center;
  padding: 5px 5px;
  color: #fffdf5;
  background: linear-gradient(145deg, rgba(2, 91, 98, 0.58), rgba(2, 43, 59, 0.62));
  border: 1px solid rgba(154, 255, 225, 0.58);
  border-radius: 7px;
  box-shadow: 0 5px 15px rgba(0, 34, 42, 0.34), inset 0 0 16px rgba(115, 255, 220, 0.12);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
  backdrop-filter: blur(3px);
  text-shadow: 0 1px 2px rgba(0, 24, 31, 0.98), 0 0 7px rgba(124, 255, 222, 0.62), 0 0 13px rgba(255, 207, 125, 0.3);
}

.gateway-access-nodes {
  position: absolute;
  inset: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: 0;
  align-items: center;
}

.gateway-access-node {
  flex-direction: column;
  gap: 2px;
  align-self: center;
  min-height: clamp(34px, 2.6vw, 44px);
  padding: clamp(3px, 0.35vw, 6px) clamp(3px, 0.4vw, 6px);
}

.gateway-model-node {
  flex-direction: column;
  gap: 2px;
  min-height: clamp(34px, 2.6vw, 44px);
}

.gateway-node-name,
.gateway-node-traffic {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.gateway-node-name {
  color: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 24, 31, 0.98), 0 0 7px rgba(124, 255, 222, 0.74), 0 0 13px rgba(255, 207, 125, 0.34);
}

.gateway-node-traffic {
  color: #ffe5a7;
  font-size: clamp(6px, 0.65vw, 9px);
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(255, 174, 93, 0.72);
}

.gateway-network-nodes {
  position: absolute;
  inset: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: center;
}

.gateway-gateway-node {
  width: 62%;
  justify-self: center;
}

.gateway-enterprise-node {
  grid-column: 1;
  width: 86%;
  justify-self: center;
}

.gateway-model-list {
  position: absolute;
  inset: 7% 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 0;
  align-items: center;
}

.gateway-model-node {
  width: 82%;
  justify-self: center;
}

.gateway-section .gateway-gateway-node.is-active,
.gateway-section .gateway-enterprise-node.is-active,
.gateway-section .gateway-router-instance.is-active,
.gateway-section .gateway-model-node.is-active {
  color: #5d2830;
  background: linear-gradient(135deg, rgba(255, 128, 104, 0.94), rgba(255, 199, 101, 0.95));
  border: 2px solid #ffca70;
  box-shadow: 0 0 0 1px rgba(255, 113, 86, 0.9), 0 0 24px rgba(255, 177, 78, 0.88), 0 5px 16px rgba(107, 42, 36, 0.3), inset 0 0 14px rgba(255, 249, 206, 0.34);
}

.gateway-section .gateway-gateway-node.is-active .gateway-node-traffic,
.gateway-section .gateway-router-instance.is-active .gateway-node-traffic,
.gateway-section .gateway-model-node.is-active .gateway-node-traffic {
  color: #6b2f2e;
  text-shadow: none;
}

.gateway-enterprise-node {
  grid-column: 1 / -1;
  display: grid;
  justify-items: stretch;
  gap: 5px;
  padding: 6px;
  font-size: 8px;
}

.gateway-enterprise-clients {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.gateway-enterprise-clients span {
  padding: 4px 3px;
  color: #fff8dc;
  background: rgba(0, 55, 64, 0.29);
  border: 1px solid rgba(255, 220, 137, 0.24);
  border-radius: 4px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 24, 31, 0.98), 0 0 7px rgba(124, 255, 222, 0.62), 0 0 12px rgba(255, 207, 125, 0.3);
}

.gateway-section .gateway-china-router {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100%;
  box-sizing: border-box;
  gap: 11px;
  padding: 13px;
  background: linear-gradient(135deg, rgba(0, 190, 165, 0.1), rgba(0, 211, 164, 0.1) 58%, rgba(0, 145, 170, 0.1));
  border: 1px solid rgba(151, 255, 225, 0.76);
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(0, 255, 206, 0.28), 0 0 42px rgba(255, 170, 91, 0.12), inset 0 0 22px rgba(151, 255, 225, 0.12);
  backdrop-filter: blur(2px);
}

.gateway-china-kicker {
  margin: 0;
  color: #ffe49c;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-align: center;
}

.gateway-router-title {
  color: #fffaf0;
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 14px rgba(104, 255, 224, 0.72), 0 0 24px rgba(255, 175, 98, 0.42);
}

.gateway-router-traffic {
  position: absolute;
  right: 10%;
  bottom: 7%;
  left: 10%;
  color: #ffe6a8;
  font-family: "DM Mono", monospace;
  font-size: clamp(7px, 0.7vw, 10px);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 9px rgba(255, 171, 92, 0.74);
}

.gateway-router-instances {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(2, auto);
  align-content: space-between;
  align-items: center;
  align-self: center;
  height: 30%;
  transform: translateY(14%);
  gap: 5px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 226, 151, 0.3);
}

.gateway-router-instance {
  width: 62%;
  min-height: 0;
  justify-self: center;
  font-size: 9px;
}

.gateway-model-node { transition: background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease; }

.gateway-flow-particle {
  fill: #fff0ad;
  opacity: 0.82;
  filter: drop-shadow(0 0 4px rgba(115, 255, 219, 0.95)) drop-shadow(0 0 7px rgba(255, 173, 91, 0.5));
}

.gateway-flow-label {
  fill: #f3fff1;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0;
  paint-order: stroke;
  stroke: rgba(2, 58, 63, 0.94);
  stroke-width: 4px;
  text-anchor: middle;
  dominant-baseline: middle;
  filter: drop-shadow(0 0 5px rgba(75, 255, 212, 0.76));
  pointer-events: none;
}

.gateway-flow-label.is-summary {
  fill: #ffe7a5;
  font-weight: 600;
}

.gateway-flow-label-title {
  font-size: 8px;
  letter-spacing: 0.08em;
}

.gateway-flow-label-value {
  font-size: 10px;
}

.gateway-section .gateway-gateway-node.is-active {
  background: linear-gradient(135deg, rgba(255, 128, 104, 0.47), rgba(255, 199, 101, 0.48));
  border-color: #ffca70;
  box-shadow: 0 0 0 1px rgba(255, 113, 86, 0.9), 0 0 24px rgba(255, 177, 78, 0.88), 0 5px 16px rgba(107, 42, 36, 0.3), inset 0 0 14px rgba(255, 249, 206, 0.34);
}

.gateway-section .gateway-enterprise-node.is-active .gateway-gateway-node:not(.is-active) {
  color: #fff9e8;
  background: linear-gradient(145deg, rgba(4, 112, 112, 0.42), rgba(4, 64, 81, 0.43));
  border-color: rgba(154, 255, 225, 0.58);
  box-shadow: 0 5px 15px rgba(0, 34, 42, 0.34), inset 0 0 16px rgba(115, 255, 220, 0.12);
}

@keyframes gateway-data-flow {
  to { stroke-dashoffset: -26; }
}

@media (prefers-reduced-motion: reduce) {
  .gateway-flow-link.is-active { animation: none; }
}

@media (max-width: 767px) {
  .gateway-section { padding: 78px 18px 88px; }
  .gateway-heading { margin-bottom: 38px; }
  .gateway-heading h2 { font-size: clamp(32px, 9vw, 44px); }
  .gateway-canvas {
    width: 100%;
    height: 431px;
    min-height: 0;
    aspect-ratio: auto;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
  }
  .gateway-visual-background,
  .gateway-flow-layer {
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    width: 768px;
    height: 100%;
  }
  .gateway-visual-background { object-position: center; }
  .gateway-architecture {
    position: absolute;
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    width: 768px;
    height: 100%;
    display: block;
    min-height: 0;
    padding: 0;
  }
  .gateway-stage {
    position: absolute;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
  }
  .gateway-stage-label { margin-bottom: 4px; font-size: clamp(5px, 1.8vw, 8px); }
  .gateway-access-nodes,
  .gateway-network-nodes,
  .gateway-model-list {
    position: absolute;
    inset: 0;
  }
  .gateway-access-nodes {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(6, minmax(0, 1fr));
    gap: 0;
  }
  .gateway-network-nodes {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .gateway-section .gateway-china-router {
    padding: 8px 5px;
    gap: 5px;
    border-radius: 7px;
  }
  .gateway-china-kicker { font-size: clamp(5px, 1.7vw, 8px); }
  .gateway-router-title { font-size: clamp(7px, 2vw, 12px); }
  .gateway-router-traffic { bottom: 6%; font-size: clamp(5px, 1.45vw, 8px); }
  .gateway-router-instances { gap: 3px; padding-top: 5px; }
  .gateway-router-instance,
  .gateway-access-node,
  .gateway-gateway-node,
  .gateway-enterprise-node,
  .gateway-model-node {
    min-height: 29px;
    padding: 3px 4px;
    font-size: 8px;
    line-height: 1.15;
  }
  .gateway-node-name { line-height: 1.1; }
  .gateway-node-traffic { font-size: 7px; line-height: 1.1; }
  .gateway-access-node,
  .gateway-model-node { gap: 2px; }
  .gateway-enterprise-node { gap: 3px; padding: 4px; }
  .gateway-enterprise-clients { gap: 2px; }
  .gateway-enterprise-clients span { padding: 3px; }
  .gateway-network-stage .gateway-enterprise-node {
    width: 86%;
  }
  .gateway-network-stage .gateway-enterprise-clients {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gateway-network-stage .gateway-enterprise-clients span {
    width: 100%;
    min-width: 0;
    font-size: 8px;
    white-space: normal;
  }
  .gateway-model-list { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 0; }

  .gateway-flow-label { font-size: clamp(5px, 1.45vw, 8px); stroke-width: 2px; }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .gateway-canvas { min-height: 0; aspect-ratio: 2560 / 1429; }
  .gateway-architecture { min-height: 0; }
  .gateway-stage { padding: 0; background: transparent; border: 0; border-radius: 0; backdrop-filter: none; }
  .gateway-stage-label { margin-bottom: 7px; font-size: clamp(7px, 1.1vw, 9px); }
  .gateway-model-list { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 375px) {
  .gateway-section { padding-right: 15px; padding-left: 15px; }
  .gateway-access-nodes { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(6, minmax(0, 1fr)); }
  .gateway-model-list { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(8, minmax(0, 1fr)); }
  .gateway-stage-label { font-size: clamp(5px, 1.8vw, 7px); }
}

/* Screen 04: Intelligent Routing */
.routing-section {
  position: relative;
  width: 100%;
  padding: 112px clamp(40px, 3vw, 60px) 128px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 20% 16%, rgba(56, 222, 184, 0.14), transparent 24%),
    radial-gradient(circle at 84% 74%, rgba(255, 163, 82, 0.12), transparent 30%),
    linear-gradient(180deg, #055147 0%, #03332f 100%);
  box-sizing: border-box;
}

.routing-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image: linear-gradient(rgba(126, 151, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 151, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, transparent 96%);
}

.routing-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  box-sizing: border-box;
}

.routing-heading {
  max-width: 760px;
  margin-bottom: 52px;
}

.routing-eyebrow {
  margin: 0 0 18px;
  color: #6fe0be;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.routing-heading h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.08;
}

.routing-subtitle {
  margin: 20px 0 0;
  color: var(--hero-muted);
  font-size: 16px;
  line-height: 1.75;
}

.routing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
}

.routing-console,
.routing-factors {
  min-width: 0;
  background: rgba(8, 69, 60, 0.7);
  border: 1px solid var(--hero-line);
  border-radius: 10px;
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.routing-console {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  padding: 18px;
}

.routing-request-rail {
  display: flex;
  min-width: 66px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.routing-request-pill {
  padding: 5px 9px;
  color: #d7f7ec;
  background: rgba(111, 224, 190, 0.16);
  border: 1px solid rgba(111, 224, 190, 0.4);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.routing-request-rail svg {
  width: 14px;
  height: 14px;
  color: #8fc1ff;
}

.routing-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  background: rgba(8, 14, 35, 0.62);
  border: 1px solid rgba(142, 164, 255, 0.24);
  border-radius: 8px;
}

.routing-card-header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.routing-card-header strong {
  color: var(--hero-text);
  font-size: 16px;
}

.routing-strategy {
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.routing-summary-row,
.routing-selected-row,
.routing-provider-list li {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.routing-summary-row,
.routing-selected-row {
  color: #d3defd;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.routing-summary-row b,
.routing-selected-row strong {
  color: #ecf1ff;
  font-size: 12px;
}

.routing-provider-box {
  min-width: 0;
  padding: 12px;
  background: rgba(13, 20, 45, 0.72);
  border: 1px solid rgba(142, 164, 255, 0.22);
  border-radius: 8px;
}

.routing-provider-box > p {
  margin: 0 0 10px;
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.routing-provider-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.routing-provider-list li {
  padding: 8px 10px;
  background: rgba(8, 14, 34, 0.65);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 6px;
}

.routing-provider-list li.is-selected {
  border-color: rgba(111, 224, 190, 0.55);
  box-shadow: inset 0 0 0 1px rgba(111, 224, 190, 0.25);
}

.routing-provider-main {
  display: inline-flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
}

.routing-provider-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ea6e8f;
  box-shadow: 0 0 0 3px rgba(234, 110, 143, 0.18);
}

.routing-provider-dot.is-up {
  background: #6fe0be;
  box-shadow: 0 0 0 3px rgba(111, 224, 190, 0.18);
}

.routing-provider-name {
  color: #d9e4ff;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.routing-provider-meta {
  color: #a9b6df;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  white-space: nowrap;
}

.routing-factors {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.routing-factors h3 {
  margin: 0;
  color: var(--hero-text);
  font-size: 20px;
}

.routing-factor-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.routing-factor-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  background: rgba(8, 14, 34, 0.7);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 8px;
}

.routing-factor-card span {
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.routing-factor-card strong {
  color: #ecf1ff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
}

.routing-factors-note {
  margin: 0;
  color: var(--hero-muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 1023px) {
  .routing-grid { grid-template-columns: 1fr; }
  .routing-factor-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .routing-section { padding: 78px 18px 88px; }
  .routing-heading { margin-bottom: 36px; }
  .routing-heading h2 { font-size: clamp(32px, 9vw, 44px); }
  .routing-subtitle { font-size: 14px; }
  .routing-console { grid-template-columns: 1fr; gap: 10px; }
  .routing-request-rail { min-width: 0; flex-direction: row; justify-content: flex-start; }
  .routing-factor-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 390px) {
  .routing-provider-meta { font-size: 8px; }
}

@media (max-width: 375px) {
  .routing-section { padding-right: 15px; padding-left: 15px; }
  .routing-factor-card strong { font-size: 19px; }
}

/* Screen 05: Automatic Failover */
.failover-section {
  position: relative;
  width: 100%;
  padding: 112px clamp(40px, 3vw, 60px) 128px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 169, 87, 0.15), transparent 27%),
    radial-gradient(circle at 12% 76%, rgba(50, 214, 176, 0.15), transparent 30%),
    linear-gradient(180deg, #04453d 0%, #03312d 100%);
  box-sizing: border-box;
}

.failover-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background-image: linear-gradient(rgba(126, 151, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 151, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, transparent 96%);
}

.failover-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  box-sizing: border-box;
}

.failover-heading {
  max-width: 760px;
  margin-bottom: 52px;
}

.failover-eyebrow {
  margin: 0 0 18px;
  color: #ffbb5e;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.failover-heading h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.08;
}

.failover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 20px;
}

.failover-flow-card,
.failover-copy {
  min-width: 0;
  background: rgba(8, 69, 60, 0.7);
  border: 1px solid var(--hero-line);
  border-radius: 10px;
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.failover-flow-card {
  padding: 20px;
}

.failover-stage {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.failover-main-node {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  padding: 8px 12px;
  color: #d9e4ff;
  background: rgba(9, 14, 34, 0.7);
  border: 1px solid rgba(142, 164, 255, 0.24);
  border-radius: 7px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.failover-main-arrow {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #8fc1ff;
}

.failover-main-arrow svg {
  width: 14px;
  height: 14px;
}

.failover-provider-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.failover-provider-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  background: rgba(8, 14, 34, 0.65);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 8px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.failover-provider-row.is-active {
  border-color: rgba(98, 165, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(98, 165, 255, 0.2);
}

.failover-provider-row.is-failed {
  border-color: rgba(207, 91, 61, 0.55);
}

.failover-provider-row.is-success {
  border-color: rgba(111, 224, 190, 0.55);
  box-shadow: inset 0 0 0 1px rgba(111, 224, 190, 0.2);
}

.failover-provider-branch {
  position: relative;
  width: 28px;
  height: 16px;
  border-bottom: 1px solid rgba(142, 164, 255, 0.4);
}

.failover-provider-branch::before {
  position: absolute;
  left: 0;
  top: -18px;
  width: 1px;
  height: 18px;
  content: "";
  background: rgba(142, 164, 255, 0.4);
}

.failover-provider-row:first-child .failover-provider-branch::before {
  top: -12px;
  height: 12px;
}

.failover-provider-row strong {
  color: #d9e4ff;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
}

.failover-provider-result {
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  white-space: nowrap;
}

.failover-provider-row.is-failed .failover-provider-result {
  color: #f1a790;
}

.failover-provider-row.is-success .failover-provider-result {
  color: #8ee4c7;
}

.failover-copy {
  display: grid;
  align-content: start;
  gap: 20px;
  padding: 20px;
}

.failover-supporting {
  margin: 0;
  color: var(--hero-muted);
  font-size: 15px;
  line-height: 1.75;
}

.failover-copy h3 {
  margin: 0;
  color: var(--hero-text);
  font-size: 20px;
}

.failover-conditions {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.failover-conditions li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #d7e3ff;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.failover-conditions li::before {
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: rgba(207, 91, 61, 0.85);
  box-shadow: 0 0 0 3px rgba(207, 91, 61, 0.15);
}

@media (max-width: 1023px) {
  .failover-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .failover-section { padding: 78px 18px 88px; }
  .failover-heading { margin-bottom: 36px; }
  .failover-heading h2 { font-size: clamp(32px, 9vw, 44px); }
  .failover-supporting { font-size: 14px; }
}

@media (max-width: 390px) {
  .failover-provider-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
  }

  .failover-provider-branch {
    display: none;
  }

  .failover-provider-result {
    white-space: normal;
  }
}

@media (max-width: 375px) {
  .failover-section { padding-right: 15px; padding-left: 15px; }
}

.failover-section {
  padding: 112px clamp(40px, 3vw, 60px) 128px;
  scroll-margin-top: var(--site-header-height, 95px);
}

.failover-section .failover-inner {
  max-width: 1280px;
}

.failover-section .failover-heading {
  max-width: 760px;
  margin: 0 0 42px;
  text-align: left;
}

.failover-section .failover-eyebrow {
  margin-bottom: 16px;
  color: var(--hero-amber);
}

.failover-section .failover-heading h2 {
  font-size: 4rem;
  letter-spacing: 0;
}

.failover-description {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--hero-muted);
  font-size: 17px;
  line-height: 1.7;
}

.failover-visual {
  position: relative;
  overflow: hidden;
  padding: clamp(18px, 2vw, 30px);
  background: var(--marketing-panel, var(--ss-surface-1));
  border: 1px solid var(--hero-line, var(--ss-border));
  border-radius: 10px;
  box-shadow: 0 20px 58px rgba(0, 68, 59, 0.28), inset 0 0 26px rgba(185, 255, 224, 0.05);
}

.failover-visual::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.4;
  background-image: linear-gradient(rgba(188, 255, 224, 0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(188, 255, 224, 0.1) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, transparent, black 18%, transparent 94%);
}

.failover-visual > * {
  position: relative;
  z-index: 1;
}

.failover-center-summary {
  width: 100%;
  margin: 0 auto;
}

.failover-summary-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 5vw, 64px);
  margin-top: clamp(24px, 3vw, 42px);
  padding-top: 18px;
  border-top: 1px solid var(--hero-line, var(--ss-border));
}

.failover-summary-grid {
  grid-template-columns: minmax(170px, 1fr) minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(120px, 0.8fr) minmax(170px, 1fr);
  align-items: stretch;
  gap: 1px;
  padding-top: 0;
  background: var(--hero-amber, var(--ss-border));
  border: 1px solid var(--hero-amber, var(--ss-border));
  border-top: 1px solid var(--hero-amber, var(--ss-border));
  box-shadow: 0 0 0 1px rgba(255, 240, 166, 0.12), 0 0 30px rgba(255, 220, 105, 0.16);
}

.failover-summary-grid > .failover-summary-column,
.failover-summary-grid > .failover-metric {
  min-height: 70px;
  padding: 13px clamp(10px, 1.5vw, 22px) 12px;
  background: var(--marketing-panel, var(--ss-surface-1));
}

.failover-summary-grid .failover-traffic-summary {
  grid-column: 1;
}

.failover-summary-grid .failover-current-summary {
  grid-column: 5;
}

.failover-summary-column {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 5px;
}

.failover-traffic-summary {
  justify-items: start;
  text-align: left;
}

.failover-current-summary {
  justify-items: start;
  text-align: left;
}

.failover-summary-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.failover-summary-label strong,
.failover-current-state > strong {
  min-width: 0;
  color: var(--hero-text);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.failover-current-state {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 5px 8px;
  max-height: 2.7em;
  overflow: hidden;
}

.failover-current-state > strong {
  color: var(--hero-amber, var(--ss-warning));
}

.failover-summary-grid .failover-outcome {
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  flex-wrap: wrap;
  line-height: 1.35;
  overflow: hidden;
}

.failover-summary-grid .failover-outcome > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.failover-summary-detail {
  min-width: 0;
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.failover-current-summary .failover-outcome {
  justify-content: flex-start;
  max-width: 100%;
  text-align: left;
}

.failover-visual-header,
.failover-visual-footer,
.failover-event {
  display: flex;
  align-items: center;
}

.failover-visual-header {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(26px, 3vw, 42px);
}

.failover-visual-kicker,
.failover-node-kicker,
.failover-phase-label {
  margin: 0;
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.failover-visual-title {
  margin: 7px 0 0;
  color: var(--hero-text);
  font-size: 19px;
  font-weight: 700;
}

.failover-live-badge,
.failover-outcome {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--marketing-mint, var(--ss-success));
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.failover-live-badge {
  padding: 7px 10px;
  border: 1px solid var(--hero-line, var(--ss-border));
  border-radius: 999px;
  background: var(--ss-success-bg);
}

.failover-live-badge svg,
.failover-outcome svg {
  width: 13px;
  height: 13px;
}

.failover-live-badge svg {
  animation: failover-live-pulse 2s ease-in-out infinite;
}

.failover-section .failover-flow {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, 0.72fr) minmax(250px, 1.25fr) minmax(120px, 0.72fr) minmax(180px, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 32px);
  margin: 0;
}

.failover-router-column {
  display: grid;
  min-width: 0;
  gap: 10px;
  width: 100%;
}

.failover-flow-node,
.failover-router-node {
  display: flex;
  min-width: 0;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  color: var(--hero-text);
  background: var(--marketing-node, var(--ss-surface-2));
  border: 1px solid var(--hero-line, var(--ss-border));
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 57, 53, 0.25), inset 0 0 16px rgba(185, 255, 224, 0.08);
  transition: border-color 240ms ease, box-shadow 240ms ease, opacity 240ms ease, transform 240ms ease;
}

.failover-router-node {
  align-items: center;
  min-height: 140px;
  text-align: center;
  background:
    radial-gradient(circle at 24% 8%, rgba(220, 248, 222, 0.12), transparent 40%),
    linear-gradient(145deg, var(--marketing-emerald-start, var(--ss-surface-2)), var(--marketing-emerald-end, var(--ss-surface-3)));
  border-color: var(--hero-line, var(--ss-border-active));
  box-shadow: 0 0 0 1px rgba(189, 244, 211, 0.18), 0 0 30px rgba(58, 154, 113, 0.3), inset 0 0 24px rgba(233, 255, 239, 0.1);
}

.failover-router-node > strong,
.failover-model-identity strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: "DM Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.failover-router-status,
.failover-node-status {
  overflow-wrap: anywhere;
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.failover-model-identity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.failover-backup-selection {
  flex-wrap: wrap;
  gap: 7px 9px;
}

.failover-selected-label,
.failover-backup-option-status {
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.failover-backup-selection strong {
  flex: 1 1 100%;
  margin-left: 17px;
  color: var(--hero-text);
}

.failover-backup-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.failover-backup-option {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 8px;
  color: var(--hero-text);
  background: rgba(0, 57, 53, 0.24);
  border: 1px solid var(--hero-line, var(--ss-border));
  border-radius: 6px;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.failover-backup-option strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
}

.failover-backup-option.is-selected {
  background: linear-gradient(135deg, var(--marketing-emerald-start, var(--ss-surface-2)), var(--marketing-emerald-end, var(--ss-surface-3)));
  border-color: var(--hero-amber, var(--ss-border-active));
  box-shadow: 0 0 0 1px rgba(255, 240, 166, 0.18), 0 0 18px rgba(255, 220, 105, 0.2), inset 0 0 14px rgba(233, 255, 239, 0.1);
  transform: translateY(-2px);
}

.failover-backup-option.is-selected .failover-backup-option-status {
  color: var(--hero-amber, var(--ss-warning));
}

.failover-node-signal,
.failover-event-signal {
  display: inline-block;
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--marketing-mint, var(--ss-success));
  box-shadow: 0 0 0 4px rgba(143, 215, 176, 0.14), 0 0 15px rgba(143, 215, 176, 0.7);
}

.failover-connector {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 12px;
}

.failover-connector-label {
  overflow-wrap: anywhere;
  min-height: 24px;
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.failover-connector-line {
  position: relative;
  display: block;
  height: 2px;
  background: var(--marketing-mint, var(--ss-accent));
  box-shadow: 0 0 10px rgba(143, 215, 176, 0.42);
}

.failover-connector-line::before {
  position: absolute;
  top: 50%;
  right: -1px;
  width: 7px;
  height: 7px;
  content: "";
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  color: var(--marketing-mint, var(--ss-accent));
  transform: translateY(-50%) rotate(45deg);
}

.failover-flow-particle {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hero-amber, var(--ss-warning));
  box-shadow: 0 0 0 4px rgba(255, 240, 166, 0.14), 0 0 14px rgba(255, 240, 166, 0.8);
  transform: translate(-50%, -50%);
  animation: failover-particle-travel 1.8s linear infinite;
}

.failover-connector-break {
  position: absolute;
  top: 50%;
  left: 50%;
  display: none;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--hero-purple, var(--ss-error));
  background: var(--marketing-panel, var(--ss-surface-1));
  border: 1px solid var(--hero-purple, var(--ss-error));
  border-radius: 50%;
  font-family: "DM Mono", monospace;
  font-size: 16px;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.failover-event {
  gap: 10px;
  margin-top: clamp(24px, 3vw, 42px);
  padding-top: 18px;
  color: var(--hero-text);
  border-top: 1px solid var(--hero-line, var(--ss-border));
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.failover-event-signal {
  width: 7px;
  height: 7px;
}

.failover-event span:last-child {
  margin-left: auto;
  color: var(--hero-muted);
  font-size: 9px;
  letter-spacing: 0;
  text-align: right;
  text-transform: none;
}

.failover-visual-footer {
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
}

.failover-visual-footer > strong {
  margin-right: auto;
  color: var(--hero-text);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.failover-center-summary .failover-event {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding-right: 10px;
  padding-left: 10px;
  text-align: center;
}

.failover-center-summary .failover-event span:last-child {
  margin-left: 0;
  text-align: center;
}

.failover-center-summary .failover-visual-footer {
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.failover-center-summary .failover-visual-footer > strong {
  margin-right: 0;
}

.failover-center-summary .failover-outcome {
  width: auto;
  margin-left: 0;
}

.failover-outcome {
  color: var(--hero-amber, var(--ss-success));
}

.failover-section .failover-capabilities {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(34px, 5vw, 72px) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hero-line, var(--ss-border));
  border-bottom: 1px solid var(--hero-line, var(--ss-border));
}

.failover-capability {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 25px 22px 27px;
  border-right: 1px solid var(--hero-line, var(--ss-border));
}

.failover-capability:first-child {
  padding-left: 0;
}

.failover-capability:last-child {
  padding-right: 0;
  border-right: 0;
}

.failover-capability-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--hero-amber, var(--ss-accent));
  border: 1px solid var(--hero-line, var(--ss-border));
  border-radius: 6px;
}

.failover-capability-icon svg {
  width: 15px;
  height: 15px;
}

.failover-capability h3 {
  margin: 1px 0 7px;
  color: var(--hero-text);
  font-size: 14px;
  line-height: 1.3;
}

.failover-capability p {
  margin: 0;
  color: var(--hero-muted);
  font-size: 12px;
  line-height: 1.6;
}

.failover-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: clamp(32px, 4vw, 58px);
  background: var(--hero-line, var(--ss-border));
  border: 1px solid var(--hero-line, var(--ss-border));
}

.failover-metric {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 24px clamp(16px, 2vw, 30px);
  background: var(--marketing-panel, var(--ss-surface-1));
}

.failover-metric strong {
  color: var(--hero-text);
  font-family: "DM Mono", monospace;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 0;
}

.failover-metric span {
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.failover-router-metrics {
  width: 100%;
  margin: clamp(18px, 2.5vw, 30px) 0 0;
}

.failover-router-metrics .failover-metric,
.failover-summary-grid .failover-metric {
  display: grid;
  min-width: 0;
  gap: 5px;
  place-items: start;
  padding: 0;
  text-align: left;
  background: var(--marketing-panel, var(--ss-surface-1));
  box-shadow: inset 0 0 24px rgba(255, 240, 166, 0.07);
}

.failover-summary-grid .failover-metric-events {
  grid-column: 2;
  place-items: center;
  align-content: center;
  text-align: center;
}

.failover-summary-grid .failover-metric-switch {
  grid-column: 3;
  place-items: center;
  align-content: center;
  text-align: center;
}

.failover-summary-grid .failover-metric-success {
  grid-column: 4;
  place-items: center;
  align-content: center;
  text-align: center;
}

.failover-router-metrics .failover-metric strong,
.failover-summary-grid .failover-metric strong {
  min-width: 0;
  color: var(--hero-amber, var(--ss-warning));
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 700;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-shadow: 0 0 14px rgba(255, 220, 105, 0.34);
}

.failover-router-metrics .failover-metric span,
.failover-summary-grid .failover-metric span {
  min-width: 0;
  color: var(--hero-text);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .failover-summary-grid {
    grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 0.9fr)) minmax(0, 1.2fr);
  }

  .failover-summary-grid > .failover-summary-column,
  .failover-summary-grid > .failover-metric {
    padding-right: 8px;
    padding-left: 8px;
  }
}

.failover-visual[data-failover-phase="normal"] .failover-flow-node[data-failover-node="primary"],
.failover-visual[data-failover-phase="normal"] .failover-flow-node[data-failover-node="backup"],
.failover-visual[data-failover-phase="backup_active"] .failover-flow-node[data-failover-node="backup"] {
  border-color: var(--marketing-mint, var(--hero-line));
  box-shadow: 0 0 0 1px rgba(143, 215, 176, 0.14), 0 0 22px rgba(58, 154, 113, 0.22), inset 0 0 18px rgba(233, 255, 239, 0.08);
}

.failover-visual[data-failover-phase="detected"] .failover-flow-node[data-failover-node="primary"],
.failover-visual[data-failover-phase="failover"] .failover-flow-node[data-failover-node="primary"] {
  border-color: var(--hero-purple, var(--ss-error));
  box-shadow: 0 0 0 1px rgba(255, 151, 131, 0.16), 0 0 24px rgba(255, 151, 131, 0.2), inset 0 0 18px rgba(255, 151, 131, 0.07);
}

.failover-visual[data-failover-phase="recovering"] .failover-flow-node[data-failover-node="primary"] {
  border-color: var(--hero-amber, var(--ss-warning));
  box-shadow: 0 0 0 1px rgba(255, 240, 166, 0.16), 0 0 24px rgba(255, 240, 166, 0.2), inset 0 0 18px rgba(255, 240, 166, 0.07);
}

.failover-visual[data-failover-phase="detected"] .failover-connector[data-failover-channel="primary"] .failover-connector-break,
.failover-visual[data-failover-phase="failover"] .failover-connector[data-failover-channel="primary"] .failover-connector-break {
  display: grid;
}

.failover-visual[data-failover-phase="detected"] .failover-connector[data-failover-channel="primary"] .failover-connector-line,
.failover-visual[data-failover-phase="failover"] .failover-connector[data-failover-channel="primary"] .failover-connector-line {
  opacity: 0.28;
}

.failover-visual[data-failover-phase="detected"] .failover-connector[data-failover-channel="primary"] .failover-flow-particle,
.failover-visual[data-failover-phase="failover"] .failover-connector[data-failover-channel="primary"] .failover-flow-particle {
  display: none;
}

.failover-visual[data-failover-phase="failover"] .failover-connector[data-failover-channel="backup"] .failover-connector-line,
.failover-visual[data-failover-phase="backup_active"] .failover-connector[data-failover-channel="backup"] .failover-connector-line,
.failover-visual[data-failover-phase="recovering"] .failover-connector[data-failover-channel="backup"] .failover-connector-line {
  background: var(--hero-amber, var(--marketing-mint));
  box-shadow: 0 0 12px rgba(255, 240, 166, 0.48);
}

.failover-visual[data-failover-phase="failover"] .failover-connector[data-failover-channel="backup"] .failover-connector-line::before,
.failover-visual[data-failover-phase="backup_active"] .failover-connector[data-failover-channel="backup"] .failover-connector-line::before,
.failover-visual[data-failover-phase="recovering"] .failover-connector[data-failover-channel="backup"] .failover-connector-line::before {
  color: var(--hero-amber, var(--marketing-mint));
}

.failover-visual[data-failover-phase="normal"] .failover-connector[data-failover-channel="primary"] .failover-flow-particle,
.failover-visual[data-failover-phase="normal"] .failover-connector[data-failover-channel="backup"] .failover-flow-particle,
.failover-visual[data-failover-phase="backup_active"] .failover-connector[data-failover-channel="backup"] .failover-flow-particle,
.failover-visual[data-failover-phase="recovering"] .failover-connector[data-failover-channel="backup"] .failover-flow-particle {
  animation-name: failover-particle-travel;
}

@keyframes failover-particle-travel {
  from { left: 0; }
  to { left: 100%; }
}

@keyframes failover-live-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 1100px) {
  .failover-section .failover-flow {
    grid-template-columns: minmax(150px, 1fr) minmax(90px, 0.6fr) minmax(210px, 1.15fr) minmax(90px, 0.6fr) minmax(150px, 1fr);
    gap: 14px;
  }

  .failover-flow-node,
  .failover-router-node {
    padding: 18px;
  }

  .failover-capability {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (max-width: 767px) {
  .failover-section {
    padding: 76px 18px 86px;
  }

  .failover-section .failover-heading h2 {
    font-size: 2.25rem;
    line-height: 1.12;
  }

  .failover-description {
    margin-top: 17px;
    font-size: 14px;
    line-height: 1.65;
  }

  .failover-visual-header {
    align-items: flex-start;
    margin-bottom: 34px;
  }

  .failover-visual-title {
    font-size: 16px;
  }

  .failover-section .failover-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .failover-router-column {
    width: 100%;
    gap: 8px;
  }

  .failover-flow-node,
  .failover-router-node {
    min-height: 116px;
    padding: 18px;
  }

  .failover-router-node {
    min-height: 140px;
  }

  .failover-connector {
    justify-items: center;
    gap: 7px;
    padding: 11px 0;
  }

  .failover-connector-label {
    min-height: 0;
    max-width: 100%;
  }

  .failover-connector-line {
    width: 2px;
    height: 38px;
  }

  .failover-connector-line::before {
    top: auto;
    right: auto;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%) rotate(135deg);
  }

  .failover-flow-particle {
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-name: failover-particle-travel-y;
  }

  .failover-connector-break {
    top: 50%;
    left: 50%;
  }

  .failover-event {
    align-items: flex-start;
    flex-wrap: wrap;
    line-height: 1.5;
  }

  .failover-event span:last-child {
    width: 100%;
    margin-left: 17px;
    text-align: left;
  }

  .failover-visual-footer {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .failover-visual-footer > strong {
    margin-right: 0;
  }

  .failover-outcome {
    width: 100%;
    margin-left: 17px;
  }

  .failover-section .failover-capabilities {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .failover-capability,
  .failover-capability:first-child,
  .failover-capability:last-child {
    padding: 17px 12px;
    border-right: 1px solid var(--hero-line, var(--ss-border));
  }

  .failover-capability:nth-child(2n) {
    border-right: 0;
  }

  .failover-capability:nth-child(n + 3) {
    border-top: 1px solid var(--hero-line, var(--ss-border));
  }

  .failover-capability {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .failover-capability h3 {
    font-size: 13px;
  }

  .failover-capability p {
    font-size: 11px;
    line-height: 1.55;
  }

  .failover-metrics {
    grid-template-columns: 1fr;
  }

  .failover-section .failover-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .failover-summary-grid .failover-traffic-summary {
    grid-column: 1 / -1;
  }

  .failover-summary-grid .failover-metric-events {
    grid-column: auto;
    place-items: center;
    align-content: center;
    text-align: center;
  }

  .failover-summary-grid .failover-metric-switch {
    grid-column: auto;
    place-items: center;
    align-content: center;
    text-align: center;
  }

  .failover-summary-grid .failover-metric-success {
    grid-column: auto;
    place-items: center;
    align-content: center;
    text-align: center;
  }

  .failover-summary-grid .failover-current-summary {
    grid-column: auto;
  }

  .failover-metric {
    padding: 18px;
  }

  .failover-metric strong {
    font-size: 25px;
  }

  .failover-summary-grid .failover-metric {
    padding: 10px 4px 9px;
  }

  .failover-summary-grid .failover-metric strong {
    font-size: 13px;
  }

  .failover-summary-grid .failover-metric span {
    font-size: 8px;
  }
}

@media (max-width: 375px) {
  .failover-section {
    padding-right: 15px;
    padding-left: 15px;
  }

  .failover-visual {
    padding: 18px 14px;
  }

  .failover-capability,
  .failover-capability:first-child,
  .failover-capability:last-child {
    padding-right: 9px;
    padding-left: 9px;
  }
}

@keyframes failover-particle-travel-y {
  from { top: 0; }
  to { top: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .failover-section .failover-flow-particle,
  .failover-section .failover-live-badge svg {
    animation: none !important;
  }
}

/* Screen 07: AI Cost Intelligence */
.cost-section {
  position: relative;
  width: 100%;
  scroll-margin-top: 84px;
  padding: 112px clamp(40px, 3vw, 60px) 128px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 16% 24%, rgba(62, 224, 188, 0.14), transparent 25%),
    radial-gradient(circle at 84% 70%, rgba(255, 164, 82, 0.12), transparent 30%),
    linear-gradient(180deg, #05584d 0%, #03342f 100%);
  box-sizing: border-box;
}

.cost-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background-image: linear-gradient(rgba(126, 151, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 151, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, transparent 96%);
}

.cost-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  box-sizing: border-box;
}

.cost-heading {
  max-width: 820px;
  margin: 0 auto 52px;
  text-align: center;
}

.cost-eyebrow {
  margin: 0 0 18px;
  color: var(--hero-amber);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.cost-heading h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  line-height: 1.08;
}

.cost-story {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) minmax(60px, 0.48fr) minmax(210px, 1.3fr) minmax(60px, 0.48fr) minmax(132px, 1fr);
  gap: clamp(8px, 1.4vw, 22px);
  align-items: center;
  max-width: 1180px;
  margin-inline: auto;
}

.cost-state {
  min-width: 0;
  display: grid;
  min-height: 188px;
  align-content: center;
  justify-items: center;
  gap: 9px;
  text-align: center;
}

.cost-state-kicker,
.cost-router-kicker,
.cost-router-status,
.cost-flow-label,
.cost-savings-value span {
  font-family: "DM Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.cost-state-kicker {
  color: var(--hero-muted);
  font-size: 10px;
}

.cost-amount {
  color: var(--hero-text);
  font-size: clamp(29px, 3.3vw, 52px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 0 24px rgba(167, 255, 224, 0.12);
}

.cost-state-after .cost-amount {
  color: var(--hero-blue);
}

.cost-state-label {
  color: var(--hero-muted);
  font-size: 13px;
}

.cost-state-note {
  color: var(--hero-amber);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cost-state-note-positive {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  color: var(--hero-text);
  background: linear-gradient(135deg, rgba(255, 240, 166, 0.18), rgba(255, 151, 131, 0.16));
  border: 1px solid rgba(255, 240, 166, 0.42);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(255, 208, 126, 0.14), inset 0 0 14px rgba(255, 240, 166, 0.08);
  letter-spacing: 0.01em;
  text-transform: none;
}

.cost-state-note strong {
  font-weight: 500;
}

.cost-state-note-positive strong {
  color: var(--hero-amber);
  font-size: 13px;
  text-shadow: 0 0 14px rgba(255, 240, 166, 0.38);
}

.cost-state-meter {
  width: min(100%, 148px);
  height: 3px;
  overflow: hidden;
  background: rgba(8, 14, 34, 0.62);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 999px;
}

.cost-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  transition: width 720ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cost-bar-fill-base {
  background: linear-gradient(90deg, var(--hero-blue), var(--hero-purple));
}

.cost-bar-fill-optimized {
  background: linear-gradient(90deg, var(--marketing-mint), var(--hero-blue));
}

.cost-flow {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: center;
  gap: 7px;
}

.cost-flow-label {
  color: var(--hero-muted);
  font-size: 9px;
  text-align: center;
  white-space: nowrap;
}

.cost-flow-svg {
  display: block;
  width: 100%;
  height: 34px;
  overflow: visible;
}

.cost-flow-line {
  fill: none;
  stroke: var(--hero-blue);
  stroke-dasharray: 2 8;
  stroke-linecap: round;
  stroke-width: 1.25;
  animation: cost-flow-dash 2.2s linear infinite;
}

.cost-flow-line-glow {
  fill: none;
  stroke: var(--hero-blue);
  stroke-linecap: round;
  stroke-width: 4;
  opacity: 0.16;
}

.cost-flow-line-vertical {
  display: none;
}

@keyframes cost-flow-dash {
  to { stroke-dashoffset: -20; }
}

.cost-router {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 214px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  overflow: visible;
  padding: 24px 18px;
  color: var(--hero-text);
  background: var(--marketing-node);
  border: 1px solid var(--hero-line);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 68, 59, 0.28), 0 0 28px rgba(40, 220, 200, 0.26), 0 0 64px rgba(104, 207, 255, 0.2), var(--ss-glow-router), inset 0 0 24px rgba(185, 255, 224, 0.05);
  backdrop-filter: blur(14px);
  isolation: isolate;
}

.cost-router::before {
  position: absolute;
  z-index: -2;
  inset: -38px;
  content: "";
  background: conic-gradient(from 220deg, transparent 0deg 42deg, rgba(104, 207, 255, 0.42) 60deg 88deg, transparent 112deg 188deg, rgba(40, 220, 200, 0.32) 210deg 246deg, rgba(255, 151, 131, 0.2) 258deg 272deg, transparent 296deg 360deg);
  border-radius: 50%;
  filter: blur(4px);
  mask-image: radial-gradient(ellipse at center, transparent 0 56%, black 59% 67%, transparent 72%);
  animation: cost-router-pulse 3.8s ease-in-out infinite;
}

.cost-router::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: 0.42;
  background-image: radial-gradient(rgba(181, 255, 222, 0.18) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle at center, black, transparent 68%);
}

.cost-router-kicker {
  color: var(--hero-amber);
  font-size: 10px;
}

.cost-router-name {
  color: #f7fff5;
  font-size: clamp(17px, 1.8vw, 23px);
  line-height: 1.1;
  text-align: center;
}

.cost-router-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--marketing-traffic);
  font-size: 9px;
}

.cost-router-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--marketing-mint);
  box-shadow: 0 0 0 4px rgba(143, 215, 176, 0.14), 0 0 14px rgba(143, 215, 176, 0.58);
  animation: cost-router-status-pulse 2.4s ease-in-out infinite;
}

.cost-router-capabilities {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  max-width: 250px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.cost-router-capabilities li {
  padding: 5px 7px;
  color: var(--hero-muted);
  background: rgba(4, 32, 39, 0.38);
  border: 1px solid rgba(181, 255, 222, 0.22);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}

@keyframes cost-router-pulse {
  0%, 100% { transform: scale(0.96) rotate(-2deg); opacity: 0.56; }
  50% { transform: scale(1.02) rotate(4deg); opacity: 0.94; }
}

@keyframes cost-router-status-pulse {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 1; }
}

.cost-savings {
  max-width: 620px;
  margin: 46px auto 0;
  padding-top: 24px;
  text-align: center;
  border-top: 1px solid rgba(181, 255, 222, 0.22);
}

.cost-savings-value {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}

.cost-savings-value strong {
  color: var(--hero-amber);
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(255, 240, 166, 0.16);
}

.cost-savings-value span {
  color: var(--marketing-mint);
  font-size: 12px;
}

.cost-savings-caption {
  margin: 10px 0 0;
  color: var(--hero-muted);
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .cost-flow-line,
  .cost-router::before,
  .cost-router-status i {
    animation: none !important;
  }
}

@media (max-width: 1023px) {
  .cost-section { padding-right: 28px; padding-left: 28px; }
  .cost-story { gap: 8px; }
  .cost-router { padding-right: 12px; padding-left: 12px; }
}

@media (max-width: 767px) {
  .cost-section { padding: 96px 18px 88px; }
  .cost-heading { margin-bottom: 22px; }
  .cost-heading h2 { font-size: clamp(25px, 7.5vw, 36px); }
  .cost-story {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .cost-state { min-height: 118px; gap: 6px; }
  .cost-router { min-height: 164px; padding: 18px 12px; gap: 7px; }
  .cost-flow { gap: 2px; }
  .cost-flow-svg { width: 34px; height: 30px; }
  .cost-flow-line-horizontal { display: none; }
  .cost-flow-line-vertical { display: block; }
  .cost-savings { margin-top: 24px; padding-top: 18px; }
}

@media (max-width: 390px) {
  .cost-state-label,
  .cost-savings-caption { font-size: 12px; }
  .cost-router-name { font-size: 17px; }
}

@media (max-width: 375px) {
  .cost-section { padding-right: 15px; padding-left: 15px; }
}

/* Screen 08: AI Model Ecosystem */
.marketplace-section {
  position: relative;
  width: 100%;
  padding: 118px clamp(28px, 4vw, 72px) 136px;
  color: var(--hero-text, var(--ss-text-primary));
  background: var(--ss-bg-primary);
  box-sizing: border-box;
}

.marketplace-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.16;
  background-image: linear-gradient(rgba(126, 151, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 151, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, transparent 96%);
}

.marketplace-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1680px;
  margin-inline: auto;
  box-sizing: border-box;
}

.marketplace-heading {
  max-width: 980px;
  margin-bottom: 42px;
}

.marketplace-eyebrow {
  margin: 0 0 16px;
  color: var(--hero-amber, var(--ss-warning));
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.marketplace-heading h2 {
  margin: 0;
  color: var(--hero-text, var(--ss-text-primary));
  font-size: 56px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.marketplace-subtitle {
  max-width: 820px;
  margin: 22px 0 0;
  color: var(--hero-muted, var(--ss-text-secondary));
  font-size: 18px;
  line-height: 1.55;
}

.marketplace-description {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--hero-muted, var(--ss-text-muted));
  font-family: "DM Mono", monospace;
  font-size: 12px;
  line-height: 1.6;
}

.marketplace-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 4px;
}

.marketplace-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.marketplace-filter {
  min-height: 30px;
  padding: 6px 11px;
  color: var(--ss-text-secondary);
  background: rgba(2, 24, 29, 0.22);
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.marketplace-filter:hover {
  color: var(--ss-text-primary);
  border-color: var(--ss-border-active);
}

.marketplace-filter.is-active {
  color: var(--ss-text-primary);
  background: var(--ss-info-bg);
  border-color: var(--ss-border-active);
}

.marketplace-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--hero-muted, var(--ss-text-secondary));
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.marketplace-status-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.marketplace-status-item strong {
  color: var(--hero-text, var(--ss-text-primary));
  font-size: 12px;
  font-weight: 500;
}

.marketplace-status-dot,
.marketplace-provider-status i,
.marketplace-router-status i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--ss-success);
  box-shadow: 0 0 11px rgba(110, 255, 240, 0.7);
}

.marketplace-rotation-mark {
  width: 9px;
  height: 9px;
  border: 1px solid var(--ss-accent-blue);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(104, 207, 255, 0.13);
}

.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 20px;
  align-items: stretch;
  position: relative;
}

.marketplace-empty {
  grid-column: 1 / -1;
  padding: 16px;
  color: #b7c7f0;
  background: rgba(18, 25, 52, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 8px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
}

.marketplace-router-bridge {
  display: grid;
  justify-items: center;
  margin: 34px auto 2px;
}

.marketplace-router-node {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 290px;
  padding: 16px 24px 15px;
  color: var(--hero-text, var(--ss-text-primary));
  background: rgba(2, 24, 29, 0.38);
  border: 1px solid var(--ss-border-active);
  border-radius: 9px;
  box-shadow: var(--ss-glow-router);
  text-align: center;
}

.marketplace-router-kicker,
.marketplace-router-status,
.marketplace-provider-label,
.marketplace-block-label,
.marketplace-detail span,
.marketplace-price span,
.marketplace-progress-meta,
.marketplace-footer-metrics small {
  color: var(--hero-muted, var(--ss-text-muted));
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.marketplace-router-kicker {
  color: var(--hero-amber, var(--ss-warning));
}

.marketplace-router-node strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.marketplace-router-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ss-success);
}

.marketplace-router-signal {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  align-items: end;
  position: relative;
  width: min(92%, 1180px);
  height: 43px;
}

.marketplace-router-signal::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 17px;
  content: "";
  background: var(--ss-border-active);
}

.marketplace-router-signal::after {
  position: absolute;
  right: 5.5%;
  bottom: 9px;
  left: 5.5%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--ss-border-active) 10%, var(--ss-border-active) 90%, transparent);
}

.marketplace-router-signal-line {
  position: relative;
  z-index: 1;
  height: 27px;
  border-left: 1px solid var(--ss-border-active);
}

.marketplace-router-signal-line::after {
  position: absolute;
  bottom: 7px;
  left: -2px;
  width: 3px;
  height: 3px;
  content: "";
  border-radius: 50%;
  background: var(--ss-accent-blue);
  box-shadow: 0 0 9px rgba(104, 207, 255, 0.78);
  animation: marketplace-signal-pulse 3.6s ease-in-out infinite;
}

.marketplace-router-signal-line:nth-child(2n)::after { animation-delay: -1.1s; }
.marketplace-router-signal-line:nth-child(3n)::after { animation-delay: -2.2s; }

.marketplace-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  position: relative;
  min-width: 0;
  height: 560px;
  padding: 20px;
  background: var(--ss-surface-1);
  border: 1px solid var(--ss-border);
  border-radius: 10px;
  box-shadow: var(--ss-shadow-md);
  box-sizing: border-box;
  overflow: visible;
}

.marketplace-card::before {
  position: absolute;
  top: -26px;
  left: 50%;
  width: 1px;
  height: 26px;
  content: "";
  background: var(--ss-border-active);
}

.marketplace-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--ss-border);
}

.marketplace-provider-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.marketplace-logo {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  color: var(--ss-text-primary);
  background: var(--ss-surface-2);
  border: 1px solid var(--ss-border-active);
  border-radius: 9px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.marketplace-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.marketplace-logo--doubao,
.marketplace-logo--openai { color: var(--hero-amber, var(--ss-warning)); }
.marketplace-logo--deepseek,
.marketplace-logo--gemini { color: var(--ss-accent-blue); }
.marketplace-logo--qwen,
.marketplace-logo--kling { color: var(--ss-accent); }
.marketplace-logo--glm,
.marketplace-logo--claude { color: var(--ss-success); }
.marketplace-logo--kimi { color: var(--ss-warning); }

.marketplace-logo--zhipu,
.marketplace-logo--klingai {
  width: 68px;
  flex-basis: 68px;
}

.marketplace-logo--zhipu img {
  width: 60px;
  height: 28px;
  filter: invert(1);
}

.marketplace-logo--klingai img {
  width: 60px;
  height: 28px;
}

.marketplace-logo--volcengine {
  width: 68px;
  flex-basis: 68px;
}

.marketplace-logo--volcengine img {
  width: 60px;
  height: 32px;
}

.marketplace-provider-brand > div {
  min-width: 0;
}

.marketplace-provider-label {
  display: block;
  margin-bottom: 4px;
}

.marketplace-provider-brand h3 {
  margin: 0;
  color: var(--hero-text, var(--ss-text-primary));
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
}

.marketplace-provider-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding-top: 3px;
  color: var(--ss-success);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.marketplace-card-content {
  display: grid;
  grid-template-rows: auto auto auto minmax(52px, 1fr) auto;
  gap: 13px;
  min-height: 0;
  padding: 16px 0 13px;
}

.marketplace-current-model,
.marketplace-data-block,
.marketplace-description-block,
.marketplace-use-cases {
  min-width: 0;
}

.marketplace-field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.marketplace-field-heading > span,
.marketplace-block-label {
  color: var(--hero-muted, var(--ss-text-muted));
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.marketplace-type-pill {
  padding: 4px 7px;
  color: var(--ss-accent-blue);
  background: var(--ss-info-bg);
  border: 1px solid var(--ss-border);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.marketplace-model-name {
  display: block;
  overflow: hidden;
  color: var(--hero-text, var(--ss-text-primary));
  font-size: 21px;
  font-weight: 700;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-block-label {
  display: block;
  margin-bottom: 7px;
}

.marketplace-detail-grid,
.marketplace-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.marketplace-detail,
.marketplace-price {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 7px 8px;
  background: rgba(2, 24, 29, 0.26);
  border: 1px solid var(--ss-border);
  border-radius: 5px;
}

.marketplace-detail strong,
.marketplace-price strong {
  overflow: hidden;
  color: var(--hero-text, var(--ss-text-primary));
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.marketplace-price strong {
  color: var(--hero-amber, var(--ss-warning));
}

.marketplace-description-block {
  min-height: 0;
}

.marketplace-description-block p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: var(--hero-muted, var(--ss-text-secondary));
  font-size: 12px;
  line-height: 1.45;
}

.marketplace-use-case-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 25px;
}

.marketplace-use-case-list span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  color: var(--hero-muted, var(--ss-text-secondary));
  background: rgba(2, 24, 29, 0.22);
  border: 1px solid var(--ss-border);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.2;
}

.marketplace-card-footer {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding-top: 13px;
  border-top: 1px solid var(--ss-border);
}

.marketplace-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.marketplace-progress {
  height: 3px;
  overflow: hidden;
  background: rgba(2, 24, 29, 0.46);
  border-radius: 99px;
}

.marketplace-progress span {
  display: block;
  height: 100%;
  min-width: 3px;
  background: linear-gradient(90deg, var(--ss-accent-blue), var(--ss-accent));
  border-radius: inherit;
  transition: width 420ms ease;
}

.marketplace-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.marketplace-card-actions .text-action {
  width: auto;
  min-height: 24px;
  padding: 4px 8px;
  color: var(--hero-muted, var(--ss-text-secondary));
  background: transparent;
  border: 1px solid var(--ss-border);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.marketplace-card-actions .text-action:hover {
  color: var(--hero-text, var(--ss-text-primary));
  background: var(--ss-info-bg);
  border-color: var(--ss-border-active);
}

.marketplace-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  margin-top: 50px;
  padding-top: 26px;
  border-top: 1px solid var(--ss-border);
}

.marketplace-footer-cta {
  margin: 0;
  color: var(--hero-text, var(--ss-text-primary));
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.marketplace-footer-metrics {
  display: flex;
  align-items: baseline;
  gap: 26px;
}

.marketplace-footer-metrics span {
  display: grid;
  gap: 5px;
  text-align: right;
}

.marketplace-footer-metrics strong {
  color: var(--hero-text, var(--ss-text-primary));
  font-family: "DM Mono", monospace;
  font-size: 18px;
  font-weight: 500;
}

@keyframes marketplace-signal-pulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-7px); }
}

@keyframes marketplace-card-model-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.marketplace-card-content.is-transitioning {
  opacity: 0.2;
  transform: translateY(4px);
  transition: opacity 170ms ease, transform 170ms ease;
}

.marketplace-card-content.is-entering {
  animation: marketplace-card-model-in 360ms ease both;
}

@media (min-width: 2000px) {
  .marketplace-section { padding-top: 154px; padding-bottom: 176px; }
  .marketplace-inner { max-width: 1840px; }
  .marketplace-heading h2 { font-size: 64px; }
  .marketplace-subtitle { font-size: 20px; }
  .marketplace-grid { gap: 32px 24px; }
  .marketplace-card { height: 590px; padding: 24px; }
  .marketplace-router-bridge { margin-top: 48px; }
  .marketplace-footer { margin-top: 64px; }
}


@media (max-width: 1199px) {
  .marketplace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marketplace-toolbar { align-items: flex-start; flex-direction: column; }
  .marketplace-status { justify-content: flex-start; }
  .marketplace-card { height: 570px; }
}

@media (max-width: 767px) {
  .marketplace-section { padding: 82px 18px 92px; }
  .marketplace-heading { margin-bottom: 32px; }
  .marketplace-heading h2 { font-size: 38px; }
  .marketplace-subtitle { font-size: 16px; }
  .marketplace-description { font-size: 11px; }
  .marketplace-grid { grid-template-columns: 1fr; }
  .marketplace-router-bridge { margin-top: 30px; }
  .marketplace-router-signal { width: 54%; height: 28px; grid-template-columns: 1fr; }
  .marketplace-router-signal::before { height: 14px; }
  .marketplace-router-signal::after { display: none; }
  .marketplace-router-signal-line { display: none; }
  .marketplace-router-signal-line:first-child { display: block; height: 18px; }
  .marketplace-card { height: 560px; padding: 18px; }
  .marketplace-card::before { top: -18px; height: 18px; }
  .marketplace-footer { align-items: flex-start; flex-direction: column; gap: 22px; margin-top: 42px; }
  .marketplace-footer-metrics { width: 100%; justify-content: space-between; gap: 12px; }
  .marketplace-footer-metrics span { text-align: left; }
}

@media (max-width: 390px) {
  .marketplace-section { padding-right: 15px; padding-left: 15px; }
  .marketplace-heading h2 { font-size: 34px; }
  .marketplace-card { height: 575px; padding: 16px; }
  .marketplace-detail-grid,
  .marketplace-pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .marketplace-router-signal-line::after,
  .marketplace-card-content.is-entering { animation: none !important; }
  .marketplace-card-content.is-transitioning,
  .marketplace-progress span { transition: none !important; }
}

/* Screen 09: Developer Integration Hub */
.developer-section {
  position: relative;
  width: 100%;
  padding: 72px clamp(28px, 3vw, 60px) 78px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 22% 18%, rgba(62, 224, 188, 0.14), transparent 26%),
    radial-gradient(circle at 82% 74%, rgba(255, 162, 77, 0.11), transparent 30%),
    linear-gradient(180deg, #045147 0%, #03332f 100%);
  box-sizing: border-box;
}

.developer-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background-image: linear-gradient(rgba(126, 151, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 151, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, transparent 96%);
}

.developer-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1420px;
  margin-inline: auto;
  box-sizing: border-box;
}

.developer-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.developer-eyebrow {
  margin: 0 0 10px;
  color: var(--hero-amber);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.developer-heading h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.08;
}

.developer-subtitle,
.developer-supporting-copy {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--hero-muted);
  line-height: 1.45;
}

.developer-subtitle {
  font-size: 15px;
  font-weight: 700;
}

.developer-supporting-copy {
  margin-top: 4px;
  font-size: 12px;
}

.developer-heading-badges,
.developer-card-status,
.developer-simulated-badge,
.developer-concept-badge,
.developer-secure-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.developer-heading-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.developer-heading-badge,
.developer-concept-badge {
  padding: 7px 9px;
  color: var(--hero-text);
  background: rgba(2, 24, 29, 0.42);
  border: 1px solid var(--hero-line);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.developer-heading-badge svg,
.developer-card-status svg,
.developer-simulated-badge svg,
.developer-secure-state svg,
.developer-code-note svg,
.developer-hub-note svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.developer-heading-badge--muted,
.developer-concept-badge {
  color: var(--hero-muted);
  border-color: rgba(181, 255, 222, 0.28);
}

.developer-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
}

.developer-flow-card,
.developer-code-card,
.developer-principle {
  min-width: 0;
  border-radius: 8px;
}

.developer-flow-card,
.developer-code-card {
  padding: 16px;
}

.developer-card-heading,
.developer-flow-heading,
.developer-cli-heading,
.developer-client-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.developer-card-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--hero-amber);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.developer-card-heading h3,
.developer-flow-heading h3,
.developer-cli-heading h3,
.developer-client-heading h3 {
  margin: 0;
  color: var(--hero-text);
  font-size: 18px;
  line-height: 1.2;
}

.developer-card-status,
.developer-simulated-badge {
  color: var(--marketing-mint);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.developer-step-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin-top: 14px;
}

.developer-step-tab,
.developer-code-tab,
.developer-model-chip,
.developer-copy-button,
.developer-env-copy {
  color: var(--hero-muted);
  background: rgba(2, 24, 29, 0.34);
  border: 1px solid rgba(181, 255, 222, 0.22);
  border-radius: 5px;
}

.developer-step-tab {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 8px 7px;
  text-align: left;
  font-size: 10px;
  line-height: 1.25;
}

.developer-step-tab:hover,
.developer-step-tab:focus-visible,
.developer-step-tab.is-active,
.developer-code-tab:hover,
.developer-code-tab:focus-visible,
.developer-code-tab.is-active,
.developer-model-chip:hover,
.developer-model-chip:focus-visible,
.developer-model-chip.is-selected {
  color: var(--hero-text);
  background: var(--marketing-emerald-end);
  border-color: var(--hero-line);
  box-shadow: 0 0 14px rgba(110, 255, 240, 0.12);
}

.developer-step-number {
  color: var(--marketing-mint);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.developer-step-tab.is-active .developer-step-number {
  color: var(--hero-text);
}

.developer-step-panel {
  min-height: 107px;
  margin-top: 9px;
  padding: 11px 12px;
  background: rgba(2, 24, 29, 0.32);
  border: 1px solid rgba(181, 255, 222, 0.2);
  border-radius: 6px;
}

.developer-step-panel-top,
.developer-config-label,
.developer-code-toolbar,
.developer-payload-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.developer-step-panel-top span:first-child {
  color: var(--hero-amber);
}

.developer-step-panel h4 {
  margin: 8px 0 3px;
  color: var(--hero-text);
  font-size: 15px;
}

.developer-step-panel p {
  margin: 0;
  color: var(--hero-muted);
  font-size: 11px;
  line-height: 1.4;
}

.developer-step-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 10px;
  margin-top: 8px;
}

.developer-step-checks span,
.developer-cli-statuses span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.3;
}

.developer-step-checks svg,
.developer-cli-statuses svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  color: var(--marketing-mint);
}

.developer-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.developer-config-field {
  position: relative;
  min-width: 0;
  padding: 9px 10px;
  background: rgba(2, 24, 29, 0.4);
  border: 1px solid rgba(181, 255, 222, 0.2);
  border-radius: 6px;
}

.developer-config-field > code {
  display: block;
  margin-top: 7px;
  overflow-x: auto;
  color: var(--hero-blue);
  background: transparent;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  white-space: nowrap;
}

.developer-secure-state {
  color: var(--marketing-mint);
  font-size: 9px;
}

.developer-copy-button,
.developer-env-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
}

.developer-copy-button:hover,
.developer-copy-button:focus-visible,
.developer-env-copy:hover,
.developer-env-copy:focus-visible,
.developer-copy-button.is-copied,
.developer-env-copy.is-copied {
  color: var(--ss-bg-primary);
  background: var(--ss-accent);
  border-color: var(--ss-accent);
}

.developer-copy-button svg,
.developer-env-copy svg {
  width: 11px;
  height: 11px;
}

.developer-env-copy {
  margin-top: 7px;
}

.developer-model-bar {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
}

.developer-model-bar > .developer-config-label {
  flex: 0 0 auto;
  padding-top: 5px;
}

.developer-model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-width: 0;
}

.developer-model-chip {
  padding: 4px 7px;
  font-size: 9px;
}

.developer-code-panel {
  display: flex;
  flex-direction: column;
}

.developer-code-tabs {
  display: flex;
  gap: 5px;
  margin-top: 14px;
  border-bottom: 1px solid rgba(181, 255, 222, 0.18);
}

.developer-code-tab {
  padding: 7px 10px;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.developer-code-toolbar {
  margin-top: 8px;
}

.developer-code-toolbar > code {
  padding: 0;
  color: var(--marketing-mint);
  background: transparent;
  font-size: 9px;
}

.developer-code-surface {
  min-height: 0;
  margin-top: 6px;
  background: var(--ss-surface-3);
  border: 1px solid var(--ss-border);
  border-radius: 6px;
  outline: none;
}

.developer-code-surface:focus-visible {
  border-color: var(--ss-border-active);
  box-shadow: 0 0 0 2px rgba(104, 207, 255, 0.16);
}

.developer-code-surface pre {
  max-height: 236px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: var(--ss-text-primary);
  background: transparent;
  font-size: 10px;
  line-height: 1.5;
}

.developer-code-surface code {
  display: block;
  min-width: max-content;
  padding: 0;
  color: var(--ss-accent);
  background: transparent;
  font-family: "DM Mono", monospace;
  white-space: pre;
}

.developer-code-note,
.developer-hub-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  color: var(--hero-muted);
  font-size: 9px;
}

.developer-code-note {
  margin-top: 7px;
}

.developer-request-flow {
  margin-top: 12px;
  padding: 14px 16px;
}

.developer-flow-track {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 0.8fr);
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

.developer-flow-node {
  min-width: 0;
  padding: 9px 10px;
  background: var(--marketing-node);
  border: 1px solid rgba(181, 255, 222, 0.28);
  border-radius: 6px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.developer-flow-node.is-active {
  border-color: var(--hero-line);
  box-shadow: 0 0 18px rgba(110, 255, 240, 0.14);
  transform: translateY(-2px);
}

.developer-flow-node-kicker {
  display: block;
  overflow: hidden;
  color: var(--hero-muted);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developer-flow-node strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--hero-text);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developer-flow-connector {
  color: var(--hero-amber);
  font-family: "DM Mono", monospace;
  font-size: 18px;
  text-align: center;
}

.developer-request-response-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.developer-payload-panel {
  min-width: 0;
  padding: 8px 10px;
  background: rgba(2, 24, 29, 0.42);
  border: 1px solid rgba(181, 255, 222, 0.2);
  border-radius: 6px;
}

.developer-payload-panel > code {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: var(--hero-blue);
  background: transparent;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developer-response-code {
  color: var(--marketing-mint) !important;
}

.developer-secondary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 12px;
  margin-top: 12px;
}

.developer-cli-panel,
.developer-client-panel {
  padding: 14px 16px;
}

.developer-terminal {
  margin-top: 10px;
  overflow: hidden;
  background: var(--ss-surface-3);
  border: 1px solid var(--ss-border);
  border-radius: 6px;
}

.developer-terminal-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  color: var(--hero-muted);
  background: rgba(2, 24, 29, 0.78);
  border-bottom: 1px solid var(--ss-border);
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.developer-terminal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hero-amber);
}

.developer-terminal-dot:nth-child(2) { background: var(--ss-accent-blue); }
.developer-terminal-dot:nth-child(3) { background: var(--marketing-mint); }

.developer-terminal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
}

.developer-terminal-body > code {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--hero-blue);
  background: transparent;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.developer-cli-statuses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 5px 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(181, 255, 222, 0.14);
}

.developer-client-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 17px;
}

.developer-client-chips span {
  padding: 7px 9px;
  color: var(--hero-muted);
  background: rgba(2, 24, 29, 0.38);
  border: 1px solid rgba(181, 255, 222, 0.22);
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.developer-hub-note {
  justify-content: center;
  margin-top: 10px;
  color: rgba(231, 255, 241, 0.7);
}

@media (max-width: 1100px) {
  .developer-heading { align-items: flex-start; flex-direction: column; }
  .developer-heading-badges { justify-content: flex-start; }
  .developer-hub-grid { grid-template-columns: 1fr; }
  .developer-code-surface pre { max-height: 190px; }
}

@media (min-width: 1101px) {
  .developer-section { padding-top: 24px; padding-bottom: 24px; }
  .developer-heading { margin-bottom: 14px; }
  .developer-subtitle { margin-top: 6px; font-size: 14px; }
  .developer-supporting-copy { margin-top: 3px; font-size: 11px; }
  .developer-flow-card,
  .developer-code-card { padding: 13px; }
  .developer-card-heading h3,
  .developer-flow-heading h3,
  .developer-cli-heading h3,
  .developer-client-heading h3 { font-size: 16px; }
  .developer-step-tabs,
  .developer-code-tabs { margin-top: 10px; }
  .developer-step-tab { padding: 6px; font-size: 9px; }
  .developer-step-panel { min-height: 88px; margin-top: 6px; padding: 8px 10px; }
  .developer-step-panel h4 { margin-top: 5px; font-size: 14px; }
  .developer-step-panel p { font-size: 10px; }
  .developer-step-checks { margin-top: 5px; }
  .developer-step-checks span,
  .developer-cli-statuses span { font-size: 8px; }
  .developer-config-grid { margin-top: 6px; }
  .developer-config-field { padding: 7px 8px; }
  .developer-config-field > code { margin-top: 5px; font-size: 9px; }
  .developer-env-copy { margin-top: 5px; }
  .developer-model-bar { margin-top: 6px; }
  .developer-model-chip { padding: 3px 6px; font-size: 8px; }
  .developer-code-toolbar { margin-top: 5px; }
  .developer-code-surface { margin-top: 4px; }
  .developer-code-surface pre { max-height: 165px; padding: 9px; font-size: 9px; line-height: 1.4; }
  .developer-code-note { margin-top: 4px; font-size: 8px; }
  .developer-request-flow { margin-top: 9px; padding: 10px 12px; }
  .developer-flow-track { gap: 5px; margin-top: 8px; }
  .developer-flow-node { padding: 7px 8px; }
  .developer-flow-node strong { margin-top: 3px; font-size: 9px; }
  .developer-request-response-grid { gap: 6px; margin-top: 6px; }
  .developer-payload-panel { padding: 6px 8px; }
  .developer-payload-panel > code { margin-top: 4px; font-size: 9px; }
  .developer-secondary-grid { gap: 9px; margin-top: 9px; }
  .developer-cli-panel,
  .developer-client-panel { padding: 10px 12px; }
  .developer-terminal { margin-top: 6px; }
  .developer-terminal-bar { padding: 5px 8px; }
  .developer-terminal-body { padding: 7px 8px; }
  .developer-client-chips { gap: 4px; margin-top: 9px; }
  .developer-client-chips span { padding: 5px 7px; font-size: 8px; }
  .developer-hub-note { margin-top: 6px; font-size: 8px; }
}

@media (max-width: 767px) {
  .developer-section { padding: 64px 18px 72px; }
  .developer-heading { margin-bottom: 18px; }
  .developer-heading h2 { font-size: clamp(32px, 9vw, 44px); }
  .developer-subtitle { font-size: 14px; }
  .developer-supporting-copy { font-size: 11px; }
  .developer-step-tabs { grid-template-columns: repeat(5, minmax(112px, 1fr)); overflow-x: auto; padding-bottom: 2px; }
  .developer-step-tab { min-height: 54px; }
  .developer-step-panel { min-height: 124px; }
  .developer-step-checks { grid-template-columns: 1fr; }
  .developer-config-grid,
  .developer-request-response-grid,
  .developer-secondary-grid { grid-template-columns: 1fr; }
  .developer-model-bar { display: block; }
  .developer-model-chips { flex-wrap: nowrap; margin-top: 7px; overflow-x: auto; padding-bottom: 2px; }
  .developer-model-chip { flex: 0 0 auto; }
  .developer-flow-track { grid-template-columns: 1fr; gap: 5px; }
  .developer-flow-connector { transform: rotate(90deg); line-height: 13px; }
  .developer-flow-node strong { white-space: normal; }
  .developer-code-surface pre { max-height: 240px; }
  .developer-client-chips { margin-top: 12px; }
}

@media (max-width: 390px) {
  .developer-section { padding: 58px 15px 64px; }
  .developer-flow-card,
  .developer-code-card,
  .developer-principle { padding: 13px; }
  .developer-card-heading h3,
  .developer-flow-heading h3,
  .developer-cli-heading h3,
  .developer-client-heading h3 { font-size: 16px; }
  .developer-heading-badges { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .developer-heading-badge { justify-content: center; overflow: hidden; text-overflow: ellipsis; }
  .developer-step-panel h4 { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .developer-flow-node,
  .developer-step-tab,
  .developer-code-tab,
  .developer-model-chip { transition-duration: 0.01ms; }
  .developer-flow-node.is-active { transform: none; }
}

/* Screen 04: AI Governance */
.governance-section {
  --governance-panel: var(--ss-surface-2);
  --governance-panel-soft: var(--ss-surface-1);
  --governance-line: var(--ss-border);
  --governance-blue: var(--ss-accent-blue);
  --governance-green: var(--ss-success);
  position: relative;
  width: 100%;
  padding: 112px clamp(40px, 3vw, 60px) 128px;
  color: var(--hero-text);
  background:
    radial-gradient(circle at 20% 16%, rgba(98, 165, 255, 0.14), transparent 26%),
    radial-gradient(circle at 82% 80%, rgba(255, 162, 77, 0.11), transparent 30%),
    linear-gradient(180deg, #033b36 0%, #032d29 100%);
  box-sizing: border-box;
}

.governance-section::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.14;
  background-image: linear-gradient(rgba(126, 151, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(126, 151, 255, 0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, transparent 96%);
}

.governance-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  box-sizing: border-box;
}

.governance-heading {
  max-width: 780px;
  margin-bottom: 52px;
}

.governance-eyebrow {
  margin: 0 0 18px;
  color: #8fc1ff;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
}

.governance-heading h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.08;
}

.governance-subtitle {
  margin: 20px 0 0;
  color: var(--hero-muted);
  font-size: 16px;
  line-height: 1.75;
}

.governance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.governance-card,
.governance-architecture {
  min-width: 0;
  background: rgba(8, 69, 60, 0.74);
  border: 1px solid rgba(142, 164, 255, 0.22);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.governance-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.governance-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.governance-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--hero-blue);
  background: rgba(98, 165, 255, 0.1);
  border: 1px solid rgba(98, 165, 255, 0.25);
  border-radius: 8px;
}

.governance-icon svg {
  width: 20px;
  height: 20px;
}

.governance-index {
  color: #7180b3;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.governance-card h3 {
  margin: 0;
  color: var(--hero-text);
  font-size: 19px;
  line-height: 1.3;
}

.governance-card-copy {
  margin: 14px 0 0;
  color: var(--hero-muted);
  font-size: 13px;
  line-height: 1.7;
}

.governance-access-map,
.governance-observability-panel,
.governance-scheduler {
  min-width: 0;
  margin-top: 20px;
  padding: 12px;
  background: rgba(8, 14, 34, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 8px;
}

.governance-access-map {
  display: grid;
  gap: 9px;
}

.governance-access-root {
  justify-self: center;
  padding: 6px 10px;
  color: #e9f3ff;
  background: rgba(98, 165, 255, 0.2);
  border: 1px solid rgba(98, 165, 255, 0.45);
  border-radius: 999px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.governance-access-scopes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.governance-access-scope {
  min-width: 0;
  padding: 7px 6px;
  color: #b8c7f0;
  background: rgba(18, 25, 52, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: center;
}

.governance-observability-panel {
  display: grid;
  gap: 10px;
}

.governance-observability-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.governance-observability-heading svg {
  width: 15px;
  height: 15px;
  color: #8fc1ff;
}

.governance-observability-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.governance-observability-metric {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 8px;
  background: rgba(18, 25, 52, 0.58);
  border: 1px solid rgba(142, 164, 255, 0.16);
  border-radius: 6px;
}

.governance-observability-metric span {
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.governance-observability-metric strong {
  min-width: 0;
  color: #ecf1ff;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.governance-scheduler {
  display: grid;
  gap: 7px;
}

.governance-scheduler-node {
  display: inline-flex;
  justify-self: start;
  min-width: 0;
  align-items: center;
  padding: 7px 10px;
  color: #d9e4ff;
  background: rgba(18, 25, 52, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.22);
  border-radius: 7px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.governance-scheduler-policy {
  color: #eaf2ff;
  background: rgba(98, 165, 255, 0.16);
  border-color: rgba(98, 165, 255, 0.42);
}

.governance-scheduler-connector {
  display: grid;
  width: 1px;
  height: 14px;
  place-items: end center;
  color: #8fc1ff;
  background: linear-gradient(#8fc1ff, rgba(142, 164, 255, 0.14));
}

.governance-scheduler-connector svg {
  width: 13px;
  height: 13px;
  padding: 1px;
  background: #0c1330;
}

.governance-scheduler-channels {
  display: grid;
  gap: 6px;
}

.governance-scheduler-channel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 9px;
  background: rgba(18, 25, 52, 0.58);
  border: 1px solid rgba(142, 164, 255, 0.16);
  border-radius: 6px;
}

.governance-scheduler-channel > span {
  display: inline-flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
}

.governance-scheduler-channel b,
.governance-scheduler-channel em {
  min-width: 0;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.governance-scheduler-channel b {
  color: #d7e3ff;
  font-weight: 500;
}

.governance-scheduler-channel em {
  color: #9eb0e7;
  text-align: right;
}

.governance-scheduler-channel:first-child em {
  color: #8ee4c7;
}

.governance-channel-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #8fc1ff;
  box-shadow: 0 0 0 3px rgba(143, 193, 255, 0.14);
}

.governance-channel-dot.is-healthy {
  background: #6fe0be;
  box-shadow: 0 0 0 3px rgba(111, 224, 190, 0.16);
  animation: governance-status-pulse 2.3s ease-in-out infinite;
}

.governance-capability-list {
  display: flex;
  gap: 6px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.governance-capability-list li {
  min-width: 0;
  padding: 5px 7px;
  color: #b7c7f0;
  background: rgba(98, 165, 255, 0.08);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.governance-architecture {
  display: grid;
  gap: 20px;
  margin-top: 20px;
  padding: 22px;
}

.governance-architecture-heading {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
}

.governance-architecture-heading strong {
  color: var(--hero-text);
  font-size: 20px;
}

.governance-architecture-flow {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.governance-architecture-node {
  display: inline-flex;
  width: min(100%, 360px);
  min-width: 0;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  color: #d9e4ff;
  background: rgba(18, 25, 52, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.24);
  border-radius: 8px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-align: center;
}

.governance-architecture-node svg,
.governance-layer-heading svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: #8fc1ff;
}

.governance-architecture-node strong,
.governance-provider-stage > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.governance-router-node {
  width: min(100%, 520px);
  color: #eaf2ff;
  background: rgba(98, 165, 255, 0.14);
  border-color: rgba(98, 165, 255, 0.44);
  box-shadow: 0 0 34px rgba(98, 165, 255, 0.12);
}

.governance-architecture-connector {
  position: relative;
  display: grid;
  width: 1px;
  height: 36px;
  place-items: end center;
  color: #8fc1ff;
  background: linear-gradient(#8fc1ff, rgba(142, 164, 255, 0.14));
}

.governance-architecture-connector::before {
  position: absolute;
  top: 0;
  left: -1px;
  width: 3px;
  height: 10px;
  content: "";
  opacity: 0.2;
  background: #6fe0be;
  border-radius: 999px;
  animation: governance-flow 2.4s ease-in-out infinite;
}

.governance-architecture-connector svg {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  padding: 2px;
  background: #0c1330;
}

.governance-layer {
  width: min(100%, 900px);
  min-width: 0;
  padding: 16px;
  background: rgba(18, 25, 52, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.3);
  border-radius: 10px;
}

.governance-layer-heading {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: center;
  color: #ecf1ff;
  font-family: "DM Mono", monospace;
  font-size: 12px;
}

.governance-layer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.governance-layer-grid span,
.governance-provider-grid span {
  min-width: 0;
  padding: 10px;
  color: #c9d7ff;
  background: rgba(8, 14, 34, 0.62);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 7px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: center;
}

.governance-provider-stage {
  display: grid;
  width: min(100%, 980px);
  min-width: 0;
  gap: 10px;
  text-align: center;
}

.governance-provider-stage > strong {
  color: #d9e4ff;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
}

.governance-provider-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.governance-provider-grid span {
  color: #b7c7f0;
  background: rgba(18, 25, 52, 0.68);
}

@keyframes governance-flow {
  0%, 100% { opacity: 0.18; transform: translateY(-6px); }
  50% { opacity: 1; transform: translateY(22px); }
}

@keyframes governance-status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(111, 224, 190, 0.16); }
  50% { box-shadow: 0 0 0 6px rgba(111, 224, 190, 0.04); }
}

@media (max-width: 1023px) {
  .governance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .governance-provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .governance-section { padding: 78px 18px 88px; }
  .governance-heading { margin-bottom: 36px; }
  .governance-heading h2 { font-size: clamp(32px, 9vw, 44px); }
  .governance-subtitle { font-size: 14px; }
  .governance-grid { grid-template-columns: 1fr; }
  .governance-architecture { gap: 18px; padding: 18px; }
  .governance-architecture-heading strong { font-size: 18px; }
  .governance-architecture-connector { height: 30px; }
  .governance-layer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .governance-card h3 { font-size: 18px; }
  .governance-access-scopes,
  .governance-observability-grid { grid-template-columns: 1fr; }
  .governance-scheduler-channel { grid-template-columns: 1fr; }
  .governance-scheduler-channel em { text-align: left; }
}

@media (max-width: 375px) {
  .governance-section { padding-right: 15px; padding-left: 15px; }
}

.governance-heading {
  max-width: 900px;
  margin-bottom: 32px;
}

.governance-heading h1,
.governance-heading h2 {
  font-size: 52px;
  line-height: 1.08;
}

.governance-subtitle {
  max-width: 760px;
  font-size: 17px;
}

.governance-hero-description {
  max-width: 760px;
  margin: 12px 0 0;
  color: #b8c7f0;
  font-size: 14px;
  line-height: 1.7;
}

.governance-question-panel,
.governance-foundation-panel,
.governance-policy-panel,
.governance-trace-panel,
.governance-checklist-panel,
.governance-audit-trail,
.governance-alert-layout,
.governance-compare-panel,
.governance-ai-column {
  min-width: 0;
  background: var(--governance-panel);
  border: 1px solid var(--governance-line);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.governance-narrative-section,
.governance-value-section,
.governance-compare-section {
  margin-top: 88px;
  padding-top: 42px;
  border-top: 1px solid rgba(142, 164, 255, 0.18);
}

.governance-section-heading {
  display: grid;
  max-width: 820px;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: baseline;
  margin-bottom: 30px;
}

.governance-hero-title-row {
  margin-bottom: 0;
}

.governance-hero-title-row h1 {
  margin: 0;
}

.governance-section-number {
  color: var(--governance-blue);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.governance-section-heading h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: 32px;
  line-height: 1.15;
}

.governance-section-heading p {
  grid-column: 2;
  margin: 9px 0 0;
  color: var(--hero-muted);
  font-size: 15px;
  line-height: 1.65;
}

.governance-observe-chain {
  min-width: 0;
  margin-bottom: 16px;
  padding: 16px 18px;
  background: rgba(8, 14, 34, 0.46);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 8px;
}

.governance-observe-chain ol {
  display: flex;
  min-width: 0;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.governance-observe-chain li {
  min-width: 0;
  color: #d9e4ff;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.governance-observe-chain li:not(:last-child)::after {
  margin-left: 8px;
  color: var(--governance-green);
  content: ">";
}

.governance-access-layout,
.governance-policy-layout,
.governance-observe-layout,
.governance-audit-layout,
.governance-resource-layout {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.governance-access-layout,
.governance-policy-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
}

.governance-observe-layout,
.governance-audit-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.governance-question-panel,
.governance-foundation-panel,
.governance-policy-panel,
.governance-trace-panel,
.governance-checklist-panel,
.governance-audit-trail,
.governance-alert-layout,
.governance-compare-panel,
.governance-ai-column {
  padding: 22px;
}

.governance-question-panel h3,
.governance-checklist-panel h3,
.governance-audit-copy h3,
.governance-alert-layout h3 {
  margin: 0;
  color: var(--hero-text);
  font-size: 20px;
  line-height: 1.3;
}

.governance-org-flow {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  margin-top: 22px;
  color: #b7c7f0;
  flex-wrap: wrap;
}

.governance-org-flow span,
.governance-org-flow strong {
  min-width: 0;
  padding: 8px 9px;
  color: #d9e4ff;
  background: rgba(18, 25, 52, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.governance-org-flow strong {
  color: #ecf1ff;
  background: rgba(98, 165, 255, 0.16);
  border-color: rgba(98, 165, 255, 0.38);
}

.governance-org-flow svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: var(--governance-blue);
}

.governance-token-list,
.governance-resource-list,
.governance-compare-panel ul {
  display: flex;
  gap: 7px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.governance-token-list li,
.governance-resource-list li {
  min-width: 0;
  padding: 7px 9px;
  color: #b7c7f0;
  background: rgba(98, 165, 255, 0.08);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.governance-foundation-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  background: rgba(8, 14, 34, 0.52);
}

.governance-foundation-panel p,
.governance-audit-copy p,
.governance-resource-columns p,
.governance-muted-copy {
  margin: 0;
  color: #b8c7f0;
  font-size: 13px;
  line-height: 1.7;
}

.governance-designed-label,
.governance-proof-label,
.governance-panel-heading {
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.governance-designed-label {
  margin-top: 7px;
  color: #f0c58a;
}

.governance-policy-panel,
.governance-trace-panel {
  background: rgba(8, 14, 34, 0.64);
}

.governance-panel-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.governance-panel-heading svg {
  width: 15px;
  height: 15px;
  color: var(--governance-blue);
}

.governance-policy-flow {
  display: grid;
  margin: 22px 0 0;
  padding: 0;
  counter-reset: governance-policy-step;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
}

.governance-policy-flow li {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 62px;
  padding: 10px 8px;
  place-items: center;
  color: #d9e4ff;
  background: rgba(18, 25, 52, 0.66);
  border: 1px solid rgba(142, 164, 255, 0.16);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  text-align: center;
}

.governance-policy-flow li + li { border-left: 0; }

.governance-policy-flow li::before {
  display: block;
  margin-bottom: 5px;
  color: var(--governance-blue);
  content: counter(governance-policy-step, decimal-leading-zero);
  counter-increment: governance-policy-step;
  font-size: 8px;
}

.governance-policy-outcomes {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.governance-policy-outcomes span {
  padding: 7px 9px;
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.governance-policy-outcomes .is-passed {
  color: var(--governance-green);
  background: rgba(111, 224, 190, 0.1);
  border: 1px solid rgba(111, 224, 190, 0.24);
}

.governance-policy-outcomes .is-restricted {
  color: #f0c58a;
  background: rgba(240, 197, 138, 0.08);
  border: 1px solid rgba(240, 197, 138, 0.22);
}

.governance-trace-grid {
  display: grid;
  margin: 20px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.governance-trace-grid > div {
  min-width: 0;
  padding: 10px;
  background: rgba(18, 25, 52, 0.58);
  border: 1px solid rgba(142, 164, 255, 0.16);
  border-radius: 6px;
}

.governance-trace-grid dt,
.governance-trace-grid dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.governance-trace-grid dt {
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.governance-trace-grid dd {
  margin: 5px 0 0;
  color: #ecf1ff;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.35;
}

.governance-trace-grid dd.is-positive { color: var(--governance-green); }

.governance-checklist {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.governance-checklist li {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  color: #c9d7ff;
  background: rgba(18, 25, 52, 0.58);
  border: 1px solid rgba(142, 164, 255, 0.16);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.governance-checklist li svg {
  width: 13px;
  height: 13px;
  color: var(--governance-green);
}

.governance-checklist li span,
.governance-checklist li b { overflow-wrap: anywhere; }

.governance-checklist li b {
  color: #9eb0e7;
  font-weight: 500;
  text-align: right;
}

.governance-checklist-panel .governance-muted-copy { margin-top: 18px; }

.governance-audit-copy {
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 10px 0;
}

.governance-audit-trail {
  display: grid;
  gap: 0;
  background: rgba(8, 14, 34, 0.64);
}

.governance-audit-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(100px, 0.7fr) minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(142, 164, 255, 0.13);
  font-family: "DM Mono", monospace;
  font-size: 10px;
}

.governance-audit-row:last-child { border-bottom: 0; }

.governance-audit-row span { color: #9eb0e7; }

.governance-audit-row strong {
  min-width: 0;
  color: #ecf1ff;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.governance-resource-layout { gap: 22px; }

.governance-resource-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.governance-resource-columns > div {
  min-width: 0;
  padding: 18px 0;
  border-top: 2px solid rgba(98, 165, 255, 0.42);
}

.governance-resource-columns h3 {
  margin: 0 0 9px;
  color: var(--hero-text);
  font-size: 18px;
}

.governance-resource-list {
  margin-top: 0;
}

.governance-resource-list li { padding-inline: 10px; }

.governance-boundary-note {
  display: grid;
  gap: 5px;
  margin-top: 24px;
  padding: 15px 17px;
  background: rgba(240, 197, 138, 0.07);
  border-left: 2px solid rgba(240, 197, 138, 0.58);
}

.governance-boundary-note strong {
  color: #f0c58a;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  font-weight: 500;
}

.governance-boundary-note span {
  color: #c8c4bf;
  font-size: 12px;
  line-height: 1.6;
}

.governance-alert-layout { padding: 22px; }

.governance-alert-list {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
}

.governance-alert-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  color: #d9e4ff;
  background: rgba(18, 25, 52, 0.58);
  border: 1px solid rgba(142, 164, 255, 0.16);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
}

.governance-alert-list li svg {
  width: 14px;
  height: 14px;
  color: #f0c58a;
}

.governance-alert-list li span,
.governance-alert-list li em { overflow-wrap: anywhere; }

.governance-alert-list li em {
  color: #9eb0e7;
  font-style: normal;
}

.governance-alert-layout .governance-muted-copy { margin-top: 18px; }

.governance-value-section .governance-section-heading,
.governance-compare-section .governance-section-heading { display: block; }

.governance-value-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.governance-value-grid > div {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 18px 15px;
  background: rgba(18, 25, 52, 0.58);
  border: 1px solid rgba(142, 164, 255, 0.16);
  border-radius: 7px;
}

.governance-value-grid strong {
  color: var(--governance-blue);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.governance-value-grid span {
  color: #d9e4ff;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.governance-before-after,
.governance-ai-table {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.governance-compare-panel h3,
.governance-ai-column h3 {
  margin: 0;
  color: #b7c7f0;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.governance-compare-panel ul {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.governance-compare-panel li,
.governance-ai-column span {
  min-width: 0;
  padding: 10px 0;
  color: #c9d7ff;
  border-bottom: 1px solid rgba(142, 164, 255, 0.13);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.governance-compare-panel li:last-child,
.governance-ai-column span:last-child { border-bottom: 0; }

.governance-compare-panel.is-highlighted,
.governance-ai-column.is-highlighted {
  background: rgba(98, 165, 255, 0.11);
  border-color: rgba(98, 165, 255, 0.34);
}

.governance-compare-panel.is-highlighted h3,
.governance-ai-column.is-highlighted h3 { color: #ecf1ff; }

.governance-ai-column {
  display: grid;
  align-content: start;
  gap: 0;
  background: rgba(8, 14, 34, 0.52);
}

.governance-ai-column h3 { padding-bottom: 8px; }

.governance-cta {
  margin-top: 88px;
  padding: 42px;
  text-align: center;
  background: rgba(8, 14, 34, 0.55);
  border: 1px solid rgba(98, 165, 255, 0.26);
  border-radius: 10px;
}

.governance-cta h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: 32px;
  line-height: 1.15;
}

.governance-cta p {
  max-width: 640px;
  margin: 14px auto 0;
  color: var(--hero-muted);
  font-size: 15px;
  line-height: 1.65;
}

.governance-cta-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

@media (max-width: 1023px) {
  .governance-policy-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .governance-policy-flow li:nth-child(4),
  .governance-policy-flow li:nth-child(5) { border-left: 1px solid rgba(142, 164, 255, 0.16); }
  .governance-value-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .governance-alert-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .governance-section { padding: 78px 18px 88px; }
  .governance-heading h1,
  .governance-heading h2 { font-size: 38px; }
  .governance-subtitle { font-size: 14px; }
  .governance-hero-description { font-size: 13px; }
  .governance-section-heading { display: block; }
  .governance-section-number { display: block; margin-bottom: 8px; }
  .governance-section-heading h2 { font-size: 28px; }
  .governance-section-heading p { margin-top: 10px; }
  .governance-access-layout,
  .governance-policy-layout,
  .governance-observe-layout,
  .governance-audit-layout { grid-template-columns: 1fr; }
  .governance-policy-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .governance-policy-flow li + li { border-left: 0; }
  .governance-policy-flow li:nth-child(odd) { border-left: 1px solid rgba(142, 164, 255, 0.16); }
  .governance-trace-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .governance-resource-columns,
  .governance-alert-list,
  .governance-value-grid,
  .governance-before-after,
  .governance-ai-table { grid-template-columns: 1fr; }
  .governance-cta { padding: 30px 20px; }
  .governance-cta h2 { font-size: 28px; }
  .governance-cta-actions { align-items: stretch; flex-direction: column; }
  .governance-cta-actions .hero-button { justify-content: center; }
}

@media (max-width: 390px) {
  .governance-trace-grid { grid-template-columns: 1fr; }
}

.governance-live-system {
  margin-top: 52px;
  padding: 26px;
  background: rgba(8, 14, 34, 0.48);
  border: 1px solid rgba(98, 165, 255, 0.26);
  border-radius: 10px;
}

.governance-live-heading {
  display: flex;
  min-width: 0;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
}

.governance-live-heading h2 {
  margin: 0;
  color: var(--hero-text);
  font-size: 28px;
  line-height: 1.15;
}

.governance-live-heading p:last-child {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--hero-muted);
  font-size: 13px;
  line-height: 1.65;
}

.governance-live-badge {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  padding: 7px 9px;
  color: var(--governance-green);
  background: rgba(111, 224, 190, 0.08);
  border: 1px solid rgba(111, 224, 190, 0.22);
  border-radius: 5px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.governance-live-badge svg {
  width: 13px;
  height: 13px;
  animation: governance-live-blink 1.8s ease-in-out infinite;
}

.governance-live-canvas {
  position: relative;
  min-width: 0;
  min-height: 700px;
}

.governance-flow-svg {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.governance-flow-svg marker path {
  fill: #8fc1ff;
}

.governance-flow-path {
  fill: none;
  stroke: rgba(143, 193, 255, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 4 8;
  opacity: 0.65;
  vector-effect: non-scaling-stroke;
}

.governance-flow-path-model {
  stroke: rgba(142, 228, 199, 0.34);
}

.governance-flow-path-record {
  stroke: rgba(240, 197, 138, 0.34);
}

.governance-flow-path.is-active {
  stroke: var(--governance-blue);
  opacity: 1;
  animation: governance-path-flow 0.95s linear infinite;
}

.governance-flow-path-model.is-active { stroke: var(--governance-green); }

.governance-flow-path-record.is-active { stroke: #f0c58a; }

.governance-flow-particle {
  fill: var(--governance-blue);
  opacity: 0.95;
  pointer-events: none;
}

.governance-flow-particle-record { fill: #f0c58a; }

.governance-flow-particle[hidden] { display: none; }

.governance-live-architecture {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 700px;
  grid-template-areas:
    "users spine models"
    "users spine live";
  grid-template-columns: minmax(155px, 0.72fr) minmax(280px, 1fr) minmax(430px, 1.42fr);
  grid-template-rows: minmax(275px, auto) minmax(310px, auto);
  gap: 16px;
  align-items: stretch;
}

.governance-users-stage,
.governance-live-spine,
.governance-model-stage,
.governance-live-data-stage {
  min-width: 0;
}

.governance-users-stage {
  grid-area: users;
  padding: 18px;
  background: rgba(8, 14, 34, 0.76);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 9px;
}

.governance-live-panel-heading {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.governance-live-panel-heading h3 {
  margin: 5px 0 0;
  color: #ecf1ff;
  font-size: 16px;
  line-height: 1.2;
}

.governance-live-panel-heading > svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--governance-blue);
}

.governance-live-kicker {
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
}

.governance-user-grid {
  display: grid;
  margin-top: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.governance-user-node {
  display: grid;
  min-width: 0;
  min-height: 38px;
  padding: 8px 6px;
  place-items: center;
  color: #aebde5;
  background: rgba(18, 25, 52, 0.7);
  border: 1px solid rgba(142, 164, 255, 0.16);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.governance-user-node.is-active {
  color: #ecf1ff;
  background: rgba(98, 165, 255, 0.18);
  border-color: rgba(143, 193, 255, 0.74);
  box-shadow: 0 0 22px rgba(98, 165, 255, 0.2);
}

.governance-live-spine {
  display: flex;
  grid-area: spine;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
}

.governance-live-node {
  position: relative;
  min-width: 0;
  padding: 18px;
  background: rgba(8, 14, 34, 0.86);
  border: 1px solid rgba(142, 164, 255, 0.24);
  border-radius: 9px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.governance-entry-node {
  display: grid;
  gap: 8px;
  text-align: center;
}

.governance-entry-node strong,
.governance-router-live-node > strong {
  min-width: 0;
  color: #ecf1ff;
  font-family: "DM Mono", monospace;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.governance-live-node-status,
.governance-router-live-status,
.governance-router-live-stage,
.governance-router-request-id {
  display: block;
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.governance-spine-connector {
  width: 1px;
  height: 28px;
  margin: 0 auto;
  background: linear-gradient(var(--governance-blue), rgba(143, 193, 255, 0.08));
}

.governance-router-live-node {
  display: grid;
  gap: 8px;
  border-color: rgba(98, 165, 255, 0.5);
  background: rgba(15, 38, 70, 0.86);
  box-shadow: 0 0 34px rgba(98, 165, 255, 0.13), 0 16px 32px rgba(0, 0, 0, 0.24);
}

.governance-router-live-node.is-processing {
  animation: governance-router-processing 0.8s ease-in-out;
}

.governance-router-live-node.is-recorded {
  animation: governance-router-recorded 0.8s ease-in-out;
}

.governance-router-live-heading {
  display: flex;
  gap: 7px;
  align-items: center;
}

.governance-router-live-heading svg {
  width: 15px;
  height: 15px;
  color: var(--governance-blue);
}

.governance-router-live-status {
  color: var(--governance-green);
}

.governance-router-live-stage { color: #f0c58a; }

.governance-router-request-id {
  color: #b7c7f0;
  letter-spacing: 0.03em;
}

.governance-router-capabilities {
  display: grid;
  margin: 8px 0 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  list-style: none;
}

.governance-router-capabilities li {
  min-width: 0;
  padding: 6px 7px;
  color: rgba(174, 189, 229, 0.62);
  background: rgba(8, 14, 34, 0.48);
  border: 1px solid rgba(142, 164, 255, 0.1);
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.governance-router-capabilities li.is-complete {
  color: #b7c7f0;
  border-color: rgba(142, 164, 255, 0.2);
}

.governance-router-capabilities li.is-active {
  color: #ecf1ff;
  background: rgba(98, 165, 255, 0.18);
  border-color: rgba(143, 193, 255, 0.58);
  box-shadow: 0 0 14px rgba(98, 165, 255, 0.15);
}

.governance-router-source {
  color: #9eb0e7;
  font-size: 10px;
  line-height: 1.5;
}

.governance-model-stage {
  grid-area: models;
  padding: 18px;
  background: rgba(8, 14, 34, 0.76);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 9px;
}

.governance-model-note {
  margin: 12px 0 0;
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.5;
}

.governance-model-grid {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.governance-model-node {
  display: grid;
  min-width: 0;
  min-height: 40px;
  padding: 8px 6px;
  place-items: center;
  color: #c9d7ff;
  background: rgba(18, 25, 52, 0.66);
  border: 1px solid rgba(142, 164, 255, 0.17);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: center;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.governance-model-node.is-selected {
  color: #ecf1ff;
  background: rgba(111, 224, 190, 0.12);
  border-color: rgba(142, 228, 199, 0.7);
  box-shadow: 0 0 24px rgba(111, 224, 190, 0.16);
}

.governance-model-node.is-receiving {
  animation: governance-model-receiving 0.8s ease-in-out;
}

.governance-live-data-stage {
  grid-area: live;
  min-width: 0;
  padding: 18px;
  background: rgba(8, 14, 34, 0.76);
  border: 1px solid rgba(142, 164, 255, 0.2);
  border-radius: 9px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.governance-live-data-stage.is-receiving,
.governance-live-data-stage.is-recording {
  border-color: rgba(240, 197, 138, 0.62);
  box-shadow: 0 0 30px rgba(240, 197, 138, 0.1);
}

.governance-live-data-source {
  display: flex;
  min-width: 0;
  gap: 6px;
  align-items: center;
  margin: 10px 0 0;
  color: #f0c58a;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
}

.governance-live-data-source svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.governance-live-data-source span { overflow-wrap: anywhere; }

.governance-request-card-grid {
  display: grid;
  min-width: 0;
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.governance-request-card {
  min-width: 0;
  padding: 12px;
  background: rgba(18, 25, 52, 0.68);
  border: 1px solid rgba(142, 164, 255, 0.18);
  border-radius: 7px;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.governance-request-card.is-updating {
  animation: governance-card-update 0.7s ease-out;
}

.governance-request-card header {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(142, 164, 255, 0.14);
}

.governance-request-card-index {
  color: #ecf1ff;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.governance-request-card code {
  min-width: 0;
  color: #9eb0e7;
  font-family: "DM Mono", monospace;
  font-size: 8px;
  overflow-wrap: anywhere;
}

.governance-request-card dl {
  display: grid;
  gap: 7px;
  margin: 11px 0 0;
}

.governance-request-card dl > div {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 6px;
  align-items: baseline;
}

.governance-request-card dt,
.governance-request-card dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.governance-request-card dt {
  color: #8c9bc7;
  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.governance-request-card dd {
  color: #e0e9ff;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  line-height: 1.35;
  text-align: right;
}

.governance-request-card dd.is-success { color: var(--governance-green); }

.governance-request-card dd.is-recorded { color: #f0c58a; }

@keyframes governance-path-flow {
  to { stroke-dashoffset: -24; }
}

@keyframes governance-live-blink {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@keyframes governance-router-processing {
  0%, 100% { box-shadow: 0 0 34px rgba(98, 165, 255, 0.13), 0 16px 32px rgba(0, 0, 0, 0.24); }
  50% { box-shadow: 0 0 46px rgba(98, 165, 255, 0.38), 0 16px 32px rgba(0, 0, 0, 0.24); }
}

@keyframes governance-router-recorded {
  0%, 100% { border-color: rgba(98, 165, 255, 0.5); }
  50% { border-color: rgba(240, 197, 138, 0.9); }
}

@keyframes governance-model-receiving {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes governance-card-update {
  0% { opacity: 0.5; transform: translateY(5px) scale(0.98); }
  65% { opacity: 1; transform: translateY(-1px) scale(1.01); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1100px) {
  .governance-live-architecture {
    grid-template-areas:
      "users spine"
      "models models"
      "live live";
    grid-template-columns: minmax(175px, 0.75fr) minmax(280px, 1.25fr);
    grid-template-rows: auto auto auto;
  }
  .governance-live-canvas,
  .governance-live-architecture { min-height: 0; }
  .governance-model-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .governance-live-system { margin-top: 38px; padding: 18px; }
  .governance-live-heading { display: block; }
  .governance-live-heading h2 { font-size: 25px; }
  .governance-live-badge { margin-top: 16px; }
  .governance-live-architecture {
    display: grid;
    grid-template-areas:
      "users"
      "spine"
      "models"
      "live";
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .governance-users-stage,
  .governance-model-stage,
  .governance-live-data-stage { padding: 15px; }
  .governance-live-spine { max-width: 520px; margin-inline: auto; }
  .governance-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .governance-request-card-grid { grid-template-columns: 1fr; }
  .governance-request-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .governance-request-card dl > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .governance-request-card dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .governance-live-badge svg,
  .governance-flow-path.is-active,
  .governance-router-live-node.is-processing,
  .governance-router-live-node.is-recorded,
  .governance-model-node.is-receiving,
  .governance-request-card.is-updating {
    animation: none !important;
  }
  .governance-flow-particle { display: none !important; }
}

.hero-section,
.problem-section,
.routing-section,
.failover-section,
.cost-section,
.marketplace-section,
.developer-section,
.governance-section {
  isolation: isolate;
}

.hero-section::after,
.problem-section::after,
.routing-section::after,
.failover-section::after,
.cost-section::after,
.marketplace-section::after,
.developer-section::after,
.governance-section::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.72;
  background: radial-gradient(circle at 78% 18%, rgba(255, 184, 96, 0.12), transparent 23%);
  mix-blend-mode: screen;
}

.hero-eyebrow,
.problem-eyebrow,
.routing-eyebrow,
.cost-eyebrow,
.marketplace-eyebrow,
.developer-eyebrow,
.governance-eyebrow {
  color: var(--hero-amber);
}

@media (prefers-reduced-motion: reduce) {
  .governance-channel-dot.is-healthy,
  .governance-architecture-connector::before,
  .gateway-canvas *,
  .gateway-canvas *::before,
  .gateway-canvas *::after,
  .router-visual *,
  .router-visual *::before,
  .router-visual *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1023px) {
  .hero-section { padding-top: 124px; }
  .hero-inner { grid-template-columns: 1fr; gap: 54px; }
  .hero-copy { max-width: 760px; }
  .hero-visual { width: min(760px, 100%); }
}

@media (max-width: 1100px) and (min-width: 1024px) {
  .hero-inner { gap: 48px; }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .router-provider--5,
  .router-provider--6 { display: none; }
  .router-provider-more:not([hidden]) { display: block; }
  .router-more-tablet { display: inline; }
  .router-more-desktop { display: none; }
}

@media (max-width: 767px) {
  .public-site { --site-header-height: 79px; }
  .site-header-inner { padding: 0 18px; }
  .site-brand { font-size: 14px; }
  .site-header-actions { gap: 7px; }
  .site-auth-actions { gap: 6px; }
  .site-auth-link { min-width: 56px; padding: 6px 8px; font-size: 10px; }
  .hero-section { min-height: auto; padding: 116px 18px 54px; }
  .hero-inner { gap: 42px; }
  .hero-copy h1 { font-size: clamp(40px, 12vw, 52px); line-height: 1.05; }
  .hero-subtitle { margin-top: 22px; font-size: 19px; }
  .hero-description { font-size: 14px; line-height: 1.7; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-button { justify-content: center; width: 100%; }
  .hero-code-card pre { padding: 18px 16px 20px; font-size: 10px; }
  .router-visual {
    display: flex;
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
    padding: 14px;
  }
  .router-input {
    position: relative;
    top: auto;
    left: auto;
    align-self: center;
    transform: none;
  }
  .router-connections {
    display: block;
    top: 50px;
    bottom: auto;
    height: 210px;
  }
  .router-connections .router-incoming-path,
  .router-connections .router-provider-path { display: none; }
  .router-connections .router-mobile-incoming-path,
  .router-connections .router-mobile-outgoing-path { display: block; }
  .router-core {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-height: 112px;
    transform: none;
  }
  .router-policy {
    position: static;
    flex-wrap: wrap;
    max-width: 100%;
    margin-top: 5px;
    opacity: 0;
    transform: none;
  }
  .router-core[data-phase="policy"] .router-policy { transform: none; }
  .router-providers {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .router-provider,
  .router-provider--1,
  .router-provider--2,
  .router-provider--3,
  .router-provider--4,
  .router-provider--5,
  .router-provider--6 {
    position: static;
    width: 100%;
    min-height: 50px;
    transform: none;
  }
  .router-provider--3.is-selected,
  .router-provider--4.is-selected { transform: none; }
  .router-provider-more {
    position: static;
    align-self: center;
    transform: none;
  }
  .router-provider-more:not([hidden]) { display: none; }
  .router-more-tablet { display: none; }
  .router-more-desktop { display: none; }
}

@media (max-width: 375px) {
  .site-brand b { display: none; }
  .site-language-picker select { max-width: 82px; }
  .site-auth-link { min-width: 52px; padding: 6px 7px; }
  .hero-section { padding-right: 15px; padding-left: 15px; }
  .hero-copy h1 { font-size: 38px; }
}

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 66px minmax(0, 1fr); }
  .sidebar { padding: 20px 8px 13px; }
  .brand { margin: 0 auto 38px; }
  .brand > span:last-child,
  .workspace-label,
  .nav-item span,
  .sidebar-footer .gateway-indicator,
  .sidebar-footer .text-action span { display: none; }
  .nav-item { justify-content: center; padding: 0; }
  .sidebar-footer { align-items: center; padding: 17px 0 5px; }
  .sidebar-footer .text-action { justify-content: center; }
  .topbar, .view { padding-right: 28px; padding-left: 28px; }
  .chat-layout { margin-right: -28px; margin-left: -28px; }
  .chat-workspace { padding-right: 38px; padding-left: 38px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-button-copy { display: none; }
  .user-button { padding-left: 8px; }
}

@media (max-width: 760px) {
  .file-server-url-item { grid-template-columns: 1fr; gap: 7px; }
  .language-picker select { max-width: 72px; }
  .app-shell { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .sidebar { position: relative; display: grid; grid-template-columns: auto 1fr; height: auto; min-height: auto; overflow: visible; padding: 12px 15px; }
  .main-stage { height: auto; min-height: 0; overflow: visible; }
  .brand { margin: 0; }
  .nav-list { display: flex; min-width: 0; justify-content: flex-end; gap: 1px; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-list:nth-of-type(2), .nav-divider, .sidebar-footer { display: none; }
  .nav-item { width: 38px; min-height: 38px; }
  .topbar { min-height: 59px; padding: 0 15px; }
  .crumb, .connection-state { display: none; }
  .topbar-actions { margin-left: auto; }
  .view { padding: 33px 15px 38px; }
  .chat-layout { display: block; min-height: 0; margin: -33px -15px -38px; }
  .conversation-rail { display: none; }
  .chat-workspace { min-height: calc(100vh - 118px); padding: 34px 15px 24px; }
  .chat-title-row, .section-heading { align-items: flex-start; flex-direction: column; gap: 16px; }
  .model-select-wrap { width: 100%; flex-basis: auto; }
  .route-strip { margin-top: 26px; }
  .route-node { min-width: 64px; }
  .message-feed { min-height: 220px; }
  .composer-footer { align-items: flex-start; flex-direction: column; }
  .composer-actions { width: 100%; justify-content: space-between; }
  .playground-layout, .playground-layout.is-debug-visible { grid-template-columns: 1fr; }
  .response-panel { min-height: 300px; }
  .model-vendor-grid, .docs-grid, .environment-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .playground-message { grid-template-columns: 84px minmax(0, 1fr) 29px; }
  .two-columns, .three-columns { grid-template-columns: 1fr; }
  .endpoint-line { align-items: flex-start; flex-wrap: wrap; }
  .endpoint-line span { width: 100%; }
  .endpoint-line .small-icon-button { margin-left: 0; }
  .secondary-command span { display: none; }
  .user-button > svg { display: none; }
  .user-button { border-left: 0; }
  .account-layout { grid-template-columns: 1fr; }
  .email-admin-layout { grid-template-columns: 1fr; }
  .email-config-panel, .email-template-panel { padding: 18px; }
  .email-panel-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .email-save-actions { align-items: flex-start; flex-direction: column; }
  .security-grid { grid-template-columns: 1fr; }
  .register-layout { grid-template-columns: 1fr; gap: 38px; min-height: 0; }
  .register-intro { max-width: 620px; }
  .register-intro h1 { max-width: 560px; }
  .account-credit-heading { align-items: flex-start; flex-direction: column; }
  .account-credit-content { grid-template-columns: 1fr; }
  .recharge-form { grid-template-columns: 1fr; }
  .admin-recharge-form { grid-template-columns: 1fr; }
  .account-recharge-history { padding-top: 19px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .purchase-key-detail-grid { grid-template-columns: 1fr; }
  .account-key-panel { grid-column: auto; align-items: flex-start; flex-direction: column; }
  .signed-out-account { align-items: flex-start; flex-direction: column; }
  .model-cost { gap: 6px; }
  .model-cost strong { font-size: 11px; }
  .pricing-legend { margin-top: -8px; }
  .purchase-key-toolbar { align-items: flex-start; flex-direction: column; }
  .purchase-day-schedule-heading { align-items: flex-start; flex-direction: column; }
  .purchase-day-schedule-heading label { width: 100%; }
}

@media (max-width: 430px) {
  .command-button span, .helper-text { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .suggestions { display: grid; }
  .suggestions button { justify-content: flex-start; }
  .playground-message { grid-template-columns: 1fr 29px; }
  .playground-message select { grid-column: 1 / -1; }
  .playground-message textarea { grid-column: 1; }
  .playground-message .remove-message { grid-column: 2; }
  .account-usage-grid { grid-template-columns: 1fr; }
  .account-actions { width: 100%; }
  .account-actions > button { flex: 1; }
  .register-card { padding: 21px; }
  .account-security-panel, .account-smtp-panel { padding: 18px; }
  .security-session, .security-event { align-items: flex-start; flex-direction: column; gap: 6px; }
  .register-intro h1 { font-size: 42px; }
  .key-notice { max-width: 150px; }
  .purchase-time-range-row { grid-template-columns: minmax(0, 1fr) 29px; }
  .purchase-time-range-row label { grid-column: 1; }
  .purchase-time-range-row .small-icon-button { grid-column: 2; grid-row: 1 / span 2; align-self: end; }
  .purchase-time-range-separator { display: none; }
}

@media (min-width: 1440px) {
  .hero-section {
    padding-top: 168px;
    padding-bottom: 118px;
  }

  .hero-inner {
    max-width: 1280px;
    gap: 84px;
  }

  .hero-copy h1 {
    font-size: 76px;
  }

  .hero-subtitle {
    font-size: 27px;
  }

  .hero-description {
    font-size: 16px;
  }

  .hero-code-card pre {
    padding: 28px 27px 31px;
    font-size: 13px;
  }

  .problem-section {
    padding-top: 144px;
    padding-bottom: 156px;
  }

  .problem-heading {
    max-width: 820px;
    margin-bottom: 64px;
  }

  .problem-heading h2 {
    max-width: 820px;
    font-size: 58px;
  }

  .problem-grid {
    gap: 20px;
  }

  .problem-card {
    min-height: 430px;
    padding: 28px;
  }

  .problem-card h3 {
    font-size: 21px;
  }

  .problem-card p {
    font-size: 14px;
  }
}

.model-card-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.playground-layout.is-debug-visible {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.debug-key-info-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
  background: #293a3b;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.playground-layout.is-debug-visible > .request-builder,
.playground-layout.is-debug-visible > .response-panel,
.playground-layout.is-debug-visible > .debug-key-info-panel,
.playground-layout.is-debug-visible > .debug-request-panel {
  min-height: 420px;
}

.debug-key-info-panel[hidden],
.debug-request-panel[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .chat-debug-panels {
    grid-template-columns: 1fr;
  }

  .playground-layout.is-debug-visible {
    grid-template-columns: 1fr;
  }
}

.public-site .router-provider-path.is-active {
  stroke: #6fcf9f;
  filter: drop-shadow(0 0 4px rgba(111, 207, 159, 0.72));
}

.public-site .router-core[data-phase="policy"],
.public-site .router-core[data-phase="selected"],
.public-site .router-core[data-phase="response"],
.public-site .router-provider.is-selected {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
}

.public-site .router-core[data-phase="request"] .router-core-status i,
.public-site .router-core[data-phase="policy"] .router-core-status i,
.public-site .router-core[data-phase="response"] .router-core-status i {
  background: #7ddfb2;
  box-shadow: 0 0 9px rgba(125, 223, 178, 0.72);
}

.public-site .gateway-flow-link.is-active {
  filter: drop-shadow(0 0 5px rgba(74, 219, 159, 0.78)) drop-shadow(0 0 10px rgba(40, 143, 103, 0.24));
}

.public-site .gateway-section .gateway-gateway-node.is-active,
.public-site .gateway-section .gateway-enterprise-node.is-active,
.public-site .gateway-section .gateway-router-instance.is-active,
.public-site .gateway-section .gateway-model-node.is-active {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
}

.public-site .gateway-section .gateway-gateway-node.is-active .gateway-node-traffic,
.public-site .gateway-section .gateway-router-instance.is-active .gateway-node-traffic,
.public-site .gateway-section .gateway-model-node.is-active .gateway-node-traffic {
  color: #d8ffeb;
  text-shadow: 0 0 8px rgba(125, 223, 178, 0.62);
}

.public-site .governance-flow-svg marker path {
  fill: #7ddfb2;
}

.public-site .governance-flow-path.is-active {
  stroke: #63c996;
}

.public-site .governance-flow-path-model.is-active,
.public-site .governance-flow-path-record.is-active {
  stroke: #70d3a2;
}

.public-site .governance-flow-particle,
.public-site .governance-flow-particle-record {
  fill: #7ddfb2;
}

.public-site .governance-user-node.is-active,
.public-site .governance-model-node.is-selected,
.public-site .governance-router-capabilities li.is-active {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
}

.public-site .governance-router-live-node {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient-soft);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
}

.public-site .governance-router-live-heading svg,
.public-site .governance-router-live-status {
  color: #b8f2d2;
}

.public-site .governance-live-data-stage.is-receiving,
.public-site .governance-live-data-stage.is-recording {
  border-color: var(--activity-emerald-border);
  box-shadow: 0 0 30px rgba(58, 169, 128, 0.2);
}

.public-site .governance-request-card dd.is-recorded {
  color: #9de6bd;
}

.public-site .routing-request-pill,
.public-site .routing-provider-list li.is-selected {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
}

.public-site .routing-provider-list li.is-selected .routing-provider-name,
.public-site .routing-provider-list li.is-selected .routing-provider-meta,
.public-site .routing-selected-row strong {
  color: var(--activity-emerald-text);
}

.public-site .routing-provider-dot.is-up {
  background: linear-gradient(135deg, #7ddfb2, #3fa883);
  box-shadow: 0 0 0 3px rgba(111, 207, 159, 0.2);
}

.public-site .failover-provider-row.is-active,
.public-site .failover-provider-row.is-success {
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
}

.public-site .failover-provider-row.is-active.is-failed {
  border-color: rgba(207, 91, 61, 0.58);
}

.public-site .failover-provider-row.is-active strong,
.public-site .failover-provider-row.is-success strong,
.public-site .failover-provider-row.is-success .failover-provider-result {
  color: var(--activity-emerald-text);
}

.public-site .cost-bar-fill-optimized {
  background: var(--activity-emerald-gradient);
}

.public-site .marketplace-filter.is-active {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
}

.public-site .developer-flow-list li::before {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: 0 0 14px rgba(58, 169, 128, 0.22);
}

.public-site .developer-flow-list li:not(:last-child)::after {
  color: rgba(125, 223, 178, 0.9);
}

.debug-key-info-panel pre {
  flex: 1;
  min-height: 300px;
  margin: 0;
  overflow: auto;
  color: #d1e1dc;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.login-methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 14px 0 4px;
}

.login-method {
  min-height: 31px;
  padding: 5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 800;
}

.login-method.is-active {
  color: var(--green-dark);
  border-color: rgba(11, 110, 87, 0.35);
  background: var(--paper-bright);
}

.auth-hint,
.social-login-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.message-image {
  display: block;
  max-width: min(360px, 100%);
  max-height: 300px;
  margin-bottom: 9px;
  border-radius: 6px;
  object-fit: contain;
}

.message-image:last-child {
  margin-bottom: 0;
}

.generated-image {
  max-width: min(560px, 100%);
  max-height: 620px;
}

.generated-image-download {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
}

.generated-image-download svg {
  width: 13px;
  height: 13px;
}

.message-video {
  display: block;
  width: min(100%, 640px);
  max-height: 420px;
  margin: 5px 0 8px;
  border-radius: 6px;
  background: #111;
}

.message-audio {
  display: block;
  width: min(100%, 520px);
  margin: 5px 0 8px;
}

.chat-image-dropzone {
  margin: 10px 10px 0;
  padding: 14px;
  border: 1px dashed rgba(11, 110, 87, 0.35);
  border-radius: 7px;
  background: rgba(11, 110, 87, 0.035);
}

.chat-image-dropzone.is-dragging {
  border-color: var(--green);
  background: rgba(11, 110, 87, 0.1);
}

.chat-image-empty:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green-dark);
  font-size: 12px;
}

.chat-image-empty svg {
  width: 17px;
  height: 17px;
}

.chat-image-empty small {
  color: var(--muted);
  font-size: 10px;
}

.inline-action {
  padding: 0;
  color: var(--green);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
}

.chat-image-preview:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-image-preview img {
  width: 56px;
  height: 56px;
  border-radius: 5px;
  object-fit: cover;
}

.chat-image-preview div {
  display: grid;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.chat-image-preview strong,
.chat-image-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-image-preview strong {
  color: var(--ink);
  font-size: 12px;
}

.chat-image-preview span {
  color: var(--muted);
  font-size: 10px;
}

.chat-image-preview small {
  color: var(--muted);
  font-size: 10px;
}

.chat-image-upload {
  flex: 0 0 auto;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
}

.chat-image-upload svg {
  width: 14px;
  height: 14px;
}

.language-picker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 8px;
  color: var(--muted);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.language-picker svg {
  width: 15px;
  height: 15px;
}

.language-picker select {
  max-width: 92px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.file-server-url-bar {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding: 14px 16px;
  background: rgba(252, 253, 249, 0.82);
  border: 1px solid var(--line);
  border-left: 3px solid var(--aqua);
}

.file-server-url-item {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.file-server-url-item span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.file-server-url-item label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.file-server-url-item code {
  overflow-wrap: anywhere;
}

.file-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin: 0 0 16px;
}

.file-search-form label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.file-search-form input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--paper-bright);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.file-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin: 12px 0 28px;
  color: var(--muted);
  font-size: 12px;
}

.file-pagination > div {
  display: flex;
  gap: 6px;
}

.file-pagination .secondary-button {
  min-width: 36px;
  min-height: 34px;
  justify-content: center;
  padding: 0 8px;
}

.managed-files-table {
  min-width: 690px;
}

@media (max-width: 767px) {
  .chat-image-preview {
    flex-wrap: wrap;
  }

  .chat-image-preview div {
    flex-basis: calc(100% - 78px);
  }

  .chat-image-upload {
    margin-left: 66px;
  }

  .file-search-form {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .file-search-form label {
    flex-basis: 100%;
  }

  .file-pagination {
    justify-content: space-between;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="datetime-local"],
textarea,
.range-with-value {
  color: var(--ss-text-primary);
  background: var(--ss-surface-2);
  border-color: var(--ss-border);
}

select option {
  color: var(--ss-text-primary);
  background: var(--ss-surface-3);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-color: var(--ss-accent-blue);
}

.sidebar,
.topbar,
.conversation-rail {
  color: var(--ss-text-secondary);
  background: var(--ss-surface-3);
  border-color: var(--ss-border);
}

.topbar {
  background: var(--ss-surface-1);
}

.brand,
.topbar .crumb,
.nav-item,
.connection-state,
.gateway-indicator {
  color: var(--ss-text-secondary);
}

.brand:hover,
.nav-item:hover,
.nav-item.is-active {
  color: var(--ss-text-primary);
}

.nav-item:hover,
.nav-item.is-active,
.conversation-item:hover,
.conversation-item.is-active {
  background: var(--ss-surface-1);
}

.nav-item.is-active {
  box-shadow: inset 3px 0 0 var(--ss-accent);
}

.icon-button,
.small-icon-button,
.secondary-button,
.secondary-command {
  color: var(--ss-text-secondary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
}

.icon-button:hover,
.small-icon-button:hover,
.secondary-button:hover,
.secondary-command:hover {
  color: var(--ss-text-primary);
  background: var(--ss-surface-2);
  border-color: var(--ss-border-active);
}

.command-button,
.new-chat-button,
.send-button,
.account-key-panel .send-button {
  color: var(--ss-bg-primary);
  background: var(--ss-accent);
  border-color: var(--ss-accent);
}

.command-button:hover,
.new-chat-button:hover,
.send-button:hover,
.account-key-panel .send-button:hover {
  color: var(--ss-bg-primary);
  background: var(--ss-accent-blue);
  border-color: var(--ss-accent-blue);
}

.model-card,
.metric,
.usage-table-wrap,
.table-top-scrollbar,
.account-profile,
.account-usage-panel,
.account-credit-panel,
.account-model-panel,
.signed-out-account,
.register-card,
.environment-note,
.doc-section,
.connection-dialog,
.auth-dialog,
.api-key-dialog,
.admin-user-dialog,
.pricing-dialog,
.purchase-keys-dialog,
.playground-layout,
.composer {
  color: var(--ss-text-primary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
  box-shadow: var(--ss-shadow-md);
}

.account-key-panel,
.response-panel,
.debug-request-panel,
.debug-key-info-panel,
.code-block-wrap {
  color: var(--ss-text-primary);
  background: var(--ss-surface-3);
  border-color: var(--ss-border);
}

.account-key-panel {
  box-shadow: var(--ss-shadow-md), var(--ss-glow-sm);
}

.model-card:hover,
.metric:hover,
.marketplace-card:hover {
  border-color: var(--ss-border-active);
}

.provider-logo {
  background: var(--ss-surface-2);
  border-color: var(--ss-border);
}

.provider-logo--kimi {
  background: var(--ss-surface-3);
  border-color: var(--ss-border);
}

.status-badge,
.role-badge,
.status-code,
.playground-run-state,
.model-count,
.purchase-key-secret-state,
.debug-request-badge {
  color: var(--ss-text-secondary);
  background: var(--ss-surface-1);
  border: 1px solid var(--ss-border);
}

.status-badge.ready,
.status-code:not(.error),
.purchase-key-secret-state {
  color: var(--ss-success);
  background: var(--ss-success-bg);
  border-color: var(--ss-border);
}

.status-badge.pending {
  color: var(--ss-warning);
  background: var(--ss-warning-bg);
  border-color: rgba(255, 210, 122, 0.3);
}

.status-badge.suspended,
.status-code.error {
  color: var(--ss-error);
  background: var(--ss-error-bg);
  border-color: rgba(255, 173, 159, 0.3);
}

.role-badge,
.playground-run-state,
.model-count {
  color: var(--ss-info);
  background: var(--ss-info-bg);
}

.message-body {
  color: var(--ss-text-primary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
}

.message.user .message-body {
  color: var(--ss-text-primary);
  background: var(--ss-surface-2);
  border-color: var(--ss-border-active);
}

.message.error .message-body {
  color: var(--ss-error);
  background: var(--ss-error-bg);
  border-color: rgba(255, 173, 159, 0.3);
}

.suggestions button,
.compact-select-control select,
.chat-image-dropzone,
.issued-key,
.auth-tabs,
.login-method {
  color: var(--ss-text-secondary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
}

.suggestions button:hover,
.chat-image-dropzone.is-dragging,
.login-method.is-active,
.auth-tab.is-active {
  color: var(--ss-text-primary);
  background: var(--ss-surface-2);
  border-color: var(--ss-border-active);
}

.code-block-wrap,
.hero-code-card,
.developer-code-card pre,
.response-panel pre,
.debug-request-panel pre,
.debug-key-info-panel pre {
  color: var(--ss-text-primary);
}

.code-block-wrap,
.hero-code-card,
.developer-code-card pre {
  background: var(--ss-surface-3);
  border-color: var(--ss-border);
}

.code-block-wrap code,
.hero-code-card code,
.developer-code-card code {
  color: var(--ss-accent);
}

.site-header,
.site-header.is-scrolled {
  background: var(--ss-surface-3);
  border-color: var(--ss-border);
  box-shadow: var(--ss-shadow-sm);
}

.site-language-picker select,
.site-auth-link,
.hero-button-secondary {
  color: var(--ss-text-primary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
}

.site-auth-link:hover,
.hero-button-secondary:hover {
  color: var(--ss-text-primary);
  background: var(--ss-surface-2);
  border-color: var(--ss-border-active);
}

.site-auth-link.is-primary,
.hero-button-primary {
  color: var(--ss-bg-primary);
  background: var(--ss-accent);
  border-color: var(--ss-accent);
  box-shadow: var(--ss-glow-md);
}

.site-auth-link.is-primary:hover,
.hero-button-primary:hover {
  color: var(--ss-bg-primary);
  background: var(--ss-accent-blue);
  border-color: var(--ss-accent-blue);
}

.problem-card,
.routing-console,
.routing-factors,
.failover-flow-card,
.failover-copy,
.cost-visual-card,
.cost-factors-card,
.marketplace-card,
.developer-flow-card,
.developer-code-card,
.developer-principle,
.governance-card,
.governance-architecture {
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
  box-shadow: var(--ss-shadow-md);
}

.routing-card,
.routing-provider-box,
.routing-provider-list li,
.routing-factor-card,
.failover-main-node,
.failover-provider-row,
.marketplace-metric,
.developer-code-card pre,
.governance-access-map,
.governance-observability-panel,
.governance-scheduler,
.governance-layer,
.governance-request-card {
  background: var(--ss-surface-2);
  border-color: var(--ss-border);
}

.cost-compare,
.integration-code,
.cost-bar-track,
.governance-foundation-panel,
.governance-policy-panel,
.governance-trace-panel,
.governance-audit-trail,
.governance-ai-column {
  background: var(--ss-surface-3);
  border-color: var(--ss-border);
}

.provider-pills span,
.marketplace-filter,
.governance-capability-list li,
.governance-token-list li,
.governance-resource-list li {
  color: var(--ss-text-secondary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
}

.marketplace-filter:hover,
.marketplace-filter.is-active {
  color: var(--ss-text-primary);
  background: var(--ss-info-bg);
  border-color: var(--ss-border-active);
}

.router-visual,
.router-input,
.router-provider,
.gateway-access-node,
.gateway-gateway-node,
.gateway-enterprise-node,
.gateway-model-node {
  color: var(--ss-text-primary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
  box-shadow: var(--ss-shadow-sm);
}

.router-visual {
  background: var(--ss-surface-2);
}

.router-input {
  background: var(--ss-surface-1);
}

.router-core,
.gateway-china-router,
.governance-router-live-node {
  color: var(--ss-text-primary);
  background: radial-gradient(circle at 28% 10%, rgba(104, 207, 255, 0.16), transparent 45%), var(--ss-surface-3);
  border-color: var(--ss-border-active);
  box-shadow: var(--ss-glow-router), inset 0 0 24px rgba(255, 255, 255, 0.035);
}

.router-core[data-phase="policy"],
.router-core[data-phase="selected"],
.router-visual[data-phase="selected"] .router-core,
.router-visual[data-phase="response"] .router-core,
.router-provider.is-selected,
.gateway-gateway-node.is-active,
.gateway-enterprise-node.is-active,
.gateway-router-instance.is-active,
.gateway-model-node.is-active,
.governance-router-live-node {
  background: var(--ss-surface-3);
  border-color: var(--ss-border-active);
  box-shadow: var(--ss-glow-md);
}

.router-provider-more {
  color: var(--ss-text-secondary);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
}

.governance-live-system,
.governance-users-stage,
.governance-model-stage,
.governance-live-data-stage {
  background: var(--ss-surface-2);
  border-color: var(--ss-border);
  box-shadow: var(--ss-shadow-md);
}

.governance-live-node,
.governance-user-node,
.governance-model-node,
.governance-request-card {
  background: var(--ss-surface-3);
  border-color: var(--ss-border);
}

.governance-live-badge {
  color: var(--ss-success);
  background: var(--ss-success-bg);
  border-color: var(--ss-border);
}

.purchase-key-detail-item {
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
}

@media (max-width: 767px) {
  .problem-card,
  .routing-console,
  .routing-factors,
  .failover-flow-card,
  .failover-copy,
  .cost-visual-card,
  .cost-factors-card,
  .marketplace-card,
  .developer-flow-card,
  .developer-code-card,
  .developer-principle,
  .governance-card,
  .governance-architecture,
  .model-card,
  .metric,
  .account-profile,
  .account-usage-panel,
  .account-credit-panel,
  .account-model-panel,
  .signed-out-account,
  .register-card {
    box-shadow: var(--ss-shadow-sm);
    backdrop-filter: blur(var(--ss-blur-sm));
  }

  .router-core,
  .gateway-china-router,
  .governance-router-live-node {
    box-shadow: var(--ss-glow-sm);
  }
}

.public-site {
  --hero-bg: #007f78;
  --hero-surface: rgba(0, 93, 79, 0.72);
  --hero-line: rgba(181, 255, 222, 0.52);
  --hero-text: #f5fff4;
  --hero-muted: rgba(231, 255, 241, 0.84);
  --hero-blue: #a7ffe0;
  --hero-purple: #ff9783;
  --hero-amber: #fff0a6;
  --marketing-mint: #8fd7b0;
  --marketing-emerald-start: #4da982;
  --marketing-emerald-mid: #398f6d;
  --marketing-emerald-end: #2c7359;
  --marketing-traffic: #d6f0df;
  --marketing-node: linear-gradient(145deg, rgba(48, 133, 104, 0.82), rgba(14, 74, 61, 0.88));
  --marketing-panel: linear-gradient(145deg, rgba(0, 117, 96, 0.72), rgba(0, 67, 71, 0.84));
}

.public-site .hero-section,
.public-site .problem-section,
.public-site .gateway-section,
.public-site .routing-section,
.public-site .failover-section,
.public-site .cost-section,
.public-site .marketplace-section,
.public-site .developer-section,
.public-site .governance-section {
  background:
    radial-gradient(circle at 13% 15%, rgba(255, 239, 139, 0.3), transparent 25%),
    radial-gradient(circle at 88% 78%, rgba(255, 103, 88, 0.28), transparent 30%),
    linear-gradient(135deg, #00686d 0%, #009d83 48%, #00d0a0 100%);
}

.public-site .hero-section::before,
.public-site .problem-section::before,
.public-site .routing-section::before,
.public-site .failover-section::before,
.public-site .cost-section::before,
.public-site .marketplace-section::before,
.public-site .developer-section::before,
.public-site .governance-section::before {
  opacity: 0.22;
  background-image: linear-gradient(rgba(188, 255, 224, 0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(188, 255, 224, 0.16) 1px, transparent 1px);
}

.public-site .hero-section::after,
.public-site .problem-section::after,
.public-site .gateway-section::after,
.public-site .routing-section::after,
.public-site .failover-section::after,
.public-site .cost-section::after,
.public-site .marketplace-section::after,
.public-site .developer-section::after,
.public-site .governance-section::after {
  opacity: 0.9;
  background:
    radial-gradient(circle at 78% 17%, rgba(255, 241, 147, 0.28), transparent 24%),
    radial-gradient(circle at 18% 84%, rgba(255, 112, 92, 0.22), transparent 28%);
}

.public-site .gateway-canvas {
  background: #031d20;
  border-color: rgba(198, 255, 222, 0.7);
  box-shadow: 0 26px 84px rgba(0, 73, 62, 0.38), 0 0 0 1px rgba(255, 132, 105, 0.24), 0 0 42px rgba(255, 220, 112, 0.18);
}

.public-site .gateway-visual-background {
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

.public-site .problem-card,
.public-site .routing-console,
.public-site .routing-factors,
.public-site .failover-flow-card,
.public-site .failover-copy,
.public-site .cost-visual-card,
.public-site .cost-factors-card,
.public-site .marketplace-card,
.public-site .developer-flow-card,
.public-site .developer-code-card,
.public-site .developer-principle,
.public-site .governance-card,
.public-site .governance-architecture,
.public-site .governance-live-system,
.public-site .governance-users-stage,
.public-site .governance-model-stage,
.public-site .governance-live-data-stage {
  background: var(--marketing-panel);
  border-color: var(--hero-line);
  box-shadow: 0 18px 50px rgba(0, 68, 59, 0.28), inset 0 0 24px rgba(185, 255, 224, 0.05);
}

.public-site .router-visual,
.public-site .router-input,
.public-site .router-provider,
.public-site .gateway-section .gateway-access-node,
.public-site .gateway-section .gateway-gateway-node,
.public-site .gateway-section .gateway-enterprise-node,
.public-site .gateway-section .gateway-model-node,
.public-site .gateway-section .gateway-router-instance,
.public-site .routing-provider-list li,
.public-site .failover-main-node,
.public-site .failover-provider-row,
.public-site .governance-user-node,
.public-site .governance-live-node,
.public-site .governance-model-node,
.public-site .governance-request-card {
  color: var(--hero-text);
  background: var(--marketing-node);
  border-color: rgba(181, 255, 222, 0.58);
  box-shadow: 0 8px 22px rgba(0, 57, 53, 0.25), inset 0 0 16px rgba(185, 255, 224, 0.08);
}

.public-site .gateway-section .gateway-access-node,
.public-site .gateway-section .gateway-gateway-node,
.public-site .gateway-section .gateway-enterprise-node,
.public-site .gateway-section .gateway-model-node,
.public-site .gateway-section .gateway-router-instance {
  background: linear-gradient(145deg, rgba(5, 89, 91, 0.62), rgba(2, 42, 56, 0.72));
  backdrop-filter: none;
}

.public-site .router-visual {
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 240, 157, 0.14), transparent 28%),
    rgba(0, 77, 72, 0.8);
  border-color: rgba(181, 255, 222, 0.62);
}

.public-site .router-core,
.public-site .gateway-section .gateway-china-router,
.public-site .governance-router-live-node {
  color: #f7fff5;
  background:
    radial-gradient(circle at 24% 8%, rgba(220, 248, 222, 0.12), transparent 40%),
    linear-gradient(145deg, var(--marketing-emerald-start), var(--marketing-emerald-end));
  border-color: rgba(178, 237, 204, 0.84);
  box-shadow: 0 0 0 1px rgba(189, 244, 211, 0.18), 0 0 30px rgba(58, 154, 113, 0.3), inset 0 0 24px rgba(233, 255, 239, 0.1);
}

.public-site .gateway-section .gateway-china-router {
  background:
    radial-gradient(circle at 24% 8%, rgba(220, 248, 222, 0.06), transparent 40%),
    linear-gradient(145deg, rgba(77, 169, 130, 0.22), rgba(44, 115, 89, 0.22));
  backdrop-filter: none;
}

.public-site .router-core[data-phase="policy"],
.public-site .router-core[data-phase="selected"],
.public-site .router-visual[data-phase="selected"] .router-core,
.public-site .router-visual[data-phase="response"] .router-core,
.public-site .router-provider.is-selected,
.public-site .gateway-section .gateway-gateway-node.is-active,
.public-site .gateway-section .gateway-enterprise-node.is-active,
.public-site .gateway-section .gateway-router-instance.is-active,
.public-site .gateway-section .gateway-model-node.is-active,
.public-site .routing-provider-list li.is-selected,
.public-site .failover-provider-row.is-active,
.public-site .failover-provider-row.is-success,
.public-site .governance-user-node.is-active,
.public-site .governance-model-node.is-selected,
.public-site .governance-live-node.is-processing,
.public-site .governance-live-node.is-recorded {
  color: #effff7;
  background: linear-gradient(135deg, var(--marketing-emerald-start) 0%, var(--marketing-emerald-mid) 52%, var(--marketing-emerald-end) 100%);
  border-color: rgba(177, 235, 201, 0.84);
  box-shadow: 0 0 0 1px rgba(184, 239, 205, 0.2), 0 0 26px rgba(49, 151, 108, 0.34), 0 8px 22px rgba(0, 72, 49, 0.3), inset 0 0 18px rgba(233, 255, 239, 0.12);
}

.public-site .gateway-section .gateway-gateway-node.is-active,
.public-site .gateway-section .gateway-enterprise-node.is-active,
.public-site .gateway-section .gateway-router-instance.is-active,
.public-site .gateway-section .gateway-model-node.is-active {
  background: linear-gradient(135deg, rgba(5, 100, 90, 0.72), rgba(3, 61, 62, 0.76) 52%, rgba(2, 43, 56, 0.8) 100%);
  border: 2px solid #ffca70;
  box-shadow: 0 0 0 1px rgba(255, 113, 86, 0.9), 0 0 24px rgba(255, 177, 78, 0.88), 0 8px 22px rgba(0, 72, 49, 0.3), inset 0 0 18px rgba(255, 249, 206, 0.34);
}

.public-site .governance-user-node.is-active,
.public-site .governance-model-node.is-selected {
  border: 2px solid #ffca70;
  border-color: #ffca70;
  box-shadow: 0 0 0 1px rgba(255, 113, 86, 0.9), 0 0 24px rgba(255, 177, 78, 0.88), 0 8px 22px rgba(0, 72, 49, 0.3), inset 0 0 18px rgba(255, 249, 206, 0.34);
}

.public-site .hero-section .router-core[data-phase="selected"],
.public-site .hero-section .router-core[data-phase="response"],
.public-site .hero-section .router-provider.is-selected {
  border: 2px solid #ffca70;
  box-shadow: 0 0 0 1px rgba(255, 113, 86, 0.9), 0 0 26px rgba(255, 177, 78, 0.88), 0 8px 22px rgba(107, 42, 36, 0.3), inset 0 0 18px rgba(255, 249, 206, 0.34);
}

.public-site .router-incoming-path,
.public-site .router-provider-path,
.public-site .router-mobile-incoming-path,
.public-site .router-mobile-outgoing-path,
.public-site .gateway-flow-link,
.public-site .governance-flow-path,
.public-site .failover-provider-branch,
.public-site .failover-provider-branch::before,
.public-site .governance-architecture-connector,
.public-site .governance-spine-connector {
  stroke: var(--marketing-mint);
  background-color: var(--marketing-mint);
}

.public-site .router-incoming-path,
.public-site .router-provider-path,
.public-site .router-mobile-incoming-path,
.public-site .router-mobile-outgoing-path {
  stroke: rgba(169, 255, 220, 0.84);
  filter: drop-shadow(0 0 4px rgba(99, 255, 198, 0.38));
}

.public-site .router-provider-path.is-active,
.public-site .router-visual[data-phase="request"] .router-incoming-path {
  stroke: #a1dfba;
  filter: drop-shadow(0 0 5px rgba(75, 177, 127, 0.72));
}

.public-site .gateway-flow-link {
  stroke: #9bdbb2;
  filter: drop-shadow(0 0 5px rgba(72, 170, 121, 0.72)) drop-shadow(0 0 10px rgba(37, 120, 84, 0.24));
}

.public-site .governance-flow-path {
  stroke: rgba(169, 255, 220, 0.72);
}

.public-site .governance-flow-path.is-active,
.public-site .governance-flow-path-model.is-active {
  stroke: #a7dfbd;
  filter: drop-shadow(0 0 5px rgba(70, 167, 119, 0.72));
}

.public-site .governance-flow-svg marker path {
  fill: var(--marketing-mint);
}

.public-site .gateway-stage-label,
.public-site .router-input,
.public-site .routing-request-pill,
.public-site .governance-live-badge {
  color: var(--marketing-traffic);
  background: rgba(0, 86, 72, 0.74);
  border-color: rgba(255, 239, 160, 0.72);
  box-shadow: 0 0 18px rgba(255, 220, 105, 0.14), inset 0 0 12px rgba(255, 239, 160, 0.08);
}

.public-site .gateway-stage-label {
  background: rgba(0, 86, 72, 0.37);
}

.public-site .gateway-node-traffic,
.public-site .gateway-router-traffic,
.public-site .gateway-flow-label,
.public-site [data-gateway-traffic] {
  color: var(--marketing-traffic);
  text-shadow: 0 0 9px rgba(255, 224, 119, 0.86);
}

.public-site .gateway-flow-label {
  fill: var(--marketing-traffic);
  stroke: rgba(0, 71, 64, 0.94);
  filter: drop-shadow(0 0 5px rgba(255, 221, 115, 0.78));
}

.public-site .gateway-section .gateway-gateway-node.is-active .gateway-node-traffic,
.public-site .gateway-section .gateway-router-instance.is-active .gateway-node-traffic,
.public-site .gateway-section .gateway-model-node.is-active .gateway-node-traffic {
  color: var(--marketing-traffic);
  text-shadow: 0 0 9px rgba(111, 207, 153, 0.62);
}

.public-site .router-core-brand,
.public-site .router-provider-status,
.public-site .governance-live-kicker,
.public-site .governance-live-data-source {
  color: var(--marketing-traffic);
}

.public-site .problem-icon,
.public-site .governance-icon {
  color: var(--marketing-mint);
  background: rgba(0, 221, 139, 0.18);
  border-color: rgba(181, 255, 222, 0.6);
  box-shadow: 0 0 18px rgba(0, 255, 169, 0.22);
}

.public-site .governance-router-capabilities li.is-active,
.public-site .routing-request-pill,
.public-site .marketplace-filter.is-active {
  color: #effff7;
  background: linear-gradient(135deg, var(--marketing-emerald-start) 0%, var(--marketing-emerald-mid) 52%, var(--marketing-emerald-end) 100%);
  border-color: rgba(177, 235, 201, 0.84);
  box-shadow: 0 0 20px rgba(49, 151, 108, 0.28), inset 0 0 14px rgba(233, 255, 239, 0.1);
}

.public-site .governance-live-data-stage.is-receiving,
.public-site .governance-live-data-stage.is-recording {
  border-color: rgba(177, 235, 201, 0.84);
  box-shadow: 0 0 26px rgba(49, 151, 108, 0.24);
}

.public-site .governance-section {
  --hero-text: #f7fff9;
  --hero-muted: rgba(232, 255, 246, 0.95);
  background:
    radial-gradient(circle at 20% 16%, rgba(111, 191, 255, 0.08), transparent 26%),
    radial-gradient(circle at 82% 80%, rgba(255, 184, 96, 0.07), transparent 30%),
    linear-gradient(135deg, #075158 0%, #0a5c57 50%, #0d655a 100%);
}

.public-site .governance-section::before {
  opacity: 0.08;
  background-image: linear-gradient(rgba(188, 255, 224, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(188, 255, 224, 0.08) 1px, transparent 1px);
}

.public-site .governance-section::after {
  opacity: 0.32;
  background:
    radial-gradient(circle at 78% 17%, rgba(255, 241, 147, 0.1), transparent 24%),
    radial-gradient(circle at 18% 84%, rgba(255, 112, 92, 0.08), transparent 28%);
}

.public-site .governance-section .governance-eyebrow,
.public-site .governance-section .governance-live-kicker {
  color: #c8f8e3;
}

.public-site .governance-section .governance-hero-description,
.public-site .governance-section .governance-live-heading p:last-child,
.public-site .governance-section .governance-section-heading p,
.public-site .governance-section .governance-card-copy,
.public-site .governance-section .governance-muted-copy {
  color: #defbed;
}

.public-site .governance-section .governance-live-node-status,
.public-site .governance-section .governance-router-request-id,
.public-site .governance-section .governance-router-source,
.public-site .governance-section .governance-model-note,
.public-site .governance-section .governance-request-card code,
.public-site .governance-section .governance-request-card dt {
  color: #bfe9da;
}

/* SCREEN-05 routing refinement: scoped to this section and existing theme tokens. */
#routing {
  display: grid;
  height: calc(100vh - var(--site-header-height));
  height: calc(100svh - var(--site-header-height));
  min-height: 0;
  scroll-margin-top: var(--site-header-height);
  align-items: center;
  padding: clamp(18px, 2.5vh, 30px) clamp(22px, 4vw, 64px);
  box-sizing: border-box;
}

#routing .routing-inner {
  width: min(100%, 1360px);
  max-height: 100%;
}

#routing .routing-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
  min-height: 0;
}

#routing .routing-overview,
#routing .routing-console {
  min-width: 0;
}

#routing .routing-heading {
  max-width: 620px;
  margin: 0 0 clamp(18px, 3vh, 30px);
}

#routing .routing-eyebrow {
  margin-bottom: 10px;
}

#routing .routing-heading h2 {
  font-size: clamp(34px, 3.3vw, 52px);
  line-height: 1.06;
  text-wrap: balance;
}

#routing .routing-subtitle {
  margin-top: 14px;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.55;
}

#routing .routing-supporting-copy {
  margin: 9px 0 0;
  color: var(--hero-muted);
  font-size: 12px;
  line-height: 1.55;
}

#routing .routing-controls {
  display: grid;
  gap: 18px;
}

#routing .routing-strategy-control,
#routing .routing-decision-factors {
  display: grid;
  gap: 9px;
}

#routing .routing-control-label {
  color: var(--ss-text-secondary);
  font-family: "DM Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#routing .routing-strategy-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#routing .routing-strategy-options button,
#routing .routing-factor-chips li {
  min-height: 30px;
  padding: 6px 10px;
  color: var(--ss-text-secondary);
  background: var(--ss-surface-1);
  border: 1px solid var(--ss-border);
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  line-height: 1.2;
}

#routing .routing-strategy-options button {
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

#routing .routing-strategy-options button:hover,
#routing .routing-strategy-options button[aria-pressed="true"] {
  color: var(--ss-text-primary);
  background: var(--ss-surface-3);
  border-color: var(--ss-border-active);
  box-shadow: var(--ss-glow-sm);
}

#routing .routing-strategy-options button:focus-visible,
#routing .routing-provider-scroll:focus-visible {
  outline: 2px solid var(--ss-accent-blue);
  outline-offset: 3px;
}

#routing .routing-factor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#routing .routing-factor-chips li {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 5px 9px;
  font-size: 10px;
}

#routing .routing-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  padding: clamp(12px, 1.5vw, 18px);
  background: var(--ss-surface-1);
  border-color: var(--ss-border);
  box-shadow: var(--ss-shadow-md);
  backdrop-filter: blur(var(--ss-blur-sm));
}

#routing .routing-flow {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 0;
}

#routing .routing-request-node {
  display: flex;
  align-items: center;
  gap: 9px;
}

#routing .routing-request-pill {
  padding: 5px 10px;
  color: var(--ss-text-primary);
  background: var(--ss-surface-2);
  border-color: var(--ss-border-active);
  box-shadow: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

#routing .routing-request-caption {
  color: var(--ss-text-muted);
  font-size: 10px;
}

#routing .routing-flow-connector {
  width: 1px;
  height: 10px;
  background: var(--ss-border-active);
}

#routing .routing-router-core {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: min(100%, 290px);
  padding: 11px 16px;
  color: var(--ss-text-primary);
  background: var(--ss-surface-3);
  border: 1px solid var(--ss-border-active);
  border-radius: 10px;
  box-shadow: var(--ss-glow-router);
  text-align: center;
}

#routing .routing-router-kicker {
  color: var(--ss-text-secondary);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

#routing .routing-router-core > strong {
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

#routing .routing-router-status {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--ss-text-secondary);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.08em;
}

#routing .routing-router-status i {
  width: 6px;
  height: 6px;
  background: var(--ss-success);
  border-radius: 50%;
  box-shadow: var(--ss-glow-sm);
}

#routing .routing-active-route {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: min(100%, 270px);
  color: var(--ss-text-secondary);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
}

#routing .routing-active-route-line {
  position: relative;
  display: block;
  width: 100%;
  height: 2px;
  overflow: hidden;
  background: var(--ss-border);
  border-radius: 999px;
}

#routing .routing-active-route-line::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  background: var(--activity-emerald-gradient);
  content: "";
  animation: routing-data-flow 1.8s ease-in-out infinite;
}

#routing .routing-selected-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  width: min(100%, 390px);
  padding: 9px 12px;
  color: var(--ss-text-primary);
  background: var(--activity-emerald-gradient-soft);
  border: 1px solid var(--activity-emerald-border);
  border-radius: 8px;
  box-shadow: var(--activity-emerald-glow);
  transition: border-color 420ms ease, box-shadow 420ms ease, background 420ms ease;
}

#routing .routing-selected-badge {
  display: inline-flex;
  grid-column: 1 / -1;
  gap: 5px;
  align-items: center;
  color: var(--activity-emerald-text);
  font-family: "DM Mono", monospace;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

#routing .routing-selected-card > strong {
  min-width: 0;
  font-size: 15px;
  line-height: 1.15;
  transition: opacity 300ms ease;
}

#routing .routing-selected-meta {
  justify-self: end;
  color: var(--ss-text-secondary);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  white-space: nowrap;
}

#routing .routing-provider-box {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 9px;
  background: var(--ss-surface-2);
  border-color: var(--ss-border);
}

#routing .routing-provider-heading {
  display: flex;
  min-width: 0;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

#routing .routing-provider-heading > p {
  margin: 0;
  color: var(--ss-text-primary);
  font-family: "DM Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

#routing .routing-provider-heading > span {
  color: var(--ss-text-muted);
  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.06em;
  text-align: right;
}

#routing .routing-provider-columns,
#routing .routing-provider-list li {
  display: grid;
  grid-template-columns: minmax(74px, 1.25fr) minmax(40px, 0.65fr) minmax(54px, 0.82fr) minmax(48px, 0.68fr) minmax(30px, 0.45fr) minmax(67px, 0.88fr);
  gap: 5px;
  align-items: center;
}

#routing .routing-provider-columns {
  padding: 2px 8px 1px;
  color: var(--ss-text-muted);
  font-family: "DM Mono", monospace;
  font-size: 7px;
  letter-spacing: 0.04em;
}

#routing .routing-provider-columns span:last-child {
  text-align: right;
}

#routing .routing-provider-scroll {
  height: clamp(210px, 34svh, 380px);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--ss-border-active) transparent;
  scrollbar-width: thin;
}

#routing .routing-provider-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#routing .routing-provider-list::before,
#routing .routing-provider-list::after {
  display: block;
  height: calc((clamp(210px, 34svh, 380px) - 30px) / 2);
  content: "";
}

#routing .routing-provider-list li {
  min-height: 30px;
  padding: 4px 8px;
  color: var(--ss-text-secondary);
  background: var(--ss-surface-1);
  border: 1px solid var(--ss-border);
  border-radius: 6px;
  font-family: "DM Mono", monospace;
  font-size: 9px;
  transition: color 360ms ease, background 360ms ease, border-color 360ms ease, box-shadow 360ms ease, opacity 360ms ease;
}

#routing .routing-provider-list li.is-selected {
  color: var(--activity-emerald-text);
  background: var(--activity-emerald-gradient);
  border-color: var(--activity-emerald-border);
  box-shadow: var(--activity-emerald-glow);
  opacity: 1;
}

#routing .routing-provider-list li.is-evaluating {
  border-color: var(--ss-border-active);
  box-shadow: var(--ss-glow-sm);
  animation: routing-provider-evaluating 1.8s ease-in-out infinite;
}

#routing .routing-provider-name {
  overflow: hidden;
  color: var(--ss-text-primary);
  font-family: inherit;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#routing .routing-provider-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#routing .routing-provider-state {
  color: var(--ss-text-muted);
  font-size: 7px;
  text-align: right;
}

#routing .routing-provider-list li.is-selected .routing-provider-state,
#routing .routing-provider-list li.is-selected .routing-provider-name {
  color: var(--activity-emerald-text);
}

@keyframes routing-data-flow {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(245%); }
}

@keyframes routing-provider-evaluating {
  0%, 100% { box-shadow: var(--ss-glow-sm); }
  50% { box-shadow: var(--ss-glow-md); }
}

@media (max-width: 900px) {
  #routing {
    padding: 18px clamp(18px, 4vw, 32px);
  }

  #routing .routing-inner {
    max-height: none;
  }

  #routing .routing-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  #routing .routing-heading {
    margin-bottom: 12px;
  }

  #routing .routing-heading h2 {
    max-width: 680px;
    font-size: clamp(30px, 5.4vw, 42px);
  }

  #routing .routing-subtitle {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
  }

  #routing .routing-supporting-copy {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.4;
  }

  #routing .routing-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
  }

  #routing .routing-console {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
  }

  #routing .routing-provider-scroll {
    height: clamp(175px, 25svh, 250px);
  }

  #routing .routing-provider-list::before,
  #routing .routing-provider-list::after {
    height: calc((clamp(175px, 25svh, 250px) - 30px) / 2);
  }
}

@media (max-width: 600px) {
  #routing {
    padding: 12px 15px;
  }

  #routing .routing-layout {
    gap: 9px;
  }

  #routing .routing-heading {
    margin-bottom: 8px;
  }

  #routing .routing-eyebrow {
    margin-bottom: 5px;
    font-size: 9px;
  }

  #routing .routing-heading h2 {
    font-size: clamp(25px, 7.2vw, 32px);
    line-height: 1.04;
  }

  #routing .routing-subtitle {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.35;
  }

  #routing .routing-supporting-copy {
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.35;
  }

  #routing .routing-controls {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  #routing .routing-strategy-control,
  #routing .routing-decision-factors {
    gap: 5px;
  }

  #routing .routing-control-label {
    font-size: 8px;
  }

  #routing .routing-strategy-options {
    gap: 4px;
  }

  #routing .routing-strategy-options button {
    min-height: 25px;
    padding: 5px 8px;
    font-size: 9px;
  }

  #routing .routing-factor-chips {
    gap: 4px;
  }

  #routing .routing-factor-chips li {
    min-height: 21px;
    padding: 4px 7px;
    font-size: 8px;
  }

  #routing .routing-console {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    padding: 8px;
    backdrop-filter: none;
  }

  #routing .routing-flow {
    gap: 3px;
  }

  #routing .routing-request-node {
    gap: 6px;
  }

  #routing .routing-request-caption {
    font-size: 8px;
  }

  #routing .routing-flow-connector {
    height: 6px;
  }

  #routing .routing-router-core {
    gap: 3px;
    padding: 7px 10px;
  }

  #routing .routing-router-kicker,
  #routing .routing-router-status {
    font-size: 7px;
  }

  #routing .routing-router-core > strong {
    font-size: 12px;
  }

  #routing .routing-active-route {
    gap: 2px;
    font-size: 7px;
  }

  #routing .routing-selected-card {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 8px;
    width: min(100%, 340px);
    padding: 6px 9px;
  }

  #routing .routing-selected-badge {
    font-size: 7px;
  }

  #routing .routing-selected-card > strong {
    font-size: 12px;
  }

  #routing .routing-selected-meta {
    font-size: 8px;
  }

  #routing .routing-provider-box {
    gap: 4px;
    padding: 6px;
  }

  #routing .routing-provider-heading > p {
    font-size: 8px;
  }

  #routing .routing-provider-heading > span {
    font-size: 6px;
  }

  #routing .routing-provider-columns,
  #routing .routing-provider-list li {
    grid-template-columns: minmax(58px, 1.15fr) minmax(31px, 0.6fr) minmax(45px, 0.82fr) minmax(39px, 0.68fr) minmax(24px, 0.42fr) minmax(52px, 0.88fr);
    gap: 3px;
  }

  #routing .routing-provider-columns {
    padding-inline: 5px;
    font-size: 6px;
  }

  #routing .routing-provider-scroll {
    height: clamp(150px, 23svh, 200px);
  }

  #routing .routing-provider-list::before,
  #routing .routing-provider-list::after {
    height: calc((clamp(150px, 23svh, 200px) - 27px) / 2);
  }

  #routing .routing-provider-list {
    gap: 3px;
  }

  #routing .routing-provider-list li {
    min-height: 27px;
    padding: 3px 5px;
    font-size: 8px;
  }

  #routing .routing-provider-name {
    font-size: 8px;
  }

  #routing .routing-provider-state {
    font-size: 6px;
  }
}

@media (max-height: 840px) and (min-width: 601px) {
  #routing .routing-provider-scroll {
    height: clamp(190px, 31svh, 300px);
  }

  #routing .routing-provider-list::before,
  #routing .routing-provider-list::after {
    height: calc((clamp(190px, 31svh, 300px) - 30px) / 2);
  }

  #routing .routing-controls {
    gap: 12px;
  }
}

@media (max-height: 800px) and (min-width: 601px) {
  #routing {
    padding-block: 8px;
  }

  #routing .routing-layout {
    gap: 18px;
  }

  #routing .routing-heading {
    margin-bottom: 12px;
  }

  #routing .routing-heading h2 {
    font-size: clamp(30px, 3vw, 42px);
  }

  #routing .routing-subtitle {
    margin-top: 9px;
    line-height: 1.4;
  }

  #routing .routing-supporting-copy {
    font-size: 11px;
    line-height: 1.4;
  }

  #routing .routing-provider-scroll {
    height: clamp(165px, 25svh, 205px);
  }

  #routing .routing-provider-list::before,
  #routing .routing-provider-list::after {
    height: calc((clamp(165px, 25svh, 205px) - 30px) / 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  #routing .routing-active-route-line::before,
  #routing .routing-provider-list li.is-evaluating {
    animation: none !important;
  }

  #routing .routing-strategy-options button,
  #routing .routing-selected-card,
  #routing .routing-provider-list li {
    transition-duration: 0.01ms !important;
  }
}