/* ==========================================================================
   ring0.run — Engineering Design System & Control Plane Console
   Locked cool-carbon palette, single Signal Emerald accent, crisp 1px borders.
   Zero drop shadows, zero glassmorphism, zero gradients, zero pill bloat.
   ========================================================================== */

:root {
  /* Cool carbon neutral surfaces */
  --bg-canvas: #0A0B0D;
  --bg-surface: #111317;
  --bg-elevated: #171A20;
  --bg-hover: #1D2129;
  --border: #232730;
  --border-strong: #2E3440;

  /* Locked single primary accent + semantic states */
  --accent: #10B981;
  --accent-hover: #059669;
  --accent-subtle: rgba(16, 185, 129, 0.12);
  --accent-border: rgba(16, 185, 129, 0.30);

  --warning: #F59E0B;
  --warning-subtle: rgba(245, 158, 11, 0.14);
  --warning-border: rgba(245, 158, 11, 0.34);

  --danger: #EF4444;
  --danger-subtle: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.32);

  /* Text hierarchy */
  --text-primary: #F3F4F6;
  --text-secondary: #8E96A4;
  --text-muted: #5C6472;

  /* Locked corner radius scale */
  --radius-sm: 4px;
  --radius-md: 6px;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout metrics */
  --header-height: 54px;
  --sidebar-width: 208px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code,
pre,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ==========================================================================
   Persistent Top Header (54px)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background-color: var(--bg-canvas);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 16px;
}

.header-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-icon {
  display: block;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 6px;
}

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 0;
  background: transparent;
  transition: color 0.12s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.is-active {
  color: var(--text-primary);
}

.nav-tab.is-active::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: -1px;
  height: 2px;
  background-color: var(--accent);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.status-chip,
.credits-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 11px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.status-chip:hover {
  background-color: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.status-chip .chip-host {
  color: var(--text-primary);
}

.status-chip .chip-state-live {
  color: var(--accent);
}

.status-chip .chip-state-demo {
  color: var(--accent);
}

.status-chip .chip-state-error {
  color: var(--danger);
}

.credits-chip {
  cursor: pointer;
}

.credits-chip:hover {
  background-color: var(--bg-elevated);
  border-color: var(--border-strong);
}

.credits-chip strong {
  color: var(--text-primary);
  font-weight: 600;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-emerald {
  background-color: var(--accent);
}

.dot-amber {
  background-color: var(--warning);
}

.dot-danger {
  background-color: var(--danger);
}

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

/* ==========================================================================
   Shared Buttons, Inputs, Badges & Panels
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-elevated);
  color: var(--text-primary);
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.btn:hover:not(:disabled) {
  background-color: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #062118;
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #F3F4F6;
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-danger {
  background-color: var(--bg-elevated);
  border-color: var(--border);
  color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background-color: var(--danger-subtle);
  border-color: var(--danger-border);
  color: var(--danger);
}

.btn-sm {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
}

.btn-lg {
  height: 38px;
  padding: 0 16px;
  font-size: 13.5px;
}

.input,
.select,
.textarea {
  width: 100%;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--accent);
}

.input-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

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

.panel-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-body {
  padding: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  white-space: nowrap;
}

.badge-running,
.badge-emerald {
  background-color: var(--accent-subtle);
  border-color: var(--accent-border);
  color: var(--accent);
}

.badge-hibernated {
  background-color: #242933;
  border-color: #323846;
  color: #D1D5DB;
}

.badge-warning {
  background-color: var(--warning-subtle);
  border-color: var(--warning-border);
  color: var(--warning);
}

.badge-danger {
  background-color: var(--danger-subtle);
  border-color: var(--danger-border);
  color: var(--danger);
}

.code-chip {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
}

/* ==========================================================================
   Inline Alert Banners (Error / Info / Success)
   ========================================================================== */

.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  font-size: 13px;
  margin-bottom: 14px;
}

.alert-banner-danger {
  background-color: var(--danger-subtle);
  border-color: var(--danger-border);
  color: #FCA5A5;
}

.alert-banner-emerald {
  background-color: var(--accent-subtle);
  border-color: var(--accent-border);
  color: #6EE7B7;
}

.alert-banner-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Dense Data Tables
   ========================================================================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background-color: #0E1014;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text-primary);
}

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

.data-table tbody tr.is-selectable {
  cursor: pointer;
}

