/* ==========================================================================
   Token Calculator — Master Stylesheet
   Frontier AI Token & Cost Estimator
   Aesthetic: Non-AI, Clean White Background, Soft Pastel Colors, Editorial Polish
   ========================================================================== */

:root {
  /* Clean White & Pastel Light Palette */
  --bg: #fafbfc;
  --bg-page: #f8fafc;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --surface: #f8fafc;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-focus: #3b82f6;

  /* Typography Colors (High-readability, crisp slate) */
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;

  /* Pastel Theme Tokens */
  --pastel-blue-bg: #eff6ff;
  --pastel-blue-text: #1d4ed8;
  --pastel-blue-border: #bfdbfe;

  --pastel-green-bg: #ecfdf5;
  --pastel-green-text: #047857;
  --pastel-green-border: #a7f3d0;

  --pastel-amber-bg: #fffbeb;
  --pastel-amber-text: #b45309;
  --pastel-amber-border: #fde68a;

  --pastel-purple-bg: #faf5ff;
  --pastel-purple-text: #7e22ce;
  --pastel-purple-border: #e9d5ff;

  --pastel-rose-bg: #fff1f2;
  --pastel-rose-text: #be123c;
  --pastel-rose-border: #fecdd3;

  /* Subtle, Soft Shadows (Zero neon glows) */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   Base Layout Resets & Viewport Discipline (No Scrollbars)
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html,
body {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* App Container: Locked to Viewport */
.container {
  width: 100%;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.85rem;
  gap: 0.45rem;
  overflow: hidden;
}

/* ==========================================================================
   Header: Clean White Bar
   ========================================================================== */
header {
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.42rem 0.85rem;
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.75rem;
}

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

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.18s ease;
}

.brand-logo:hover {
  transform: scale(1.05);
}

.brand-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
  line-height: 1.15;
}

.brand-text p {
  color: var(--text-subtle);
  font-size: 0.74rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Status Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.72rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.status-dot {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #f59e0b;
}

.badge.ready {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.badge.ready .status-dot {
  background: #10b981;
}

/* ==========================================================================
   Dashboard Grid Layout
   ========================================================================== */
.dashboard {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 0.65rem;
  overflow: hidden;
}

/* ==========================================================================
   Left Controls Card
   ========================================================================== */
.controls-card {
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
}

/* Clean Segmented Tabs */
.tabs {
  display: flex;
  background: #f1f5f9;
  padding: 0.18rem;
  border-radius: 8px;
  gap: 0.18rem;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.75rem;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: #0f172a;
}

.tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Prompt Box (Fills Space in Prompt Playground Tab) */
.prompt-box {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 180px;
  gap: 0.32rem;
}

.generator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.generator-header label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
}

/* Generator Toolbar */
.generator-bar {
  display: flex;
  gap: 0.2rem;
  align-items: center;
  flex-wrap: wrap;
}

.gen-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0.15rem 0.38rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.gen-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.clear-btn {
  background: transparent;
  border: none;
  color: #dc2626;
  font-size: 0.64rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.12rem 0.3rem;
  border-radius: 4px;
  transition: all 0.12s ease;
}

.clear-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Prompt Textarea */
textarea {
  width: 100%;
  flex: 1 1 auto;
  min-height: 160px;
  height: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.5;
  resize: none;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  caret-color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

textarea:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  background-color: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Text Telemetry Stats Row */
.text-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
}

.stat-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 0.25rem 0.2rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
}

.stat-pill span {
  font-weight: 600;
  color: #0f172a;
  line-height: 1.15;
}

.stat-pill small {
  font-size: 0.6rem;
  color: var(--text-subtle);
}

