/* --------------------------------------------------------------------------
   HF Backend — Design System
   Crafted following Emil Kowalski's Design Engineering & Anti-Slop Principles
   -------------------------------------------------------------------------- */

:root {
  /* Emil's Custom Easing Curves */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --spring-snappy: cubic-bezier(0.175, 0.885, 0.32, 1.15);

  /* Clean Slate & Zinc Palette (Anti-Slop: No generic purple AI gradients) */
  --bg-page: #09090b;
  --bg-surface: #121215;
  --bg-surface-elevated: #18181c;
  --bg-surface-hover: #202026;
  --bg-code: #0d0d10;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-focus: #3b82f6;

  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-accent: #38bdf8;

  /* Semantic Accents */
  --color-emerald: #10b981;
  --color-emerald-bg: rgba(16, 185, 129, 0.1);
  --color-emerald-border: rgba(16, 185, 129, 0.25);

  --color-blue: #3b82f6;
  --color-blue-bg: rgba(59, 130, 246, 0.1);
  --color-blue-border: rgba(59, 130, 246, 0.25);

  --color-amber: #f59e0b;
  --color-amber-bg: rgba(245, 158, 11, 0.1);
  --color-amber-border: rgba(245, 158, 11, 0.25);

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

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* Base Reset & Typography */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Header & Global Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #18181c, #27272a);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: 3px;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: calc(var(--radius-sm) - 2px);
  display: block;
}

