:root {
  --blue: #2f6fae;
  --blue-dark: #1e4e7a;
  --blue-light: #dcebfa;
  --blue-pale: #f4f8fc;
  --white: #ffffff;
  --ink: #1f2d3d;
  --muted: #607286;
  --line: #c9d9e8;
  --success-bg: #e3f3eb;
  --success-text: #17633f;
  --gold-bg: #fff3d8;
  --gold-text: #79520b;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--blue-pale);
  color: var(--ink);
  line-height: 1.5;
}

.site-header {
  background: var(--blue-dark);
  color: var(--white);
  border-bottom: 4px solid var(--blue);
  box-shadow: 0 2px 8px rgb(20 52 81 / 18%);
}

.site-header nav {
  width: min(1120px, 100%);
  min-height: 76px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand,
.nav-links a {
  color: var(--white);
  text-decoration: none;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  padding: 0.42rem 0.7rem;
  background: var(--white);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgb(9 30 49 / 25%);
}

.brand-logo img {
  display: block;
  width: clamp(160px, 20vw, 218px);
  height: auto;
}

.brand-product {
  padding-left: 0.9rem;
  border-left: 1px solid rgb(255 255 255 / 35%);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.92;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  padding: 0.55rem 0.85rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a:hover {
  background: rgb(255 255 255 / 13%);
}

.nav-links a:focus-visible,
.brand:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
  flex: 1;
}

.hero {
  padding: clamp(1.5rem, 4vw, 2.25rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  color: var(--white);
  background: linear-gradient(125deg, var(--blue), var(--blue-dark));
  border: 1px solid var(--blue-dark);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgb(30 78 122 / 18%);
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--blue-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-heading h1 {
  margin: 0.1rem 0;
  color: inherit;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.12;
}

.date-label {
  margin-bottom: 0;
  color: rgb(255 255 255 / 82%);
}

.rate-cards {
  display: flex;
  gap: 0.85rem;
}

.rate-card {
  min-width: 158px;
  padding: 1rem 1.2rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgb(255 255 255 / 75%);
  border-top: 4px solid var(--blue-light);
  border-radius: 7px;
  box-shadow: 0 4px 12px rgb(15 47 76 / 18%);
}

.rate-card.sale {
  border-top-color: var(--blue-dark);
}

.rate-card span {
  display: block;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rate-card strong {
  display: block;
  margin-top: 0.25rem;
  color: var(--blue-dark);
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  line-height: 1.25;
}

.filters {
  margin: 1.4rem 0;
  padding: 1rem;
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 2px 7px rgb(31 45 61 / 6%);
}

label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

select,
input,
button {
  min-height: 42px;
  margin-top: 0.35rem;
  padding: 0.62rem 0.78rem;
  display: block;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #9fb7cc;
  border-radius: 5px;
  font: inherit;
}

select:focus,
input:focus {
  border-color: var(--blue);
  outline: 3px solid rgb(47 111 174 / 22%);
  outline-offset: 1px;
}

button {
  padding-inline: 1.15rem;
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

button:focus-visible {
  outline: 3px solid rgb(47 111 174 / 30%);
  outline-offset: 2px;
}

.table-wrap {
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 2px 7px rgb(31 45 61 / 6%);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.85rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--blue-dark);
  background: var(--blue-light);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: var(--blue-pale);
}

tbody tr:hover {
  background: var(--blue-light);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.page-heading {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--blue-light);
}

.page-heading .eyebrow {
  color: var(--blue);
}

.page-heading h1 {
  color: var(--blue-dark);
}

.page-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.legend {
  margin-bottom: 0.85rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.legend span,
.winner-buy,
.winner-sale {
  border-radius: 4px;
  font-weight: 700;
}

.legend span {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  border: 1px solid transparent;
}

.best-buy,
.winner-buy {
  color: var(--success-text);
  background: var(--success-bg) !important;
}

.best-buy {
  border-color: #b8dfc9 !important;
}

.best-sale,
.winner-sale {
  color: var(--gold-text);
  background: var(--gold-bg) !important;
}

.best-sale {
  border-color: #ead49c !important;
}

.empty {
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  padding: 1.25rem;
  color: #e9f1f8;
  background: #173d60;
  border-top: 4px solid var(--blue);
}

.footer-signature {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.footer-signature img {
  width: 72px;
  height: 88px;
  flex: 0 0 auto;
  object-fit: cover;
  object-position: center 14%;
  border: 2px solid rgb(255 255 255 / 72%);
  border-radius: 4px;
  filter: saturate(0.85);
}

.footer-signature strong {
  display: block;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.footer-signature p {
  margin: 0.18rem 0 0;
  color: #d4e2ee;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.92rem;
  font-style: italic;
}

@media (max-width: 760px) {
  .site-header nav {
    gap: 0.75rem;
  }

  .brand-product {
    display: none;
  }

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

  .rate-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .rate-card {
    min-width: 0;
  }

  .filters {
    align-items: stretch;
  }

  .filters label,
  .filters select,
  .filters input,
  .filters button {
    width: 100%;
  }

  th,
  td {
    padding: 0.72rem 0.8rem;
  }
}

@media (max-width: 520px) {
  .site-header nav {
    min-height: 0;
    padding-block: 0.65rem;
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    justify-content: center;
  }

  .brand-logo img {
    width: min(218px, 68vw);
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    padding-top: 0.4rem;
    border-top: 1px solid rgb(255 255 255 / 18%);
  }

  .nav-links a {
    flex: 1;
    text-align: center;
  }

  main {
    padding: 1.25rem 0.8rem 2.5rem;
  }

  .rate-cards {
    grid-template-columns: 1fr;
  }

  .footer-signature img {
    width: 60px;
    height: 74px;
  }
}

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