:root {
  --bg: #0a0d14;
  --card-bg: rgba(18, 24, 38, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(99, 102, 241, 0.3);
  --accent: #6366f1;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --rose: #f43f5e;
  --amber: #f59e0b;
  --violet: #8b5cf6;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --mono: 'JetBrains Mono', monospace;
  --heading: 'Space Grotesk', sans-serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  padding: 24px 16px;
  min-height: 100vh;
}

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

header {
  text-align: center;
  margin-bottom: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

h1 {
  font-family: var(--heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 820px;
  margin: 0 auto;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 900px) {
  .layout-grid {
    grid-template-columns: 520px 1fr;
  }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.card-title {
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #818cf8;
  margin-top: 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Provider Tabs */
.provider-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.provider-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.provider-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.provider-tab.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.6);
  color: #fff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.form-group {
  margin-bottom: 14px;
}

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

label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.value-display {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

.input-display-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.num-input {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 2px 6px;
  width: 72px;
  text-align: right;
  outline: none;
  transition: border-color 0.2s ease;
}

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

.value-unit {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
}

select {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.875rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

select:focus {
  border-color: var(--accent);
}

select option {
  background: #121826;
  color: #fff;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Throughput Banner */
.throughput-banner {
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  color: #c7d2fe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  margin-bottom: 14px;
}

.throughput-banner strong {
  color: #fff;
  font-family: var(--mono);
}

/* Workload Distribution Segmented Bar */
.workload-bar-wrap {
  margin-bottom: 14px;
}

.workload-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.workload-seg {
  height: 100%;
  transition: width 0.2s ease;
}

/* Swarm Model Cards */
.swarm-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.model-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
  transition: border-color 0.2s ease;
}

.model-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.model-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.model-info-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.model-info-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.model-select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 3px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.model-select:focus {
  border-color: var(--accent);
}

.model-select option {
  background: #121826;
  color: #fff;
}

.model-role-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
}

.model-pct-val {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.btn-remove-model {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
  line-height: 1;
}

.btn-remove-model:hover {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.15);
}

.btn-add-model {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-add-model:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(99, 102, 241, 0.08);
}

.swarm-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.model-pricing-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

/* Results Column */
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.metric-val {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.metric-val.positive {
  color: var(--emerald);
}

.metric-val.negative {
  color: var(--rose);
}

/* FeiZ & Empirical ROI Barometer */
.feiz-barometer-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}

.feiz-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.feiz-title {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #c7d2fe;
}

.mode-toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.mode-toggle-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-toggle-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.roi-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feiz-bar-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.feiz-bar-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.feiz-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.feiz-card-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feiz-plan-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.feiz-plan-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.feiz-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feiz-roi-badge {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Side by Side (Top and Bottom) Bar Pair */
.bar-pair {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.bar-metric-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bar-label-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-family: var(--mono);
}

.bar-type-label {
  color: var(--text-dim);
  font-weight: 500;
}

.bar-val-text {
  font-weight: 700;
  color: #ffffff;
}

.bar-val-text.cost {
  color: #f87171;
}

.bar-val-text.savings {
  color: #34d399;
}

.bar-val-text.val-delivered {
  color: #e2e8f0;
}

.bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

/* Gradients */
.grok-grad {
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 100%);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}

.claude-grad {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.35);
}

.oai-grad {
  background: linear-gradient(90deg, #10a37f 0%, #059669 100%);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.35);
}

.promax-grad {
  background: linear-gradient(90deg, #a855f7 0%, #6366f1 100%);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.35);
}

.cursor-grad {
  background: linear-gradient(90deg, #94a3b8 0%, #64748b 100%);
  box-shadow: 0 0 8px rgba(148, 163, 184, 0.35);
}

.google-grad {
  background: linear-gradient(90deg, #4285f4 0%, #34a853 100%);
  box-shadow: 0 0 8px rgba(66, 133, 244, 0.35);
}

.cost-fill {
  background: linear-gradient(90deg, #f43f5e 0%, #e11d48 100%);
  opacity: 0.85;
}

/* Card Footer */
.feiz-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.feiz-card-footer strong {
  color: #e2e8f0;
}

.feiz-card-footer strong.pareto-num {
  color: #34d399;
}

.feiz-card-footer strong.headroom-num {
  color: #93c5fd;
}

/* FeiZ Pareto List */
.pareto-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pareto-row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.2s ease;
}

.pareto-row:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.pareto-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}

.pareto-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pareto-rank {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  width: 22px;
}

.pareto-plan {
  font-weight: 700;
  color: #fff;
}

.pareto-model {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.pareto-cost-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #34d399;
}

.pareto-cost-tag.surcharge {
  color: #f87171;
}

.pareto-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.pareto-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
  min-width: 4px;
}

.roi-footnote {
  margin-top: 10px;
  font-size: 0.7rem;
  color: var(--text-dim);
  line-height: 1.4;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

/* FeiZ SVG Chart Viewport */
.feiz-svg-viewport {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #080c14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 10px;
}

.feiz-svg-viewport svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-actions-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-chart-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 5px 10px;
  color: #c7d2fe;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-chart-action:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
  color: #fff;
}

/* Cache Economics Card */
.cache-economics-card {
  margin-top: 14px;
  padding: 14px;
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 12px;
}

.cache-economics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.cache-header-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #a7f3d0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cache-rate-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  padding: 2px 8px;
  border-radius: 9999px;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.cache-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

@media (min-width: 600px) {
  .cache-metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cache-metric-sub {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cache-metric-sub .sub-label {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cache-metric-sub strong {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
}

.cache-metric-sub strong.savings-highlight {
  color: #6ee7b7;
}

.cache-metric-sub strong.unit-highlight {
  color: #93c5fd;
}

.cache-quota-expansion-note {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.45;
  background: rgba(15, 23, 42, 0.6);
  border-left: 3px solid #10b981;
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
}

/* Swarm Cost Breakdown Table */
.breakdown-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
  margin-top: 16px;
}

.breakdown-header {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.breakdown-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
}

.breakdown-right {
  font-family: var(--mono);
  color: #fff;
}

/* Latency Comparison */
.latency-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
}

.latency-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.latency-item {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
}

.latency-item.cerebras {
  background: rgba(16, 185, 129, 0.05);
  border-color: rgba(16, 185, 129, 0.3);
}

.latency-item.h100 {
  background: rgba(244, 63, 94, 0.05);
  border-color: rgba(244, 63, 94, 0.3);
}

.latency-item h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.latency-item.cerebras h4 { color: var(--emerald); }
.latency-item.h100 h4 { color: var(--rose); }

.latency-num {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.latency-desc {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Quota Callout & Badges */
.quota-callout {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1.45;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
}

.quota-callout.active {
  display: block;
}

.quota-callout.warning {
  background: rgba(120, 53, 15, 0.25);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fde68a;
}

.quota-callout.success {
  background: rgba(6, 95, 70, 0.25);
  border-color: rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.quota-callout.info {
  background: rgba(30, 58, 138, 0.25);
  border-color: rgba(56, 189, 248, 0.4);
  color: #bae6fd;
}

.quota-headroom-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(6, 95, 70, 0.4);
  color: #a7f3d0;
  border: 1px solid #065f46;
}

.quota-exceeded-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(153, 27, 27, 0.4);
  color: #fecaca;
  border: 1px solid #991b1b;
}

/* Citations & Source Link */
.methodology-box {
  margin-top: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.methodology-box a {
  color: #a5b4fc;
  text-decoration: none;
}

.methodology-box a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #a5b4fc;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Weekly Quota & Lockout Status Card */
.quota-status-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.quota-status-card.safe {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.03);
}

.quota-status-card.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.04);
}

.quota-status-card.critical {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.06);
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.15);
}

.quota-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.quota-status-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c7d2fe;
}

.quota-tier-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.quota-bar-wrapper {
  margin-bottom: 10px;
}

.quota-bar-track {
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin-bottom: 6px;
}

.quota-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.35s ease, background 0.35s ease;
  min-width: 6px;
}

.quota-bar-fill.fill-safe {
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.quota-bar-fill.fill-warning {
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.quota-bar-fill.fill-critical {
  background: linear-gradient(90deg, #ef4444 0%, #f87171 100%);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
}

.quota-bar-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-family: var(--mono);
  color: var(--text-dim);
}

.quota-pct-label {
  font-weight: 700;
}

.quota-pct-label.safe {
  color: #34d399;
}

.quota-pct-label.warning {
  color: #fbbf24;
}

.quota-pct-label.critical {
  color: #f87171;
}

.quota-verdict-banner {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.76rem;
  line-height: 1.45;
}

.quota-verdict-banner.safe {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.quota-verdict-banner.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.quota-verdict-banner.critical {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  font-weight: 500;
}

/* Zero Cache Comparison Box */
.zero-cache-comparison-box {
  margin-top: 10px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
}

.zero-cache-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 600px) {
  .zero-cache-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.zero-cache-col {
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.zero-cache-col.active-state {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.zero-cache-col.zero-state {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.zero-cache-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zero-cache-col.active-state .zero-cache-title {
  color: #6ee7b7;
}

.zero-cache-col.zero-state .zero-cache-title {
  color: #fca5a5;
}

.zero-cache-desc {
  font-size: 0.72rem;
  color: #e2e8f0;
  line-height: 1.35;
}

.zero-cache-desc strong {
  font-family: var(--mono);
}

/* Context Mini Presets */
.mini-presets-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.mini-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-family: var(--mono);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mini-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.mini-btn.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  color: #c7d2fe;
}

.mini-btn.highlight {
  border-color: rgba(236, 72, 153, 0.35);
  color: #f472b6;
}

.mini-btn.highlight.active {
  background: rgba(236, 72, 153, 0.18);
  border-color: #ec4899;
  color: #fbcfe8;
}

/* Turn-by-Turn Cost & Quota Anatomy Card */
.turn-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.turn-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.turn-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}

.turn-title svg {
  color: #f59e0b;
}

.turn-badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
  padding: 3px 8px;
  border-radius: 6px;
}

.turn-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.turn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 600px) {
  .turn-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.turn-col {
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.turn-col.hit {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.turn-col.miss {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.turn-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px;
}

.turn-tag {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.turn-tag.hit {
  color: #34d399;
}

.turn-tag.miss {
  color: #f87171;
}

.turn-price {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 800;
}

.turn-price.hit {
  color: #6ee7b7;
}

.turn-price.miss {
  color: #fca5a5;
}

.turn-col-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.73rem;
}

.turn-col-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #cbd5e1;
}

.turn-col-row span {
  color: var(--text-dim);
}

.turn-col-row strong {
  font-family: var(--mono);
  font-weight: 600;
}

.turn-col-row.penalty {
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px dashed rgba(239, 68, 68, 0.25);
  color: #f87171;
}

.turn-col-row.penalty span {
  color: #f87171;
  font-weight: 600;
}

.turn-col-footer {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
}

.turn-col-footer.safe span {
  color: var(--text-dim);
}

.turn-col-footer.safe strong {
  color: #6ee7b7;
  font-family: var(--mono);
}

.turn-col-footer.danger span {
  color: var(--text-dim);
}

.turn-col-footer.danger strong {
  color: #fca5a5;
  font-family: var(--mono);
}

.turn-task-summary {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.74rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 8px;
}

.turn-task-summary strong {
  font-family: var(--mono);
  color: #fff;
}

.turn-lockout-alert {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  line-height: 1.35;
  font-weight: 500;
}

.turn-lockout-alert.safe {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.turn-lockout-alert.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.turn-lockout-alert.danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}


