@font-face {
  font-family: "Instrument Serif";
  src: url("/static/fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("/static/fonts/Manrope.ttf") format("truetype");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0f241c;
  --ink-secondary: #284237;
  --accent: #cef255;
  --accent-ink: #0f241c;
  --paper: #f0f3ed;
  --surface: #ffffff;
  --panel: #e4eae0;
  --well: #f4f7f2;
  --line: rgba(15, 36, 28, 0.13);
  --line-strong: rgba(15, 36, 28, 0.28);
  --muted: #4b5d54;
  --hero-scrim-a: rgba(9, 25, 19, 0.88);
  --hero-scrim-b: rgba(9, 25, 19, 0.56);
  --hero-scrim-c: rgba(9, 25, 19, 0.14);
  --savings: #16603b;
  --savings-bg: #dff0e6;
  --focus: #16603b;
  --selection: #d6e9ca;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  font-synthesis: none;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scrollbar-color: var(--line-strong) transparent;
}
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
  width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}
p {
  text-wrap: pretty;
}

h1,
.field-note h2,
.source-page h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
h1 {
  font-size: clamp(44px, 5vw, 68px);
}
h2 {
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 16px;
  font-weight: 700;
}

.discount,
.prices,
.reference,
.savings,
.results-bar,
.history-table,
.source-card,
.coverage {
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 3px;
}
::selection {
  background: var(--selection);
  color: var(--ink);
}
input,
select {
  caret-color: var(--focus);
}
button,
summary {
  cursor: pointer;
}

.skip {
  position: absolute;
  left: 16px;
  top: -70px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  z-index: 90;
}
.skip:focus {
  top: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* ---- Shared Clearcut Edition Bar ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.76);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-shell {
  max-width: 1440px;
  height: 68px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.wordmark {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.brand-mark {
  background: var(--ink);
  color: var(--accent);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  flex-shrink: 0;
}

.world-dock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 36, 28, 0.05);
  border: 1px solid var(--line);
}
.dock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 200ms var(--ease-spring), color 200ms var(--ease-spring);
}
.dock-idx {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.dock-pill:hover,
.dock-pill.is-current {
  background: var(--ink);
  color: #ffffff;
}

.utility-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}
.top-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--well);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 13px;
  height: 38px;
  width: clamp(180px, 18vw, 250px);
  color: var(--muted);
  transition: border-color 160ms var(--ease-spring), background-color 160ms var(--ease-spring), width 200ms var(--ease-spring);
}
.top-search:focus-within {
  background: var(--surface);
  border-color: var(--ink);
  width: clamp(200px, 21vw, 285px);
}
.top-search svg {
  flex-shrink: 0;
}
.top-search input {
  border: 0;
  background: transparent;
  padding: 4px 2px;
  min-height: 34px;
  height: 34px;
  width: 100%;
  font-size: 13.5px;
  color: var(--ink);
}
.top-search input:focus-visible {
  outline: none;
}
.utility-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink-secondary);
  white-space: nowrap;
}
.utility-nav a:hover {
  color: var(--ink);
}
.utility-nav a.nav-pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--surface);
  color: var(--ink);
  transition: background-color 160ms var(--ease-spring), color 160ms var(--ease-spring);
}
.utility-nav a.nav-pill:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}
.locker-trigger {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 13px;
  min-height: 36px;
  background: var(--ink);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 700;
}
.drop-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--savings-bg);
  color: var(--savings);
  font-size: 12px;
  font-weight: 800;
}
.other-shops-link {
  font-weight: 700;
  color: var(--ink);
}

