:root {
  color-scheme: light;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172a43;
  background: #eff4fa;
  font-synthesis: none;
  --ink: #172a43;
  --muted: #52647a;
  --accent: #a2352b;
  --border: #dbe5f0;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #365f9a;
  outline-offset: 4px;
}

.shell {
  width: min(1240px, 100% - 80px);
  margin-inline: auto;
}

.masthead {
  background: #fff;
  border-block-start: 4px solid var(--ink);
  border-block-end: 1px solid var(--border);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 36px;
  min-height: 100px;
  padding-block: 16px;
}

.wordmark {
  flex: none;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -.065em;
  font-weight: 800;
}

.wordmark span { color: var(--accent); }

.date-navigation {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.date-navigation a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.date-navigation a:hover { border-color: #a7b9d0; }
.date-navigation a[aria-current="date"] {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.main-content { padding-block: 36px 56px; }

.collection-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-block-end: 17px;
  border-block-end: 1px solid #cbd9ea;
  margin-block-end: 20px;
}

.collection-heading h2 {
  margin: 0;
  font-size: clamp(1.38rem, 3vw, 1.85rem);
  line-height: 1.18;
  letter-spacing: -.04em;
}

.collection-heading p {
  margin: 0;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.deal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.deal-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 3px 9px #172a4308;
}

.product-media {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 112px;
  border-block-end: 1px solid var(--border);
  background: #f5f8fc;
}

.product-media.has-photo { aspect-ratio: 1.5; background: #fff; }

.product-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
}

.deal-number {
  position: absolute;
  z-index: 1;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 7px;
  color: #354f71;
  background: #fff;
  font-size: .75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.photo-placeholder {
  margin: 40px 18px 19px;
  color: var(--muted);
  font-size: .875rem;
  text-align: center;
}

.deal-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.deal-body p, .deal-title { margin: 0; }

.product-rating {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 550;
}

.rating-star { color: #a26405; }

.deal-title {
  font-size: clamp(1.04rem, 1.65vw, 1.25rem);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.27;
}

.deal-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  font-variant-numeric: tabular-nums;
}

.deal-price {
  color: var(--accent);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 760;
  letter-spacing: -.045em;
  white-space: nowrap;
}

.regular-price {
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
}

.offer-text {
  color: #354a63;
  font-size: .9rem;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.amazon-link {
  width: fit-content;
  max-width: 100%;
  color: #075ac3;
  font-size: .875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-decoration-color: #075ac389;
  text-underline-offset: .16em;
}

.amazon-link:hover { text-decoration-color: currentColor; }
.end-date { color: var(--muted); font-size: .8125rem; }

.deal-body .deal-cc, .deal-body .deal-budget {
  color: var(--accent);
  font-size: .9rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.deal-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-block-start: auto;
  padding-block-start: 14px;
}

.deal-actions button {
  min-width: 0;
  min-height: 42px;
  padding: 8px 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  cursor: pointer;
}

.deal-actions .copy-code {
  color: #fff;
  background: var(--ink);
}

.deal-actions .copy-code:not(:disabled):hover { background: #254466; }
.deal-actions .copy-code:disabled {
  color: #667587;
  background: #eff3f7;
  border-color: var(--border);
  cursor: default;
}

.deal-actions .report-deal {
  color: #3f5165;
  background: #edf2f8;
  border-color: #cbd9ea;
}

.deal-actions .report-deal:hover { background: #e1e9f3; }
.deal-actions .copy-deal { color: #fff; background: var(--accent); }
.deal-actions .copy-deal:hover { background: #88291f; }

.product-source {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.5;
}
.product-source a { color: inherit; text-underline-offset: .16em; }
.empty-state { padding: 24px 0; color: var(--muted); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 960px) {
  .shell { width: min(100% - 48px, 1240px); }
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 570px) {
  .shell { width: calc(100% - 32px); }
  .masthead-inner { flex-wrap: wrap; min-height: 72px; gap: 12px; }
  .date-navigation { justify-content: flex-start; }
  .date-navigation a { min-height: 35px; padding-inline: 10px; }
  .main-content { padding-block: 24px 36px; }
  .collection-heading { padding-block-end: 13px; margin-block-end: 14px; }
  .deal-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .deal-body { padding: 16px; }
}
