/* ==========================================================================
   PULSE - Browser API Testing UI
   ========================================================================== */

:root {
  /* Dark Theme Palette (Default Obsidian) */
  --bg-app: #080c14;
  --bg-surface: #0f172a;
  --bg-surface-elevated: #162035;
  --bg-surface-hover: #1e2c47;
  --border-subtle: #1e293b;
  --border-focus: #6366f1;
  --border-glow: rgba(99, 102, 241, 0.35);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #090d16;

  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-glow: rgba(99, 102, 241, 0.25);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.12);
  --success-border: rgba(16, 185, 129, 0.3);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --warning-border: rgba(245, 158, 11, 0.35);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-border: rgba(239, 68, 68, 0.35);

  --info: #0ea5e9;
  --info-bg: rgba(14, 165, 233, 0.12);
  --info-border: rgba(14, 165, 233, 0.35);

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.2);

  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}

[data-theme="light"] {
  --bg-app: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #f8fafc;
  --bg-surface-hover: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-focus: #4f46e5;
  --border-glow: rgba(79, 70, 229, 0.25);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  --accent-glow: rgba(79, 70, 229, 0.15);

  --success-bg: rgba(16, 185, 129, 0.08);
  --warning-bg: rgba(245, 158, 11, 0.08);
  --danger-bg: rgba(239, 68, 68, 0.08);
  --info-bg: rgba(14, 165, 233, 0.08);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 25px rgba(0, 0, 0, 0.08);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.app-wrapper {
  max-width: 1540px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  gap: 1rem;
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.35rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.brand-logo::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
}

.brand-text h1 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  background: var(--accent-glow);
  color: var(--accent-primary);
  border: 1px solid var(--border-focus);
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.brand-text p {
  font-size: 0.775rem;
  color: var(--text-muted);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}


@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ==========================================================================
   Preset Launch Bar
   ========================================================================== */

.preset-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.preset-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.preset-tag {
  padding: 0.45rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

.preset-tag:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.preset-tag.active {
  background: var(--accent-glow);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  font-weight: 600;
}

/* ==========================================================================
   Main Grid Layout
   ========================================================================== */

.main-layout {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 1.25rem;
}

@media (max-width: 1180px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.panel-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  margin-bottom: 1.25rem;
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  letter-spacing: -0.01em;
}

.panel-title-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */

.form-field {
  margin-bottom: 1rem;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.input-split {
  display: flex;
  gap: 0.45rem;
}

.ui-select, .ui-input, .ui-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: all 0.15s ease;
}

.ui-select:focus, .ui-input:focus, .ui-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.method-select {
  width: 110px;
  font-weight: 700;
  font-family: var(--font-mono);
  text-align: center;
  cursor: pointer;
}

.method-select[data-method="GET"] { color: var(--success); }
.method-select[data-method="POST"] { color: var(--accent-primary); }
.method-select[data-method="PUT"] { color: var(--warning); }
.method-select[data-method="DELETE"] { color: var(--danger); }

/* Quick Pills */
.pill-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.quick-pill {
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-mono);
  border-radius: var(--radius-xs);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-pill:hover, .quick-pill.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

/* Sliders */
.slider-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-wrap input[type="range"] {
  flex: 1;
  height: 6px;
  background: var(--bg-surface-elevated);
  border-radius: 9999px;
  outline: none;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.slider-badge {
  min-width: 50px;
  padding: 0.2rem 0.45rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-align: center;
  color: var(--accent-primary);
}

/* Switch Toggle */
.custom-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.custom-switch input {
  display: none;
}

.switch-track {
  width: 36px;
  height: 20px;
  background-color: var(--border-subtle);
  border-radius: 9999px;
  position: relative;
  transition: background-color 0.2s ease;
}

.switch-track::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: white;
  top: 3px;
  left: 3px;
  transition: transform 0.2s ease;
}

.custom-switch input:checked + .switch-track {
  background-color: var(--accent-primary);
}

.custom-switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

/* Tabs */
.subtabs-bar {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.subtab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

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

.subtab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.subtab-view {
  display: none;
}

.subtab-view.active {
  display: block;
}

/* Headers list */
.header-item {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.header-item input {
  font-size: 0.8rem;
  padding: 0.45rem 0.65rem;
}

.btn-icon-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm);
  padding: 0 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.15s ease;
}

.btn-icon-danger:hover {
  background: var(--danger);
  color: white;
}

/* Action Execution Buttons */
.controls-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.btn-cta {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.15s ease;
}

.btn-start {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-start:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-pause {
  background: var(--warning);
  color: #1e293b;
}

.btn-stop {
  background: var(--danger);
  color: white;
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.15s ease;
}

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

.btn-cta:disabled, .btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

/* ==========================================================================
   Execution Status & Progress Bar
   ========================================================================== */

.progress-banner {
  margin-bottom: 1.25rem;
}

.progress-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.progress-rail {
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: 9999px;
  transition: width 0.12s linear;
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.785rem;
  color: var(--text-secondary);
  margin-top: 0.6rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-item strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Rate Limit & Quota Reach Hero Card
   ========================================================================== */

.shield-panel {
  border-left: 4px solid var(--accent-primary);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.04) 0%, var(--bg-surface) 100%);
  position: relative;
  overflow: hidden;
}

.shield-panel.breached {
  border-left-color: var(--danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-surface) 100%);
}

.quota-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.quota-stat-box {
  background: var(--bg-surface-elevated);
  padding: 0.85rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  text-align: center;
}

.quota-stat-value {
  font-size: 1.45rem;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.quota-stat-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 0.2rem;
  letter-spacing: 0.05em;
}

.breach-alert {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.825rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.breach-alert.warning {
  background: var(--warning-bg);
  color: #fbbf24;
  border: 1px solid var(--warning-border);
}

.breach-alert.danger {
  background: var(--danger-bg);
  color: #f87171;
  border: 1px solid var(--danger-border);
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   Metrics Dashboard Cards (SaaS KPI Grid)
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.kpi-card.green::before { background: var(--success); }
.kpi-card.amber::before { background: var(--warning); }
.kpi-card.red::before { background: var(--danger); }
.kpi-card.blue::before { background: var(--info); }
.kpi-card.purple::before { background: var(--accent-primary); }

.kpi-caption {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.kpi-number {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-top: 0.25rem;
  letter-spacing: -0.025em;
}

.kpi-footnote {
  font-size: 0.725rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}

/* ==========================================================================
   Interactive Chart Grid
   ========================================================================== */

.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 950px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-viewport {
  height: 250px;
  position: relative;
}

/* ==========================================================================
   Logs & Request Stream Table
   ========================================================================== */

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.filter-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.filter-chip.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.table-scrollbox {
  overflow-x: auto;
  max-height: 420px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
}

.stream-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.stream-table th {
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 2;
  white-space: nowrap;
}

.stream-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
}

.stream-table tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

/* Status Badges */
.status-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  font-size: 0.725rem;
  font-weight: 700;
}

.status-2xx { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.status-429 { background: var(--warning-bg); color: #fbbf24; border: 1px solid var(--warning-border); }
.status-4xx { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.status-5xx { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.status-err { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }

/* Latency color coding */
.latency-fast { color: var(--success); }
.latency-normal { color: var(--info); }
.latency-slow { color: var(--warning); }
.latency-critical { color: var(--danger); }

/* ==========================================================================
   Request Details Modal
   ========================================================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 15, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-head h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: var(--danger-border);
}

.code-box {
  background: var(--bg-surface-elevated);
  padding: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  overflow-x: auto;
  max-height: 240px;
}

/* Workspace refresh */
:root, [data-theme="light"] {
  --bg-app:#f4f5f2; --bg-surface:#fff; --bg-surface-elevated:#f6f7f5; --bg-surface-hover:#eef2ef;
  --border-subtle:#e2e6e1; --border-focus:#397e77; --border-glow:rgba(57,126,119,.14);
  --text-primary:#202b29; --text-secondary:#66736f; --text-muted:#89948f; --text-inverse:#fff;
  --accent-primary:#397e77; --accent-secondary:#397e77; --accent-gradient:#397e77; --accent-glow:rgba(57,126,119,.09);
  --success:#39846e; --warning:#bc883b; --danger:#c65f58; --info:#527f99;
  --radius-sm:6px; --radius-md:8px; --radius-lg:10px; --shadow-sm:none; --shadow-md:0 8px 24px rgba(30,45,40,.08);
}
[data-theme="dark"] {
  --bg-app:#131b1a; --bg-surface:#1b2523; --bg-surface-elevated:#24302d; --bg-surface-hover:#2b3835;
  --border-subtle:#34413d; --border-focus:#76b9aa; --border-glow:rgba(118,185,170,.16);
  --text-primary:#e7eeea; --text-secondary:#a6b6af; --text-muted:#82938c; --text-inverse:#14201d;
  --accent-primary:#76b9aa; --accent-secondary:#76b9aa; --accent-gradient:#4f9588; --accent-glow:rgba(118,185,170,.12);
  --success:#79bea4; --warning:#d9b36e; --danger:#e48d83; --info:#8cb6c8;
}
body { font-size:14px; }
.app-wrapper { max-width:1600px; padding:0 32px 48px; }
.app-header { margin:0 -32px; padding:14px 32px; border:0; border-bottom:1px solid var(--border-subtle); border-radius:0; background:var(--bg-surface); }
.brand-logo { width:34px; height:34px; border-radius:8px; background:#244b44; box-shadow:none; gap:3px; align-items:center; }
.brand-logo::after { display:none; }
.brand-logo span { width:3px; height:11px; background:#d8f0e6; border-radius:2px; }
.brand-logo span:nth-child(2) { height:19px; }
.brand-logo span:nth-child(3) { height:14px; }
.brand-text h1 { font-size:1.14rem; letter-spacing:-.05em; line-height:1; }
.brand-period { color:var(--accent-primary); }
.brand-text p { margin-top:4px; font-size:.67rem; }
.header-tools { gap:8px; }
.workspace-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; padding:34px 0 25px; }
.workspace-heading h2 { font-size:1.8rem; letter-spacing:-.045em; line-height:1.15; font-weight:650; margin:10px 0 7px; }
.workspace-heading p { color:var(--text-secondary); font-size:.87rem; }
.eyebrow { color:var(--text-muted); font-size:.65rem; font-weight:700; letter-spacing:.1em; }
.workspace-label { color:var(--text-muted); font-size:.76rem; white-space:nowrap; }
.workspace-label span { display:inline-block; width:7px; height:7px; border-radius:50%; background:var(--success); margin-right:7px; }
.preset-container { padding:0 0 17px; margin:0 0 20px; border-bottom:1px solid var(--border-subtle); gap:7px; }
.preset-label { margin-right:10px; text-transform:none; letter-spacing:0; font-size:.76rem; color:var(--text-secondary); }
.preset-tag { padding:7px 11px; font-size:.73rem; background:transparent; border-color:transparent; }
.preset-tag.active { background:var(--bg-surface); border-color:var(--border-subtle); color:var(--text-primary); }
.main-layout { grid-template-columns:minmax(310px, 370px) minmax(0,1fr); gap:20px; align-items:start; }
.panel-card { padding:20px; margin-bottom:16px; box-shadow:none; }
.sidebar-workspace > .panel-card { padding:22px; }
.panel-title { font-size:.91rem; font-weight:650; margin-bottom:20px; }
.sidebar-workspace .panel-title { padding-bottom:17px; border-bottom:1px solid var(--border-subtle); }
.form-field { margin-bottom:18px; }
.field-label { font-size:.76rem; font-weight:600; margin-bottom:8px; }
.ui-input, .ui-select, .ui-textarea { border-radius:6px; background:var(--bg-surface); min-height:39px; font-size:.78rem; }
.quick-pill, .filter-chip { border-radius:5px; }
.subtabs-bar { margin-top:20px; }
.controls-grid { margin-top:20px; }
.btn-cta, .btn-secondary { border-radius:6px; box-shadow:none; font-weight:600; }
.btn-start { background:#356f65; color:#fff; }
.btn-start:hover { background:#2c6057; box-shadow:none; }
.results-command-center { min-width:0; display:flex; flex-direction:column; }
.progress-banner { order:0; padding:18px 20px; }
.progress-header-info { margin-bottom:13px; }
.status-separator { color:var(--border-subtle); padding:0 7px; }
.progress-rail { height:5px; }
.progress-meta-row { margin-top:14px; font-size:.73rem; }
.kpi-grid { order:1; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0; margin-bottom:16px; border:1px solid var(--border-subtle); border-radius:10px; overflow:hidden; background:var(--bg-surface); }
.kpi-card { border:0; border-radius:0; padding:18px 20px; min-height:110px; }
.kpi-card:not(:nth-child(3n)) { border-right:1px solid var(--border-subtle); }
.kpi-card:nth-child(-n+3) { border-bottom:1px solid var(--border-subtle); }
.kpi-card::before { display:none; }
.kpi-caption { font-size:.72rem; font-weight:600; text-transform:none; letter-spacing:0; color:var(--text-secondary); }
.kpi-number { font-family:var(--font-sans); font-size:1.65rem; letter-spacing:-.05em; font-weight:650; color:var(--text-primary) !important; margin-top:8px; }
.kpi-footnote { color:var(--text-muted); font-size:.7rem; }
.charts-row { order:2; gap:16px; margin-bottom:0; }
.charts-row .panel-card { min-width:0; }
.chart-viewport { height:220px; }
.shield-panel { order:3; border-left:1px solid var(--border-subtle); background:var(--bg-surface); }
.shield-panel.breached { background:var(--bg-surface); }
.quota-stats-grid { gap:0; margin-top:20px; }
.quota-stat-box { background:transparent; border:0; border-right:1px solid var(--border-subtle); border-radius:0; text-align:left; padding:2px 14px; }
.quota-stat-box:first-child { padding-left:0; }
.quota-stat-box:last-child { border-right:0; }
.quota-stat-value { font-family:var(--font-sans); font-size:1.2rem; font-weight:650; }
.quota-stat-title { text-transform:none; letter-spacing:0; font-weight:500; }
.results-command-center > .panel-card:last-child { order:4; }
.table-toolbar { gap:14px; }
.table-toolbar .panel-title { width:100%; }
.stream-table th { font-size:.68rem; letter-spacing:.02em; }
.stream-table td { font-size:.75rem; }
.modal-card { border-radius:10px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline:2px solid var(--accent-primary); outline-offset:2px; }
@media(max-width:1100px) { .main-layout { grid-template-columns:320px minmax(0,1fr); } .quota-stats-grid { grid-template-columns:repeat(3,1fr); gap:12px; } }
@media(max-width:850px) { .main-layout { grid-template-columns:1fr; } .app-wrapper { padding:0 20px 32px; } .app-header { margin:0 -20px; padding:14px 20px; } .charts-row { grid-template-columns:1fr; } }
@media(max-width:560px) { .workspace-heading { align-items:start; flex-direction:column; padding-top:25px; } .workspace-heading h2 { font-size:1.5rem; } .header-tools { gap:5px; } .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .kpi-card:not(:nth-child(3n)) { border-right:0; } .kpi-card:nth-child(odd) { border-right:1px solid var(--border-subtle); } .kpi-card:nth-child(-n+4) { border-bottom:1px solid var(--border-subtle); } .quota-stats-grid { grid-template-columns:repeat(2,1fr); } .quota-stat-box { border:0; padding:2px 0; } }

.plan-note { display:grid; grid-template-columns:1fr auto 1fr; gap:28px; align-items:center; margin:0 0 20px; padding:18px 20px; border:1px solid var(--border-subtle); border-radius:var(--radius-lg); background:var(--bg-surface); }
.plan-note h3 { margin:5px 0; font-size:.92rem; font-weight:650; color:var(--text-primary); }
.plan-note p:not(.eyebrow) { color:var(--text-secondary); font-size:.76rem; line-height:1.55; }
.plan-note-divider { width:1px; height:42px; background:var(--border-subtle); }
@media(max-width:700px) { .plan-note { grid-template-columns:1fr; gap:14px; } .plan-note-divider { display:none; } }

.browser-only-note { color:var(--text-muted); font-size:.72rem; font-weight:600; }

/* Request allowance and plan styling */
.request-count-value { display:inline-flex; align-items:baseline; gap:4px; font-family:var(--font-mono); font-size:.78rem; font-weight:700; color:var(--accent-primary); }
.request-count-limit { color:var(--text-muted); font-weight:500; }
.request-volume-input { font-variant-numeric:tabular-nums; font-size:1rem !important; font-weight:650; }
.request-capacity { height:3px; margin-top:9px; border-radius:999px; overflow:hidden; background:var(--bg-surface-elevated); }
.request-capacity span { display:block; width:10%; height:100%; background:var(--accent-primary); border-radius:inherit; transition:width .16s ease; }
.request-limit-help { margin-top:7px; color:var(--text-muted); font-size:.68rem; }
.request-limit-help strong { color:var(--text-secondary); font-weight:600; }
.plan-note { grid-template-columns:1fr 1fr; gap:12px; padding:0; border:0; background:transparent; }
.plan-card { min-width:0; padding:17px 19px; border:1px solid var(--border-subtle); border-radius:10px; background:var(--bg-surface); }
.plan-card-free { border-top:2px solid var(--accent-primary); }
.plan-card-pro { background:linear-gradient(135deg,var(--bg-surface) 0%,var(--bg-surface-elevated) 100%); }
.plan-card-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.plan-status { display:inline-flex; align-items:center; gap:7px; color:var(--text-muted); font-size:.65rem; font-weight:650; letter-spacing:.035em; text-transform:uppercase; }
.plan-status-live i { display:block; width:6px; height:6px; border-radius:50%; background:var(--success); box-shadow:0 0 0 3px var(--success-bg); }
.plan-status-soon { color:var(--accent-primary); }
.plan-price { color:var(--text-primary); font-size:.72rem; font-weight:700; }
.plan-card h3 { margin:13px 0 6px; font-size:.88rem; font-weight:650; letter-spacing:-.015em; }
.plan-card p:not(.eyebrow) { color:var(--text-secondary); font-size:.72rem; line-height:1.55; }
@media(max-width:700px) { .plan-note { grid-template-columns:1fr; gap:9px; } }

/* Signature workspace refresh */
:root, [data-theme="light"] {
  --bg-app:#f2f4f1;
  --bg-surface:#ffffff;
  --bg-surface-elevated:#f7f8f6;
  --bg-surface-hover:#eef2ee;
  --border-subtle:#e3e8e3;
  --border-focus:#326f62;
  --border-glow:rgba(50,111,98,.16);
  --text-primary:#1d2925;
  --text-secondary:#64716b;
  --text-muted:#8a958f;
  --accent-primary:#397e70;
  --accent-secondary:#397e70;
  --accent-gradient:linear-gradient(110deg,#397e70,#5c9a86);
  --accent-glow:rgba(57,126,112,.10);
  --success:#3d846d;
  --warning:#b9843b;
  --danger:#bf6259;
  --info:#547e91;
  --radius-sm:7px;
  --radius-md:10px;
  --radius-lg:12px;
  --shadow-sm:0 1px 2px rgba(28,43,36,.035),0 5px 18px rgba(28,43,36,.035);
  --shadow-md:0 16px 42px rgba(28,43,36,.11);
}
[data-theme="dark"] {
  --bg-app:#101917;
  --bg-surface:#18221f;
  --bg-surface-elevated:#202d29;
  --bg-surface-hover:#293833;
  --border-subtle:#2c3a35;
  --border-focus:#81b7a2;
  --border-glow:rgba(129,183,162,.16);
  --text-primary:#e5ede8;
  --text-secondary:#a5b3ac;
  --text-muted:#788b81;
  --accent-primary:#81b7a2;
  --accent-secondary:#81b7a2;
  --accent-gradient:linear-gradient(110deg,#5f9d85,#81b7a2);
  --accent-glow:rgba(129,183,162,.12);
  --success:#83c2a4;
  --warning:#d3ad70;
  --danger:#de8c82;
  --info:#8bb5c4;
}
body { background:var(--bg-app); }
.app-wrapper { max-width:1680px; padding:0 40px 56px; }
.app-header { position:sticky; top:0; z-index:20; margin:0 -40px 0; padding:13px 40px; border:0; border-bottom:1px solid var(--border-subtle); border-radius:0; background:color-mix(in srgb,var(--bg-surface) 92%,transparent); backdrop-filter:blur(14px); }
.brand-logo { width:36px; height:36px; background:#21463c; border:1px solid rgba(255,255,255,.08); border-radius:9px; box-shadow:none; }
.brand-logo span { background:#d3ecdc; }
.brand-text h1 { font-size:1.22rem; letter-spacing:-.07em; }
.brand-text p { font-size:.68rem; letter-spacing:.015em; }
.header-tools .btn-secondary { background:transparent; border-color:transparent; }
.header-tools .btn-secondary:hover { background:var(--bg-surface-elevated); border-color:var(--border-subtle); }
.workspace-heading { position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:30px; min-height:218px; margin:26px 0 22px; padding:34px 40px; border:1px solid #294940; border-radius:15px; background:radial-gradient(ellipse at 78% 12%,rgba(115,167,140,.23),transparent 34%),linear-gradient(115deg,#1e3931 0%,#25483d 55%,#2d5547 100%); color:#f3f6f2; box-shadow:0 10px 30px rgba(25,55,44,.10); }
.workspace-heading::after { content:""; position:absolute; right:13%; bottom:-110px; width:390px; height:260px; border:1px solid rgba(226,244,232,.10); border-radius:50%; box-shadow:0 0 0 24px rgba(226,244,232,.025),0 0 0 50px rgba(226,244,232,.025),0 0 0 78px rgba(226,244,232,.02); pointer-events:none; }
.workspace-copy,.workspace-proof { position:relative; z-index:1; }
.workspace-heading .eyebrow { color:#a6c6b3; font-size:.64rem; }
.workspace-heading .eyebrow span { margin:0 6px; opacity:.55; }
.workspace-heading h2 { margin:13px 0 9px; color:#f4f7f3; font-size:clamp(1.8rem,3.2vw,2.55rem); font-weight:590; line-height:1.08; letter-spacing:-.055em; }
.workspace-heading p { color:#c2d4ca; font-size:.82rem; }
.workspace-proof { display:flex; align-items:center; gap:13px; max-width:260px; padding:14px 16px; border:1px solid rgba(228,244,234,.16); border-radius:9px; background:rgba(14,33,27,.20); backdrop-filter:blur(7px); }
.workspace-proof strong,.workspace-proof small { display:block; }
.workspace-proof strong { color:#edf5ef; font-size:.73rem; font-weight:650; }
.workspace-proof small { margin-top:4px; color:#abc5b6; font-size:.64rem; line-height:1.5; }
.proof-mark { display:flex; align-items:center; gap:2px; height:25px; }
.proof-mark span { width:3px; border-radius:3px; background:#a4d0b3; }
.proof-mark span:nth-child(1),.proof-mark span:nth-child(5) { height:8px; opacity:.6; }
.proof-mark span:nth-child(2),.proof-mark span:nth-child(4) { height:16px; opacity:.8; }
.proof-mark span:nth-child(3) { height:24px; }
.preset-container { display:flex; align-items:center; gap:7px; min-height:76px; margin:0 0 13px; padding:13px 16px; border:1px solid var(--border-subtle); border-radius:11px; background:var(--bg-surface); box-shadow:var(--shadow-sm); }
.preset-heading,.plan-section-heading { display:flex; align-items:center; gap:10px; flex:0 0 auto; min-width:190px; margin-right:8px; }
.preset-heading strong,.preset-heading small,.plan-section-heading strong,.plan-section-heading small { display:block; }
.preset-heading strong,.plan-section-heading strong { color:var(--text-primary); font-size:.73rem; font-weight:650; }
.preset-heading small,.plan-section-heading small { margin-top:3px; color:var(--text-muted); font-size:.63rem; }
.section-index { display:inline-grid; place-items:center; width:25px; height:25px; flex:0 0 25px; border:1px solid var(--border-subtle); border-radius:7px; color:var(--accent-primary); font-family:var(--font-mono); font-size:.62rem; font-weight:700; background:var(--bg-surface-elevated); }
.preset-tag { padding:8px 12px; border:1px solid var(--border-subtle); border-radius:7px; color:var(--text-secondary); background:var(--bg-surface); font-size:.7rem; }
.preset-tag.active { border-color:var(--accent-primary); color:var(--accent-primary); background:var(--accent-glow); }
.preset-tag:hover { border-color:var(--accent-primary); color:var(--accent-primary); background:var(--bg-surface-elevated); }
.plan-note { display:grid; grid-template-columns:190px minmax(0,1fr) minmax(0,1fr); align-items:stretch; gap:10px; margin:0 0 19px; padding:0; border:0; background:transparent; }
.plan-section-heading { min-width:0; margin:0; padding:0 9px 0 3px; }
.plan-card { position:relative; min-height:114px; padding:15px 17px 14px; border:1px solid var(--border-subtle); border-radius:10px; background:var(--bg-surface); box-shadow:var(--shadow-sm); }
.plan-card-free { border-top:2px solid var(--accent-primary); }
.plan-card-pro { background:linear-gradient(135deg,var(--bg-surface),var(--bg-surface-elevated)); }
.plan-card-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.plan-status { font-size:.59rem; letter-spacing:.06em; }
.plan-price { padding:4px 8px; border:1px solid var(--border-subtle); border-radius:5px; color:var(--text-primary); background:var(--bg-surface-elevated); font-size:.66rem; }
.plan-card h3 { margin:11px 0 4px; font-size:.79rem; letter-spacing:-.02em; }
.plan-card p:not(.eyebrow) { font-size:.66rem; }
.main-layout { grid-template-columns:minmax(330px,390px) minmax(0,1fr); gap:19px; align-items:start; }
.sidebar-workspace { position:sticky; top:79px; }
.panel-card { padding:20px; margin-bottom:14px; border:1px solid var(--border-subtle); border-radius:11px; background:var(--bg-surface); box-shadow:var(--shadow-sm); }
.sidebar-workspace > .panel-card { padding:21px; }
.panel-title { font-size:.84rem; font-weight:650; letter-spacing:-.015em; }
.panel-title .section-index { margin-right:3px; }
.sidebar-workspace .panel-title { padding-bottom:15px; border-bottom:1px solid var(--border-subtle); }
.browser-only-note { padding:5px 8px; border:1px solid var(--border-subtle); border-radius:5px; color:var(--text-muted); background:var(--bg-surface-elevated); font-size:.61rem; font-weight:600; }
.form-field { margin-bottom:17px; }
.field-label { font-size:.7rem; letter-spacing:.005em; }
.ui-select,.ui-input,.ui-textarea { border-radius:7px; background:var(--bg-surface-elevated); font-size:.76rem; }
.method-select { width:92px; }
.request-volume-input { min-height:46px; padding-left:13px; font-size:1.06rem!important; letter-spacing:-.02em; }
.quick-pill { min-width:46px; padding:5px 9px; border-radius:5px; font-size:.67rem; }
.slider-badge { min-width:48px; border-radius:5px; font-family:var(--font-mono); font-size:.69rem; font-weight:650; text-align:center; }
.subtabs-bar { margin-top:19px; border-bottom-color:var(--border-subtle); }
.subtab-btn { font-size:.67rem; }
.controls-grid { margin-top:19px; }
.btn-cta,.btn-secondary { border-radius:7px; box-shadow:none; font-weight:600; }
.btn-start { background:#2e685b; color:#fff; }
.btn-start:hover { background:#25584d; box-shadow:0 5px 12px rgba(39,93,78,.18); }
.results-command-center { min-width:0; display:flex; flex-direction:column; }
.progress-banner { order:0; padding:17px 19px 14px; border-top:2px solid var(--accent-primary); }
.progress-header-info { margin-bottom:12px; font-size:.76rem; }
.progress-rail { height:4px; }
.progress-bar-fill { background:var(--accent-gradient); }
.progress-meta-row { justify-content:flex-start; gap:10px 22px; margin-top:12px; font-size:.66rem; }
.meta-item { color:var(--text-muted); }
.meta-item strong { margin-left:3px; font-size:.68rem; }
.kpi-grid { order:1; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:0 0 14px; border:0; border-radius:0; background:transparent; overflow:visible; }
.kpi-card { min-height:112px; padding:15px 16px; border:1px solid var(--border-subtle); border-radius:9px; background:var(--bg-surface); box-shadow:var(--shadow-sm); }
.kpi-card:not(:nth-child(3n)) { border-right:1px solid var(--border-subtle); }
.kpi-card:nth-child(-n+3) { border-bottom:1px solid var(--border-subtle); }
.kpi-card::before { display:none; }
.kpi-caption { color:var(--text-muted); font-size:.64rem; font-weight:650; letter-spacing:.035em; text-transform:uppercase; }
.kpi-number { margin-top:8px; font-size:1.48rem; font-weight:620; letter-spacing:-.055em; }
.kpi-footnote { margin-top:3px; font-size:.64rem; }
.charts-row { order:2; grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr); gap:13px; margin-bottom:0; }
.charts-row .panel-card { min-width:0; }
.chart-title { margin-bottom:14px; }
.chart-title .panel-title-text { gap:8px; }
.chart-heading-mark { display:inline-grid; place-items:center; width:23px; height:23px; border-radius:6px; color:var(--accent-primary); background:var(--accent-glow); font-size:.85rem; }
.chart-viewport { height:210px; }
.shield-panel { order:3; border-left:1px solid var(--border-subtle); background:var(--bg-surface); }
.shield-panel.breached { border-color:var(--danger-border); background:var(--bg-surface); }
.quota-stats-grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:0; margin-top:16px; }
.quota-stat-box { min-width:0; padding:2px 12px; border:0; border-right:1px solid var(--border-subtle); border-radius:0; background:transparent; text-align:left; }
.quota-stat-box:first-child { padding-left:0; }
.quota-stat-box:last-child { border-right:0; }
.quota-stat-value { font-size:1.08rem; font-weight:620; }
.quota-stat-title { font-size:.61rem; font-weight:500; letter-spacing:0; text-transform:none; }
.results-command-center > .panel-card:last-child { order:4; }
.table-toolbar { gap:12px; }
.table-toolbar .panel-title { width:100%; }
.table-toolbar .panel-title-text { display:flex; align-items:center; gap:9px; }
.log-count-badge { display:inline-grid; place-items:center; min-width:22px; height:21px; padding:0 6px; border-radius:5px; background:var(--bg-surface-elevated); color:var(--text-secondary); font-family:var(--font-mono); font-size:.63rem; }
.filter-chip { padding:5px 9px; border-radius:6px; font-size:.64rem; }
.stream-table th { font-size:.63rem; }
.stream-table td { font-size:.7rem; }
@media(max-width:1180px) { .sidebar-workspace { position:static; } .plan-note { grid-template-columns:150px 1fr 1fr; } }
@media(max-width:920px) { .app-wrapper { padding:0 22px 36px; } .app-header { margin:0 -22px; padding:12px 22px; } .workspace-heading { min-height:190px; padding:29px; } .workspace-proof { max-width:220px; } .main-layout { grid-template-columns:1fr; } .plan-note { grid-template-columns:155px 1fr 1fr; } .sidebar-workspace { position:static; } }
@media(max-width:740px) { .workspace-heading { align-items:flex-start; flex-direction:column; gap:20px; } .workspace-heading h2 { font-size:2rem; } .workspace-proof { max-width:none; } .preset-container { align-items:flex-start; flex-wrap:wrap; } .preset-heading { width:100%; margin:0 0 5px; } .plan-note { grid-template-columns:1fr 1fr; } .plan-section-heading { grid-column:1/-1; padding:4px 0; } .charts-row { grid-template-columns:1fr; } .quota-stats-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px 0; } .quota-stat-box:nth-child(3n) { border-right:0; } }
@media(max-width:560px) { .app-wrapper { padding:0 14px 28px; } .app-header { margin:0 -14px; padding:11px 14px; } .brand-text p { display:none; } .header-tools { gap:2px; } .workspace-heading { min-height:0; margin:16px 0 14px; padding:24px 21px; } .workspace-heading h2 { font-size:1.78rem; } .workspace-heading p { max-width:310px; font-size:.74rem; } .workspace-proof { width:100%; } .plan-note { grid-template-columns:1fr; } .plan-section-heading { grid-column:auto; } .plan-card { min-height:0; } .preset-tag { padding:7px 9px; font-size:.64rem; } .sidebar-workspace > .panel-card { padding:16px; } .kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; } .kpi-card { min-height:100px; padding:12px; } .kpi-card:not(:nth-child(3n)) { border-right:1px solid var(--border-subtle); } .kpi-card:nth-child(odd) { border-right:1px solid var(--border-subtle); } .kpi-card:nth-child(-n+4) { border-bottom:1px solid var(--border-subtle); } .quota-stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .quota-stat-box,.quota-stat-box:first-child { padding:0; border:0; } .progress-meta-row { gap:8px 14px; } }

/* Pulse type system: editorial display type paired with crisp, practical UI text. */
:root {
  --font-sans: Arial, Helvetica, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "kern" 1, "liga" 1;
  text-rendering: optimizeLegibility;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
}

.brand-text p,
.workspace-proof small {
  font-size: 0.76rem;
  line-height: 1.5;
}

.workspace-heading h2 {
  max-width: 780px;
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.workspace-heading p {
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.7;
}

.eyebrow,
.section-index {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.preset-heading strong,
.panel-title,
.plan-card h3,
.plan-note h3 {
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.plan-card h3,
.plan-note h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.preset-heading small,
.plan-note p:not(.eyebrow),
.request-limit-help,
.browser-only-note {
  font-size: 0.79rem;
  line-height: 1.6;
}

.field-label,
.workspace-label,
.preset-label {
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.ui-input,
.ui-select,
.ui-textarea,
.btn-cta,
.btn-secondary,
.preset-tag,
.quick-pill,
.filter-chip {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  letter-spacing: 0.005em;
}

.kpi-caption,
.kpi-footnote,
.progress-meta-row,
.meta-item strong,
.quota-stat-title,
.plan-status,
.stream-table th,
.stream-table td,
.filter-chip {
  font-size: 0.73rem;
  letter-spacing: 0;
}

.kpi-number {
  font-family: var(--font-sans);
  font-size: clamp(1.45rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums lining-nums;
}

.quota-stat-value,
.request-volume-input,
.request-count-value,
.log-count-badge {
  font-variant-numeric: tabular-nums lining-nums;
}

.stream-table th {
  font-weight: 700;
}

.stream-table td {
  line-height: 1.55;
}

.site-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 1.25rem 0 0.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-subtle);
  text-underline-offset: 0.18em;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-primary);
}

.site-footer-links {
  display: flex;
  gap: 1rem;
}

.legal-page {
  min-height: 100vh;
}

.legal-shell {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.legal-back {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.legal-back:hover,
.legal-back:focus-visible {
  color: var(--accent-primary);
}

.legal-card {
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.legal-card .eyebrow {
  color: var(--accent-primary);
}

.legal-card h1 {
  margin: 0.5rem 0 0.25rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  letter-spacing: -0.05em;
}

.legal-updated {
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.legal-card h2 {
  margin: 1.75rem 0 0.45rem;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.legal-card p {
  margin: 0 0 0.85rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.legal-card a {
  color: var(--accent-primary);
  text-underline-offset: 0.18em;
}

.legal-footer {
  justify-content: center;
}

@media (max-width: 740px) {
  body { font-size: 14px; }
  .workspace-heading h2 { font-size: clamp(2.25rem, 9vw, 3rem); }
  .workspace-heading p { font-size: 0.9rem; }
}