/* ---- Panoramic World Hero ---- */
.world-hero-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 40px 0;
}
.world-hero {
  position: relative;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 36px 40px;
  background: var(--ink);
  box-shadow: 0 18px 40px rgba(15, 36, 28, 0.12);
}
.world-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  pointer-events: none;
}
.world-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    94deg,
    var(--hero-scrim-a) 0%,
    var(--hero-scrim-b) 42%,
    rgba(10, 18, 16, 0.06) 74%,
    rgba(10, 18, 16, 0) 100%
  );
  pointer-events: none;
}
.world-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 600px;
  color: #ffffff;
}
.world-hero-copy h1 {
  color: #ffffff;
  margin-bottom: 10px;
}
.world-hero-copy > p {
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(247, 250, 248, 0.88);
  max-width: 52ch;
  margin-bottom: 18px;
}
.coverage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(12, 20, 17, 0.56);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 14px;
}
.coverage strong {
  color: #ffffff;
}
.coverage a {
  color: var(--accent);
  font-weight: 700;
}
.signal {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---- Unified Horizontal Command Console ---- */
.deal-section {
  max-width: 1440px;
  padding: 22px 40px 68px;
  margin: 0 auto;
}

.command-console {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px 14px;
  box-shadow: 0 8px 24px rgba(15, 36, 28, 0.05);
}
.command-primary {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.command-primary label,
.drawer-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  min-width: 0;
}
.cmd-search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 13px;
  color: var(--muted);
  transition: border-color 160ms var(--ease-spring), background-color 160ms var(--ease-spring);
}
.cmd-search-box:focus-within {
  background: var(--surface);
  border-color: var(--ink);
}
.cmd-search-box svg {
  flex-shrink: 0;
}
.cmd-search-box input {
  border: 0;
  background: transparent;
  margin: 0;
  padding: 10px 2px;
  min-height: 44px;
  width: 100%;
  font-size: 14.5px;
  color: var(--ink);
}
.cmd-search-box input:focus-visible {
  outline: none;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 12px;
  background: var(--well);
  color: var(--ink);
  font-size: 14px;
  min-width: 0;
  transition: border-color 160ms var(--ease-spring), background-color 160ms var(--ease-spring);
}
input:hover,
select:hover {
  border-color: var(--line-strong);
}
input:focus,
select:focus {
  background: var(--surface);
  border-color: var(--ink);
}
input::placeholder {
  color: var(--muted);
  opacity: 1;
}
label small {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.primary-button {
  border: 0;
  background: var(--ink);
  color: #ffffff;
  border-radius: 11px;
  min-height: 46px;
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  white-space: nowrap;
  transition: transform 160ms var(--ease-spring), opacity 160ms var(--ease-spring);
}
.primary-button:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}
.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
}
.secondary-button:hover {
  background: var(--panel);
}

.post-search-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.quick-cats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms var(--ease-spring), color 160ms var(--ease-spring), border-color 160ms var(--ease-spring);
}
.cat-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.cat-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}
.post-search-bar .filter-panel {
  margin: 0;
  padding: 0;
  border: 0;
}
.post-search-bar .filter-panel[open] {
  flex-basis: 100%;
}
.filter-toggle-pill {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink) !important;
  font-size: 13px;
  font-weight: 700;
  margin-left: auto;
}
.filter-drawer-box {
  margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: 0 10px 26px rgba(15, 36, 28, 0.06);
}
.filter-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-secondary);
  list-style: none;
  min-height: 36px;
}
.filter-panel summary::-webkit-details-marker {
  display: none;
}
.filter-chevron {
  transition: transform 200ms var(--ease-spring);
}
.filter-panel[open] .filter-chevron {
  transform: rotate(180deg);
}
.drawer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 14px;
  align-items: end;
}
.check-label {
  flex-direction: row !important;
  align-items: center;
  gap: 9px !important;
  min-height: 46px;
  color: var(--ink) !important;
}
.check-label input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--ink);
  flex-shrink: 0;
}
.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.reset {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

/* ---- Saved Searches, Active Filters & Results Bar ---- */
.saved-searches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.saved-searches:empty,
.save-status:empty {
  display: none;
}
.saved-item {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
}
.saved-item a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  text-decoration: none;
  font-weight: 600;
}
.saved-item button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  color: var(--muted);
  padding: 4px 10px;
}
.save-status {
  font-size: 12.5px;
  color: var(--muted);
  margin: 8px 0 0;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.active-filters a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 6px 13px;
  border-radius: 999px;
  min-height: 38px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 150ms var(--ease-spring);
}
.active-filters a:hover {
  background: var(--panel);
}

