:root {
  --paper: #f7f2e8;
  --paper-deep: #eee6d8;
  --wine: #7b3345;
  --wine-deep: #592131;
  --sage: #718276;
  --sage-deep: #526258;
  --sage-light: #dfe5df;
  --ink: #2f332e;
  --ink-soft: #62665f;
  --line: rgba(47, 51, 46, 0.2);
  --line-strong: rgba(47, 51, 46, 0.36);
  --white: #fffdf8;
  --warning: #8b5b22;
  --danger: #922f3e;
  --focus: #1263a0;
  --shadow: 0 18px 46px rgba(56, 39, 35, 0.08);
  --font-serif: "Yu Mincho", "Hiragino Mincho ProN", "Hiragino Mincho Pro",
    "Noto Serif JP", serif;
  --font-sans: "Avenir Next", "Helvetica Neue", "Yu Gothic",
    "Hiragino Kaku Gothic ProN", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(47, 51, 46, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 51, 46, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--wine);
}

main a:not(.button):not(.card):not(.tag) {
  text-decoration-thickness: 1px;
}

button,
input,
select {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-180%);
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(1440px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  border-inline: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.9);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 17px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 232, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--wine);
  color: var(--paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.brand-copy small {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 13px;
  font-weight: 700;
}

.header-nav a {
  text-decoration: none;
}

.header-nav .search-link {
  padding: 9px 13px;
  border: 1px solid var(--wine);
  color: var(--wine);
}

.header-nav .search-link:hover {
  background: var(--wine);
  color: var(--white);
}

.header-nav .back-link {
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--ink-soft);
}

.breadcrumbs {
  padding: 14px clamp(20px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
  margin-left: 7px;
  content: "/";
}

.breadcrumbs a {
  color: var(--ink-soft);
}

main {
  display: block;
}

.hero,
.page-hero {
  position: relative;
  padding: clamp(70px, 9vw, 118px) clamp(24px, 7vw, 104px);
  border-bottom: 1px solid var(--line);
}

.hero::before,
.page-hero::before {
  position: absolute;
  top: 0;
  left: clamp(24px, 7vw, 104px);
  width: 1px;
  height: 34px;
  background: var(--wine);
  content: "";
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.65fr);
  gap: clamp(44px, 7vw, 110px);
  align-items: end;
}

.page-hero {
  padding-block: clamp(58px, 7vw, 88px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1.34;
  letter-spacing: -0.04em;
}

.page-hero h1 {
  font-size: clamp(31px, 4vw, 48px);
}

.hero-lead,
.page-lead {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 2;
}

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

.hero-note {
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.62);
}

.hero-note dt {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-note dd {
  margin: 4px 0 18px;
  font-family: var(--font-serif);
  font-size: 22px;
}

.hero-note dd:last-child {
  margin-bottom: 0;
}

.button,
button.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--wine);
  border-radius: 2px;
  background: var(--wine);
  color: var(--white);
  cursor: pointer;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.button:hover {
  background: var(--wine-deep);
  color: var(--white);
}

.button-secondary,
button.button-secondary {
  background: transparent;
  color: var(--wine);
}

.button-secondary:hover {
  background: var(--white);
  color: var(--wine-deep);
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 16px clamp(20px, 6vw, 88px);
  border-bottom: 1px solid rgba(139, 91, 34, 0.3);
  background: #fff1d7;
  color: #5e3a10;
  font-size: 13px;
}

.notice strong {
  white-space: nowrap;
}

.content {
  padding: clamp(58px, 8vw, 104px) clamp(20px, 6vw, 88px);
}

.content-narrow {
  max-width: 960px;
  margin-inline: auto;
}

.section {
  max-width: 1180px;
  margin: 0 auto clamp(68px, 8vw, 112px);
}

.section:last-child {
  margin-bottom: 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.45;
}