.stat-pill.highlight-stat {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.stat-pill.highlight-stat span {
  color: #1d4ed8;
  font-weight: 700;
}

/* ==========================================================================
   Sliders Stack: Clean Pastel Cards
   ========================================================================== */
.sliders-stack {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.slider-unit {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  padding: 0.38rem 0.52rem;
  background: #fafbfc;
  border: 1px solid #e8ecf2;
  border-radius: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

/* Slider 1 is controlled by tab state: hidden in Prompt Playground mode */
.slider-input-tokens {
  display: none;
}

.slider-unit:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

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

.dot-sky {
  background: #0ea5e9;
}

.dot-violet {
  background: #8b5cf6;
}

.dot-amber {
  background: #f59e0b;
}

.dot-mint {
  background: #10b981;
}

.slider-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e293b;
  letter-spacing: -0.01em;
}

.value-wrapper {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 0.06rem 0.35rem;
  gap: 0.2rem;
}

.slider-input {
  width: 56px;
  background: transparent;
  border: none;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: right;
  padding: 0;
}

.slider-input:focus {
  outline: none;
  box-shadow: none;
}

.unit-tag {
  font-size: 0.6rem;
  color: var(--text-subtle);
  user-select: none;
  font-weight: 500;
}

.val-badge {
  color: #047857;
  font-size: 0.74rem;
  font-weight: 700;
}

.slider-track-wrap {
  display: flex;
  align-items: center;
  padding: 0.12rem 0;
}

/* Clean Understated Sliders */
.styled-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  transition: background 0.05s ease;
}

.slider-sky {
  --thumb-color: #0ea5e9;
  background: linear-gradient(
    to right,
    #38bdf8 0%,
    #38bdf8 var(--slider-fill, 0%),
    #e2e8f0 var(--slider-fill, 0%),
    #e2e8f0 100%
  );
}

.slider-violet {
  --thumb-color: #8b5cf6;
  background: linear-gradient(
    to right,
    #a78bfa 0%,
    #a78bfa var(--slider-fill, 0%),
    #e2e8f0 var(--slider-fill, 0%),
    #e2e8f0 100%
  );
}

.slider-amber {
  --thumb-color: #f59e0b;
  background: linear-gradient(
    to right,
    #fbbf24 0%,
    #fbbf24 var(--slider-fill, 0%),
    #e2e8f0 var(--slider-fill, 0%),
    #e2e8f0 100%
  );
}

.slider-mint {
  --thumb-color: #10b981;
  background: linear-gradient(
    to right,
    #34d399 0%,
    #34d399 var(--slider-fill, 0%),
    #e2e8f0 var(--slider-fill, 0%),
    #e2e8f0 100%
  );
}

/* WebKit Slider Thumb (Clean white circle with solid pastel ring) */
.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--thumb-color, #0ea5e9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  cursor: grab;
  transition: transform 0.12s ease;
}

.styled-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.styled-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

/* Firefox Slider Track & Thumb */
.styled-slider::-moz-range-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
}

.styled-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--thumb-color, #0ea5e9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  cursor: grab;
  transition: transform 0.12s ease;
}

.styled-slider::-moz-range-thumb:hover {
  transform: scale(1.18);
}

/* Slider Preset Micro-Chips */
.presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.18rem;
  margin-top: 0.1rem;
}

.preset-btn,
.out-preset-btn,
.req-preset-btn,
.cache-preset-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.64rem;
  font-weight: 500;
  padding: 0.14rem 0.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: center;
  white-space: nowrap;
}

.preset-btn:hover,
.out-preset-btn:hover,
.req-preset-btn:hover,
.cache-preset-btn:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #e2e8f0;
}

/* Batch Mode Card with Clean Sliding Toggle Switch */
.batch-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fafbfc;
  border: 1px solid #e8ecf2;
  padding: 0.38rem 0.55rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: auto;
}

.batch-card:hover {
  border-color: #a7f3d0;
  background: #f0fdf4;
}

/* Custom Animated Switch (Clean Light Mode) */
.custom-switch {
  position: relative;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

.custom-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.custom-switch input:checked + .switch-slider {
  background-color: #10b981;
}

.custom-switch input:checked + .switch-slider::before {
  transform: translateX(14px);
}

.batch-info {
  display: flex;
  flex-direction: column;
}

.batch-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.batch-info strong {
  font-size: 0.72rem;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.15;
}

.batch-discount-tag {
  font-size: 0.6rem;
  font-weight: 700;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 0.04rem 0.28rem;
  border-radius: 3px;
}

.batch-info span {
  font-size: 0.64rem;
  color: var(--text-subtle);
}

/* ==========================================================================
   Right Section: Filter Bar & Model Grid
   ========================================================================== */
.results-section {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Filter Bar */
.filter-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  background: #ffffff;
  padding: 0.38rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.provider-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.28rem;
}

.filter-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--text-muted);
  padding: 0.26rem 0.6rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.filter-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.filter-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  font-weight: 600;
}

.filter-right-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* Cost Spectrum Legend */
.spectrum-legend {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.18rem 0.45rem;
  font-size: 0.64rem;
  user-select: none;
}

.legend-label {
  font-weight: 600;
  font-size: 0.62rem;
}

.label-low {
  color: #15803d;
}

.label-high {
  color: #be123c;
}

.legend-bar {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #86efac 0%, #fde047 50%, #fca5a5 100%);
}

/* Sort Select */
.sort-box {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-shrink: 0;
}

