:root {
  color-scheme: light;
  --ink: #202521;
  --muted: #6d736e;
  --faint: #929793;
  --paper: #f7f7f3;
  --surface: #ffffff;
  --accent: #1f6b5b;
  --accent-soft: #e8f1ed;
  --pass: #216c4d;
  --fail: #9a493c;
  --unknown: #8a641e;
  --line: #dedfd9;
  --line-strong: #c8cbc4;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

button {
  padding: 0 13px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.64);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(31, 107, 91, 0.24);
  outline-offset: 3px;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.brand,
.home-link {
  color: var(--ink);
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.9rem;
  font-weight: 680;
}

.brand-mark {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--ink);
  border-right-color: var(--accent);
  transform: rotate(45deg);
}

.home-link {
  color: var(--muted);
  font-size: 0.84rem;
}

.evaluator-tool {
  display: grid;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 60px;
  gap: 0;
}

.tool-intro {
  max-width: 900px;
  padding: 52px 0 38px;
}

.category-switch {
  display: flex;
  width: 100%;
  margin-top: 24px;
  border-bottom: 1px solid var(--line);
  gap: 22px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.category-switch a {
  flex: 0 0 auto;
  padding: 10px 1px 9px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.category-switch a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 15px;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", ui-serif, Georgia, serif;
  font-size: clamp(2.7rem, 5vw, 4.15rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.24rem;
  font-weight: 690;
  line-height: 1.3;
}

h3 {
  margin-bottom: 0;
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.4;
}

.intro {
  max-width: 720px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.contract-note {
  display: flex;
  align-items: baseline;
  max-width: 760px;
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.55;
}

.contract-note strong {
  flex: none;
  font-weight: 700;
}

.contract-note span {
  color: var(--muted);
}

.summary-strip {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-strip > div {
  display: grid;
  gap: 5px;
  padding: 17px 18px;
  border-right: 1px solid var(--line);
}

.summary-strip > div:first-child {
  padding-left: 0;
}

.summary-strip > div:last-child {
  border-right: 0;
}

.summary-strip span {
  color: var(--muted);
  font-size: 0.72rem;
}

.summary-strip strong {
  font-size: 1.35rem;
  font-weight: 680;
  line-height: 1;
}

.summary-strip [data-tone="pass"] strong {
  color: var(--pass);
}

.summary-strip [data-tone="candidate"] strong {
  color: var(--accent);
}

.summary-strip [data-tone="fail"] strong {
  color: var(--fail);
}

.summary-strip [data-tone="unknown"] strong {
  color: var(--unknown);
}

.workspace {
  display: grid;
  align-items: start;
  min-width: 0;
  padding: 36px 0 48px;
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
  gap: 46px;
}

.catalog-panel {
  position: sticky;
  top: 16px;
  display: grid;
  max-height: calc(100svh - 32px);
  min-width: 0;
  grid-template-rows: auto auto auto auto auto auto minmax(150px, 1fr) auto;
  gap: 13px;
}

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

.compact-heading {
  align-items: center;
}

.compact-heading button {
  min-height: 44px;
  border-color: transparent;
  color: var(--muted);
  font-size: 0.78rem;
}

.search-form {
  display: grid;
  gap: 7px;
}

.search-form label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 620;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.search-row input {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface);
}

.search-row input::placeholder {
  color: var(--faint);
}

.search-row button {
  color: var(--muted);
}

.status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 13px;
  padding: 3px 0 10px;
  border-bottom: 1px solid var(--line);
}

.status-filters button {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-size: 0.8rem;
  background: transparent;
}

.facet-panel {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.facet-panel > summary,
.compare-details > summary {
  min-height: 44px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 680;
  line-height: 44px;
}

.facet-grid {
  display: grid;
  padding: 5px 0 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.facet-grid label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.facet-grid label > span,
.family-toggle span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 620;
}

.facet-grid select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 0.78rem;
}

.facet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.family-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.family-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.facet-actions button {
  min-height: 40px;
  padding: 0 8px;
  border-color: transparent;
  color: var(--muted);
  font-size: 0.75rem;
}

.sort-explanation {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 0.75rem;
  line-height: 1.5;
}

.status-filters button:hover:not(:disabled) {
  background: transparent;
}

.status-filters button[aria-pressed="true"] {
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 0 -1px 0 var(--accent);
}

.tier-legend {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.result-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.result-meta p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.result-meta p:last-child {
  flex: none;
  color: var(--faint);
}

.product-list {
  min-height: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  overscroll-behavior: contain;
}

.product-card {
  display: grid;
  min-width: 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 1fr) auto;
}

.product-card.is-current {
  background: rgba(31, 107, 91, 0.045);
  box-shadow: inset 2px 0 0 var(--accent);
}

.product-select {
  display: grid;
  align-items: center;
  min-width: 0;
  min-height: 76px;
  padding: 9px 8px;
  border: 0;
  border-radius: 0;
  text-align: left;
  background: transparent;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
}

.product-select:hover {
  background: rgba(255, 255, 255, 0.55);
}

.product-thumb,
.product-image {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line);
  color: rgba(31, 107, 91, 0.5);
  background: var(--surface);
}

.product-thumb {
  width: 44px;
  height: 54px;
  border-radius: 3px;
}

.product-image {
  width: 108px;
  height: 128px;
  border-radius: 4px;
}

.product-thumb img,
.product-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  opacity: 0;
  background: var(--surface);
}

