:root {
  color-scheme: dark;
  --a2spa-blue: #2596be;
  --a2spa-purple: #6c25be;
  --a2spa-gold: #bea925;
  --bg: #070a0f;
  --bg-2: #0b111a;
  --panel: rgba(16, 23, 34, 0.9);
  --panel-2: rgba(22, 31, 45, 0.92);
  --card: rgba(22, 29, 42, 0.84);
  --card-strong: #171f2d;
  --border: rgba(157, 176, 205, 0.16);
  --border-strong: rgba(157, 176, 205, 0.28);
  --text: #f4f8ff;
  --muted: #9daec3;
  --soft: #748295;
  --accent: #2596be;
  --accent-2: #6c25be;
  --accent-3: #bea925;
  --success: #42d392;
  --warning: #f7c948;
  --danger: #ff6b6b;
  --gradient: linear-gradient(90deg, var(--a2spa-blue), var(--a2spa-purple), var(--a2spa-gold));
  --brand-cyan: var(--a2spa-blue);
  --brand-purple: var(--a2spa-purple);
  --brand-gold: var(--a2spa-gold);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  --shadow-sm: 0 14px 38px rgba(0, 0, 0, 0.22);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --shell: 1180px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
}

body {
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 150, 190, 0.18), transparent 30%),
    radial-gradient(circle at 85% 4%, rgba(108, 37, 190, 0.12), transparent 26%),
    radial-gradient(circle at 76% 34%, rgba(190, 169, 37, 0.08), transparent 24%),
    linear-gradient(180deg, #070a0f 0%, #0b111a 58%, #070a0f 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 78%);
}

a {
  color: inherit;
}

code,
pre,
kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.site-shell {
  width: min(calc(100% - 32px), var(--shell));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(157, 176, 205, 0.12);
  background: rgba(7, 10, 15, 0.78);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}