.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 14px;
  color: var(--muted);
  padding: 18px 0 14px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.results-bar strong {
  color: var(--ink);
}
.results-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.quiet-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.quiet-button {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  padding: 7px 14px;
  border-radius: 999px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  transition: background-color 160ms var(--ease-spring);
}
.quiet-button:hover {
  background: var(--panel);
}

.filter-note {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 12px 16px;
  font-size: 13px;
  border-radius: 12px;
  margin: 0 0 20px;
}

/* ---- Editorial Gallery Deal Cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
@media (min-width: 1360px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
}

.deal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: 0 6px 20px rgba(15, 36, 28, 0.05);
  transition:
    transform 240ms var(--ease-spring),
    box-shadow 240ms var(--ease-spring),
    border-color 240ms var(--ease-spring);
}
.deal-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 20px 42px rgba(15, 36, 28, 0.11);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  background: var(--well);
  border-bottom: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.product-image img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  padding: 24px 18px 32px;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 320ms var(--ease-spring);
}
.product-image img.world-fallback-art {
  padding: 0;
  object-fit: cover;
  mix-blend-mode: normal;
  opacity: 0.88;
}
.deal-card:hover .product-image img {
  transform: scale(1.045);
}

.discount {
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 14px;
  background: var(--accent);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14.5px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--accent-ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.discount small {
  font-size: 12px;
}
.product-category {
  position: absolute;
  z-index: 2;
  bottom: 12px;
  left: 14px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 999px;
}

.card-body {
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}
.product-brand {
  color: var(--ink-secondary);
  font-weight: 800;
}
.product-store {
  color: var(--muted);
  font-weight: 600;
  text-align: right;
}

.card-body h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  min-height: 2.7em;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body h3 a {
  text-decoration: none;
}
.card-body h3 a:hover {
  text-decoration: underline;
}
.variant {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 10px;
  overflow-wrap: anywhere;
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.tags span {
  background: var(--well);
  border: 1px solid var(--line);
  color: var(--ink-secondary);
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
}

.price-band {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-bottom: 10px;
}
.prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}
.prices strong {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.prices > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.reference {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.reference s {
  margin-right: 3px;
}
.savings {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  color: var(--savings);
  margin: 4px 0 0;
}
.price-note {
  font-size: 11.5px;
  color: var(--muted);
  margin: 4px 0 0;
}

.stock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
.stock strong {
  color: var(--ink);
}
.stock-extra {
  margin-top: -6px;
}
.stock-dot {
  height: 7px;
  width: 7px;
  background: #9aa79e;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.stock-dot.is-in {
  background: var(--savings);
}

.merchant {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  gap: 8px;
  transition: transform 160ms var(--ease-spring), opacity 160ms var(--ease-spring);
}
.merchant:hover {
  opacity: 0.92;
  transform: translateX(2px);
}

.offer-evidence {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.offer-evidence summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 4px;
  font-weight: 600;
  color: var(--muted);
  list-style: none;
}
.offer-evidence summary::-webkit-details-marker {
  display: none;
}
.offer-evidence summary::after {
  content: "+";
  font-weight: 700;
  font-size: 14px;
}
.offer-evidence[open] summary::after {
  content: "−";
}
.offer-evidence p {
  margin: 0 0 8px;
  color: var(--muted);
}
.observed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin: 12px 0 0;
}
.history-link {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  text-decoration: none;
}
.history-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ---- Empty State & Pagination ---- */
.empty {
  padding: 68px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.empty svg {
  color: var(--muted);
  margin-bottom: 12px;
}
.empty h3 {
  font-size: 24px;
  margin: 0 0 10px;
}
.empty p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 48ch;
  margin: 0 auto 22px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 30px 0 0;
  font-size: 13px;
  font-weight: 700;
}
.pagination a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  text-decoration: none;
}
.pagination a:hover {
  background: var(--ink);
  color: #ffffff;
}

