:root {
  color-scheme: light;
  --bg: #f4efe7;
  --panel: rgba(255, 249, 241, 0.88);
  --panel-strong: rgba(255, 251, 246, 0.96);
  --line: rgba(74, 58, 42, 0.14);
  --line-strong: rgba(74, 58, 42, 0.24);
  --text: #21170f;
  --muted: #766453;
  --accent: #c75b12;
  --accent-soft: rgba(199, 91, 18, 0.14);
  --shadow: 0 24px 80px rgba(80, 50, 23, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 194, 128, 0.38), transparent 28%),
    radial-gradient(circle at top right, rgba(165, 181, 244, 0.24), transparent 30%),
    linear-gradient(180deg, #fbf6ef 0%, #f2eadf 52%, #efe7dc 100%);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.72;
}

.ambient-a {
  top: -80px;
  left: -60px;
  width: 320px;
  height: 320px;
  background: rgba(199, 91, 18, 0.15);
}

.ambient-b {
  right: -70px;
  bottom: 8vh;
  width: 260px;
  height: 260px;
  background: rgba(50, 84, 175, 0.12);
}

.shell {
  width: min(1240px, calc(100vw - 28px));
  margin: 22px auto 40px;
}

.site-nav {
  display: flex;
  gap: 10px;
  padding: 0 30px;
}

.page-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 251, 246, 0.72);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.page-switch:hover {
  transform: translateY(-1px);
  color: var(--text);
}

.page-switch.is-active {
  background: linear-gradient(135deg, #2f1d10, #4a2711);
  border-color: transparent;
  color: #fff6ef;
}

.hero {
  position: relative;
  padding: 28px 30px 18px;
}

.hero-ops h1 {
  max-width: 720px;
}

.eyebrow,
.table-kicker,
.meta-label,
.field span,
.table-note {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero h1,
.table-header h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  line-height: 0.95;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  letter-spacing: -0.05em;
}

.intro {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.meta-card,
.panel,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.meta-card {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.meta-card strong {
  display: block;
  margin-top: 8px;
  font-size: 0.96rem;
  line-height: 1.45;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 22px;
}

.controls-panel {
  display: grid;
  gap: 18px;
}

.search-wrap {
  display: grid;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 9px;
}

.field input,
.field select,
.toggle-button,
.ghost-button {
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.field input,
.field select {
  width: 100%;
  padding: 0 16px;
}

.field input:focus,
.field select:focus,
.toggle-button:focus,
.ghost-button:focus {
  outline: none;
  border-color: rgba(199, 91, 18, 0.6);
  box-shadow: 0 0 0 4px rgba(199, 91, 18, 0.14);
}

.field-search input {
  font-size: 1rem;
}

.controls-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.toggle-button,
.ghost-button {
  cursor: pointer;
  padding: 0 18px;
  font-weight: 600;
}

.toggle-button {
  background: linear-gradient(135deg, #2f1d10, #4a2711);
  color: #fff6ef;
  border-color: transparent;
}

.toggle-button[aria-pressed="true"] {
  background: linear-gradient(135deg, #8f3d09, #c75b12);
}

.ghost-button:hover,
.toggle-button:hover,
.field input:hover,
.field select:hover {
  transform: translateY(-1px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat-card {
  border-radius: var(--radius-lg);
  padding: 18px;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
  line-height: 1;
}

.stat-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.error-banner {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(162, 32, 32, 0.25);
  background: rgba(162, 32, 32, 0.08);
  color: #7f1d1d;
}

.table-panel {
  margin-top: 16px;
  padding: 0;
  overflow: hidden;
}

.table-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
}

.table-note {
  max-width: 280px;
  text-align: right;
}

.table-scroll {
  overflow: auto;
  border-top: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

thead {
  background: rgba(253, 249, 242, 0.94);
}

th,
td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--muted);
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:nth-child(even) {
  background: rgba(255, 250, 244, 0.46);
}

tbody tr:hover {
  background: rgba(199, 91, 18, 0.06);
}

.provider-pill,
.type-pill,
.currency-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 251, 246, 0.85);
  font-size: 0.84rem;
}

.status-pill {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-live {
  background: rgba(26, 127, 55, 0.12);
  color: #1f6a32;
}

.status-fallback {
  background: rgba(199, 91, 18, 0.12);
  color: #8f3d09;
}

.status-failed {
  background: rgba(162, 32, 32, 0.12);
  color: #8f1d1d;
}

.status-unknown {
  background: rgba(74, 58, 42, 0.1);
  color: var(--muted);
}

.model-cell {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.86rem;
}

.price-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.source-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.source-link:hover {
  text-decoration: underline;
}

.empty-state {
  padding: 28px 24px;
  color: var(--muted);
}

.ops-table-panel table {
  min-width: 1120px;
}

.ops-message {
  min-width: 220px;
  color: var(--muted);
}

@media (max-width: 840px) {
  .shell {
    width: min(100vw - 18px, 1240px);
    margin-top: 10px;
  }

  .hero,
  .panel {
    padding-left: 18px;
    padding-right: 18px;
  }

  .site-nav {
    padding: 0 18px;
  }

  .table-header {
    padding-left: 18px;
    padding-right: 18px;
  }

  .table-note {
    text-align: left;
  }
}
