:root {
  color-scheme: light;
  --bg: #f7f7f2;
  --ink: #1f2933;
  --muted: #65717f;
  --line: #d9ded8;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --paper: #ffffff;
  --warning: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.secondaryButton {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--accent-dark);
}

.status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
  margin-bottom: 18px;
}

.filters {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 16px;
  margin-bottom: 18px;
}

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

.filterGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

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

.field input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.field input:focus {
  border-color: var(--accent);
  outline: 3px solid #ccebe6;
}

.status div {
  background: var(--paper);
  padding: 16px;
}

.label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef7f5;
  padding: 14px 16px;
  margin-bottom: 18px;
}

.message.error {
  background: #fff1f0;
  color: var(--warning);
}

.hidden {
  display: none;
}

.offers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.offer {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.offer img,
.imageFallback {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #dfe8e5;
}

.offerBody {
  padding: 16px;
}

.offerHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.offerHeader p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.offerHeader h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
}

.offerHeader strong {
  white-space: nowrap;
  color: var(--accent-dark);
  font-size: 20px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 12px;
}

.lowestDates {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 14px;
  padding: 12px 0;
}

.lowestDates h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dates {
  display: grid;
  gap: 8px;
}

.dateRow {
  display: grid;
  grid-template-columns: minmax(92px, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  padding: 6px 8px;
  text-decoration: none;
}

.dateRow:hover {
  background: #eef7f5;
}

.dateRow span {
  font-weight: 700;
}

.dateRow small,
.dateRow em,
.datesEmpty {
  color: var(--muted);
  font-size: 12px;
}

.dateRow em {
  font-style: normal;
  text-align: right;
}

.datesEmpty {
  margin: 0;
}

a {
  color: var(--accent-dark);
  font-weight: 700;
}

.empty {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 24px;
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .filterHeader {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .dateRow em {
    text-align: left;
  }
}

@media (min-width: 721px) and (max-width: 1080px) {
  .filterGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