.section-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.section-link {
  color: var(--wine);
  font-size: 13px;
  font-weight: 800;
}

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

.stat {
  min-width: 0;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.45);
}

.stat dt {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.stat dd {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.stat small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 76px);
}

.three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 52px);
}

.panel {
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.5);
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.5);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

caption {
  padding: 14px 16px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: left;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(113, 130, 118, 0.09);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: rgba(255, 253, 248, 0.75);
}

.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cell-main {
  display: block;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.cell-sub {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.data-state {
  display: inline-flex;
  width: fit-content;
  margin-top: 7px;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.bar-cell {
  min-width: 150px;
}

.ranking-module {
  min-width: 0;
}

.ranking-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.ranking-toolbar select {
  width: auto;
  min-width: 150px;
  min-height: 38px;
  padding: 6px 34px 6px 10px;
}

.ranking-toolbar output {
  min-width: 112px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rank-cell {
  width: 62px;
}

.rank-number {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.ranking-policy-note {
  max-width: 820px;
  margin: -12px 0 30px;
  color: var(--ink-soft);
  font-size: 13px;
}

.grape-ranking-groups {
  display: grid;
  gap: clamp(28px, 5vw, 52px);
}

.grape-ranking-group {
  min-width: 0;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.48);
}

.ranking-group-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.ranking-group-heading .eyebrow,
.ranking-group-heading h3 {
  margin: 0;
}

.ranking-group-heading h3 {
  margin-top: 4px;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 34px);
}

.ranking-group-swatch {
  width: 11px;
  height: 48px;
  border-radius: 999px;
  background: var(--wine);
}

.grape-ranking-white .ranking-group-swatch,
.grape-ranking-white .bar {
  background: #ae8e48;
}

.grape-ranking-other .ranking-group-swatch,
.grape-ranking-other .bar {
  background: var(--sage);
}

.ranking-group-note {
  margin: -8px 0 20px;
  font-size: 13px;
}

.bar-track {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--sage-light);
}

.bar {
  display: block;
  height: 100%;
  transform-origin: left center;
  border-radius: inherit;
  background: var(--wine);
}

.bar-0 { width: 0; }
.bar-5 { width: 5%; }
.bar-10 { width: 10%; }
.bar-15 { width: 15%; }
.bar-20 { width: 20%; }
.bar-25 { width: 25%; }
.bar-30 { width: 30%; }
.bar-35 { width: 35%; }
.bar-40 { width: 40%; }
.bar-45 { width: 45%; }
.bar-50 { width: 50%; }
.bar-55 { width: 55%; }
.bar-60 { width: 60%; }
.bar-65 { width: 65%; }
.bar-70 { width: 70%; }
.bar-75 { width: 75%; }
.bar-80 { width: 80%; }
.bar-85 { width: 85%; }
.bar-90 { width: 90%; }
.bar-95 { width: 95%; }
.bar-100 { width: 100%; }

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

.card {
  display: flex;
  min-width: 0;
  min-height: 180px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.5);
  color: inherit;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--wine);
  box-shadow: var(--shadow);
  color: inherit;
}

.card:focus-visible {
  border-color: var(--wine);
  box-shadow: var(--shadow);
}