.brand__mark,
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.brand__mark {
  font-size: 1.48rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.brand__tagline {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.site-nav,
.site-footer__links,
.button-row,
.inline-actions,
.action-buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.site-nav {
  justify-content: flex-end;
}

.site-nav a,
.site-footer__links a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a {
  border-radius: 999px;
  padding: 9px 12px;
}

.site-nav a:hover,
.site-footer__links a:hover {
  color: var(--text);
}

.site-nav .nav-pill {
  color: #071018;
  background: var(--gradient);
  font-weight: 700;
  padding-inline: 15px;
}

.site-footer {
  border-top: 1px solid rgba(157, 176, 205, 0.12);
  background: rgba(7, 10, 15, 0.72);
  color: var(--muted);
  padding: var(--space-10) 0;
}

.site-footer__grid {
  display: flex;
  justify-content: space-between;
  gap: var(--space-6);
}

.site-footer p {
  margin: var(--space-2) 0 0;
}

.hero,
.section,
.page-section {
  padding: var(--space-16) 0;
}

.hero--compact {
  padding: var(--space-12) 0 var(--space-8);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: var(--space-8);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(37, 150, 190, 0.28);
  border-radius: 999px;
  background: rgba(37, 150, 190, 0.1);
  color: #bcecf8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  padding: 8px 12px;
  text-transform: uppercase;
}

.hero h1,
.page-title,
.section-title {
  margin: 0;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.hero h1,
.page-title {
  margin-top: var(--space-5);
  max-width: 850px;
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 800;
}

.page-title {
  font-size: clamp(2.4rem, 5vw, 4.5rem);
}

.hero-lede,
.page-lede,
.section-lede {
  max-width: 780px;
  margin: var(--space-5) 0 0;
  color: var(--muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 780;
}

.section-kicker {
  margin-bottom: var(--space-4);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card,
.panel,
.feature-card,
.auth-card,
.modal-content {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel {
  padding: var(--space-8);
}

.card,
.feature-card {
  padding: var(--space-6);
}

.card h2,
.card h3,
.feature-card h3,
.panel h2,
.panel h3 {
  margin: 0 0 var(--space-3);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.card p,
.feature-card p,
.panel p,
.muted {
  color: var(--muted);
}

.card p,
.feature-card p,
.panel p {
  margin: 0;
}

.stack,
.content-stack {
  display: grid;
  gap: var(--space-6);
}

.stack-lg {
  display: grid;
  gap: var(--space-8);
}

.section-offset {
  margin-top: clamp(28px, 3vw, 44px);
}

.grid-2,
.grid-3,
.grid-4,
.split-grid,
.stats-grid,
.filter-grid,
.continuity-grid {
  display: grid;
  gap: var(--space-5);
}

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

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

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

.split-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: var(--space-8);
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 6px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 23, 34, 0.74);
}

.docs-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 10px;
}

.docs-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.doc-section {
  scroll-margin-top: 110px;
}

.code-block,
pre.code-block,
.template,
.payload-details,
.key-display {
  overflow-x: auto;
  border: 1px solid rgba(157, 176, 205, 0.16);
  border-radius: var(--radius);
  background: #07101a;
  color: #dbeafe;
}

.code-block,
pre.code-block {
  padding: var(--space-5);
  font-size: 0.88rem;
  line-height: 1.6;
  white-space: pre;
}

.template-header,
.table-toolbar,
.section-header,
.modal-header,
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.template-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.template pre {
  margin: 0;
  padding: var(--space-5);
  white-space: pre;
}

.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(16, 23, 34, 0.72);
}

.table-container table {
  min-width: 640px;
}

.comparison-table {
  min-width: 980px;
}

table,
.data-table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(157, 176, 205, 0.12);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

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

.btn,
button.btn,
.submit-button,
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  color: #071018;
  background: var(--gradient);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.submit-button:hover,
.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(37, 150, 190, 0.16);
}

.btn-secondary,
.btn.btn-secondary,
.gate-button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.btn-danger,
.btn.btn-danger {
  color: #fff;
  background: rgba(255, 107, 107, 0.16);
  border-color: rgba(255, 107, 107, 0.34);
}

.btn-sm,
.btn.btn-sm {
  min-height: 30px;
  padding: 6px 11px;
  font-size: 0.82rem;
}

.form-grid,
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.form-group,
.filter-field {
  display: grid;
  gap: var(--space-2);
}

.form-label,
.filter-label,
label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.input-field,
.form-input,
.form-select,
.form-textarea,
textarea,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
input[type="datetime-local"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(7, 16, 26, 0.9);
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
}

textarea,
.form-textarea,
.textarea-field {
  min-height: 132px;
  resize: vertical;
}

.input-field:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
textarea:focus,
select:focus,
input:focus {
  border-color: rgba(37, 150, 190, 0.64);
  box-shadow: 0 0 0 4px rgba(37, 150, 190, 0.1);
  outline: none;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.required {
  color: var(--danger);
}

.full-width,
.form-group.full-width {
  grid-column: 1 / -1;
}

.form-note,
.terms-checkbox,
.password-strength,
.resend-timer {
  color: var(--muted);
  font-size: 0.88rem;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.strength-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.strength-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  transition: width 0.2s ease, background 0.2s ease;
}

.strength-medium {
  background: var(--warning);
}

.strength-strong {
  background: var(--success);
}

.alert,
.notice,
.feedback,
.message,
.error-message,
.success-message,
.credit-alert {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.alert-info,
.notice-info {
  border-color: rgba(37, 150, 190, 0.28);
  background: rgba(37, 150, 190, 0.09);
}

.alert-success,
.success-message,
.feedback-success,
.feedback.success {
  color: #d9ffe9;
  border-color: rgba(66, 211, 146, 0.3);
  background: rgba(66, 211, 146, 0.1);
}

.alert-warning,
.stat-subtitle-warning {
  color: #ffe9a6;
  border-color: rgba(247, 201, 72, 0.3);
  background: rgba(247, 201, 72, 0.08);
}

.alert-error,
.error-message,
.feedback-error,
.feedback.error,
.credit-alert.critical {
  color: #ffd9d9;
  border-color: rgba(255, 107, 107, 0.32);
  background: rgba(255, 107, 107, 0.1);
}

.credit-alert.low {
  color: #ffe9a6;
  border-color: rgba(247, 201, 72, 0.3);
  background: rgba(247, 201, 72, 0.08);
}

.auth-page main {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 164px);
  padding: var(--space-12) 0;
}

.auth-card {
  width: min(100%, 430px);
  padding: var(--space-8);
}

.auth-card h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.auth-card form {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.auth-subtitle,
.stat-subtitle,
.table-summary {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-footer {
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align: center;
}

.auth-link,
.text-link,
.contact-link {
  color: #7dd3fc;
  text-decoration: none;
}

.dashboard-page main {
  padding: var(--space-8) 0 var(--space-16);
}

.dashboard-container,
.dashboard-shell {
  width: min(calc(100% - 32px), 1280px);
  margin: 0 auto;
}

.dashboard-container > .header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
  padding: var(--space-6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.logout-btn {
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  text-decoration: none;
}

.stat-card,
.dashboard-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.dashboard-panel {
  display: grid;
  gap: var(--space-5);
}

.dashboard-collapsible {
  display: block;
}

.dashboard-panel-summary {
  cursor: pointer;
  list-style: none;
}

.dashboard-panel-summary::-webkit-details-marker {
  display: none;
}

.dashboard-panel-summary h2,
.dashboard-panel-summary p {
  margin: 0;
}

.dashboard-panel-body {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.collapse-hint {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0;
  padding: 7px 11px;
}

.collapse-hint::after {
  content: "Expand";
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-collapsible[open] .collapse-hint::after {
  content: "Collapse";
}

.dashboard-panel h2,
.dashboard-panel h3 {
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.16;
}

.stat-value,
.balance-display {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.api-key-section,
.billing-section,
.load-more-row,
.modal-actions,
.incident-controls,
.incident-pagination {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.filter-grid {
  grid-template-columns: minmax(220px, 2fr) repeat(2, minmax(160px, 1fr));
}

.continuity-grid {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.continuity-wide {
  grid-column: 1 / -1;
}

.status-badge,
.chip,
.meta-chip,
.category-chip,
.label {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.8rem;
  padding: 5px 9px;
}

.status-enabled,
.chip.approved {
  color: var(--success);
}

.status-disabled,
.chip.rejected {
  color: var(--danger);
}

.chip.pending {
  color: var(--warning);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.modal-content {
  width: min(100%, 620px);
  max-height: 90vh;
  overflow: auto;
  padding: var(--space-6);
}

.modal-fullscreen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.modal-fullscreen .modal-content {
  width: 100%;
  max-height: 100vh;
  border-radius: 0;
}

.details-modal-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-5);
}

.details-modal-json {
  width: 100%;
  min-height: 0;
  max-height: none;
  margin: 0;
  overflow: auto;
  font-size: clamp(0.78rem, 1.2vw, 0.94rem);
}

.key-display,
.payload-details {
  padding: var(--space-4);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
}

.hash-chip {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3vw, 40px);
}

.modal-title {
  margin: 0;
  letter-spacing: -0.03em;
}

.policy-editor {
  min-height: 220px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.incident-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.incident-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  padding: 8px 12px;
}

.incident-tab.active {
  color: var(--text);
  border-color: rgba(37, 150, 190, 0.42);
  background: rgba(37, 150, 190, 0.1);
}

.incident-type-pill {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #bcecf8;
  padding: 4px 8px;
}

.incident-table-title {
  color: var(--text);
  font-weight: 700;
}

.incident-table-summary {
  color: var(--muted);
  margin-top: 6px;
}

.source-link {
  color: #7dd3fc;
  text-decoration: none;
}

.incident-card-list {
  display: grid;
  gap: var(--space-4);
}

.tracker-incident-card {
  display: grid;
  grid-template-columns: minmax(130px, 0.22fr) minmax(180px, 0.28fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 36, 0.74);
}

.tracker-incident-meta,
.tracker-incident-source,
.tracker-incident-body {
  min-width: 0;
}

.tracker-incident-meta,
.tracker-incident-source {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tracker-incident-meta > span:first-child,
.tracker-incident-source > span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.tracker-incident-source .source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  background: rgba(37, 150, 190, 0.08);
  line-height: 1.2;
  white-space: nowrap;
}

.tracker-incident-body h3 {
  margin: 0;
  color: var(--text);
  line-height: 1.28;
}

.tracker-incident-body p {
  margin: 6px 0 0;
  color: var(--muted);
}

.thread-card,
.comment-card,
.incident-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  padding: var(--space-6);
}

.thread-topline,
.thread-meta,
.comment-header,
.comment-actions,
.filters,
.chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.comment-header,
.comment-actions {
  justify-content: space-between;
}

.thread-card h3,
.comment-card h3,
.incident-card h3 {
  margin: var(--space-3) 0;
}

.comment-form,
.partner-form,
.contact-form {
  display: grid;
  gap: var(--space-4);
}

.comment-list,
.threads-list,
.incident-list {
  display: grid;
  gap: var(--space-5);
}

.comment-gate,
.comment-empty,
.empty-state {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  padding: var(--space-5);
}

.tab-link,
.filters a {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  padding: 8px 12px;
  text-decoration: none;
}

.tab-link.active,
.filters a.active {
  color: var(--text);
  border-color: rgba(37, 150, 190, 0.42);
  background: rgba(37, 150, 190, 0.1);
}

.thread-body p + p,
.comment-body p + p,
.prose p + p,
.prose ul + p,
.prose p + ul {
  margin-top: var(--space-4);
}

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

.prose h2,
.prose h3 {
  color: var(--text);
  letter-spacing: -0.03em;
}

.prose a {
  color: #7dd3fc;
}

.footer-note,
.small-note {
  color: var(--soft);
  font-size: 0.88rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .split-grid,
  .stats-grid,
  .docs-layout,
  .filter-grid,
  .continuity-grid {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
  }

  .continuity-wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .site-header__inner,
  .site-footer__grid,
  .dashboard-container > .header,
  .billing-section,
  .api-key-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero,
  .section,
  .page-section {
    padding: var(--space-10) 0;
  }

  .panel,
  .card,
  .feature-card,
  .auth-card,
  .stat-card,
  .section,
  .thread-card,
  .comment-card,
  .incident-card {
    padding: var(--space-5);
  }

  .form-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .btn,
  button.btn,
  .submit-button,
  .submit-btn {
    width: 100%;
  }
}

/* Production visual pass: restrained software-company styling, logo-native color system. */
:root {
  --bg: #05070c;
  --bg-2: #090d16;
  --panel: #0d1420;
  --panel-2: #111b2a;
  --card: #0f1724;
  --card-strong: #142033;
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(148, 163, 184, 0.34);
  --text: #f8fafc;
  --muted: #a7b4c7;
  --soft: #748295;
  --accent: #2596be;
  --accent-2: #6c25be;
  --accent-3: #bea925;
  --gradient: linear-gradient(90deg, #2596be, #6c25be, #bea925);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  --shadow-sm: 0 16px 44px rgba(0, 0, 0, 0.2);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

body {
  background: linear-gradient(180deg, #05070c 0%, #090d16 48%, #05070c 100%);
}

body::before {
  background-image: linear-gradient(rgba(148, 163, 184, 0.025) 1px, transparent 1px);
  background-size: 96px 96px;
}

.brand__mark,
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.brand__mark {
  letter-spacing: -0.04em;
}

.brand__tagline {
  color: #8aa4c4;
}

.site-header {
  background: rgba(5, 7, 12, 0.86);
}

.site-nav a {
  padding: 8px 10px;
}

.site-nav .nav-pill,
.btn,
button.btn,
.submit-button,
.submit-btn {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: none;
}

.btn:hover,
.submit-button:hover,
.submit-btn:hover {
  background: #1f7d9d;
  box-shadow: 0 12px 28px rgba(37, 150, 190, 0.22);
}

.btn-secondary,
.btn.btn-secondary,
.gate-button-secondary {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

.btn-danger,
.btn.btn-danger {
  color: #fff;
  background: #b42335;
  border-color: #b42335;
}

.panel,
.card,
.feature-card,
.auth-card,
.thread-card,
.comment-card,
.incident-card,
.stat-card,
.dashboard-panel {
  background: linear-gradient(180deg, rgba(15, 23, 36, 0.98), rgba(12, 18, 29, 0.98));
}

.hero,
.section,
.page-section {
  padding: clamp(64px, 9vw, 112px) 0;
}

.section + .section,
.page-section + .section,
.section + .page-section {
  border-top: 0;
}

.hero h1,
.page-title {
  max-width: 980px;
  letter-spacing: -0.07em;
}

.section-title {
  letter-spacing: -0.055em;
}

.section-kicker,
.eyebrow {
  color: #8edcf0;
}

.eyebrow {
  background: rgba(37, 150, 190, 0.1);
  border-color: rgba(37, 150, 190, 0.35);
}

.grid-2,
.grid-3,
.grid-4,
.stats-grid,
.filter-grid,
.continuity-grid {
  gap: clamp(24px, 2.8vw, 38px);
}

.panel {
  padding: clamp(24px, 3vw, 44px);
}

.card,
.feature-card,
.stat-card,
.dashboard-panel,
.incident-card,
.thread-card,
.comment-card {
  padding: clamp(20px, 2.4vw, 32px);
}

.section .card,
.section .feature-card {
  min-height: 100%;
}

.media-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #070b12;
  box-shadow: var(--shadow-sm);
}

.media-frame img,
.media-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.responsive-video {
  position: relative;
  aspect-ratio: 16 / 9;
}

.responsive-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.spoof-infographic {
  background: #030712;
}

.spoof-infographic figcaption {
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.gate-diagram {
  display: grid;
  gap: var(--space-4);
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 20% 20%, rgba(37, 150, 190, 0.16), transparent 32%),
    radial-gradient(circle at 85% 25%, rgba(108, 37, 190, 0.18), transparent 30%),
    rgba(7, 11, 18, 0.92);
  box-shadow: var(--shadow-sm);
}

.gate-node,
.gate-arrow,
.gate-result {
  border: 1px solid rgba(157, 176, 205, 0.18);
  border-radius: var(--radius);
  padding: var(--space-4);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.gate-node--primary {
  border-color: rgba(37, 150, 190, 0.5);
  background: rgba(37, 150, 190, 0.12);
  font-weight: 800;
}

.gate-arrow {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
}

.gate-branch {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.gate-result--allow { color: var(--success); }
.gate-result--hold { color: #f7c948; }
.gate-result--deny { color: #ff7b7b; }

.threat-map {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: var(--space-6);
  align-items: center;
}

.threat-map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.threat-map-card {
  min-height: 180px;
  display: grid;
  align-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid rgba(157, 176, 205, 0.16);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(37, 150, 190, 0.08), rgba(108, 37, 190, 0.08)),
    rgba(255, 255, 255, 0.03);
}

.threat-map-card span {
  color: var(--soft);
  font-weight: 800;
  letter-spacing: 0.14em;
}

.threat-map-card strong {
  color: var(--text);
  font-size: 1.1rem;
}

.threat-map-card p {
  margin: 0;
  color: var(--muted);
}

.capability-list,
.plain-list {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.capability-list li,
.plain-list li {
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
  color: var(--muted);
}

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-3);
}

.workflow-step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  padding: var(--space-4);
  text-align: center;
}

.comparison-table td:first-child,
.comparison-table th:first-child {
  color: var(--text);
  font-weight: 700;
}

.checkmark {
  color: var(--success);
  font-weight: 800;
}

.xmark {
  color: var(--soft);
  font-weight: 800;
}

.threat-demo {
  display: grid;
  gap: var(--space-5);
}

.terminal-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #070b12;
  padding: var(--space-5);
}

.terminal-card code {
  display: grid;
  gap: 6px;
  color: #dbeafe;
  white-space: pre-wrap;
}

.terminal-card.is-risk {
  border-color: rgba(255, 107, 107, 0.3);
}

.terminal-card.is-denied {
  border-color: rgba(66, 211, 146, 0.32);
}

.terminal-line {
  display: block;
  width: 0;
  max-width: max-content;
  overflow: hidden;
  white-space: nowrap;
  border-right: 0 solid transparent;
  animation: terminal-type 7.2s steps(42, end) infinite;
}

.terminal-line:nth-child(2) {
  animation-delay: 1.4s;
}

.terminal-line:nth-child(3) {
  animation-delay: 2.8s;
}

.terminal-line:nth-child(4) {
  animation-delay: 4.2s;
}

.terminal-card::after {
  display: none;
}

@keyframes terminal-line-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes terminal-type {
  0%, 8% {
    width: 0;
    opacity: 0;
  }
  10%, 42% {
    width: 100%;
    opacity: 1;
  }
  86%, 100% {
    width: 100%;
    opacity: 1;
  }
}

@keyframes terminal-cursor {
  50% {
    opacity: 0;
  }
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-5);
}

.impact-item {
  border-top: 2px solid var(--accent);
  color: var(--muted);
  padding-top: var(--space-4);
}

.attack-list {
  columns: 2;
  column-gap: var(--space-10);
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.plain-list {
  list-style: none;
}

ol.plain-list {
  counter-reset: plain-list;
}

ol.plain-list li {
  counter-increment: plain-list;
  position: relative;
  display: block;
  min-width: 0;
  padding-left: 2.25rem;
}

ol.plain-list li::before {
  content: counter(plain-list) ".";
  position: absolute;
  left: 0;
  top: var(--space-4);
  color: var(--accent);
  font-weight: 800;
}

.attack-list li {
  break-inside: avoid;
  margin-bottom: var(--space-4);
}

.doc-search {
  position: static;
  z-index: auto;
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(5, 7, 12, 0.88);
  backdrop-filter: blur(16px);
}

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

.copy-panel {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(37, 150, 190, 0.06);
  padding: var(--space-5);
}

.explain-box {
  border-left: 3px solid var(--accent);
  color: var(--muted);
  padding: var(--space-4) var(--space-5);
  background: rgba(37, 150, 190, 0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-6);
}

.payload-details {
  margin-top: var(--space-3);
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

td,
th,
.hash-chip,
.key-display {
  overflow-wrap: anywhere;
}

.prose p code,
.prose li code,
td code,
th code {
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .workflow-strip,
  .impact-grid,
  .threat-map,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .attack-list {
    columns: 1;
  }
}

@media (max-width: 720px) {
  .site-nav {
    width: 100%;
    gap: 6px;
  }

  .site-nav a {
    font-size: 0.86rem;
    padding: 7px 8px;
  }

  .hero h1,
  .page-title {
    font-size: clamp(2.35rem, 13vw, 3.4rem);
  }

  .table-container {
    margin-inline: -8px;
    border-radius: var(--radius-sm);
  }

  .gate-branch {
    grid-template-columns: 1fr;
  }

  .threat-map-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-container,
  .site-shell {
    width: min(calc(100% - 24px), var(--shell));
  }

  .data-table .btn,
  .data-table button.btn,
  .incident-pagination .btn,
  .modal-actions .btn,
  .header-actions .btn,
  .api-key-section .btn {
    width: auto;
  }
}

/* Final launch polish: A2SPA logo palette, readable controls, and profile layout. */
:root {
  --accent: #2596be;
  --accent-2: #6c25be;
  --accent-3: #bea925;
  --button-bg: #2596be;
  --button-bg-hover: #1f7f9f;
  --button-text: #ffffff;
  --focus-ring: rgba(37, 150, 190, 0.18);
}

body {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.62;
}

.hero-lede,
.page-lede,
.section-lede {
  line-height: 1.58;
}

.section-kicker,
.eyebrow {
  color: #f0d94a;
}

.eyebrow {
  background: rgba(190, 169, 37, 0.1);
  border-color: rgba(190, 169, 37, 0.32);
}

.btn,
button.btn,
.submit-button,
.submit-btn,
.site-nav .nav-pill {
  min-height: 42px;
  color: var(--button-text);
  background: var(--button-bg);
  border-color: rgba(37, 150, 190, 0.34);
  font-size: 0.94rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.btn:hover,
.submit-button:hover,
.submit-btn:hover {
  color: var(--button-text);
  background: var(--button-bg-hover);
  border-color: rgba(108, 37, 190, 0.44);
  box-shadow: 0 14px 30px rgba(37, 150, 190, 0.2);
}

.btn-secondary,
.btn.btn-secondary,
.gate-button-secondary,
.logout-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--border-strong);
}

.btn-secondary:hover,
.btn.btn-secondary:hover,
.gate-button-secondary:hover,
.logout-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(190, 169, 37, 0.42);
}

.btn-sm,
.btn.btn-sm {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 0.84rem;
}

.input-field:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
textarea:focus,
select:focus,
input:focus {
  border-color: rgba(37, 150, 190, 0.7);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.docs-nav,
.doc-search {
  position: static;
}

.doc-search {
  margin-bottom: clamp(22px, 3vw, 34px);
  background: rgba(12, 18, 29, 0.92);
}

.profile-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(24px, 3vw, 40px);
  align-items: stretch;
}

.profile-summary {
  display: grid;
  gap: var(--space-4);
}

.profile-metric {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: var(--space-5);
}

.profile-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-metric strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  letter-spacing: -0.045em;
}

.settings-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.4fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: center;
  background: rgba(15, 23, 36, 0.98);
  padding: var(--space-4) var(--space-5);
}

.settings-row span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.settings-row strong {
  color: var(--text);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.terminal-card {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.22);
  min-height: 156px;
}

.terminal-card strong {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--text);
}

.terminal-header {
  display: flex;
  gap: 7px;
  margin-bottom: var(--space-4);
}

.terminal-header span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.terminal-header span:nth-child(1) { background: #ef4444; }
.terminal-header span:nth-child(2) { background: #eab308; }
.terminal-header span:nth-child(3) { background: #22c55e; }

.command-line,
.terminal-output {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  overflow: hidden;
}

.command-line {
  width: 100%;
  color: #42d392;
}

.terminal-output {
  width: 0;
  margin-top: var(--space-3);
  border-right: 2px solid currentColor;
  animation: terminal-output-type 4.8s steps(42, end) infinite, terminal-caret 0.75s step-end infinite;
}

.output-risk { color: #ff6b6b; }
.output-denied,
.is-denied .terminal-output { color: #f7c948; }

@keyframes terminal-output-type {
  0%, 18% { width: 0; }
  58%, 100% { width: 100%; }
}

@keyframes terminal-caret {
  0%, 100% { border-color: transparent; }
  50% { border-color: currentColor; }
}

@media (max-width: 980px) {
  .profile-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .settings-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .hero h1,
  .page-title {
    letter-spacing: -0.055em;
  }
}

/* User-approved corrections: cyan buttons, lightweight logo, original spoof demo pattern. */
:root {
  --button-bg: #2596be;
  --button-bg-hover: #1f7f9f;
  --button-text: #ffffff;
}

.brand__mark {
  font-size: 1.42rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.brand__tagline {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.btn,
button.btn,
.submit-button,
.submit-btn,
.site-nav .nav-pill {
  color: var(--button-text);
  background: var(--button-bg);
  border-color: var(--button-bg);
  font-size: 0.92rem;
  font-weight: 700;
}

.btn:hover,
.submit-button:hover,
.submit-btn:hover {
  color: var(--button-text);
  background: var(--button-bg-hover);
  border-color: var(--button-bg-hover);
  box-shadow: 0 14px 30px rgba(37, 150, 190, 0.22);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-5);
}

.demo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.8);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.demo-card h3 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  line-height: 1.2;
}

.demo-caption {
  margin: var(--space-2) 0 var(--space-4);
  color: var(--soft);
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-left: auto;
}

.status-vulnerable {
  background: #ff4757;
  box-shadow: 0 0 12px rgba(255, 71, 87, 0.8);
}

.status-protected {
  background: #2ed573;
  box-shadow: 0 0 12px rgba(46, 213, 115, 0.72);
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.terminal {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  border: 1px solid #334155;
  border-radius: 10px;
  background: #0f172a;
  padding: var(--space-5);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #eab308; }
.dot-green { background: #22c55e; }

.output-success,
.output-error {
  max-width: max-content;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid currentColor;
  font-weight: 600;
}

.output-success { color: #ef4444; }
.output-error { color: #f97316; }

.typing {
  animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: currentColor; }
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  border: 2px solid rgba(37, 150, 190, 0.3);
  border-radius: 999px;
  background: rgba(37, 150, 190, 0.9);
  color: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button::after {
  content: "▶";
  display: block;
  margin-left: 2px;
  font-size: 1rem;
}

.play-button:hover {
  background: rgba(37, 150, 190, 1);
  transform: translate(-50%, -50%) scale(1.08);
}

@media (max-width: 980px) {
  .demo-grid {
    grid-template-columns: 1fr;
  }
}

/* Corrections: original wordmark, no site-wide yellow accents, cyan primary controls. */
:root {
  --a2spa-blue: #2596be;
  --a2spa-purple: #6c25be;
  --a2spa-gold: #bea925;
}

.a2spa-gradient,
.brand__mark,
.gradient-text {
  background: linear-gradient(90deg, var(--a2spa-blue), var(--a2spa-purple), var(--a2spa-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.brand__mark {
  display: inline-block;
  font-family: "Google Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.05;
}

.brand__tagline {
  font-family: "Google Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #8f9bac;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.section-kicker,
.eyebrow {
  color: #8edcf0;
}

.eyebrow {
  background: rgba(37, 150, 190, 0.1);
  border-color: rgba(37, 150, 190, 0.34);
}

.btn,
button.btn,
.submit-button,
.submit-btn,
.site-nav .nav-pill {
  color: #fff;
  background: #2596be;
  border-color: #2596be;
  font-family: "Google Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
}

.btn:hover,
.submit-button:hover,
.submit-btn:hover {
  color: #fff;
  background: #1f7f9f;
  border-color: #1f7f9f;
  box-shadow: 0 14px 30px rgba(37, 150, 190, 0.22);
}

.btn-secondary,
.btn.btn-secondary,
.gate-button-secondary,
.logout-btn {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

.btn-secondary:hover,
.btn.btn-secondary:hover,
.gate-button-secondary:hover,
.logout-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(37, 150, 190, 0.46);
}

.demo-card {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.demo-section {
  min-width: 0;
}

.section.demo-section {
  padding-top: 0;
}

.demo-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.terminal {
  margin: 1rem 0;
  min-height: 120px;
  border-radius: 8px;
  padding: 1.5rem;
  background: #0f172a;
  border: 1px solid #334155;
  font-family: "Monaco", "Menlo", "SFMono-Regular", Consolas, monospace;
  font-size: 0.95rem;
}

.terminal-header {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.command-line {
  margin-bottom: 1rem;
  color: #10b981;
  font-weight: 500;
}

.output-success,
.output-error {
  display: block;
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid currentColor;
  font-weight: 500;
}

.output-success {
  color: #ef4444;
}

.output-error {
  color: #f97316;
}

.play-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.9);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, background 0.3s ease;
}

.play-button:hover {
  background: rgba(59, 130, 246, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

.chain-panel {
  padding: clamp(22px, 2.8vw, 38px);
}

.chain-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chain-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.chain-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.chain-list span {
  color: #8edcf0;
  font-weight: 800;
}

.chain-list strong {
  display: block;
  color: var(--text);
  line-height: 1.3;
}

.chain-list p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.prompt-card {
  display: grid;
  gap: var(--space-4);
}

.prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.prompt-header h3 {
  margin: 0;
}

.profile-page .header h1 {
  margin: 0;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.profile-primary-card {
  position: relative;
  overflow: hidden;
}

.profile-primary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2596be, #6c25be);
}

.profile-metric-large {
  grid-column: 1 / -1;
}

.profile-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.profile-key-card,
.readiness-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  padding: var(--space-5);
}

.profile-key-card span,
.readiness-item .status-badge {
  margin-bottom: var(--space-3);
}

.profile-key-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-key-card strong {
  display: block;
  color: var(--text);
  font-size: 1.35rem;
  letter-spacing: -0.035em;
}

.profile-key-card p,
.readiness-item p {
  margin-top: var(--space-2);
  color: var(--muted);
}

.readiness-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.readiness-item h3 {
  margin: 0;
  letter-spacing: -0.025em;
}

.profile-status-good {
  color: #b9f6d5;
  border-color: rgba(66, 211, 146, 0.34);
  background: rgba(66, 211, 146, 0.1);
}

.profile-status-danger {
  color: #ffd9d9;
  border-color: rgba(255, 107, 107, 0.32);
  background: rgba(255, 107, 107, 0.1);
}

.profile-status-muted {
  color: var(--muted);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 720px) {
  .chain-list li {
    grid-template-columns: 1fr;
    gap: var(--space-2);
  }

  .prompt-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

/* Responsive launch fixes for long terminal/code/table content. */
main,
.hero,
.section,
.page-section,
.site-shell,
.dashboard-container,
.panel,
.dashboard-panel,
.content-stack,
.hero-grid,
.docs-layout,
.grid-2,
.grid-3,
.grid-4,
.split-grid,
.stats-grid,
.filter-grid,
.continuity-grid {
  min-width: 0;
}

.button-row,
.header-actions,
.modal-actions,
.incident-controls,
.incident-pagination,
.api-key-section {
  min-width: 0;
}

.button-row .btn,
.header-actions .btn,
.header-actions .logout-btn,
.modal-actions .btn,
.incident-pagination .btn,
.api-key-section .btn {
  max-width: 100%;
  white-space: normal;
}

.terminal-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.terminal-card code,
.command-line,
.terminal-output,
.output-success,
.output-error {
  max-width: 100%;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.terminal-output,
.output-success,
.output-error {
  width: auto;
  border-right: 0;
  animation: none;
}

.terminal-line {
  width: auto;
  max-width: 100%;
  white-space: pre-wrap;
  animation: none;
}

.docs-nav {
  min-width: 0;
}

.docs-nav a,
.doc-section,
.copy-panel,
.template,
.code-block,
pre.code-block,
.payload-details,
.key-display {
  min-width: 0;
  max-width: 100%;
}

.code-block,
pre.code-block,
.template pre,
.payload-details,
.key-display {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#builder-spec {
  max-height: 68vh;
}

.dashboard-table-wrap table,
.incident-table-wrap table {
  min-width: 0;
  table-layout: fixed;
}

.log-table,
.error-table,
.incident-table {
  min-width: 0;
}

.log-table th:nth-child(1),
.log-table td:nth-child(1),
.error-table th:nth-child(1),
.error-table td:nth-child(1) {
  width: 10.5rem;
}

.log-table th:nth-child(5),
.log-table td:nth-child(5),
.details-action-cell {
  width: 7.75rem;
}

.log-table th:nth-child(6),
.error-table th:nth-child(5) {
  width: 6rem;
}

.details-toggle {
  padding-inline: 10px;
}

.details-row-cell {
  padding-top: 0;
  background: rgba(7, 16, 26, 0.72);
}

.details-row .payload-details {
  margin: var(--space-3) 0 0;
}

.incident-table th:nth-child(1),
.incident-table td:nth-child(1) {
  width: 8.5rem;
}

.incident-table th:nth-child(2),
.incident-table td:nth-child(2) {
  width: 7.5rem;
}

.incident-table th:nth-child(3),
.incident-table td:nth-child(3) {
  width: 9rem;
}

.incident-table th:nth-child(5),
.incident-table td:nth-child(5) {
  width: 5.75rem;
}

.incident-date-cell,
.incident-type-cell,
.incident-source-cell,
.incident-title-cell,
.incident-link-cell {
  vertical-align: top;
  padding: 0.85rem 1rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.incident-date-cell,
.incident-type-cell {
  white-space: nowrap;
}

.incident-source-cell,
.incident-title-cell {
  overflow-wrap: anywhere;
}

.incident-link-cell {
  text-align: center;
}

.source-link {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.endpoint-grid {
  align-items: stretch;
}

.endpoint-card {
  display: grid;
  align-content: start;
  gap: var(--space-3);
  min-width: 0;
}

.endpoint-card h3 {
  margin-bottom: 0;
}

.endpoint-url {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(7, 16, 26, 0.68);
}

.endpoint-url span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.2rem;
  border-radius: 999px;
  background: rgba(37, 150, 190, 0.16);
  color: #bcecf8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.endpoint-url code {
  display: block;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

ol.plain-list li,
.plain-list li,
.feature-card,
.card,
.panel,
.notice,
.prose,
.thread-card,
.comment-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.terminal-card .terminal-output {
  opacity: 0;
  transform: translateY(4px);
  animation: terminal-output-reveal 3.8s steps(12, end) infinite;
  animation-delay: 0.45s;
}

.terminal-card .command-line {
  opacity: 1;
  animation: terminal-command-pulse 3.8s ease-in-out infinite;
}

@keyframes terminal-command-pulse {
  0%, 100% { opacity: 0.78; }
  24%, 82% { opacity: 1; }
}

@keyframes terminal-output-reveal {
  0%, 12% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translateY(4px);
  }
  32%, 82% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
  100% {
    opacity: 0.88;
    clip-path: inset(0 0 0 0);
    transform: translateY(0);
  }
}

.dashboard-table-wrap {
  overflow-x: visible;
  border: 0;
  background: transparent;
}

.dashboard-table-wrap .data-table,
.dashboard-table-wrap tbody,
.dashboard-table-wrap tr,
.dashboard-table-wrap td {
  display: block;
  width: 100%;
}

.dashboard-table-wrap .data-table {
  min-width: 0;
  border-collapse: separate;
}

.dashboard-table-wrap thead {
  display: none;
}

.dashboard-table-wrap tbody {
  display: grid;
  gap: var(--space-3);
}

.dashboard-table-wrap tr:not(.details-row) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 36, 0.78);
}

.dashboard-table-wrap td {
  min-width: 0;
  padding: 0;
  border-bottom: 0;
  overflow-wrap: anywhere;
}

.dashboard-table-wrap td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 4px;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-table-wrap .details-action-cell,
.dashboard-table-wrap .details-row-cell,
.dashboard-table-wrap .details-row-cell .payload-details {
  width: 100%;
}

.dashboard-table-wrap .details-action-cell::before,
.dashboard-table-wrap .details-row-cell::before,
.dashboard-table-wrap td[colspan]::before {
  content: none;
}

.dashboard-table-wrap .details-toggle {
  width: 100%;
  min-width: 0;
}

.dashboard-table-wrap .details-row {
  margin-top: calc(-1 * var(--space-2));
}

.dashboard-table-wrap .details-row-cell {
  padding: 0 var(--space-4) var(--space-4);
  background: transparent;
}

.dashboard-table-wrap .details-row .payload-details {
  margin: 0;
  max-height: 52vh;
}

.incident-table-wrap {
  overflow-x: visible;
}

.incident-table {
  min-width: 0;
  table-layout: auto;
}

.incident-table th:nth-child(1),
.incident-table td:nth-child(1) {
  width: 8rem;
}

.incident-table th:nth-child(2),
.incident-table td:nth-child(2) {
  width: 7.25rem;
}

.incident-table th:nth-child(4),
.incident-table td:nth-child(4) {
  width: 11rem;
}

.incident-source-cell {
  word-break: normal;
}

.incident-source-name {
  overflow-wrap: anywhere;
}

.incident-source-cell .source-link {
  margin-top: 0.5rem;
  padding: 5px 9px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  background: rgba(37, 150, 190, 0.08);
  line-height: 1.2;
}

.architecture-diagram {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 18% 12%, rgba(37, 150, 190, 0.18), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(108, 37, 190, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 36, 0.96), rgba(7, 11, 18, 0.96));
  box-shadow: var(--shadow-sm);
}

.architecture-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.architecture-rail strong {
  padding: 8px 12px;
  border: 1px solid rgba(37, 150, 190, 0.34);
  border-radius: 999px;
  background: rgba(37, 150, 190, 0.1);
  color: #bcecf8;
  white-space: normal;
}

.architecture-rail span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.architecture-stack {
  display: grid;
  gap: var(--space-3);
}

.architecture-layer {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 0.45fr) minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.architecture-layer span {
  color: #8edcf0;
  font-weight: 900;
}

.architecture-layer strong {
  color: var(--text);
  line-height: 1.25;
}

.architecture-layer em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.45;
}

.architecture-outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (max-width: 720px) {
  .button-row,
  .header-actions,
  .modal-actions,
  .incident-controls,
  .incident-pagination,
  .api-key-section {
    align-items: stretch;
    width: 100%;
  }

  .button-row .btn,
  .header-actions .btn,
  .header-actions .logout-btn,
  .modal-actions .btn,
  .incident-controls .input-field,
  .incident-pagination .btn,
  .api-key-section .btn {
    width: 100%;
    justify-content: center;
  }

  .docs-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: var(--space-3);
  }

  .endpoint-url {
    grid-template-columns: 1fr;
  }

  .architecture-rail,
  .architecture-layer,
  .architecture-outcomes,
  .tracker-incident-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .tracker-incident-source .source-link,
  .a2spa-mit-btn {
    width: 100%;
    justify-content: center;
  }

  .docs-nav a {
    overflow-wrap: anywhere;
  }

  .table-container.dashboard-table-wrap,
  .table-container.incident-table-wrap {
    overflow-x: visible;
  }

  .dashboard-table-wrap table,
  .dashboard-table-wrap thead,
  .dashboard-table-wrap tbody,
  .dashboard-table-wrap th,
  .dashboard-table-wrap td,
  .dashboard-table-wrap tr,
  .incident-table-wrap table,
  .incident-table-wrap thead,
  .incident-table-wrap tbody,
  .incident-table-wrap th,
  .incident-table-wrap td,
  .incident-table-wrap tr {
    display: block;
    width: 100%;
  }

  .dashboard-table-wrap thead,
  .incident-table-wrap thead {
    display: none;
  }

  .dashboard-table-wrap tr,
  .incident-table-wrap tr {
    padding: var(--space-4);
    border-bottom: 1px solid rgba(157, 176, 205, 0.14);
  }

  .dashboard-table-wrap td,
  .incident-table-wrap td {
    display: grid;
    grid-template-columns: minmax(5.5rem, 32%) minmax(0, 1fr);
    gap: var(--space-3);
    width: 100% !important;
    padding: 8px 0;
    border-bottom: 0;
  }

  .dashboard-table-wrap td::before,
  .incident-table-wrap td::before {
    content: attr(data-label);
    color: var(--soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .dashboard-table-wrap .details-action-cell,
  .dashboard-table-wrap .details-row-cell {
    display: block;
  }

  .dashboard-table-wrap .details-row-cell::before,
  .dashboard-table-wrap td[colspan]::before {
    content: none;
  }

  .dashboard-table-wrap .details-toggle,
  .incident-link-cell .source-link,
  .incident-source-cell .source-link {
    justify-content: center;
    width: 100%;
  }

  .incident-table-wrap .incident-title-cell,
  .incident-table-wrap .incident-source-cell {
    display: block;
  }

  .incident-table-wrap .incident-title-cell::before,
  .incident-table-wrap .incident-source-cell::before {
    display: block;
    margin-bottom: 6px;
  }

  .details-row {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terminal-card .command-line,
  .terminal-card .terminal-output,
  .terminal-line,
  .output-success,
  .output-error {
    opacity: 1;
    clip-path: none;
    transform: none;
    animation: none;
  }
}