.data-table tbody tr.is-selectable:hover td {
  background-color: var(--bg-elevated);
}

.data-table tbody tr.is-selected td {
  background-color: rgba(16, 185, 129, 0.05);
}

.data-table .col-num {
  width: 34px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.data-table .col-right {
  text-align: right;
}

.action-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

/* ==========================================================================
   Console Layout (Exact Match to 1376x768 Target)
   ========================================================================== */

.console-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--header-height));
  background-color: var(--bg-canvas);
}

.console-sidebar {
  border-right: 1px solid var(--border);
  background-color: var(--bg-canvas);
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.sidebar-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.sidebar-item.is-active {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.sidebar-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--accent);
}

.sidebar-item.is-active .sidebar-item-icon {
  color: var(--accent);
}

.sidebar-item-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.sidebar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background-color: var(--warning);
  color: #0A0B0D;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.console-main {
  padding: 18px 22px 28px;
  min-width: 0;
}

/* 4-Cell 1px Hairline Metric Strip */
.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}

.metric-cell {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
}

.metric-cell:last-child {
  border-right: 0;
}

.metric-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.metric-value {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.metric-value-warning {
  color: var(--warning);
}

.metric-value-emerald {
  color: var(--accent);
}

.metric-sub {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Console Bottom Split Grid */
.console-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.stream-panel,
.approval-panel {
  display: flex;
  flex-direction: column;
  min-height: 296px;
}

.segmented {
  display: inline-flex;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.segmented-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
}

.segmented-btn:hover {
  color: var(--text-primary);
}

.segmented-btn.is-active {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.prompt-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background-color: #0E1014;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.prompt-toolbar label {
  color: var(--text-secondary);
  font-size: 11.5px;
  white-space: nowrap;
}

.prompt-toolbar .select,
.prompt-toolbar .input {
  height: 26px;
  padding: 2px 8px;
  font-size: 12px;
  width: auto;
}

.terminal-output {
  flex: 1;
  min-height: 184px;
  max-height: 280px;
  overflow-y: auto;
  padding: 14px 16px;
  background-color: var(--bg-canvas);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
}

.term-line {
  margin: 0;
}

.term-cmd {
  color: var(--text-primary);
}

.term-meta {
  color: var(--text-secondary);
}

.term-stdout {
  color: #D1D5DB;
}

.term-stderr {
  color: var(--danger);
}

.term-policy {
  color: var(--warning);
}

.term-ok {
  color: var(--accent);
}

.terminal-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background-color: #0E1014;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.terminal-prompt-char {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  padding-left: 4px;
}

.terminal-input {
  flex: 1;
  min-width: 0;
  height: 30px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  outline: none;
}

.terminal-input:focus {
  border-color: var(--accent);
}

/* Safe YOLO Approval Card */
.approval-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.approval-endpoint {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  word-break: break-all;
}

.approval-endpoint .held-tag {
  color: var(--text-secondary);
}

.kv-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background-color: #0D0F13;
}

.kv-table tr {
  border-bottom: 1px solid var(--border);
}

.kv-table tr:last-child {
  border-bottom: 0;
}

.kv-table th {
  width: 112px;
  padding: 9px 12px;
  text-align: left;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  background-color: #101217;
}

.kv-table td {
  padding: 9px 12px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-primary);
  word-break: break-all;
}

.approval-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.approval-actions .btn {
  height: 36px;
  font-size: 13.5px;
}

