:root {
  color-scheme: light dark;
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-soft: #fbfcf8;
  --surface-strong: #202124;
  --surface-strong-hover: #34363a;
  --text: #1d1f23;
  --text-strong: #ffffff;
  --reason: #42464d;
  --muted: #636a72;
  --line: #d7d9d1;
  --line-strong: #aeb3ab;
  --green: #147d50;
  --green-bg: #e4f4eb;
  --amber: #9b5a00;
  --amber-bg: #fff0d5;
  --red: #b3261e;
  --red-bg: #ffe4e1;
  --gray-bg: #eceee8;
  --blue: #1b66c9;
  --focus: #111111;
  --shadow: rgba(0, 0, 0, 0.1);
  --button-hover-bg: #fafbf8;
  --input-bg: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15171a;
  --surface: #1d2024;
  --surface-soft: #23262b;
  --surface-strong: #e8eaef;
  --surface-strong-hover: #d2d4d8;
  --text: #e8eaef;
  --text-strong: #15171a;
  --reason: #c8ccd2;
  --muted: #9aa0a6;
  --line: #34373c;
  --line-strong: #4a4d52;
  --green: #4ade80;
  --green-bg: #11321f;
  --amber: #f5b042;
  --amber-bg: #3a2710;
  --red: #f47373;
  --red-bg: #3a1818;
  --gray-bg: #2a2d32;
  --blue: #6aa9f5;
  --focus: #ffffff;
  --shadow: rgba(0, 0, 0, 0.5);
  --button-hover-bg: #25282d;
  --input-bg: #23262b;
}

@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    color-scheme: dark;
    --bg: #15171a;
    --surface: #1d2024;
    --surface-soft: #23262b;
    --surface-strong: #e8eaef;
    --surface-strong-hover: #d2d4d8;
    --text: #e8eaef;
    --text-strong: #15171a;
    --reason: #c8ccd2;
    --muted: #9aa0a6;
    --line: #34373c;
    --line-strong: #4a4d52;
    --green: #4ade80;
    --green-bg: #11321f;
    --amber: #f5b042;
    --amber-bg: #3a2710;
    --red: #f47373;
    --red-bg: #3a1818;
    --gray-bg: #2a2d32;
    --blue: #6aa9f5;
    --focus: #ffffff;
    --shadow: rgba(0, 0, 0, 0.5);
    --button-hover-bg: #25282d;
    --input-bg: #23262b;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0 14px;
  white-space: nowrap;
}

button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--button-hover-bg);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.primary {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  color: var(--text-strong);
}

button.primary:hover:not(:disabled) {
  background: var(--surface-strong-hover);
  border-color: var(--surface-strong-hover);
}

button.btn-utility {
  min-height: 34px;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0 12px;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.05;
}

h2 {
  font-size: 1.15rem;
}

.status-pill {
  min-width: 96px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--gray-bg);
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.status-pill.running {
  background: var(--green-bg);
  color: var(--green);
}

.controls,
.summary-strip,
.results-section {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.controls {
  padding: 16px;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(140px, 180px);
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--text);
  padding: 0 10px;
}

.inline-input {
  display: grid;
  grid-template-columns: minmax(64px, 96px) auto;
  gap: 8px;
  align-items: center;
  justify-content: start;
}

.country-picker {
  grid-template-columns: minmax(160px, 1fr) auto auto;
  justify-content: stretch;
}

.country-input-wrap {
  position: relative;
}

.country-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 4px 16px var(--shadow);
  display: none;
}

.country-dropdown.open {
  display: block;
}

.country-option {
  padding: 8px 12px;
  font-size: 0.88rem;
  cursor: pointer;
}

.country-option:hover,
.country-option.active {
  background: var(--gray-bg);
}

.product-panel,
.region-panel {
  margin-top: 16px;
}

.section-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.product-grid,
.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.product-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.select-chip {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface-soft);
  cursor: pointer;
}

.select-chip input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--surface-strong);
}

.chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chip-content {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.chip-icon {
  flex: 0 0 auto;
  height: 26px;
  width: 44px;
  object-fit: cover;
  border-radius: 3px;
  background: #1b2838;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
}

.summary-strip > div {
  display: grid;
  gap: 2px;
  min-height: 74px;
  padding: 14px 16px;
  background: var(--surface);
}

.metric-value {
  font-size: 1.25rem;
  font-weight: 800;
}

.metric-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.results-section {
  margin-top: 14px;
  padding: 16px;
}

.results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.message-area {
  min-height: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.message-area:not(:empty) {
  margin-bottom: 12px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.result-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

.result-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.region-title {
  display: grid;
  gap: 2px;
}

.region-code {
  font-size: 1.25rem;
  font-weight: 850;
}

.region-full-name {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  transition: background 0.15s, color 0.15s;
}

.badge-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.info-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: help;
  white-space: nowrap;
}

.badge.available,
.badge.in_stock {
  background: var(--green-bg);
  color: var(--green);
}

.badge.pending,
.badge.reservation,
.badge.reservation_open,
.badge.waitlist {
  background: var(--amber-bg);
  color: var(--amber);
}

.badge.error,
.badge.restricted,
.badge.unsupported,
.badge.unavailable_in_region {
  background: var(--red-bg);
  color: var(--red);
}

.badge.unpublished,
.badge.out,
.badge.out_of_stock,
.badge.unknown {
  background: var(--gray-bg);
  color: var(--muted);
}

.reason {
  color: var(--reason);
  line-height: 1.45;
  font-size: 0.92rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.detail {
  display: grid;
  gap: 2px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.detail span:first-child {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.model-list {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.product-section {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 12px;
}

.product-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.product-section-name {
  font-size: 1rem;
  font-weight: 800;
}

.model-name,
.model-delivery {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-name {
  font-weight: 800;
}

.model-delivery {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.model-status {
  justify-self: end;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.changelog-list {
  display: grid;
  gap: 6px;
}

.changelog-date {
  margin: 0;
  padding: 6px 10px 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.changelog-date:not(:first-child) {
  margin-top: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.changelog-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.changelog-time {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  font-weight: 700;
}

.changelog-product {
  font-size: 0.88rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changelog-region {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.source-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--gray-bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.last-stock-hint {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.history-as-of {
  margin: -8px 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.history-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gray-bg);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  vertical-align: middle;
}

h1 .history-link {
  font-size: 0.66em;
}

.history-link:hover {
  background: var(--surface-soft);
  text-decoration: none;
}

.history-toolbar {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.history-toolbar-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px 16px;
  align-items: end;
}

.field.grow {
  grid-column: span 2;
}

.segmented {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 2px;
  gap: 2px;
}

.segmented button {
  min-height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0 10px;
  cursor: pointer;
}

.segmented button:hover:not(.active) {
  background: var(--gray-bg);
  color: var(--text);
}

.segmented button.active {
  background: var(--surface-strong);
  color: var(--text-strong);
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  padding: 4px 12px 4px 4px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-chip img {
  height: 26px;
  width: 44px;
  object-fit: cover;
  border-radius: 999px;
  background: #1b2838;
}

.filter-chip:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.filter-chip.active {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  color: var(--text-strong);
}

.history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.history-table-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table tbody tr:hover {
  background: var(--surface-soft);
}

.history-table th {
  font-weight: 800;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  white-space: nowrap;
}

.history-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.history-table th[data-sort]:hover {
  color: var(--text);
}

.history-table th.sorted {
  color: var(--text);
}

.history-table th.sorted::after {
  content: ' ▾';
  color: var(--muted);
}

.col-product {
  min-width: 180px;
}

.cell-product {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cell-product-icon {
  flex: 0 0 auto;
  height: 28px;
  width: 44px;
  object-fit: cover;
  border-radius: 4px;
  background: #1b2838;
}

.cell-product-name {
  font-weight: 700;
  white-space: nowrap;
}

.col-region {
  white-space: nowrap;
}

.cell-region-code {
  font-weight: 850;
  letter-spacing: 0.02em;
  margin-right: 6px;
}

.cell-region-name {
  color: var(--muted);
  font-size: 0.82rem;
}

.col-events {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.col-actions {
  white-space: nowrap;
}

.col-actions a {
  margin-right: 8px;
}

@media (max-width: 760px) {
  .history-table th,
  .history-table td {
    padding: 8px 10px;
  }
  .cell-product-icon {
    height: 22px;
    width: 36px;
  }
  .cell-region-name {
    display: none;
  }
}

.browse-grid {
  margin-top: 32px;
  padding: 16px 0;
}

.browse-grid h2 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}

.browse-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 16px;
}

.browse-grid a {
  text-decoration: none;
  color: var(--text);
}

.browse-grid a:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 20px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding-top: 0;
  padding-bottom: 0;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .topbar,
  .results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-row,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .button-row button {
    flex: 1 1 145px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .model-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .model-delivery {
    grid-column: 1 / -1;
  }
}

.affiliate-block {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border, rgba(127, 127, 127, 0.3));
  font-size: 0.85rem;
}
.affiliate-title {
  font-weight: 600;
}
.affiliate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}
.affiliate-disclosure {
  margin: 0;
  opacity: 0.75;
  font-size: 0.78rem;
}

/* JSAUX product cards. Scroll sideways when the strip is narrow (phones,
   homepage region cards). */
.deal-strip {
  container-type: inline-size;
  margin: 14px 0 18px;
  padding: 12px 14px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.deal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 10px;
}
.deal-title {
  font-weight: 650;
  font-size: 0.95rem;
}
.deal-promo {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--amber);
  background: var(--amber-bg);
  padding: 2px 8px;
  border-radius: 999px;
}
.deal-ad {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 0 5px;
  line-height: 1.5;
  cursor: help;
}
.deal-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.deal-card a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.deal-card a:hover {
  border-color: var(--line-strong);
  box-shadow: 0 2px 8px var(--shadow);
}
.deal-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.deal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.deal-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 1px 6px;
  border-radius: 5px;
}
.deal-name {
  font-size: 0.82rem;
  line-height: 1.3;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.deal-price {
  font-size: 0.9rem;
}
.deal-price s {
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: 2px;
}
.deal-cta {
  margin-top: auto;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-strong);
  background: var(--surface-strong);
  border-radius: 7px;
  padding: 5px 0;
}
.deal-card a:hover .deal-cta {
  background: var(--surface-strong-hover);
}
.deal-foot {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}
.deal-foot a {
  color: inherit;
}
@container (max-width: 560px) {
  .deal-list {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 42%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  .deal-card {
    scroll-snap-align: start;
  }
}

/* Consent banner: fixed, so showing it never moves the page. */
.consent-banner {
  position: fixed;
  inset: auto 12px 12px 12px;
  z-index: 1000;
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--line, rgba(127, 127, 127, 0.35));
  border-radius: 10px;
  background: var(--surface, #fff);
  color: inherit;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}
.consent-banner[hidden] {
  display: none;
}
.consent-title {
  margin: 0 0 4px;
  font-weight: 600;
}
.consent-text {
  margin: 0 0 10px;
  font-size: 0.9rem;
}
.consent-actions {
  display: flex;
  gap: 8px;
}
.consent-button {
  flex: 1;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.consent-button:focus-visible {
  outline: 3px solid #4c8bf5;
  outline-offset: 2px;
}

/* Alert box under the product title. */
.alert-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 2px solid var(--surface-strong);
  border-radius: 8px;
  background: var(--surface);
}
.alert-box > div {
  flex: 1 1 320px;
}
.alert-box h2 {
  margin: 0 0 2px;
  font-size: 1.05rem;
}
.alert-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.alert-box form {
  display: flex;
  gap: 8px;
}
.alert-box select {
  width: auto;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
}
.alert-box button {
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--text-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
@media (max-width: 760px) {
  .alert-box form {
    width: 100%;
  }
  .alert-box select,
  .alert-box button {
    flex: 1;
  }
}

/* "Right now" status summary on product pages. */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}
.hero.has-yc {
  grid-template-columns: 1.3fr 1fr;
}
.hero > div {
  background: var(--surface);
  padding: 16px;
}
.hero > div[hidden] {
  display: none;
}
.hero .lbl {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.03em;
}
.hero .big {
  font-size: 1.9rem;
  font-weight: 850;
  line-height: 1.1;
}
.hero .big.g {
  color: var(--green);
}
.hero .big.a {
  color: var(--amber);
}
.hero .big.r {
  color: var(--muted);
}
.hero .bar {
  display: flex;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0 8px;
  background: var(--gray-bg);
}
.hero .bar i {
  display: block;
}
.hero .bar .g {
  background: var(--green);
}
.hero .bar .a {
  background: #e0a030;
}
.hero .bar .o {
  background: var(--line-strong);
}
.hero p {
  margin: 6px 0 0;
  font-size: 0.92rem;
}
.hero .yc-name {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 4px;
}
.hero .yc-alert {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}
@media (max-width: 760px) {
  .hero.has-yc {
    grid-template-columns: 1fr;
  }
  .hero .big {
    font-size: 1.5rem;
  }
}

/* Check time, cadence and source in one line. */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  margin: 0 0 14px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.84rem;
  color: var(--muted);
}
.trust .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  box-shadow: 0 0 0 3px var(--green-bg);
}
.trust b {
  color: var(--text);
}

/* Product status cards on the homepage. */
.pcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}
.pcard {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
}
.pcard:hover {
  border-color: var(--line-strong);
}
.pcard img {
  width: 56px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  background: #1b2838;
}
.pcard .nm {
  display: block;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.2;
}
.pcard .st {
  display: block;
  margin-top: 4px;
}
.pcard .badge {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.72rem;
}
.pcard .why {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  color: var(--muted);
}
.results-section .pcards {
  margin: 0;
}
.home-intro h2 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}
@media (max-width: 760px) {
  .pcards {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .pcard {
    grid-template-columns: 44px 1fr;
    padding: 8px;
  }
  .pcard img {
    width: 44px;
    height: 30px;
  }
}

/* Country table on product pages, grouped by status. */
.ctable-section h2 {
  margin-bottom: 2px;
}
.checked-line {
  margin: 0 0 10px;
  font-size: 0.84rem;
  color: var(--muted);
}
.ctable tr.grp th {
  background: var(--surface-soft);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-align: left;
}
details.notsold {
  margin-top: 10px;
  font-size: 0.88rem;
}
details.notsold summary {
  cursor: pointer;
  color: var(--blue);
}
details.notsold p {
  margin: 8px 0 0;
  line-height: 1.6;
}
@media (max-width: 760px) {
  .ctable-section .history-table-wrap {
    overflow: visible;
    border: 0;
  }
  .ctable thead {
    display: none;
  }
  .ctable,
  .ctable tbody,
  .ctable tr,
  .ctable th,
  .ctable td {
    display: block;
    width: 100%;
  }
  .ctable tr[data-cc] {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }
  .ctable td {
    border: 0;
    padding: 0 4px;
  }
  .ctable td.st {
    text-align: right;
  }
  .ctable td.price,
  .ctable td.ls {
    font-size: 0.8rem;
    color: var(--muted);
  }
  .ctable td.ls {
    text-align: right;
  }
}

/* 30-day restock timeline on the Steam Deck page. */
.tl {
  display: grid;
  grid-template-columns: 170px 1fr 120px;
  gap: 6px 10px;
  align-items: center;
  font-size: 0.86rem;
}
.tl .track {
  position: relative;
  height: 16px;
  background: var(--gray-bg);
  border-radius: 4px;
  overflow: hidden;
}
.tl .track i {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--green);
}
.tl .axis {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
}
.tl .now {
  font-size: 0.8rem;
}
.tl .small {
  color: var(--muted);
  font-size: 0.76rem;
}
.tl-legend {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 8px 0 0;
}
.tl-legend i {
  display: inline-block;
  width: 12px;
  height: 10px;
  background: var(--green);
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
@media (max-width: 760px) {
  .tl {
    grid-template-columns: 82px 1fr 78px;
    gap: 6px;
    font-size: 0.76rem;
  }
  .tl .now .badge {
    font-size: 0.66rem;
    padding: 1px 5px;
  }
}
