html, body {
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fafafa;
  color: #222;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.site-header .container {
  padding: 32px 24px 24px;
}

.site-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}

.site-header .tagline {
  margin-top: 6px;
  font-size: 15px;
  color: #666;
}

/* Main */
.site-main .container {
  padding: 32px 24px 48px;
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e5e5;
}

thead th {
  background: #f3f3f3;
  font-weight: 600;
  text-align: left;
  padding: 12px 14px;
  font-size: 14px;
}

tbody td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

tbody tr:hover:not(.model-row) {
  background: #fafafa;
}

.table-meta {
  margin-top: 10px;
  font-size: 13px;
  color: #777;
}

/* Model grouping */
.model-row td {
  background: #f8f9fb;
  font-size: 15px;
  font-weight: 600;
  border-top: 2px solid #e5e5e5;
  padding: 14px;
}

/* Best price */
.best-price {
  background-color: #f6fbf8;
  border-left: 2px solid #9fcfb4;
}

.best-price .price {
  font-weight: 600;
}

/* Numeric alignment */
th.price, td.price {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

th.delta, td.delta {
  text-align: center;
  white-space: nowrap;
}

/* Delta */
.delta-val {
  font-size: 13px;
  font-weight: 500;
}

.delta-up { color: #1a7f37; }
.delta-down { color: #b42318; }
.delta-none { color: #777; }

/* Availability */
.available {
  color: #1a7f37;
  font-weight: 600;
}

.unavailable {
  color: #b42318;
  font-weight: 600;
}

.subnote {
  margin-top: 4px;
  font-size: 12px;
  color: #666;
  font-weight: 400;
}

/* Footer */
.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
}

.site-footer .container {
  padding: 24px;
  font-size: 13px;
  color: #777;
}

.muted {
  color: #999;
}

/* Mobile */
@media (max-width: 600px) {
  thead {
    display: none;
  }

  table, tbody, tr {
    display: block;
    width: 100%;
  }

  tbody tr {
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0;
  }

  tbody td {
    display: block;
    padding: 6px 14px;
    text-align: left !important;
  }
}