.card-kicker {
  margin-bottom: 13px;
  color: var(--wine);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card h3 {
  margin: 0;
  font-size: 21px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.card p {
  margin: 9px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: auto;
  padding-top: 20px;
  color: var(--ink-soft);
  font-size: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag,
.confidence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.68);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.confidence::before {
  content: "根拠";
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

.confidence-guide-item {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.5);
}

.confidence-guide-item p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
}

.data-policy-note {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-left: 3px solid var(--sage);
  background: rgba(113, 130, 118, 0.08);
  color: var(--ink-soft);
  font-size: 13px;
}

.confidence-official,
.confidence-A {
  border-color: var(--sage);
  background: #e7eee8;
}

.confidence-related,
.confidence-stakeholder,
.confidence-B {
  border-color: #8a7b50;
  background: #f2ead2;
}

.confidence-multiple,
.confidence-multiple_match,
.confidence-C {
  border-color: #6d8290;
  background: #e5edf1;
}

.confidence-single,
.confidence-single_participant,
.confidence-D {
  border-color: #a76d46;
  background: #f7e7dc;
}

.confidence-unverified,
.confidence-E {
  border-color: #9d6d75;
  background: #f4e2e6;
}

.definition-list {
  display: grid;
  grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.definition-list dt,
.definition-list dd {
  min-width: 0;
  margin: 0;
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
}

.definition-list dt {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.definition-list dd {
  overflow-wrap: anywhere;
}

.source-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-item {
  padding: 18px;
  border-left: 3px solid var(--sage);
  background: rgba(255, 253, 248, 0.55);
}

.source-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.source-item p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.affiliate-module {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(108, 37, 62, 0.24);
  background:
    linear-gradient(135deg, rgba(108, 37, 62, 0.07), transparent 44%),
    rgba(255, 253, 248, 0.72);
}

.affiliate-disclosure {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-left: 3px solid var(--wine);
  background: rgba(255, 253, 248, 0.74);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.affiliate-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.affiliate-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
}

.affiliate-kind {
  margin: 0 0 10px;
  color: var(--wine);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.affiliate-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}

.affiliate-link strong {
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.affiliate-link:hover strong,
.affiliate-link:focus-visible strong {
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.affiliate-cta {
  align-self: flex-start;
  margin-top: auto;
  color: var(--wine);
  font-size: 12px;
  font-weight: 900;
}

.affiliate-shop,
.affiliate-card-note {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.affiliate-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 11px;
}

.affiliate-notice p {
  margin: 0;
}

.coverage-overview {
  margin-top: 30px;
}

.coverage-overview h3 {
  margin-bottom: 8px;
}

.coverage-badge,
.evidence-relationship,
.difference-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.coverage-complete,
.relationship-supports {
  border-color: var(--sage);
  background: #e9efe8;
}

.coverage-partial,
.relationship-supplements {
  border-color: #b88942;
  background: #fbf0d9;
}

.coverage-not_collected,
.coverage-unavailable,
.relationship-conflicts,
.difference-label {
  border-color: #a76d46;
  background: #f7e7dc;
}

.coverage-detail {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.62);
}

.coverage-detail > p {
  margin: 0 0 10px;
}

.coverage-detail dl {
  display: grid;
  gap: 8px 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0 0;
}

.coverage-detail dl div {
  min-width: 0;
}

.coverage-detail dt {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.coverage-detail dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.original-labels {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.original-labels summary {
  padding: 13px 0 8px;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
}

.original-labels .table-wrap {
  margin-top: 10px;
}

.original-labels th,
.original-labels td {
  font-size: 12px;
}

.value-difference {
  background: rgba(247, 231, 220, 0.45);
}

.difference-label {
  margin-left: 8px;
}

.empty-state,
.error-state,
.loading-state {
  padding: 46px 24px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 253, 248, 0.45);
  text-align: center;
}

.error-state {
  border-color: var(--danger);
}

.empty-state h2,
.error-state h2,
.loading-state h2 {
  margin-top: 0;
}

.compact-state {
  margin-top: 14px;
  padding-block: 20px;
}

.compact-state p {
  margin: 0;
}

.change-summary {
  margin-top: 18px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  background: rgba(113, 130, 118, 0.08);
}

.change-summary h3 {
  margin: 0;
  font-size: 22px;
}

.change-summary dl {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr;
  gap: 1px;
  margin: 20px 0 0;
  background: var(--line);
}

.change-summary dl div {
  min-width: 0;
  padding: 16px;
  background: var(--white);
}

.change-summary dt {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
}

.change-summary dd {
  margin: 7px 0 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.search-panel {
  max-width: 1180px;
  margin: 0 auto 38px;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.65);
  box-shadow: var(--shadow);
}

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

.checkbox-field {
  margin: 0;
  padding: 0;
  border: 0;
}

.facet {
  min-width: 0;
  border: 1px solid var(--line-strong);
  background: var(--white);
}

.facet > summary {
  min-height: 45px;
  padding: 10px 14px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.facet[open] > summary {
  border-bottom: 1px solid var(--line);
  background: rgba(113, 130, 118, 0.08);
}

.facet .checkbox-field {
  padding: 16px;
}

.facet-search-label {
  font-size: 12px;
  font-weight: 800;
}

.facet [data-grape-filter] {
  margin: 7px 0 8px;
}

.check-option[hidden] {
  display: none;
}

.checkbox-field legend {
  padding: 0;
  font-size: 12px;
  font-weight: 800;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 2px;
}

.check-option {
  display: grid;
  min-width: 0;
  min-height: 45px;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.check-option:hover {
  border-color: var(--wine);
}

.check-option:has(input:checked) {
  border-color: var(--wine);
  background: rgba(123, 51, 69, 0.08);
  box-shadow: inset 3px 0 var(--wine);
}

.check-option input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--wine);
}

.check-option span {
  overflow-wrap: anywhere;
}

.search-help {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.search-help summary {
  width: fit-content;
  margin-top: 14px;
  color: var(--wine);
  cursor: pointer;
  font-weight: 800;
}

.search-help p {
  max-width: 780px;
  margin-bottom: 0;
}

.field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.field-wide {
  grid-column: span 2;
}

.field label,
.field-label {
  font-size: 12px;
  font-weight: 800;
}

.field-hint {
  color: var(--ink-soft);
  font-size: 11px;
}

input,
select {
  width: 100%;
  min-height: 45px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}

select[multiple] {
  min-height: 112px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.active-filter {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--wine);
  border-radius: 999px;
  background: var(--white);
  color: var(--wine);
  font-size: 12px;
  font-weight: 800;
}

.active-filter button {
  display: grid;
  width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--wine);
  color: var(--white);
  cursor: pointer;
  font-size: 13px;
}

.results-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto 16px;
}

.results-toolbar p {
  margin: 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.pagination button {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  cursor: pointer;
}

.pagination button[aria-current="page"] {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
  font-weight: 800;
}

.pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.callout {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--wine);
  background: rgba(123, 51, 69, 0.055);
}

.callout h2 {
  margin: 0;
}

.callout p {
  max-width: 760px;
  color: var(--ink-soft);
}

.learning-path {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  list-style: none;
}

.learning-path li {
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.45);
}

.learning-path-number {
  color: var(--wine);
  font-family: var(--font-serif);
  font-size: 28px;
}

.learning-path h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
}

.learning-path p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.learning-path a {
  margin-top: auto;
  color: var(--wine);
  font-size: 13px;
  font-weight: 800;
}

.learning-route {
  padding: 18px clamp(20px, 6vw, 88px);
  border-bottom: 1px solid var(--line);
  background: rgba(238, 230, 216, 0.45);
}

.learning-route-label {
  max-width: 1180px;
  margin: 0 auto 10px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.learning-route ol {
  display: grid;
  max-width: 1180px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.learning-route li > a,
.learning-route li > span {
  display: flex;
  min-width: 0;
  gap: 9px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  text-decoration: none;
}

.learning-route li > a:hover {
  border-color: var(--wine);
  background: var(--white);
}

.learning-route li[aria-current="step"] > span {
  border-color: var(--wine);
  background: var(--white);
  color: var(--ink);
}

.learning-route-number {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.learning-route li[aria-current="step"] .learning-route-number {
  border-color: var(--wine);
  background: var(--wine);
  color: var(--white);
}

.learning-route strong,
.learning-route small {
  display: block;
  overflow-wrap: anywhere;
}

.learning-route strong {
  font-size: 12px;
}

.learning-route small {
  margin-top: 1px;
  font-size: 10px;
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: end;
  padding: 44px clamp(20px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: var(--paper-deep);
}

.site-footer p {
  margin: 4px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  font-weight: 800;
}

.muted {
  color: var(--ink-soft);
}

.nowrap {
  white-space: nowrap;
}

.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;
}

@media (max-width: 900px) {
  .hero,
  .split-grid,
  .three-grid {
    grid-template-columns: 1fr;
  }

  .hero-note {
    max-width: 540px;
  }

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

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

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

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

  .learning-path,
  .confidence-guide,
  .change-summary dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .learning-route ol {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 7px;
    scrollbar-width: thin;
  }
}

@media (max-width: 620px) {
  .site-header {
    display: grid;
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 13px 16px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand-copy small {
    display: none;
  }

  .header-nav {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 8px;
  }

  .header-nav .back-link {
    display: grid;
    min-height: 42px;
    place-items: center;
    padding: 7px 10px;
    border: 1px solid var(--line-strong);
    font-size: 11px;
    text-align: center;
  }

  .header-nav .search-link {
    display: grid;
    min-height: 42px;
    place-items: center;
    padding: 7px 10px;
  }

  .hero,
  .page-hero {
    padding-inline: 20px;
  }

  .hero::before,
  .page-hero::before {
    left: 20px;
  }

  .content {
    padding: 48px 16px 72px;
  }

  .ranking-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: stretch;
  }

  .ranking-toolbar select {
    width: 100%;
    min-width: 0;
  }

  .ranking-toolbar output {
    grid-column: 1 / -1;
    min-width: 0;
    text-align: right;
  }

  .grape-ranking-group {
    padding: 18px 14px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stats-grid,
  .card-grid,
  .affiliate-list,
  .filter-grid,
  .learning-path,
  .confidence-guide,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .learning-path li {
    min-height: 0;
  }

  .change-summary dl {
    grid-template-columns: 1fr;
  }

  .field-wide {
    grid-column: auto;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px 16px;
    align-items: center;
  }

  .stat dd {
    grid-row: span 2;
    margin: 0;
  }

  .stat small {
    margin: 0;
  }

  .table-responsive {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .table-responsive table,
  .table-responsive tbody,
  .table-responsive tr,
  .table-responsive td {
    display: block;
    width: 100%;
  }

  .table-responsive thead,
  .table-responsive caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .table-responsive tr {
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    background: rgba(255, 253, 248, 0.6);
  }

  .table-responsive td {
    display: grid;
    grid-template-columns: minmax(86px, 0.34fr) minmax(0, 1fr);
    gap: 12px;
    padding: 7px 0;
    border: 0;
    text-align: left;
  }

  .table-responsive td::before {
    color: var(--ink-soft);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .table-responsive .priority-cell {
    display: block;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
  }

  .table-responsive .priority-cell::before {
    display: none;
  }

  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .coverage-detail dl {
    grid-template-columns: 1fr;
  }

  .definition-list {
    grid-template-columns: 1fr;
  }

  .definition-list dt {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .definition-list dd {
    padding-top: 2px;
  }
}

.motion-enhanced .reveal-target {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

.motion-enhanced .reveal-target.reveal-delay-1 {
  transition-delay: 60ms;
}

.motion-enhanced .reveal-target.reveal-delay-2 {
  transition-delay: 120ms;
}

.motion-enhanced .reveal-target.is-revealed {
  opacity: 1;
  transform: none;
}

.motion-enhanced .ranking-module .bar {
  transform: scaleX(0);
}

.motion-enhanced .ranking-module.is-bar-visible .bar {
  transform: scaleX(1);
  transition: transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

  .reveal-target,
  .ranking-module .bar {
    opacity: 1 !important;
    transform: none !important;
  }
}
