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

html {
  background: var(--bg);
  color: var(--text);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

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

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text);
}

/* Navbar */
.navbar {
  width: 100%;
  border-bottom: 1px solid transparent;
}

.navbar--bordered {
  background: var(--bg);
  border-bottom-color: var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 15px;
  color: var(--text-2);
  transition: color 0.18s var(--ease);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active {
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.lang-switch button {
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.lang-switch button.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

.nav-login {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.nav-login:hover {
  opacity: 0.8;
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), opacity 0.18s var(--ease);
}

.btn--sm {
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  border: 1px solid var(--accent);
}

.btn--primary:hover {
  opacity: 0.9;
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn--secondary:hover {
  background: var(--surface-2);
}

.btn--ghost {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn--ghost:hover {
  background: var(--surface-2);
}

.btn--full {
  width: 100%;
}

/* Typography helpers */
.display-xl {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.4vw, 74px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.display-lg {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.8vw, 52px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.display-md {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.032em;
}

.display-sm {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.muted-line {
  display: block;
  color: var(--text-3);
}

.lead {
  margin: 0;
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--text-2);
}

.mono {
  font-family: var(--font-mono);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.text-link:hover {
  opacity: 0.8;
}

/* Hero with Monochrome Prism */
.hero-prism {
  position: relative;
  min-height: 820px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(20, 20, 20, 0) 68%, #141414 100%),
    linear-gradient(90deg, rgba(20, 20, 20, 0.95) 0%, rgba(20, 20, 20, 0.72) 42%, rgba(20, 20, 20, 0.1) 78%),
    url("../images/prism.png");
  background-position: center, center, right center;
  background-size: 100% 100%, 100% 100%, cover;
  background-repeat: no-repeat;
}

.hero-prism--compact {
  min-height: 460px;
  background-image:
    linear-gradient(180deg, rgba(20, 20, 20, 0.85) 0%, rgba(20, 20, 20, 0) 24%, rgba(20, 20, 20, 0) 68%, #141414 100%),
    linear-gradient(90deg, rgba(20, 20, 20, 0.95) 0%, rgba(20, 20, 20, 0.72) 42%, rgba(20, 20, 20, 0.12) 78%),
    url("../images/prism.png");
}

.hero-body {
  padding-block: 56px 48px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.copy-endpoint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

.copy-endpoint:hover {
  background: var(--surface-2);
}

.providers-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.providers-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding-block: 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-3);
}

/* Sections */
.section {
  padding-block: 104px;
}

.section--tight {
  padding-block: 64px;
}

.section--alt {
  background: var(--bg-alt);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 44px;
}

.section-head--stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.section-side {
  max-width: 400px;
  margin: 0;
  font-size: 16px;
  color: var(--text-2);
}

/* Unified Pricing Slab (Landing) */
.pricing-slab {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pricing-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 36px;
  border-right: 1px solid var(--border);
}

.pricing-col:last-child {
  border-right: none;
}

.pricing-col--featured {
  background: var(--surface-2);
}

.pricing-period {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.pricing-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--text);
}

.tag-solid {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 600;
}

.tag-muted {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.pricing-desc {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-2);
}

/* Code Diff Section */
.code-split {
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

.code-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.seg-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.seg-switch button {
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  font-size: 12.5px;
  color: var(--text-3);
}

.seg-switch button.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 500;
}

.code-tabs {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.code-tabs button {
  position: relative;
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-3);
}

.code-tabs button.active {
  color: var(--text);
  font-weight: 600;
}

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

.code-body {
  padding: 20px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
}

.code-line {
  display: flex;
  gap: 14px;
  padding: 2px 24px;
  white-space: pre;
  color: var(--text-2);
}

.code-line--del {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-3);
}

.code-line--add {
  background: rgba(255, 255, 255, 0.09);
  color: var(--accent);
}

.code-line-mark {
  width: 12px;
  flex-shrink: 0;
  user-select: none;
  color: var(--text-3);
}

.code-line--add .code-line-mark {
  color: var(--accent);
  font-weight: 600;
}

.code-output {
  padding: 16px 24px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-output-lbl {
  font-size: 12px;
  color: var(--text-3);
}

.code-output-val {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

/* Models Cards Grid */
.models-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.model-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.model-vendor {
  font-size: 13px;
  color: var(--text-3);
}

.model-name {
  margin: 8px 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.model-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
}

.model-metrics {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.metric-lbl {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
  margin-bottom: 3px;
}

.metric-id {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

.metric-access {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

/* Features Bento */
.bento-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 20px;
  margin-bottom: 20px;
}

.bento-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.bento-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.bento-card p {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

.endpoint-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.endpoint-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  min-width: 0;
}

.endpoint-method {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

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

.code-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
}

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

.kv-list {
  display: flex;
  flex-direction: column;
}

.kv-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.kv-row:first-child {
  border-top: 1px solid var(--border);
}

.kv-k {
  font-size: 14px;
  color: var(--text-2);
}

.kv-v {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

/* Ahmia wide card */
.ahmia-card {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr) minmax(0, 340px);
  gap: 32px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.ahmia-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.ahmia-copy h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.ahmia-copy p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-2);
}

.trace-panel,
.lineup-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}

.trace-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

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

.trace-tag {
  font-weight: 600;
  color: var(--text-3);
}

.trace-tag--prompt {
  color: var(--accent);
}

.lineup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}

.lineup-row:last-child {
  border-bottom: none;
}

.lineup-slug {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  display: block;
}

.lineup-sub {
  font-size: 11.5px;
  color: var(--text-3);
}

.lineup-role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}

/* Open Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.step-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-3);
}

.step-num--first {
  color: var(--accent);
}

.step-col h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.step-col p {
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

/* Bottom CTA Card */
.cta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 22px;
  padding: 72px 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}

/* Providers 4x2 Slab */
.providers-slab {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.provider-cell {
  padding: 22px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.provider-cell:nth-child(4n) {
  border-right: none;
}

.provider-cell:nth-last-child(-n + 4) {
  border-bottom: none;
}

.provider-cell strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.provider-cell span {
  font-size: 13px;
  color: var(--text-3);
}

/* Filter Toolbar & Tables */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 320px;
  max-width: 100%;
  height: 42px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.search-input-wrap input {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  color: var(--text);
}

.search-input-wrap input::placeholder {
  color: var(--text-3);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tab {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-2);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.filter-tab:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

.data-table th {
  text-align: left;
  padding: 13px 24px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}

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

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

.data-table tr.is-degraded td {
  background: var(--surface-2);
}

.cell-right {
  text-align: right;
}

.copy-id-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-2);
}

.copy-id-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* Plans Page */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.plan-card--featured {
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plan-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.plan-features {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: var(--text-2);
}

.plan-features li {
  display: flex;
  gap: 10px;
}

.plan-features .dash {
  font-family: var(--font-mono);
  color: var(--text-3);
}

.token-note {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-2);
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 48px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  text-align: left;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
}

.faq-plus {
  font-family: var(--font-mono);
  color: var(--text-3);
  transition: transform 0.18s var(--ease);
}

.faq-item.open .faq-plus {
  transform: rotate(45deg);
  color: var(--text);
}

.faq-answer {
  display: none;
  padding: 0 0 20px;
  margin: 0;
  font-size: 14.5px;
  color: var(--text-2);
}

.faq-item.open .faq-answer {
  display: block;
}

/* Docs Layout */
.docs-header {
  border-bottom: 1px solid var(--border);
  padding-block: 52px 36px;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  padding-block: 48px 96px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.toc-group-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  margin: 0 0 6px;
}

.toc-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toc-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-2);
}

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

.toc-links a.active {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
}

.docs-main {
  display: flex;
  flex-direction: column;
  gap: 48px;
  min-width: 0;
}

.docs-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.docs-section > p {
  margin: 0 0 16px;
  color: var(--text-2);
}

.clients-slab {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.client-cell {
  padding: 22px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.client-cell:last-child {
  border-right: none;
}

.client-cell h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.client-cell pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--text-2);
  white-space: pre-wrap;
}

.docs-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.info-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.info-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-2);
}

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* Status Page */
.summary-slab {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.summary-cell {
  padding: 22px 26px;
  border-right: 1px solid var(--border);
}

.summary-cell:last-child {
  border-right: none;
}

.summary-cell span {
  display: block;
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 6px;
}

.summary-cell strong {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.8px;
}

.status-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-square {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
  flex-shrink: 0;
}

.gw-slab {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.gw-row {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gw-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.uptime-strip {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}

.uptime-strip--sm {
  height: 18px;
}

.uptime-tick {
  flex: 1;
  height: 100%;
  border-radius: 1.5px;
  background: var(--bar-ok);
}

.uptime-strip--sm .uptime-tick {
  background: var(--bar-ok-muted);
}

.uptime-tick--dip {
  height: 55%;
  background: var(--bar-dip) !important;
}

.uptime-axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.status-pill-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
}

.status-pill-inline--deg {
  color: var(--text);
  font-weight: 600;
}

.dot-ok {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.dot-deg {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  background: transparent;
}

.dot-down {
  width: 7px;
  height: 2px;
  background: var(--text-3);
}

.legend {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
}

.incident-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.incident-row:last-child {
  border-bottom: 1px solid var(--border);
}

.incident-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.incident-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.incident-update {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--text-2);
}

/* Split Login Page */
.login-split {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 32px 64px;
  background: var(--bg);
}

.login-form-wrap {
  width: 100%;
  max-width: 400px;
  margin: 48px auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.field label {
  font-size: 13.5px;
  font-weight: 500;
}

.field input {
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 14px;
  outline: none;
}

.field input:focus {
  border-color: var(--border-strong);
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}

.checkbox-row input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-3);
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  border-left: 1px solid var(--border);
  background-color: var(--bg-alt);
  background-image:
    linear-gradient(180deg, rgba(20, 20, 20, 0) 35%, rgba(20, 20, 20, 0.92) 88%),
    url("../images/prism.png");
  background-position: center, center;
  background-size: 100% 100%, cover;
  background-repeat: no-repeat;
}

.login-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* Footer */
.footer {
  margin-top: auto;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 64px 40px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-brand p {
  margin: 0;
  font-size: 14px;
  color: var(--text-3);
}

.footer-cols {
  display: flex;
  gap: 72px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer-col h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.footer-col a {
  font-size: 14px;
  color: var(--text-3);
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--text-3);
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1180px) {
  .ahmia-card {
    grid-template-columns: 1fr;
  }
  .bento-top {
    grid-template-columns: 1fr;
  }
  .code-split {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 960px) {
  .nav-links,
  .nav-actions .lang-switch,
  .nav-actions .nav-login {
    display: none;
  }
  .nav-burger {
    display: inline-flex;
  }
  .navbar.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    position: absolute;
    left: 0;
    right: 0;
    top: 86px;
    padding: 24px var(--gutter);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    z-index: 40;
  }
  .pricing-slab,
  .plans-grid,
  .models-grid-3,
  .steps-grid,
  .clients-slab,
  .docs-pair,
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .pricing-col,
  .client-cell {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .pricing-col:last-child,
  .client-cell:last-child {
    border-bottom: none;
  }
  .providers-slab,
  .summary-slab {
    grid-template-columns: repeat(2, 1fr);
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-toc {
    position: static;
  }
  .login-split {
    grid-template-columns: 1fr;
  }
  .login-right {
    display: none;
  }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-top {
    flex-direction: column;
  }
  .footer-cols {
    flex-wrap: wrap;
    gap: 36px 48px;
  }
  .incident-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Auth status and server-side error notices (frontend.go & web/auth.js) */
.alert-err {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid rgba(255, 110, 110, 0.35);
  background: rgba(255, 110, 110, 0.08);
  color: #ffb3b3;
  font-size: 13.5px;
  line-height: 1.45;
}
.auth-status {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2, #a3a3a3);
}
.auth-status a {
  color: var(--text, #ededed);
  text-decoration: underline;
  margin-left: 6px;
}
.vip-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-strong, #333);
  background: var(--surface-2, #1e1e1e);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text, #ededed);
}

/* Live /status states */
.status-square--deg {
  background: transparent;
  border: 2px solid var(--text, #ededed);
}
.status-square--down {
  background: #d45b5b;
}
.uptime-tick--nodata {
  background: rgba(255, 255, 255, 0.09) !important;
}
.uptime-tick--down {
  height: 45%;
  background: #d45b5b !important;
}
.status-pill-inline--down {
  color: #ffb3b3;
  font-weight: 600;
}
.incident-empty {
  padding: 24px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-2);
}
