:root {
  --ink: #162327;
  --muted: #5d6970;
  --paper: #f5f8f7;
  --card: #ffffff;
  --line: #d7e0dd;
  --teal: #08756f;
  --magenta: #b83e6d;
  --gold: #d7a735;
  --indigo: #26365d;
  --mist: #e7f1ee;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

a { color: inherit; }

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 5vw;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-weight: 950;
}

.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-weight: 750; }

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  font-weight: 850;
  color: #536267;
}

nav a { text-decoration: none; }

.hero {
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 24px;
  align-items: end;
  padding: 16vh 5vw 7vh;
  background-image: linear-gradient(180deg, rgba(18, 31, 36, .08), rgba(18, 31, 36, .72)), url("assets/hero.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero-copy { max-width: 960px; }

.kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--magenta);
  font-size: .82rem;
  font-weight: 950;
}

.hero .kicker {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .84);
}

h1, h2, h3 { letter-spacing: 0; }
h1 { margin: 0 0 18px; font-size: clamp(3rem, 7vw, 6.4rem); line-height: .95; max-width: 980px; }
h2 { margin: 0 0 12px; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1; }
h3 { margin: 0; font-size: 1.22rem; line-height: 1.16; }

p { line-height: 1.55; }
.hero p { max-width: 820px; margin: 0 0 24px; font-size: clamp(1.06rem, 2vw, 1.35rem); }

.hero-actions, .source-links, .item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.btn, .source-links a, .item-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 7px;
  background: rgba(255, 255, 255, .13);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.btn.primary {
  background: var(--gold);
  color: #162327;
  border-color: var(--gold);
}

.hero-panel {
  background: rgba(255, 255, 255, .93);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, .65);
  border-radius: 8px;
  padding: 18px;
}

.hero-panel strong { display: block; font-size: 1.15rem; }
.hero-panel p { margin: 8px 0 0; color: #435157; }

.planner {
  display: grid;
  grid-template-columns: minmax(240px, .85fr) minmax(320px, 1.4fr);
  gap: 34px;
  padding: 48px 5vw;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}

.planner p { color: #405056; margin-bottom: 0; }

.controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.controls label {
  display: grid;
  gap: 8px;
  color: #2f3d42;
  font-weight: 900;
}

.controls input, .controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #c9d1d1;
  border-radius: 7px;
  background: #fff;
  padding: 0 13px;
  font: inherit;
  font-weight: 750;
}

.image-band {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px;
  padding: 42px 5vw 0;
}

.image-band img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ddd;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 28px 5vw 12px;
}

.stats div {
  min-height: 112px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 17px;
}

.stats strong { display: block; font-size: 2rem; }
.stats span { color: var(--muted); font-weight: 850; }

.section { padding: 48px 5vw 64px; }
.section-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
.section-head p { max-width: 880px; color: var(--muted); margin-bottom: 0; }

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

.card {
  min-height: 390px;
  display: grid;
  gap: 10px;
  align-content: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.rank {
  color: var(--magenta);
  font-weight: 950;
  font-size: .9rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e7f4f2;
  border: 1px solid #b9dcd6;
  color: #0b5752;
  font-size: .75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.card p { margin: 0; color: #4c5b60; }
.card .why { color: #263338; }

.item-actions { margin-top: auto; padding-top: 8px; }
.item-actions a {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}
.item-actions a:first-child {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.sources {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, .8fr);
  gap: 24px;
  padding: 44px 5vw;
  background: var(--indigo);
  color: #eaf0ef;
}

.sources .kicker { color: var(--gold); }
.sources p { color: #d8e1df; }
.source-links a { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }

footer {
  padding: 28px 5vw;
  background: #111b28;
  color: #d9e3e1;
}

@media (max-width: 980px) {
  .hero, .planner, .sources, .card-grid, .stats, .image-band { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 18vh; }
  .controls { grid-template-columns: 1fr; }
  .site-header { align-items: flex-start; flex-direction: column; }
  nav { justify-content: flex-start; gap: 12px; }
  h1 { font-size: 3.15rem; }
  .image-band img { height: 210px; }
}

@media (max-width: 560px) {
  .hero { padding: 18vh 5vw 48px; }
  h1 { font-size: 2.65rem; }
  h2 { font-size: 2rem; }
  .card { min-height: auto; }
  .stats div { min-height: 96px; }
}