/* ---- Field Note & Footer ---- */
.field-note {
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 48px max(40px, calc((100vw - 1360px) / 2));
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 36px;
}
.field-note h2 {
  font-size: clamp(32px, 3.2vw, 44px);
}
.field-note p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-secondary);
  max-width: 58ch;
  margin: 0 0 12px;
}
.field-note p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
}
.footer-shell {
  padding: 32px 40px;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px 40px;
}
.footer-brand p,
.footer-meta p {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 58ch;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 12px;
}
.footer-links a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.back-top {
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

/* ---- Source Health & Price History Pages ---- */
.source-page {
  padding: 44px 40px 68px;
  max-width: 1120px;
  margin: 0 auto;
}
.source-page h1 {
  font-size: clamp(42px, 4.8vw, 62px);
  margin: 0 0 16px;
}
.source-page .intro {
  color: var(--ink-secondary);
  font-size: 16px;
  max-width: 62ch;
  margin: 0 0 14px;
}
.source-list {
  display: grid;
  gap: 14px;
  margin: 32px 0 40px;
}
.source-card {
  padding: 22px 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 16px;
}
.source-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.source-card h2 {
  font-size: 20px;
  margin: 0 0 4px;
}
.source-card h2 a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.source-card h2 a:hover span {
  text-decoration: underline;
}
.source-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
}
.source-pill.is-fresh {
  background: var(--savings-bg);
  color: var(--savings);
}
.source-card p,
.source-card dl {
  font-size: 13px;
  color: var(--muted);
}
.source-card dl {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.source-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}
.source-detail {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  margin-top: 12px;
  overflow-wrap: anywhere;
}

.methodology {
  max-width: 68ch;
}
.methodology h2 {
  margin-bottom: 14px;
}
.methodology p {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-secondary);
  margin: 0 0 14px;
}
.methodology strong {
  color: var(--ink);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.history-page h1 {
  font-size: clamp(34px, 4.2vw, 50px);
}
.history-sub {
  font-weight: 700;
  color: var(--ink-secondary);
}
.history-page p {
  max-width: 68ch;
  line-height: 1.65;
  margin: 12px 0;
}
.history-note {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink-secondary);
  font-weight: 500;
}
.history-table {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 16px;
  margin: 24px 0;
}
.history-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.history-table caption {
  text-align: left;
  font-weight: 700;
  padding: 8px 0 12px;
}
.history-table td,
.history-table th {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .header-shell,
  .world-hero-wrap,
  .deal-section,
  .footer-shell,
  .source-page {
    padding-left: 22px;
    padding-right: 22px;
  }
  .command-primary {
    grid-template-columns: 1fr 1fr;
  }
  .cmd-search,
  .command-primary .primary-button {
    grid-column: 1 / -1;
  }
  .drawer-grid,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .header-shell {
    height: auto;
    min-height: 60px;
    padding-top: 8px;
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .world-dock {
    order: 3;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .utility-nav {
    flex-wrap: wrap;
    width: 100%;
    justify-content: space-between;
  }
  .top-search {
    width: 100% !important;
    order: 4;
  }
  .world-dock::-webkit-scrollbar {
    display: none;
  }
  .dock-pill {
    flex: 1;
    justify-content: center;
    padding: 5px 10px;
    font-size: 12px;
  }
  .world-hero {
    min-height: 240px;
    padding: 24px;
    border-radius: 20px;
  }
  .field-note,
  .footer-shell {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-left: 22px;
    padding-right: 22px;
  }
  .back-top {
    margin-left: 0;
  }
  .source-card dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .source-card dd {
    margin-bottom: 8px;
  }
}

@media (max-width: 580px) {
  .header-shell,
  .world-hero-wrap,
  .deal-section,
  .footer-shell,
  .source-page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .command-primary,
  .drawer-grid,
  .cards {
    grid-template-columns: 1fr;
  }
  input,
  select,
  .cmd-search-box input {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