.brand-title {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  margin-left: 0.35rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-item {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 140ms var(--ease-out);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Emil Kowalski Buttons (Snappy, Responsive Scale on Press, Polished Spacing) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1;
  height: 36px;
  padding: 0 1.15rem;
  text-decoration: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
  user-select: none;
  white-space: nowrap;
  outline: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  flex-shrink: 0;
  display: block;
}

.btn-sm {
  height: 32px;
  padding: 0 0.85rem;
  font-size: 0.82rem;
  gap: 0.4rem;
}

.btn-xs {
  height: 26px;
  padding: 0 0.65rem;
  font-size: 0.78rem;
  border-radius: 5px;
  gap: 0.35rem;
}

/* Primary Button: Clean contrast with top specular highlight */
.btn-primary {
  background-color: #fafafa;
  color: #09090b;
  border: 1px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-primary:hover {
  background-color: #e4e4e7;
  border-color: #f4f4f5;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* Secondary Button: Elevated dark surface with subtle 1px border */
.btn-secondary {
  background-color: #18181b;
  color: #f4f4f5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
  background-color: #27272a;
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-elevated);
  border-color: var(--border-medium);
}

/* Hero Section */
.hero-section {
  padding: 4.5rem 1.5rem 3.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
}

.hero-container {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Status Pill with Pulsing Glow */
.status-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background-color: var(--color-emerald-bg);
  border: 1px solid var(--color-emerald-border);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-emerald);
}

.status-dot.pulsing {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-ring 2.4s infinite cubic-bezier(0.24, 0, 0.38, 1);
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-headline {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.18;
  color: #fafafa;
  margin-bottom: 1.15rem;
}

.hero-subline {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 680px;
  margin-bottom: 2rem;
}

/* Base URL Chip Widget */
.endpoint-chip-container {
  margin-bottom: 2.5rem;
  width: 100%;
  display: flex;
  justify-content: center;
}

.endpoint-chip {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.45rem 0.35rem 0.85rem;
  gap: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.chip-method {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.chip-url {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.chip-copy-btn {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  height: 28px;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  line-height: 1;
  outline: none;
  transition: transform 140ms var(--ease-out), background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.chip-copy-btn:hover {
  background-color: var(--bg-surface-hover);
  color: var(--text-primary);
}

.chip-copy-btn:active {
  transform: scale(0.96);
}

/* Spec Highlights Row */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 28px;
  background-color: var(--border-subtle);
}

/* Sections Common Structure */
.services-section, .playground-section, .arch-section, .telemetry-section {
  padding: 4.5rem 1.5rem;
}

.section-container {
  max-width: 1160px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-accent);
  display: block;
  margin-bottom: 0.4rem;
}

.section-title {
  font-size: 1.95rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: #fafafa;
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 1.02rem;
  color: var(--text-secondary);
  max-width: 680px;
}

/* Mounted Services Cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
  position: relative;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.service-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.service-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon-emerald {
  background-color: var(--color-emerald-bg);
  border: 1px solid var(--color-emerald-border);
  color: #34d399;
}

.icon-blue {
  background-color: var(--color-blue-bg);
  border: 1px solid var(--color-blue-border);
  color: #60a5fa;
}

.service-meta {
  flex-grow: 1;
}

.service-prefix {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.service-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fafafa;
  letter-spacing: -0.015em;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  display: inline-block;
}

.pill-success {
  background-color: var(--color-emerald-bg);
  color: #34d399;
  border: 1px solid var(--color-emerald-border);
}

.service-body {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.service-specs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.spec-tag {
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.65rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.spec-tag span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.spec-tag strong {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-top: 0.1rem;
}

.service-routes {
  margin-bottom: 1.5rem;
}

.route-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.6rem;
}

.route-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.route-list li {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--bg-code);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.method {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  line-height: 1;
}

.method.get {
  background-color: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.method.post {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.route-hint {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  gap: 0.75rem;
  flex-wrap: wrap;
}

.service-links-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-subtle {
  color: var(--text-secondary);
  font-size: 0.82rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 140ms var(--ease-out);
}

.link-subtle:hover {
  color: var(--text-primary);
}

/* Interactive Swagger-Style API Explorer */
.swagger-console {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.gateway-tabs-bar {
  display: flex;
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.gateway-tab {
  background: transparent;
  border: none;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 2px solid transparent;
  padding: 0.85rem 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out);
  white-space: nowrap;
}

.gateway-tab:active {
  transform: scale(0.98);
}

.gateway-tab .gw-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out);
}

.gateway-tab .gw-name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 140ms var(--ease-out);
}

.gateway-tab:hover {
  background-color: var(--bg-surface-hover);
}

.gateway-tab:hover .gw-name {
  color: var(--text-primary);
}

.gateway-tab.active {
  background-color: var(--bg-surface);
  border-bottom-color: #38bdf8;
}

.gateway-tab.active .gw-tag {
  background-color: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

.gateway-tab.active .gw-name {
  color: #fafafa;
}

.gateway-info-bar {
  padding: 0.85rem 1.4rem;
  background-color: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gw-info-text {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gw-current-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: #fafafa;
}

.gw-current-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.gw-info-base {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gw-base-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gw-base-code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #38bdf8;
  background-color: rgba(56, 189, 248, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.swagger-operations-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
}

/* Operation Card (Swagger UI Style) */
.op-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}

.op-card.op-method-get {
  border: 1px solid rgba(14, 165, 233, 0.25);
  background-color: rgba(14, 165, 233, 0.02);
}

.op-card.op-method-get:hover {
  border-color: rgba(14, 165, 233, 0.45);
}

.op-card.op-method-get.is-open {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.op-card.op-method-post {
  border: 1px solid rgba(16, 185, 129, 0.25);
  background-color: rgba(16, 185, 129, 0.02);
}

.op-card.op-method-post:hover {
  border-color: rgba(16, 185, 129, 0.45);
}

.op-card.op-method-post.is-open {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.op-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.15rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms var(--ease-out);
}

.op-header:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

.op-header:active {
  transform: scale(0.995);
}

.op-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.op-method-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 26px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.op-method-pill.op-pill-get {
  background-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.3);
}

.op-method-pill.op-pill-post {
  background-color: #059669;
  color: #ffffff;
  box-shadow: 0 1px 2px rgba(5, 150, 105, 0.3);
}

.op-path {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: #f4f4f5;
}

.op-summary {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-left: 0.35rem;
}

.op-chevron {
  color: var(--text-muted);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.op-card.is-open .op-chevron {
  transform: rotate(180deg);
}

.op-body {
  display: none;
  padding: 1.15rem;
  border-top: 1px solid var(--border-subtle);
  background-color: #09090b;
}

.op-card.is-open .op-body {
  display: block;
}

.op-desc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.op-description {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.op-url-badge code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.op-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.op-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.95rem;
}

.op-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.op-col-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.op-content-type,
.op-status-sample {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.op-payload-textarea {
  width: 100%;
  min-height: 180px;
  max-height: 320px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: #fafafa;
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.75rem;
  resize: vertical;
  outline: none;
  transition: border-color 140ms var(--ease-out);
}

.op-payload-textarea:focus {
  border-color: var(--border-focus);
}

.op-no-params-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 180px;
  background-color: var(--bg-code);
  border: 1px dashed var(--border-subtle);
  border-radius: 4px;
  padding: 1.25rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.op-actions-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.35rem;
}

.op-live-box,
.op-sample-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.op-resp-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.op-resp-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 120ms var(--ease-out);
}

.op-resp-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.op-resp-tab.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border-subtle);
}

.op-live-actions,
.op-sample-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.op-view-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-sans);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  cursor: pointer;
  transition: all 120ms var(--ease-out);
}