.product-image img {
  padding: 7px;
}

.product-thumb.is-loaded img,
.product-image.is-loaded img {
  opacity: 1;
}

.image-fallback {
  font-size: 0.74rem;
  font-weight: 720;
}

.product-image .image-fallback {
  font-size: 1.2rem;
}

.product-card-body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.product-card-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card-meta,
.product-card-outcome {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.family-count {
  width: fit-content;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 620;
}

.blocker-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--unknown) 26%, var(--line));
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--unknown) 5%, transparent);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
}

.product-card-outcome {
  color: var(--accent);
  font-weight: 650;
}

.compare-toggle {
  align-self: center;
  min-width: 51px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.compare-toggle[aria-pressed="true"] {
  color: var(--accent);
  font-weight: 700;
}

.status-badge,
.gate-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.status-badge {
  min-height: 23px;
  padding: 2px 0;
  font-size: 0.76rem;
}

[data-status="passed"].status-badge,
[data-tier="strict"].status-badge,
[data-gate-status="pass"] .gate-status {
  color: var(--pass);
}

[data-status="failed"].status-badge,
[data-gate-status="fail"] .gate-status {
  color: var(--fail);
}

[data-status="incomplete"].status-badge,
[data-tier="high_q1"].status-badge,
[data-tier="evidence_pending"].status-badge,
[data-tier="dual_pending"].status-badge,
[data-gate-status="unknown"] .gate-status {
  color: var(--unknown);
}

[data-tier="high_q2"].status-badge {
  color: var(--accent);
}

.empty-list,
.empty-detail {
  padding: 34px 10px;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.7;
}

.empty-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
  gap: 8px;
}

.empty-actions button {
  min-height: 42px;
  background: rgba(255, 255, 255, 0.58);
}

.empty-actions button.is-primary {
  color: var(--paper);
  border-color: var(--accent);
  background: var(--accent);
}

.empty-actions button.is-primary:hover {
  color: var(--paper);
  background: #185748;
}

.load-more {
  width: 100%;
  border-color: transparent;
  color: var(--muted);
  font-size: 0.76rem;
}

.detail-column {
  display: grid;
  min-width: 0;
  gap: 28px;
}

