:root {
  --bg: #f7f2ea;
  --paper: rgba(255, 251, 247, 0.88);
  --paper-strong: #fffdf9;
  --ink: #231815;
  --muted: #65574f;
  --accent: #c35f3e;
  --accent-soft: #f4d6c7;
  --leaf: #45634d;
  --leaf-soft: #dbe6db;
  --border: rgba(101, 87, 79, 0.14);
  --shadow: 0 24px 70px rgba(35, 24, 21, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(195, 95, 62, 0.15), transparent 34%),
    radial-gradient(circle at 10% 18%, rgba(69, 99, 77, 0.12), transparent 28%),
    linear-gradient(180deg, #fbf7f1 0%, #f3ebe0 100%);
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero,
.section,
.stat-card,
.source-card,
.risk-card,
.split-panel {
  backdrop-filter: blur(14px);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 28px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 253, 249, 0.96), rgba(255, 246, 239, 0.92)),
    var(--paper);
  box-shadow: var(--shadow);
}

.eyebrow,
.section-kicker,
.panel-kicker,
.stat-label {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

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

h1,
h2 {
  font-family: "Fraunces", serif;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
}

.lede {
  max-width: 62ch;
  margin: 20px 0 0;
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--accent);
  color: #fff8f3;
}

.button--ghost {
  border-color: rgba(35, 24, 21, 0.12);
  background: rgba(255, 255, 255, 0.58);
}

.hero-panel,
.stat-card,
.risk-card,
.source-card,
.split-panel,
.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--paper-strong);
  box-shadow: 0 18px 38px rgba(35, 24, 21, 0.08);
}

.hero-panel {
  padding: 22px;
  background:
    linear-gradient(160deg, rgba(69, 99, 77, 0.12), rgba(255, 255, 255, 0)),
    var(--paper-strong);
}

.bullet-list,
.check-list,
.link-list {
  margin: 0;
  padding-left: 20px;
}

.bullet-list li,
.check-list li,
.link-list li {
  margin: 0 0 10px;
  line-height: 1.65;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #713923;
  font-size: 0.9rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-card {
  padding: 22px 20px;
}

.stat-value {
  display: block;
  margin-bottom: 10px;
  font-family: "Fraunces", serif;
  font-size: 2rem;
}

.stat-card p,
.section-note,
.risk-card p,
.batch-total {
  color: var(--muted);
  line-height: 1.7;
}

.section {
  margin-top: 22px;
  padding: 28px;
  border: 1px solid rgba(101, 87, 79, 0.1);
  border-radius: var(--radius-xl);
  background: rgba(255, 251, 247, 0.62);
}

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

.section-note {
  max-width: 46ch;
  margin: 0;
}

.recommend-grid,
.risk-grid,
.sources-grid,
.split-section {
  display: grid;
  gap: 16px;
}

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

.recommend-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at top right, rgba(69, 99, 77, 0.15), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(251, 247, 242, 0.92));
}

.recommend-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0 auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(195, 95, 62, 0.08);
  filter: blur(6px);
}

.recommend-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--leaf);
  color: #f5f3ef;
  font-weight: 800;
}

.recommend-card h3 {
  margin-top: 18px;
  font-size: 1.4rem;
}

.copy-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.copy-target {
  user-select: all;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(35, 24, 21, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--leaf);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.copy-button:hover {
  transform: translateY(-1px);
  border-color: rgba(69, 99, 77, 0.26);
  background: #ffffff;
}

.copy-button:active {
  transform: translateY(0);
}

.recommend-meta {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.recommend-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.recommend-list li {
  color: var(--muted);
  line-height: 1.65;
}

.audit-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(101, 87, 79, 0.12);
}

.audit-block p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.support-list,
.evidence-list {
  margin: 12px 0 0;
  padding-left: 18px;
}

.support-list li,
.evidence-list li {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.6;
}

.evidence-list a {
  color: var(--leaf);
  text-decoration: none;
}

.evidence-list a:hover {
  text-decoration: underline;
}

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

.risk-card,
.source-card,
.split-panel {
  padding: 22px;
}

.risk-card h3,
.source-card h3 {
  margin-bottom: 14px;
  font-size: 1.2rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.filter-button.is-active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #f6f3ee;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

thead {
  background: rgba(69, 99, 77, 0.09);
}

th,
td {
  padding: 14px 16px;
  vertical-align: top;
  text-align: left;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

tbody tr + tr {
  border-top: 1px solid rgba(101, 87, 79, 0.1);
}

tbody tr[hidden] {
  display: none;
}

.sku-name {
  font-weight: 700;
}

.sku-brand {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge--core {
  background: rgba(69, 99, 77, 0.14);
  color: var(--leaf);
}

.badge--backup {
  background: rgba(195, 95, 62, 0.14);
  color: #8d472c;
}

.badge--watch {
  background: rgba(67, 110, 169, 0.14);
  color: #30527e;
}

.badge--drop {
  background: rgba(101, 87, 79, 0.1);
  color: var(--muted);
}

.copy-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(35, 24, 21, 0.92);
  color: #fff9f4;
  box-shadow: 0 20px 50px rgba(35, 24, 21, 0.24);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.split-section {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-table {
  display: grid;
  gap: 10px;
}

.mini-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 70px 86px 110px;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(69, 99, 77, 0.06);
}

.mini-head {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.batch-total {
  margin: 18px 0 0;
}

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

.link-list a {
  text-decoration: none;
  color: var(--leaf);
}

.link-list a:hover {
  text-decoration: underline;
}

@media (max-width: 1040px) {
  .hero,
  .stats-grid,
  .recommend-grid,
  .risk-grid,
  .split-section,
  .sources-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 20px;
    padding-bottom: 40px;
  }

  .hero,
  .section {
    padding: 20px;
  }

  .mini-row {
    grid-template-columns: 1.4fr 56px 76px 90px;
    font-size: 0.92rem;
  }

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

  .copy-button {
    width: 100%;
  }

  h1 {
    max-width: none;
  }
}
