:root {
  --ink: #152024;
  --soft-ink: #4b575b;
  --panel: #fff8ea;
  --cream-soft: #fff9f1;
  --cream-soft-2: #fff6ec;
  --line: #1e1f24;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: #0097ff;
  background-image: linear-gradient(188deg, #b762ff, #0079ff, #ff0, #ff576f, #b762ff, #459dff, #4ee4c4, #ffd117, #ff576f);
}

.shell {
  width: min(1240px, calc(100% - 24px));
  margin: 6px auto 24px;
  border: 4px solid #111;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.16);
  color: #111;
  padding: 16px 20px;
}

.brand-box {
  background: linear-gradient(140deg, #c88dff 0%, #b762ff 55%, #8f4ce6 100%);
}

.brand-box-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0 8px;
}

.site-nav { margin-left: auto; }
.site-link { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 10px 16px; border: 3px solid #111; background: #ffd117; color: #111; font-weight: 800; text-decoration: none; box-shadow: 4px 4px 0 #111; }
.site-link:hover { background: #ffe778; }
.site-link:focus-visible { outline: 3px solid #1745cc; outline-offset: 4px; }

.brand-box img {
  width: 116px;
  height: auto;
  flex: 0 0 auto;
}

.brand-text h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.1rem);
  line-height: 1;
  color: #111;
}

.brand-text p {
  margin: 6px 0 0;
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  color: #111;
}

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

.card {
  border: 3px solid #111;
  border-radius: 1px;
  padding: 10px 12px;
  background: #fff4d8;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.14);
  min-width: 0;
}

.card:nth-child(3) { background: #ffe5e9; }
.card:nth-child(4) { background: #ddf9ee; }

.card .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--soft-ink);
}

.card .value {
  margin-top: 4px;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

.price-band-value span {
  display: inline-block;
}

.data-note { margin: 16px 0 0; font-size: .8rem; line-height: 1.5; }

.panel {
  min-width: 0;
  border: 4px solid #111;
  border-radius: 2px;
  background: #fff8ea;
  padding: 12px 14px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.16);
}

.panel > h2 {
  margin: 0;
  display: inline-block;
  background: #111;
  color: #fff;
  padding: 4px 10px;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 800;
  line-height: 1.1;
}

.footnote {
  margin-top: 8px;
  color: #4f5d61;
  font-size: 0.82rem;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  min-width: 520px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9rem;
  background: #fffdf5;
  border: 3px solid #111;
}

th,
td {
  border-bottom: 1px solid #1f1f1f;
  text-align: left;
  padding: 10px 8px;
}

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #111;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #111;
  background: #ff6e08;
}

.outliers-panel { margin-top: 24px; padding: 20px; border-top: 10px solid #ff6e08; }
.deal-list { list-style: none; padding: 0; margin: 18px 0 0; }
.deal-card { display: grid; grid-template-columns: 140px minmax(0, 1fr) 140px; gap: 12px 20px; padding: 18px 14px; border-top: 2px solid #111; }
.deal-card:nth-child(odd) { background: #fffdf7; }
.deal-heading { margin: 0; font-size: 1.1rem; align-self: center; }
.deal-stats { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 12px; margin: 0; font-variant-numeric: tabular-nums; }
.deal-stats dt { font-size: .75rem; color: #4b575b; }
.deal-stats dd { margin: 5px 0 0; font-size: 1.05rem; font-weight: 800; }
.deal-saving dd { color: #17644c; }
.deal-percent { font-size: .8rem; white-space: nowrap; }
.deal-link { display: inline-flex; align-items: center; justify-content: center; align-self: center; min-height: 44px; padding: 10px; border: 2px solid #111; background: #fff0da; color: #111; font-size: .85rem; font-weight: 700; text-decoration: none; box-shadow: 3px 3px 0 #111; }
.deal-link:hover { background: #ffb370; }
.deal-link:focus-visible { outline: 3px solid #1745cc; outline-offset: 3px; }
.deal-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font-size: .8rem; line-height: 1.5; color: #4b575b; }
.deal-meta .deal-location { flex: 1 1 220px; }

.site-footer {
  margin: 20px 0 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-chip {
  border: 4px solid #111;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.16);
  color: #111;
  padding: 8px 14px;
  font-weight: 700;
}

.footer-chip-main {
  background: #ff576f;
  transform: rotate(-0.8deg);
}

.footer-chip-date {
  background: #fff8ea;
  transform: rotate(0.8deg);
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .outliers-panel { padding: 14px 10px; margin-top: 20px; }
  .deal-card { grid-template-columns: minmax(0, 1fr) auto; gap: 14px 12px; padding: 16px 10px; }
  .deal-stats { grid-column: 1 / -1; grid-row: 2; grid-template-columns: 1fr 1fr; }
  .deal-saving { grid-column: 1 / -1; }
  .deal-saving dt, .deal-saving dd { display: inline; }
  .deal-saving dd { margin-left: 8px; }
  .deal-meta { gap: 6px 16px; }
  .deal-link { box-shadow: 2px 2px 0 #111; }
}

@media (max-width: 600px) {
  .site-nav { flex-basis: 100%; margin: 8px 0 2px; }
  .site-link { width: 100%; }
  .shell {
    width: calc(100% - 16px);
    padding: 12px;
  }
  .brand-box img { width: 76px; }
  .brand-text { min-width: 0; }
  .brand-text p { font-size: 1.05rem; line-height: 1.3; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 10px; }
  .card .value { font-size: 1.15rem; }
}
