:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-strong: #eef4ed;
  --ink: #20231f;
  --muted: #61675e;
  --line: #d8ded3;
  --brand: #246b4f;
  --brand-dark: #174834;
  --accent: #b6562d;
  --warn: #8a5b00;
  --danger: #a83232;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

img {
  display: block;
  max-width: 100%;
  border: 1px solid var(--line);
  background: #fff;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.nav nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.ad-disclosure {
  background: #203129;
  color: #fff;
  font-size: 14px;
  padding: 8px 0;
}

.band {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.band-quiet {
  background: linear-gradient(180deg, #eef4ed 0%, #f7f8f5 100%);
}

.home-grid,
.page-header,
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.section {
  padding: 40px 0 56px;
}

.section-block {
  margin-top: 36px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.section-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.narrow {
  max-width: 760px;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(30px, 4vw, 48px);
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: #374038;
  font-size: 17px;
}

.notice,
.notice-inline {
  background: #fff8e9;
  border: 1px solid #efd7a2;
  padding: 16px;
}

.notice p,
.notice-inline {
  margin: 8px 0 0;
  color: #4e3b15;
}

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

.category-card {
  display: grid;
  gap: 16px;
  min-height: 220px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.category-list-muted .category-card {
  min-height: 200px;
  background: #f3f5f1;
  border-color: #dce2da;
}

.category-card .category-status {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.metric-row,
.detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.detail-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 20px 0;
}

.metric-row div,
.detail-list div {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 0;
  font-weight: 700;
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.context-links {
  margin: -10px 0 32px;
}

.guide-links a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  color: var(--brand-dark);
  background: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  background: var(--brand);
  color: #fff;
}

.breadcrumb {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.comparison-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.comparison-notes > div {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  padding: 16px;
}

.comparison-notes p {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
}

.ranking-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ranking-table th {
  background: #edf1e9;
  color: #384036;
  font-size: 13px;
}

.ranking-table small {
  display: block;
  color: var(--muted);
}

.ranking-table.compact {
  min-width: 640px;
}

.rank {
  width: 48px;
  color: var(--brand);
  font-weight: 800;
  font-size: 20px;
}

.product-cell {
  min-width: 330px;
}

.product-mini {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.product-mini img,
.product-mini .image-placeholder {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.image-placeholder {
  border: 1px solid var(--line);
  background: #f0f1ee;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 6px 6px 0 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.warn {
  background: #fff0c7;
  color: var(--warn);
}

.badge.danger {
  background: #ffe2e2;
  color: var(--danger);
}

.empty {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}

.item-detail {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
}

.item-media img,
.item-media .image-placeholder {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

.site-footer {
  padding: 32px 0;
  background: #1e2420;
  color: #eef4ed;
}

.site-footer a {
  color: #fff;
}

.site-footer p {
  color: #c9d3c7;
  margin: 8px 0 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.contact-line {
  font-size: 14px;
}

.legal-body p + p {
  margin-top: 18px;
}

@media (max-width: 820px) {
  .home-grid,
  .page-header,
  .footer-grid,
  .category-list,
  .comparison-notes,
  .item-detail {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: block;
  }

  .metric-row,
  .detail-list {
    grid-template-columns: 1fr;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }
}