.op-view-toggle-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.05);
}

.op-live-bar,
.op-sample-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.op-live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.op-live-status-pill.status-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.op-live-status-pill.status-success .live-dot {
  background-color: #34d399;
}

.op-live-status-pill.status-warn {
  background-color: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.op-live-status-pill.status-warn .live-dot {
  background-color: #fbbf24;
}

.op-live-status-pill.status-error {
  background-color: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.op-live-status-pill.status-error .live-dot {
  background-color: #f87171;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.op-live-time {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.op-mini-copy {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-family: var(--font-sans);
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  cursor: pointer;
  transition: color 120ms var(--ease-out), border-color 120ms var(--ease-out);
}

.op-mini-copy:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.op-code-pre {
  margin: 0;
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 0.75rem;
  overflow-x: auto;
  max-height: 220px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: #e4e4e7;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

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

/* Architecture Cards Grid */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.arch-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
  transition: transform 140ms var(--ease-out), border-color 140ms var(--ease-out);
}

.arch-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.arch-step {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-accent);
  margin-bottom: 0.75rem;
}

.arch-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 0.65rem;
  letter-spacing: -0.015em;
}

.arch-card-body {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background-color: var(--bg-surface-elevated);
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  color: #e4e4e7;
}

/* System Design Topology Card */
.topology-card {
  margin-top: 2rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topology-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
}

.topology-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.topology-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #38bdf8;
}

.topology-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fafafa;
  letter-spacing: -0.015em;
  margin: 0;
}

.topology-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background-color: var(--bg-surface-elevated);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
}

.svg-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background-color: #08080a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1rem;
}

.architecture-svg {
  width: 100%;
  height: auto;
  min-width: 760px;
  display: block;
}

/* System Design Notes Grid */
.sys-notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.sys-note-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sys-note-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.sys-note-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Site Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  padding: 2rem 1.5rem;
}

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

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-brand {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fafafa;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-right a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 140ms var(--ease-out);
}

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

/* Responsive Media Queries */
@media (max-width: 860px) {
  .op-grid {
    grid-template-columns: 1fr;
  }
  .op-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .op-summary {
    margin-left: 0;
  }
  .nav-links {
    display: none;
  }
  .hero-headline {
    font-size: 2.15rem;
  }
  .stats-row {
    flex-wrap: wrap;
    gap: 1.25rem;
  }
  .stat-divider {
    display: none;
  }
}