.sort-box label {
  font-size: 0.72rem;
  color: var(--text-subtle);
  font-weight: 500;
}

select {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  padding: 0.24rem 0.5rem;
  border-radius: 5px;
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

select:hover {
  border-color: #94a3b8;
}

/* ==========================================================================
   Models Grid: 12 Frontier Models (4 cols x 3 rows)
   Aesthetic: Pastel Tint Washes, High Readability, Natural Polish
   ========================================================================== */
.models-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 0.55rem;
  overflow-y: auto;
}

.model-card {
  background: hsl(var(--card-hue, 142), 52%, 97.5%);
  border: 1px solid hsl(var(--card-hue, 142), 44%, 86%);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  min-height: 0;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

/* Subtle Top Pastel Highlight */
.card-ambient-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: hsl(var(--card-hue, 142), 55%, 72%);
  border-radius: 999px;
  pointer-events: none;
}

.model-card:hover {
  background: hsl(var(--card-hue, 142), 65%, 96%);
  border-color: hsl(var(--card-hue, 142), 50%, 75%);
  box-shadow: 0 4px 14px -1px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.model-card.is-lowest {
  border-color: #86efac;
  box-shadow: 0 0 0 1px #86efac, 0 1px 3px rgba(0, 0, 0, 0.04);
}

.model-card.is-highest {
  border-color: #fecdd3;
  box-shadow: 0 0 0 1px #fecdd3, 0 1px 3px rgba(0, 0, 0, 0.04);
}

.model-card-top {
  display: flex;
  flex-direction: column;
}

.model-card-bottom {
  display: flex;
  flex-direction: column;
  margin-top: auto;
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.model-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.model-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.model-name {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f172a;
  line-height: 1.15;
}

.ctx-tag {
  font-size: 0.58rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #475569;
  padding: 0.04rem 0.28rem;
  border-radius: 3px;
  line-height: 1;
}

.model-desc {
  font-size: 0.63rem;
  color: var(--text-subtle);
  line-height: 1.15;
}

.model-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.12rem;
}

.badges-col {
  display: flex;
  align-items: center;
  gap: 0.22rem;
  flex-shrink: 0;
}

/* Lab Badges */
.lab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.42rem;
  border-radius: 4px;
}

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

.lab-Google {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.lab-Google .lab-dot { background: #3b82f6; }

.lab-OpenAI {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.lab-OpenAI .lab-dot { background: #10b981; }

.lab-Anthropic {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.lab-Anthropic .lab-dot { background: #f59e0b; }

.lab-xAI {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}
.lab-xAI .lab-dot { background: #a855f7; }

/* Rank Pills */
.cost-rank-pill {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.pill-lowest {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.pill-highest {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fda4af;
}

.warning-pill {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 500;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  padding: 0.06rem 0.28rem;
  border-radius: 3px;
}

.alert-pill {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
  font-weight: 600;
}

/* Price Display Section */
.price-display {
  margin: 0.2rem 0 0.4rem;
}

.total-scaled-cost {
  font-size: 1.35rem;
  font-weight: 700;
  color: hsl(var(--card-hue, 142), 65%, 26%);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.per-req-cost {
  font-size: 0.66rem;
  color: var(--text-subtle);
  margin-top: 0.08rem;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.per-req-sub {
  color: #94a3b8;
  font-size: 0.62rem;
}

/* Telemetry Rate Breakdown */
.cost-breakdown {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 0.3rem;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.rate-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
  font-size: 0.66rem;
  color: var(--text-muted);
}

.rate-item small {
  font-size: 0.58rem;
  color: var(--text-subtle);
  text-transform: uppercase;
}

.rate-item strong {
  color: #0f172a;
  font-weight: 600;
}

.rate-cache strong {
  color: #047857;
}

/* Proportional Comparison Progress Bar */
.bar-container {
  height: 4px;
  background: rgba(0, 0, 0, 0.07);
  border-radius: 999px;
  margin-top: 0.35rem;
  overflow: hidden;
}

.cost-bar {
  height: 100%;
  background: hsl(var(--card-hue, 142), 55%, 62%);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1200px) {
  .dashboard {
    grid-template-columns: 300px 1fr;
  }

  .models-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 860px) {
  .dashboard {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .models-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .models-grid {
    grid-template-columns: 1fr;
  }

  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   SEO Hidden Content Container (Zero visual overhead)
   ========================================================================== */
.seo-hidden {
  display: none !important;
  visibility: hidden;
  height: 0;
  width: 0;
  overflow: hidden;
  position: absolute;
  pointer-events: none;
}