.empty-state {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-state-title {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state-desc {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Marketing / Docs / Compare / Security Content Pages
   ========================================================================== */

.page-wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.page-section {
  margin-top: 40px;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 6px;
}

.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* Overview Hero */
.hero-box {
  padding: 28px 0 24px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero-title {
  margin: 0 0 12px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  max-width: 780px;
}

.hero-lead {
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 720px;
}

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

/* Telemetry 5-Cell Hardware Strip */
.telemetry-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: 24px;
  overflow: hidden;
}

.telemetry-cell {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.telemetry-cell:last-child {
  border-right: 0;
}

.telemetry-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.telemetry-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 4px;
}

.telemetry-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Code Block with Tabs & Copy Button */
.code-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background-color: #0E1014;
  border-bottom: 1px solid var(--border);
  min-height: 40px;
  gap: 10px;
}

.code-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.code-tab {
  position: relative;
  height: 40px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.code-tab:hover {
  color: var(--text-primary);
}

.code-tab.is-active {
  color: var(--text-primary);
}

.code-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background-color: var(--accent);
}

.code-pre {
  margin: 0;
  padding: 16px 18px;
  background-color: var(--bg-canvas);
  font-family: var(--font-mono);
  font-variant-ligatures: none;
  font-size: 12.5px;
  line-height: 1.6;
  color: #D8DEE9;
  overflow-x: auto;
  tab-size: 2;
}

/* 3-Column Pillars Grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pillar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.pillar-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: var(--accent);
}

.pillar-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.pillar-body {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Pricing Plans 4-Column Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.plan-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-card-featured {
  border-color: var(--accent-border);
}

.plan-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.plan-price {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.plan-price span {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.plan-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.plan-list .check-mark {
  color: var(--accent);
  margin-top: 2px;
}

/* ==========================================================================
   Compare View & Cost Estimator
   ========================================================================== */

.transcript-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.transcript-box .code-pre {
  white-space: pre-wrap;
  word-break: break-word;
}

.tradeoffs-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.tradeoffs-list strong {
  color: var(--text-primary);
}

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

.slider-group {
  margin-bottom: 16px;
}

.slider-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}

.slider-label-row strong {
  font-family: var(--font-mono);
  color: var(--accent);
}

.range-input {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.bar-row {
  margin-bottom: 12px;
}

.bar-row:last-child {
  margin-bottom: 0;
}

.bar-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 13px;
}

.bar-track {
  height: 10px;
  background-color: var(--bg-canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background-color: #363D4A;
}

.bar-fill-ring0 {
  background-color: var(--accent);
}

.savings-callout {
  margin-top: 16px;
  padding: 12px 14px;
  background-color: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
}

/* ==========================================================================
   Docs Two-Column Reference Layout
   ========================================================================== */

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

.docs-rail {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  background-color: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-rail-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.docs-rail-btn:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.docs-rail-btn.is-active {
  background-color: var(--accent-subtle);
  color: var(--accent);
}

.docs-rail-sep {
  height: 1px;
  background-color: var(--border);
  margin: 8px 4px;
}

.docs-raw-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.docs-raw-link:hover {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.docs-article {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ==========================================================================
   Modals (Zero Shadow, Crisp 1px Border)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(5, 6, 8, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  width: 100%;
  max-width: 500px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background-color: #0E1014;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  background-color: var(--bg-canvas);
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Responsive Collapse (< 900px)
   ========================================================================== */

@media (max-width: 900px) {
  .site-header {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 8px;
  }

  .header-nav {
    order: 3;
    width: 100%;
    height: 36px;
    overflow-x: auto;
    border-top: 1px solid var(--border);
    padding-top: 4px;
  }

  .console-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 100vw;
    overflow-x: hidden;
  }

  .console-sidebar {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 6px 10px;
    max-width: 100%;
  }

  .sidebar-item {
    width: auto;
    height: 34px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
  }

  .sidebar-item.is-active::before {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: 2px;
  }

  .console-main {
    padding: 12px;
    min-width: 0;
    max-width: 100%;
  }

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

  .panel-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .metric-cell {
    min-width: 0;
    padding: 12px 14px;
  }

  .metric-cell:nth-child(2n) {
    border-right: 0;
  }

  .metric-cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .console-split,
  .pillars-grid,
  .plans-grid,
  .estimator-grid,
  .docs-layout,
  .telemetry-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .telemetry-cell {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .telemetry-cell:last-child {
    border-bottom: 0;
  }

  .docs-rail {
    position: static;
  }

  .hero-title {
    font-size: 28px;
  }
}

@media (max-width: 640px) {
  html,
  body {
    max-width: 100vw;
    overflow-x: hidden;
  }

  .site-header {
    padding: 8px 12px;
    gap: 8px;
  }

  .header-brand {
    font-size: 14.5px;
    gap: 7px;
  }

  .header-controls {
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
    white-space: normal;
  }

  .status-chip,
  .credits-chip {
    font-size: 11px;
    padding: 0 7px;
    height: 26px;
    gap: 5px;
  }

  .header-nav {
    gap: 2px;
    justify-content: space-between;
  }

  .nav-tab {
    padding: 0 7px;
    font-size: 12.5px;
  }

  .metric-value {
    font-size: 18px;
  }

  .metric-sub {
    font-size: 12px;
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }
}
