:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5b6760;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --line: #d9ded7;
  --green: #214f3d;
  --green-soft: #dce9de;
  --coral: #c7573d;
  --gold: #d8a23a;
  --sky: #d8e8ef;
  --shadow: 0 14px 36px rgba(23, 33, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  overflow-x: auto;
  background: rgba(251, 250, 246, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-track {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  min-width: 100%;
  padding: 12px clamp(16px, 4vw, 48px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--green);
  background: var(--green);
  color: white;
  border-radius: 6px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 9px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  background: var(--green-soft);
  color: var(--green);
}

.header-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

input,
button {
  font: inherit;
}

.header-search input,
.search-box input {
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
}

.header-search button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 10px 14px;
  background: var(--green);
  color: white;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button.ghost {
  background: transparent;
  color: var(--green);
}

.button.primary:hover,
.header-search button:hover {
  background: #15382a;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(320px, 0.97fr);
  align-items: stretch;
  gap: clamp(22px, 4vw, 58px);
  width: min(100% - 32px, 1180px);
  margin: 28px auto 0;
  padding: clamp(18px, 4vw, 46px) 0 30px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding: clamp(18px, 4vw, 44px);
  border-left: 8px solid var(--coral);
  background:
    linear-gradient(135deg, rgba(216, 232, 239, 0.65), rgba(220, 233, 222, 0.72)),
    var(--surface);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(40px, 6vw, 78px);
}

h2 {
  font-size: clamp(26px, 3.4vw, 42px);
}

h3 {
  font-size: 22px;
}

.hero-copy p:not(.eyebrow),
.page-hero p,
.section-head p,
.band p,
.prose p,
.side-note p,
.empty-state p,
.rank-card p,
.criteria p,
.item-card p,
.site-footer p {
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-media {
  margin: 0;
  min-height: 520px;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-media img {
  height: 100%;
  object-fit: cover;
}

.section,
.page-hero,
.content-band,
.band,
.sitemap-columns {
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
}

.section {
  padding: 54px 0;
}

.section-head {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.rank-grid,
.ranking-cards,
.criteria-grid,
.item-grid,
.footer-grid,
.sitemap-columns {
  display: grid;
  gap: 16px;
}

.rank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rank-card,
.criteria,
.item-card,
.empty-state,
.side-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.rank-card {
  overflow: hidden;
}

.rank-card a,
.item-card a {
  display: grid;
  gap: 12px;
  height: 100%;
  padding: 14px;
  text-decoration: none;
}

.item-thumb {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: var(--green-soft);
}

.item-card.is-premium {
  border-color: rgba(216, 162, 58, 0.75);
  box-shadow: 0 12px 28px rgba(216, 162, 58, 0.16);
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.item-meta.page-meta {
  margin: 14px 0 4px;
}

.premium-badge,
.likes {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.premium-badge {
  border: 1px solid rgba(216, 162, 58, 0.8);
  background: #fff5d8;
  color: #7a5200;
}

.likes {
  border: 1px solid var(--line);
  background: #f7faf7;
  color: var(--green);
}

.profile-image {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 18px;
  background: var(--green-soft);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #f7faf7;
  color: var(--green);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.rank-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}

.rank-card span {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--green);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rank-card h2,
.item-card h2 {
  font-size: 24px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.45fr) minmax(0, 0.55fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.ranking-card.is-premium {
  border-color: rgba(216, 162, 58, 0.75);
  box-shadow: 0 16px 34px rgba(216, 162, 58, 0.16);
}

.ranking-media {
  position: relative;
  display: block;
  min-height: 260px;
  background: var(--green-soft);
}

.ranking-media img {
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.ranking-media span {
  position: absolute;
  left: 14px;
  top: 14px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
}

.ranking-body {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: clamp(18px, 3vw, 30px);
}

.ranking-body h2 {
  font-size: clamp(28px, 4vw, 46px);
}

.ranking-body h2 a {
  text-decoration-color: var(--gold);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero h1 {
  margin-top: 12px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.content-band {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: 18px;
  padding: 26px 0 42px;
}

.prose {
  border-top: 4px solid var(--gold);
  background: var(--surface);
  padding: clamp(18px, 3vw, 34px);
}

.prose h2 {
  margin-top: 28px;
}

.side-note {
  align-self: start;
  display: grid;
  gap: 10px;
  padding: 18px;
  border-top: 4px solid var(--green);
}

.side-note a {
  color: var(--green);
  font-weight: 800;
}

.criteria-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.criteria {
  padding: 18px;
}

.criteria span {
  display: inline-flex;
  margin-bottom: 20px;
  color: var(--coral);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.criteria h3 a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.rank-reason {
  margin-top: 12px;
  border-left: 3px solid var(--gold);
  padding-left: 12px;
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-style: dashed;
  background: #fffdf8;
}

.band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 60px;
  padding: clamp(20px, 4vw, 36px);
  border-top: 6px solid var(--coral);
  background: var(--sky);
}

.search-box {
  display: grid;
  gap: 10px;
  padding-top: 18px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

.search-box label {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
}

.sitemap-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 30px 0 70px;
}

.sitemap-columns div {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.sitemap-columns a {
  color: var(--green);
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #18231f;
  color: white;
}

.footer-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
  width: min(100% - 32px, 1180px);
  margin-inline: auto;
  padding: 36px 0;
}

.footer-grid h2 {
  font-size: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.footer-links a {
  color: #edf5ef;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero,
  .content-band,
  .band,
  .footer-grid,
  .sitemap-columns {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 14px;
  }

  .hero-copy,
  .hero-media {
    min-height: auto;
  }

  .hero-media img {
    aspect-ratio: 16 / 11;
  }

  .rank-grid,
  .criteria-grid,
  .ranking-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .band {
    align-items: flex-start;
  }
}

@media (max-width: 620px) {
  .header-track {
    padding-inline: 12px;
  }

  .brand-name {
    font-size: 18px;
  }

  .header-search input {
    min-width: 170px;
  }

  h1 {
    font-size: 40px;
  }

  .rank-grid,
  .criteria-grid,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .ranking-media,
  .ranking-media img {
    min-height: 220px;
  }

  .ranking-card {
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 10px;
  }

  .ranking-media {
    min-height: 0;
    height: 72px;
    overflow: hidden;
    border-radius: 7px;
  }

  .ranking-media img {
    min-height: 0;
    height: 72px;
    aspect-ratio: 1;
  }

  .ranking-media span {
    left: 5px;
    top: 5px;
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .ranking-body {
    gap: 5px;
    padding: 0;
  }

  .ranking-body h2 {
    font-size: 18px;
    line-height: 1.12;
  }

  .ranking-body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.32;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .ranking-body .rank-reason {
    display: none;
  }

  .ranking-body .item-meta {
    order: -1;
  }

  .ranking-body .premium-badge,
  .ranking-body .likes {
    padding: 2px 6px;
    font-size: 10px;
  }

  .ranking-body .card-actions {
    margin-top: 1px;
  }

  .ranking-body .button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .item-card a {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 9px 12px;
    align-items: center;
    padding: 10px;
  }

  .item-thumb {
    grid-row: span 4;
    height: 76px;
    aspect-ratio: 1;
    border-radius: 6px;
  }

  .item-card h2 {
    font-size: 19px;
    line-height: 1.15;
  }

  .item-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
  }

  .item-card .item-meta {
    gap: 5px;
  }

  .item-card .premium-badge,
  .item-card .likes {
    padding: 3px 7px;
    font-size: 11px;
  }

  .hero,
  .section,
  .page-hero,
  .content-band,
  .band,
  .sitemap-columns,
  .footer-grid {
    width: calc(100% - 24px);
  }
}