.compare-panel {
  min-width: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.compare-help {
  margin: 7px 0 12px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

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

.compare-summary {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compare-summary-card {
  display: grid;
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  gap: 5px;
}

.compare-summary-card h3 {
  overflow: hidden;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-summary-card p,
.compare-summary-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.compare-summary-status {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.compare-summary-cost {
  color: var(--ink) !important;
  font-weight: 680;
}

.compare-summary-issue {
  color: var(--unknown) !important;
}

.compare-highlights {
  display: flex;
  flex-wrap: wrap;
  margin-top: 4px;
  gap: 4px;
}

.compare-highlights span {
  padding: 3px 6px;
  border-radius: 999px;
  color: var(--pass);
  background: color-mix(in srgb, var(--pass) 8%, transparent);
  font-size: 0.7rem;
  font-weight: 680;
}

.compare-highlights .is-warning {
  color: var(--fail);
  background: color-mix(in srgb, var(--fail) 8%, transparent);
}

.compare-details {
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.compare-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 44px;
  padding: 4px 4px 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  gap: 5px;
}

.compare-chip span {
  max-width: 230px;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-chip button {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--muted);
}

.compare-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.compare-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.compare-table th,
.compare-table td {
  padding: 9px 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}

.compare-table th:last-child,
.compare-table td:last-child {
  border-right: 0;
}

.compare-table thead th {
  min-width: 170px;
  background: var(--surface);
}

.compare-table thead th:first-child,
.compare-table tbody th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 112px;
  color: var(--muted);
  font-weight: 620;
  background: var(--paper);
  box-shadow: 1px 0 0 var(--line);
}

.compare-table thead th:first-child {
  z-index: 2;
  background: var(--surface);
}

.compare-section-row th {
  padding: 9px 11px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.compare-product-heading {
  display: grid;
  gap: 4px;
}

.compare-product-heading strong {
  color: var(--ink);
  font-size: 0.79rem;
  line-height: 1.35;
}

.compare-product-heading > span:not(.visually-hidden) {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
}

.ingredient-fact-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 7px;
}

.ingredient-fact-list li {
  display: grid;
  gap: 2px;
}

.ingredient-fact-list li + li {
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.ingredient-fact-list span,
.comparison-data-status {
  color: var(--muted);
}

.ingredient-fact-list strong {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 650;
}

.ingredient-facts-more {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.ingredient-facts-more summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 0.68rem;
}

.ingredient-facts-more .ingredient-fact-list {
  margin-top: 8px;
}

.ingredient-copy,
.ingredient-details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.ingredient-details summary {
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  line-height: 1.55;
}

.ingredient-details summary::-webkit-details-marker {
  display: none;
}

.ingredient-details summary::after {
  display: block;
  margin-top: 5px;
  color: var(--accent);
  content: "展开标签原文";
  font-size: 0.65rem;
}

.ingredient-details[open] summary::after {
  content: "收起";
}

.ingredient-details[open] p {
  margin-top: 8px;
}

.ingredient-concern-section {
  border-left: 3px solid var(--line-strong);
  padding-left: 16px;
}

.ingredient-concern-section[data-status="flagged"] {
  border-left-color: #b18a45;
}

.ingredient-concern-section[data-status="clear"] {
  border-left-color: var(--pass);
}

.ingredient-concern-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.ingredient-concern-list {
  display: grid;
  margin: 14px 0;
  gap: 8px;
}

.ingredient-concern-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.45);
}

.ingredient-concern-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  cursor: pointer;
  gap: 12px;
}

.ingredient-concern-item summary strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.ingredient-concern-item summary span {
  color: var(--muted);
  font-size: 0.66rem;
}

.ingredient-concern-item > p,
.ingredient-concern-item > .source-list {
  margin: 0;
  padding: 0 12px 12px;
}

.ingredient-concern-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ingredient-concern-chip {
  display: inline-flex;
  padding: 3px 7px;
  border: 1px solid #ddc99e;
  border-radius: 999px;
  color: #755b26;
  background: #fbf6e9;
  font-size: 0.65rem;
}

.ingredient-concern-compare small,
.ingredient-concern-clear {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.5;
}

.product-detail {
  min-width: 0;
}

.product-hero {
  display: grid;
  align-items: start;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 22px;
}

.product-heading {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.product-heading h2 {
  max-width: 720px;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", ui-serif, Georgia, serif;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.product-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-actions a,
.product-actions button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 620;
  text-decoration: none;
  background: transparent;
}

.product-actions button[aria-pressed="true"] {
  color: var(--accent);
  border-color: rgba(31, 107, 91, 0.35);
}

.mobile-back {
  display: none !important;
}

.score-summary,
.unscored-summary {
  margin-top: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.score-summary {
  display: grid;
  align-items: center;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 24px;
}

.total-score {
  display: flex;
  align-items: baseline;
  color: var(--pass);
  gap: 6px;
}

.total-score strong {
  font-family: "Songti SC", "STSong", ui-serif, serif;
  font-size: 3.9rem;
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.total-score span {
  color: var(--muted);
  font-size: 0.7rem;
}

.score-copy h3,
.unscored-summary h3 {
  margin-bottom: 5px;
}

.score-copy p,
.unscored-summary p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.62;
}

.unscored-summary h3 {
  color: var(--unknown);
}

.unscored-summary[data-status="failed"] h3 {
  color: var(--fail);
}

.score-grid {
  display: grid;
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.score-card {
  min-width: 0;
  padding: 14px 12px;
  border-right: 1px solid var(--line);
}

.score-card:first-child {
  padding-left: 0;
}

.score-card:last-child {
  border-right: 0;
}

.score-card summary {
  display: grid;
  min-height: 54px;
  align-content: space-between;
  cursor: pointer;
  list-style: none;
  gap: 5px;
}

.score-card summary::-webkit-details-marker {
  display: none;
}

.score-card summary::after {
  content: "依据";
  color: var(--faint);
  font-size: 0.72rem;
}

.score-card[open] summary::after {
  content: "收起";
}

.score-card summary span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.score-card summary strong {
  font-size: 1.02rem;
  font-weight: 680;
}

.score-card > p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.detail-section {
  margin-top: 26px;
}

.detail-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.detail-section-heading p {
  margin-bottom: 0;
  color: var(--faint);
  font-size: 0.68rem;
}

.facts-grid {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.fact-card {
  display: grid;
  align-content: start;
  min-height: 74px;
  padding: 13px 12px;
  border-right: 1px solid var(--line);
  gap: 5px;
}

.fact-card:first-child {
  padding-left: 0;
}

.fact-card:last-child {
  border-right: 0;
}

.fact-card span {
  color: var(--muted);
  font-size: 0.74rem;
}

.fact-card strong {
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.label-stack {
  border-bottom: 1px solid var(--line);
}

.label-item {
  padding: 13px 0;
}

.label-item h4 {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 620;
}

.label-item p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.gate-list {
  border-top: 1px solid var(--line);
}

.gate-card {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.gate-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.gate-heading h4 {
  margin-bottom: 0;
  font-size: 0.84rem;
  font-weight: 680;
}

.gate-number {
  display: inline-block;
  min-width: 25px;
  color: var(--faint);
  font-size: 0.66rem;
}

.gate-status {
  flex: none;
  min-height: 24px;
  padding: 0;
  font-size: 0.76rem;
}

.gate-rationale {
  max-width: 820px;
  margin: 7px 0 0 25px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  margin: 8px 0 0 25px;
  padding: 0;
  list-style: none;
  gap: 4px 13px;
}

.source-list a {
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration-color: var(--line-strong);
}

.provenance-grid {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.provenance-card {
  display: grid;
  align-content: start;
  min-height: 78px;
  padding: 13px 12px;
  border-right: 1px solid var(--line);
  gap: 5px;
}

.provenance-card:first-child {
  padding-left: 0;
}

.provenance-card:last-child {
  border-right: 0;
}

.provenance-card span,
.provenance-card small,
.provenance-card a {
  color: var(--muted);
  font-size: 0.74rem;
}

.provenance-card strong {
  font-size: 0.8rem;
  line-height: 1.4;
}

.provenance-card[data-freshness="stale"] strong,
.freshness-warning,
[data-gate-status="restricted"] .gate-status {
  color: var(--fail);
}

.freshness-warning {
  margin: 10px 0 0;
  font-size: 0.78rem;
  line-height: 1.55;
}

.score-card .source-list {
  display: grid;
  margin-left: 0;
  gap: 4px;
}

.interaction-status {
  min-height: 1.3em;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.method-note {
  display: grid;
  align-items: start;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  grid-template-columns: minmax(170px, 0.35fr) minmax(0, 1fr);
  gap: 30px;
}

.method-note p:last-child {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

@media (max-width: 920px) {
  .workspace {
    grid-template-columns: minmax(280px, 310px) minmax(0, 1fr);
    gap: 30px;
  }

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

  .score-card:nth-child(3) {
    border-right: 0;
  }

  .score-card:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

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

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

  .fact-card:nth-child(2) {
    border-right: 0;
  }

  .fact-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .topbar,
  .evaluator-tool {
    width: min(100% - 32px, 1180px);
  }

  .topbar {
    padding: 17px 0;
  }

  .tool-intro {
    padding: 34px 0 26px;
  }

  .category-switch {
    width: 100%;
    margin-top: 12px;
    overflow-x: auto;
  }

  h1 {
    font-size: clamp(2.45rem, 12vw, 3.35rem);
  }

  .intro {
    font-size: 0.92rem;
  }

  .contract-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .workspace,
  .method-note {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 28px 0 40px;
    gap: 30px;
  }

  .catalog-panel {
    position: static;
    max-height: none;
    scroll-margin-top: 12px;
    grid-template-rows: auto;
  }

  .product-list {
    max-height: 350px;
  }

  .detail-column {
    gap: 22px;
  }

  .product-detail {
    scroll-margin-top: 12px;
  }

  .mobile-back {
    display: inline-flex !important;
  }

  .method-note {
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip > div {
    padding: 13px 12px;
  }

  .summary-strip > div:first-child,
  .summary-strip > div:nth-child(3) {
    padding-left: 0;
  }

  .summary-strip > div:nth-child(2) {
    border-right: 0;
  }

  .summary-strip > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .summary-strip > div:nth-child(4) {
    border-right: 0;
  }

  .summary-strip > div:nth-child(3),
  .summary-strip > div:nth-child(4) {
    border-bottom: 1px solid var(--line);
  }

  .summary-strip > div:nth-child(5) {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .summary-strip strong {
    font-size: 1.2rem;
  }

  .result-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .facet-grid,
  .compare-summary,
  .provenance-grid {
    grid-template-columns: 1fr;
  }

  .facet-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .provenance-card,
  .provenance-card:first-child {
    min-height: 0;
    padding: 10px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .provenance-card:last-child {
    border-bottom: 0;
  }

  .product-hero {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .product-image {
    width: 82px;
    height: 100px;
  }

  .product-heading h2 {
    font-size: 1.25rem;
  }

  .score-summary {
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 12px;
  }

  .total-score {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
  }

  .total-score strong {
    font-size: 3rem;
  }

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

  .score-card,
  .score-card:first-child {
    padding: 12px 9px;
  }

  .score-card:nth-child(2n) {
    border-right: 0;
  }

  .score-card:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .score-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .score-card:last-child {
    grid-column: 1 / -1;
    border-right: 0;
  }

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

  .fact-card,
  .fact-card:first-child {
    padding: 11px 9px;
  }

  .gate-rationale,
  .source-list {
    margin-left: 0;
  }
}

@media (max-width: 360px) {
  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row button {
    width: 100%;
  }

  .product-hero {
    grid-template-columns: 1fr;
  }

  .product-image {
    width: 74px;
    height: 90px;
  }
}

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

/* Ranking explorer redesign */
[hidden] {
  display: none !important;
}

.topbar,
.evaluator-tool {
  width: min(1280px, calc(100% - 64px));
}

.topbar {
  padding: 20px 0;
}

.top-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.top-links a {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.top-links a:hover {
  color: var(--accent);
}

.evaluator-tool {
  padding-bottom: 84px;
}

.tool-intro {
  display: grid;
  align-items: end;
  max-width: none;
  padding: 28px 0 22px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  gap: 72px;
}

.tool-intro h1 {
  margin-bottom: 12px;
  font-size: clamp(2.85rem, 4vw, 3.45rem);
}

.intro-copy .intro {
  max-width: 690px;
  margin-bottom: 14px;
}

.ranking-contract {
  display: none;
  align-items: baseline;
  margin: 0;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
}

.ranking-contract strong {
  color: var(--accent);
  font-weight: 720;
}

.quick-evaluate {
  align-self: center;
  justify-self: end;
  width: min(100%, 440px);
  text-align: right;
}

.quick-evaluate > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 680;
  list-style: none;
}

.quick-evaluate > summary::-webkit-details-marker {
  display: none;
}

.quick-evaluate[open] > summary {
  margin-bottom: 10px;
  color: var(--accent);
  border-color: var(--accent);
}

.quick-evaluate-form {
  display: grid;
  gap: 7px;
  text-align: left;
}

.quick-evaluate-form label {
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 680;
}

.quick-evaluate-form p {
  margin: 0;
  color: var(--faint);
  font-size: 0.7rem;
}

.quick-evaluate-form .search-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.quick-evaluate-form input {
  width: 100%;
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
}

.guided-chooser {
  margin: 8px 0 54px;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.48);
}

.guided-heading {
  display: grid;
  align-items: end;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 56px;
}

.guided-heading h2,
.guided-result h3 {
  margin: 4px 0 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", ui-serif, Georgia, serif;
}

.guided-heading > p,
.guided-result-heading > p,
.guided-notice > p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.guided-form {
  display: grid;
  padding: 28px 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.guided-step {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
}

fieldset.guided-step {
  display: grid;
  gap: 10px;
}

.guided-step legend,
.guided-step-label {
  display: block;
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.guided-step legend span,
.guided-step-label b {
  margin-right: 7px;
  color: var(--accent);
  font-size: 0.7rem;
}

.guided-step > label:not([for]) {
  display: grid;
  align-items: start;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
}

.guided-step input[type="radio"] {
  margin-top: 3px;
}

.guided-step label strong,
.guided-step label small,
.guided-step > small {
  display: block;
}

.guided-step label strong {
  font-size: 0.76rem;
}

.guided-step label small,
.guided-step > small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 0.68rem;
  line-height: 1.5;
}

.guided-step select {
  width: 100%;
  min-height: 44px;
  margin-bottom: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.guided-actions {
  display: flex;
  align-items: center;
  padding-top: 2px;
  grid-column: 1 / -1;
  gap: 16px;
}

.guided-actions button,
.guided-notice button,
.advanced-entry button,
.advanced-mode-toolbar button,
.guided-candidate button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: white;
  background: var(--accent);
  font-weight: 700;
}

.guided-actions p {
  margin: 0;
  color: var(--faint);
  font-size: 0.72rem;
}

.guided-result {
  padding: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(31, 107, 91, 0.035);
}

.guided-result > p {
  margin: 0;
  color: var(--muted);
}

.guided-outcome-label {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guided-notice h3,
.guided-result-heading h3 {
  margin: 8px 0 10px;
}

.guided-notice button {
  margin-top: 18px;
}

.guided-candidate-grid {
  display: grid;
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.guided-candidate {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.guided-candidate-rank {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 760;
}

.guided-candidate h4 {
  overflow-wrap: anywhere;
  margin: 8px 0;
  font-size: 0.93rem;
  line-height: 1.45;
}

.guided-candidate p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.58;
}

.guided-candidate .guided-source-status {
  color: var(--faint);
}

.guided-candidate button {
  width: 100%;
  margin-top: auto;
  color: var(--accent);
  background: transparent;
}

.advanced-entry,
.advanced-mode-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.supplement-guide-links {
  display: flex;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  gap: 20px;
  color: var(--muted);
  font-size: 0.76rem;
}

.supplement-guide-links strong {
  color: var(--ink);
}

.supplement-guide-links a {
  color: var(--accent);
  text-underline-offset: 4px;
}

.advanced-entry {
  padding-top: 24px;
}

.advanced-entry div {
  display: grid;
  gap: 4px;
}

.advanced-entry span,
.advanced-mode-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.advanced-entry button,
.advanced-mode-toolbar button {
  flex: 0 0 auto;
  color: var(--accent);
  background: transparent;
}

.advanced-mode-toolbar {
  margin: 8px 0 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ranking-workspace {
  display: grid;
  align-items: start;
  padding: 0 0 54px;
  border-top: 1px solid var(--line);
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 34px;
}

.ranking-sidebar {
  position: sticky;
  top: 18px;
  padding-top: 28px;
}

.ranking-sidebar h2 {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 680;
}

.ranking-nav {
  display: grid;
  border-top: 1px solid var(--line);
}

.ranking-nav button {
  display: grid;
  min-height: 70px;
  padding: 12px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  gap: 4px;
}

.ranking-nav button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.42);
}

.ranking-nav button[aria-current="true"] {
  padding-left: 11px;
  color: var(--accent);
  background: rgba(31, 107, 91, 0.035);
  box-shadow: inset 2px 0 0 var(--accent);
}

.ranking-nav strong {
  font-size: 0.9rem;
  font-weight: 710;
}

.ranking-nav span {
  color: var(--muted);
  font-size: 0.7rem;
}

.sidebar-method {
  display: grid;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  gap: 7px;
}

.sidebar-method strong,
.sidebar-method p,
.sidebar-method a {
  font-size: 0.72rem;
  line-height: 1.55;
}

.sidebar-method p {
  margin: 0;
  color: var(--muted);
}

.ranking-main {
  min-width: 0;
  padding-top: 28px;
}

.ranking-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  min-height: 76px;
  padding-bottom: 18px;
  gap: 24px;
}

.ranking-heading h2 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", ui-serif, Georgia, serif;
  font-size: 2rem;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.ranking-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.ranking-heading .section-kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.64rem;
}

.ranking-heading .catalog-updated {
  flex: none;
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 0.68rem;
}

.ranking-main .facet-panel {
  padding: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.ranking-main .facet-panel > summary {
  display: none;
}

.ranking-main .facet-grid {
  display: grid;
  padding: 14px 0 12px;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
}

.ranking-main .facet-grid label {
  gap: 5px;
}

.ranking-main .facet-grid label > span {
  font-size: 0.68rem;
}

.ranking-main .facet-grid select {
  min-height: 40px;
  border-radius: 3px;
  background-color: rgba(255, 255, 255, 0.54);
  font-size: 0.74rem;
}

.ranking-main .facet-actions {
  justify-content: flex-start;
  padding: 2px 0 8px;
  gap: 24px;
}

.strict-toggle,
.brand-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ranking-main .family-toggle {
  display: none;
}

.strict-toggle input,
.brand-toggle input,
.ranking-main .family-toggle input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.strict-toggle span,
.brand-toggle span,
.ranking-main .family-toggle span {
  color: var(--muted);
  font-size: 0.72rem;
}

.ranking-main #reset-product-filters {
  min-height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.ranking-main .sort-explanation {
  display: none;
}

.ranking-main .result-meta {
  min-height: 42px;
  padding: 11px 0 8px;
}

.ranking-main .result-meta p {
  color: var(--ink);
  font-size: 0.76rem;
}

.ranking-columns,
.product-card,
.brand-group-summary {
  display: grid;
  grid-template-columns:
    58px minmax(180px, 1.65fr) minmax(105px, 0.9fr) minmax(170px, 1.45fr)
    minmax(106px, 0.8fr) 76px 92px 52px;
}

.ranking-columns {
  min-height: 34px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.65rem;
}

.ranking-columns span {
  padding: 0 8px;
}

.ranking-columns span:first-child {
  padding-left: 6px;
}

.ranking-main .product-list {
  max-height: none;
  overflow: visible;
  border-top: 0;
}

.product-card {
  align-items: center;
  min-height: 82px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.brand-group-summary {
  width: 100%;
  min-height: 78px;
  padding: 0;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  text-align: left;
  background: rgba(31, 107, 91, 0.022);
}

.brand-group-summary:hover,
.brand-group-summary:focus-visible {
  color: var(--ink);
  background: rgba(31, 107, 91, 0.055);
}

.brand-group[data-expanded="true"] > .brand-group-summary {
  background: rgba(31, 107, 91, 0.065);
  box-shadow: inset 2px 0 0 var(--accent);
}

.brand-group-summary > * {
  min-width: 0;
  padding: 12px 8px;
}

.brand-group-disclosure {
  color: var(--accent);
  font-family: "Songti SC", "STSong", ui-serif, Georgia, serif;
  font-size: 1.55rem;
  line-height: 1;
  text-align: center;
}

.brand-group-identity,
.brand-group-form,
.brand-group-status,
.brand-group-score {
  display: grid;
  align-content: center;
  gap: 4px;
}

.brand-group-identity strong {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-group-identity span,
.brand-group-form span,
.brand-group-status span,
.brand-group-score span {
  color: var(--faint);
  font-size: 0.64rem;
  line-height: 1.35;
}

.brand-group-form strong,
.brand-group-status strong {
  font-size: 0.72rem;
  font-weight: 630;
  line-height: 1.35;
}

.brand-group-reason {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.brand-group-score strong {
  color: var(--accent);
  font-size: 0.76rem;
}

.brand-group-cost {
  color: var(--ink);
  font-size: 0.7rem;
  white-space: nowrap;
}

.brand-group-action {
  color: var(--accent);
  font-size: 0.67rem;
  font-weight: 690;
  text-align: right;
}

.brand-group-products {
  background: rgba(31, 107, 91, 0.018);
  box-shadow: inset 2px 0 0 rgba(31, 107, 91, 0.18);
}

.brand-group-products .product-card {
  padding-left: 10px;
}

.product-card.is-current {
  background: rgba(31, 107, 91, 0.035);
  box-shadow: inset 2px 0 0 var(--accent);
}

.product-card > * {
  min-width: 0;
  padding: 13px 8px;
}

.rank-number {
  color: var(--accent);
  font-family: "Songti SC", "STSong", ui-serif, Georgia, serif;
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1;
}

.rank-number.is-candidate {
  color: var(--unknown);
  font-family: inherit;
  font-size: 0.64rem;
  font-weight: 680;
}

.product-card .product-select {
  display: block;
  min-height: 0;
  padding: 13px 8px;
  border: 0;
  border-radius: 0;
  text-align: left;
  background: transparent;
}

.product-card .product-select:hover {
  color: var(--accent);
  background: transparent;
}

.product-card-body {
  display: grid;
  gap: 5px;
}

.product-card-title {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.82rem;
  font-weight: 690;
  line-height: 1.38;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-card-meta,
.ranking-form span,
.candidate-note {
  color: var(--faint);
  font-size: 0.66rem;
  line-height: 1.4;
}

.ranking-form,
.ranking-status {
  display: grid;
  align-content: center;
  gap: 5px;
}

.ranking-form strong {
  font-size: 0.75rem;
  font-weight: 610;
  line-height: 1.35;
}

.ranking-reason {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.ranking-status .status-badge {
  width: fit-content;
  padding: 0;
  color: var(--pass);
  background: transparent;
  font-size: 0.7rem;
}

.ranking-status .status-badge[data-tier^="high_"] {
  color: var(--unknown);
}

.ranking-status .status-badge[data-status="incomplete"] {
  color: var(--unknown);
}

.ranking-status .status-badge[data-status="failed"] {
  color: var(--fail);
}

.ranking-status .blocker-chip {
  width: fit-content;
  margin: 0;
  font-size: 0.64rem;
}

.ranking-score {
  color: var(--accent);
  font-family: "Songti SC", "STSong", ui-serif, Georgia, serif;
  font-size: 1.38rem;
  line-height: 1;
  white-space: nowrap;
}

.product-card[data-eligibility="provisional"] .ranking-score {
  color: var(--unknown);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.product-card[data-eligibility="blocked"] .ranking-score {
  color: var(--faint);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 650;
}

.ranking-cost {
  color: var(--ink);
  font-size: 0.72rem;
  white-space: nowrap;
}

.product-card .compare-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.product-card .compare-toggle[aria-pressed="true"] {
  color: var(--accent);
  font-weight: 700;
}

.ranking-divider {
  display: flex;
  align-items: baseline;
  padding: 20px 6px 13px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}

.ranking-divider strong {
  color: var(--unknown);
  font-family: "Songti SC", "STSong", ui-serif, Georgia, serif;
  font-size: 1.08rem;
  font-weight: 620;
}

.ranking-divider span {
  color: var(--muted);
  font-size: 0.7rem;
}

.ranking-divider[data-eligibility="formal"] strong {
  color: var(--pass);
}

.ranking-divider[data-eligibility="blocked"] strong {
  color: var(--fail);
}

.assessment-range {
  display: grid;
  width: fit-content;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  gap: 4px;
}

.assessment-range strong {
  color: var(--unknown);
  font-family: "Songti SC", "STSong", ui-serif, Georgia, serif;
  font-size: 2rem;
  font-weight: 520;
  line-height: 1;
}

.assessment-range span,
.assessment-range small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.55;
}

.assessment-range small {
  max-width: 620px;
}

.assessment-range[data-eligibility="blocked"] strong {
  color: var(--fail);
}

.ranking-main .load-more {
  display: block;
  min-width: 220px;
  margin: 22px auto 0;
  border-color: var(--accent);
  color: var(--accent);
}

.detail-column {
  display: contents;
}

.detail-drawer {
  position: fixed;
  z-index: 40;
  inset: 0 0 0 auto;
  width: min(720px, calc(100% - 48px));
  max-height: none;
  padding: 30px 34px 60px;
  overflow: auto;
  border-left: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: none;
}

.detail-drawer .mobile-back {
  display: inline-flex !important;
}

.compare-dock {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: 18px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 10px max(18px, calc((100% - 1240px) / 2));
  border: 1px solid var(--line-strong);
  background: rgba(247, 247, 243, 0.97);
  backdrop-filter: blur(12px);
  gap: 20px;
}

.compare-dock > div {
  display: flex;
  align-items: baseline;
  min-width: 0;
  gap: 16px;
}

.compare-dock strong {
  flex: none;
  color: var(--accent);
  font-size: 0.82rem;
}

.compare-dock span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-dock button {
  min-width: 112px;
  border-color: var(--accent);
  color: var(--accent);
}

.compare-sheet {
  position: fixed;
  z-index: 50;
  inset: 6vh 5vw;
  max-height: 88vh;
  padding: 28px 32px 40px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: none;
}

.sheet-actions {
  display: flex;
  gap: 8px;
}

.interaction-status {
  position: fixed;
  z-index: 60;
  right: 24px;
  bottom: 92px;
  min-height: 0;
  color: var(--ink);
  background: var(--paper);
  pointer-events: none;
}

.method-note {
  margin-top: 0;
  padding-top: 32px;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 34px;
}

.method-copy {
  display: grid;
  max-width: 850px;
  gap: 8px;
}

.method-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.strict-preview-section {
  padding-top: 2px;
}

.strict-preview-summary {
  display: grid;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
}

.strict-preview-outcome,
.strict-preview-copy {
  display: grid;
  align-content: center;
  gap: 5px;
}

.strict-preview-outcome strong {
  color: var(--accent);
  font-family: "Songti SC", "STSong", ui-serif, Georgia, serif;
  font-size: 2rem;
  font-weight: 520;
  line-height: 1;
}

.strict-preview-section[data-eligibility="provisional"] .strict-preview-outcome strong {
  color: var(--unknown);
}

.strict-preview-section[data-eligibility="blocked"] .strict-preview-outcome strong {
  color: var(--fail);
}

.strict-preview-outcome > span:last-child,
.strict-preview-copy small {
  color: var(--faint);
  font-size: 0.7rem;
  line-height: 1.5;
}

.strict-preview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}

.strict-gate-list {
  display: grid;
  border-bottom: 1px solid var(--line);
}

.strict-gate-card {
  padding: 0;
  border-top: 1px solid var(--line);
}

.strict-gate-card:first-child {
  border-top: 0;
}

.strict-gate-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  cursor: pointer;
  list-style: none;
  gap: 16px;
}

.strict-gate-card summary::-webkit-details-marker {
  display: none;
}

.strict-gate-title {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 670;
  gap: 11px;
}

.strict-gate-card > p {
  max-width: 600px;
  margin: -3px 0 14px 39px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.65;
}

.strict-gate-card > .source-list {
  margin: -5px 0 16px 39px;
}

.strict-component-grid {
  display: grid;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strict-component-item {
  display: grid;
  padding: 12px;
  border-right: 1px solid var(--line);
  gap: 4px;
}

.strict-component-item:nth-child(3n) {
  border-right: 0;
}

.strict-component-item:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}

.strict-component-item span {
  color: var(--faint);
  font-size: 0.66rem;
}

.strict-component-item strong {
  font-size: 0.8rem;
  font-weight: 670;
}

.strict-boundaries {
  margin-top: 15px;
  color: var(--muted);
  font-size: 0.73rem;
}

.strict-boundaries summary {
  min-height: 38px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 670;
}

.strict-boundaries ul {
  margin: 5px 0 0 18px;
  padding: 0;
  line-height: 1.7;
}

@media (max-width: 1080px) {
  .tool-intro {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 38px;
  }

  .ranking-workspace {
    grid-template-columns: 184px minmax(0, 1fr);
    gap: 24px;
  }

  .ranking-columns,
  .product-card,
  .brand-group-summary {
    grid-template-columns: 48px minmax(170px, 1.5fr) 100px minmax(150px, 1.25fr) 98px 68px 84px 48px;
  }

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

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

@media (max-width: 820px) {
  .topbar,
  .evaluator-tool {
    width: min(100% - 32px, 1280px);
  }

  .top-links {
    gap: 15px;
  }

  .top-links a:first-child {
    display: none;
  }

  .tool-intro {
    padding: 32px 0 26px;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .tool-intro h1 {
    overflow-wrap: anywhere;
    font-size: clamp(2.2rem, 10.5vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }

  .guided-chooser {
    padding: 22px 18px;
  }

  .guided-heading {
    align-items: start;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .guided-candidate-grid {
    grid-template-columns: 1fr;
  }

  .ranking-contract {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .ranking-workspace {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .ranking-main,
  .ranking-main .product-list,
  .brand-group,
  .brand-group-summary {
    min-width: 0;
    max-width: 100%;
  }

  .ranking-sidebar {
    position: static;
    padding-top: 22px;
  }

  .ranking-sidebar h2,
  .sidebar-method {
    display: none;
  }

  .ranking-nav {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .ranking-nav::-webkit-scrollbar {
    display: none;
  }

  .ranking-nav button {
    flex: 0 0 auto;
    min-height: 52px;
    padding: 8px 15px;
    border-bottom: 0;
  }

  .ranking-nav button[aria-current="true"] {
    padding-left: 15px;
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .ranking-nav span {
    display: none;
  }

  .ranking-main {
    padding-top: 20px;
  }

  .ranking-heading {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    gap: 4px;
  }

  .ranking-main .facet-panel > summary {
    display: block;
  }

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

  .ranking-columns {
    display: none;
  }

  .product-card,
  .brand-group-summary {
    position: relative;
    min-height: 0;
    padding: 14px 0;
    grid-template-columns: 44px minmax(0, 1fr) 52px;
  }

  .product-card > *,
  .brand-group-summary > * {
    padding: 5px 7px;
  }

  .brand-group-disclosure {
    align-self: start;
    grid-column: 1;
    grid-row: 1 / span 5;
  }

  .brand-group-identity {
    grid-column: 2;
    grid-row: 1;
  }

  .brand-group-form,
  .brand-group-reason,
  .brand-group-status,
  .brand-group-cost {
    grid-column: 2;
  }

  .brand-group-form {
    grid-row: 2;
  }

  .brand-group-reason {
    grid-row: 3;
  }

  .brand-group-status {
    grid-row: 4;
  }

  .brand-group-cost {
    grid-row: 5;
  }

  .brand-group-score {
    display: none;
  }

  .brand-group-action {
    align-self: start;
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .brand-group-products .product-card {
    padding-left: 6px;
  }

  .rank-number {
    align-self: start;
    grid-column: 1;
    grid-row: 1 / span 3;
  }

  .product-card .product-select {
    padding: 5px 7px;
    grid-column: 2;
    grid-row: 1;
  }

  .ranking-form,
  .ranking-reason,
  .ranking-status {
    grid-column: 2;
  }

  .ranking-form {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .ranking-score,
  .ranking-cost {
    display: inline-block;
    grid-column: 2;
  }

  .product-card .compare-toggle {
    align-self: start;
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .ranking-divider {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .detail-drawer {
    width: 100%;
    padding: 22px 18px 60px;
  }

  .compare-dock {
    right: 8px;
    bottom: 8px;
    left: 8px;
    min-height: 58px;
    padding: 8px 12px;
  }

  .compare-dock > div {
    display: grid;
    gap: 2px;
  }

  .compare-sheet {
    inset: 0;
    max-height: none;
    padding: 22px 16px 50px;
  }

  .method-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .strict-preview-summary {
    grid-template-columns: 130px minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .top-links a:nth-child(2) {
    display: none;
  }

  .quick-evaluate .search-row {
    grid-template-columns: 1fr auto;
  }

  .guided-form {
    grid-template-columns: 1fr;
  }

  .guided-actions,
  .advanced-entry,
  .advanced-mode-toolbar,
  .supplement-guide-links {
    align-items: stretch;
    flex-direction: column;
  }

  .guided-actions button,
  .advanced-entry button,
  .advanced-mode-toolbar button {
    width: 100%;
  }

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

  .ranking-main .facet-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .ranking-main #reset-product-filters {
    margin-left: 0;
  }

  .ranking-reason {
    display: none;
  }

  .compare-dock #compare-dock-names {
    max-width: 160px;
  }

  .strict-preview-summary {
    grid-template-columns: 1fr;
    gap: 13px;
  }

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

  .strict-component-item:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .strict-component-item:nth-child(2n) {
    border-right: 0;
  }

  .strict-component-item:nth-child(3) {
    border-top: 1px solid var(--line);
  }
}
