:root { color-scheme: light; --canvas: #faf9f6; --surface: #fff; --ink: #242823; --muted: #61655f; --line: #dedfd8; --accent: #71354b; --accent-soft: #f2e9ed; --focus: #27656a; --red: #80324b; --white: #80722e; --rose: #985467; --mixed: #657079; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--ink); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { background: transparent; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, .map-frame:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-weight: 500; }
h1 { margin-bottom: .3rem; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -.055em; }
h3 { font-size: 1rem; margin-bottom: .5rem; }
input, select { min-height: 44px; width: 100%; padding: .6rem .75rem; border: 1px solid #8a9084; border-radius: 4px; background: var(--surface); }
input[type="search"] { margin: .4rem 0 1rem; padding: .8rem; }
input::placeholder { color: var(--muted); opacity: 1; }
label { color: var(--muted); font-size: .8rem; }
label select { display: block; margin-top: .3rem; font-size: .85rem; }
.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; }
.skip-link { position: fixed; z-index: 20; top: 1rem; left: 1rem; padding: .75rem 1rem; transform: translateY(-200%); background: var(--ink); color: white; }
.skip-link:focus { transform: translateY(0); }
.site-header, .page-intro, .page-shell, .site-footer { width: min(100% - 5rem, 1200px); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 82px; border-bottom: 1px solid var(--line); }
.wordmark { color: var(--ink); font: 600 1.6rem/1 Georgia, serif; letter-spacing: -.055em; text-decoration: none; }
.wordmark span { color: var(--accent); }
.header-link { color: var(--muted); font-size: .8rem; text-decoration: none; }
.page-intro { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding-block: 2.5rem 2.2rem; }
.eyebrow { margin-bottom: .5rem; color: var(--muted); font-size: .66rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.lede { color: var(--muted); margin: .4rem 0 0; }
.total-badge { color: var(--muted); font-size: .8rem; margin: 0; white-space: nowrap; }
.page-shell { display: grid; grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); gap: 3.5rem; align-items: start; padding-bottom: 4rem; }
.library-panel { min-width: 0; position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow-y: auto; padding: .25rem .5rem .25rem .25rem; scrollbar-width: thin; scrollbar-color: #c0c4bb transparent; }
.library-heading { font-size: 1rem; margin-bottom: 1rem; }
.search-label { display: block; }
.search-row { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.flavour-options { margin-top: .6rem; border-bottom: 1px solid var(--line); }
summary { min-height: 48px; padding: .8rem 0; font-size: .85rem; }
.flavour-options summary { color: var(--muted); }
.filter-fieldset { padding: 0 0 .8rem; margin: 0; border: 0; }
.filter-help { color: var(--muted); font-size: .75rem; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem; }
.filter-option { display: flex; align-items: center; min-height: 40px; gap: .45rem; color: var(--ink); }
.filter-option input { min-height: 0; width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.active-filters { display: flex; flex-wrap: wrap; gap: .3rem; }
.active-filters:empty { display: none; }
.filter-chip { min-height: 36px; margin-top: .7rem; padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 3px; font-size: .72rem; }
.filter-chip:hover { border-color: var(--accent); }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-block: .5rem; }
.match-count { margin: 0; color: var(--muted); font-size: .74rem; }
.text-button { border: 0; min-height: 44px; padding: .4rem .1rem; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; font-size: .8rem; }
.grape-list { min-height: 120px; padding: .25rem; }
.grape-card { display: grid; grid-template-columns: 1fr auto; align-items: center; width: 100%; min-height: 58px; padding: .8rem .7rem; border: 0; border-bottom: 1px solid var(--line); text-align: left; transition: background .15s; gap: .1rem .8rem; }
.grape-card:hover { background: #efefea; }
.grape-card:focus-visible { outline-offset: -3px; }
.grape-card[aria-pressed="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); }
.grape-card-name { font-size: .9rem; font-weight: 500; }
.grape-card-kind { color: var(--muted); font-size: .67rem; white-space: nowrap; }
.grape-card-alias { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); }
.empty-state { padding: 1.5rem .7rem; }
.empty-state p { color: var(--muted); font-size: .85rem; }
.name-directory-link { display: inline-flex; align-items: center; min-height: 36px; margin: 0 .25rem .5rem; font-size: .76rem; }
.filter-name-results { padding: 1rem .25rem 0; border-top: 1px solid var(--line); }
.filter-name-results > h3 { font-size: .85rem; }
.filter-name-card { padding: 1rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.filter-name-card h4 { display: inline; margin: 0 .7rem 0 0; font-size: .88rem; }
.filter-name-card p { margin: .5rem 0; font-size: .78rem; color: var(--muted); }
.name-status { display: inline-block; color: var(--muted); font-size: .67rem; }
.name-status.alias, .name-status.profile { color: var(--focus); }
.name-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1rem; margin-top: .35rem; }
.name-actions a { display: inline-flex; align-items: center; min-height: 44px; font-size: .73rem; }
.evidence-name-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.evidence-name-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; padding: .3rem 0; font-size: .82rem; }
.evidence-name-list a { display: inline-flex; align-items: center; min-height: 36px; font-size: .7rem; }
.facts-panel { min-width: 0; padding-left: 3rem; border-left: 1px solid var(--line); }
.profile-navigation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.profile-navigation .eyebrow { margin: 0; }
.profile-filter-note { padding: .6rem .8rem; background: #eeeee8; color: var(--muted); font-size: .8rem; }
.kind-badge { color: var(--muted); display: inline-flex; gap: .45rem; align-items: center; font-size: .75rem; }
.kind-badge::before { content: ""; width: 7px; height: 7px; background: var(--muted); border-radius: 50%; }
.kind-badge.red::before { background: var(--red); }.kind-badge.white::before { background: var(--white); }.kind-badge.rose::before { background: var(--rose); }
.profile-title { font: 400 clamp(2.2rem, 4vw, 3.3rem)/1.15 Georgia, serif; letter-spacing: -.045em; margin: .5rem 0 .7rem; overflow-wrap: anywhere; }
.selected-summary { color: var(--muted); max-width: 60ch; margin-bottom: .8rem; }
.alias-list { color: var(--muted); font-size: .8rem; margin-bottom: 1.5rem; }
.alias-list button { border: 0; padding: .1rem .2rem; color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.taste-section { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.taste-section > p:first-of-type { font-size: 1.1rem; max-width: 60ch; }
.taste-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.taste-tag { font-size: .7rem; padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); }
.context-note { font-size: .77rem; color: var(--muted); line-height: 1.6; }
.fact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-block: 1.5rem; }
dt { color: var(--muted); font-size: .69rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .4rem; }
dd { margin: 0; font-size: .9rem; }
.wine-finder { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding-block: 1.1rem; border-block: 1px solid var(--line); margin-bottom: 1.5rem; }
.wine-finder h3 { margin-bottom: .2rem; font-size: .9rem; }
.wine-finder p { margin: 0; color: var(--muted); font-size: .78rem; }
.wine-finder .availability-note { flex-basis: 100%; font-size: .7rem; }
.button-secondary { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; font-size: .78rem; }
.button-secondary:hover { border-color: var(--accent); background: var(--surface); }
.comparison-toolbar { display: flex; align-items: center; gap: 1rem; justify-content: space-between; margin-bottom: 1rem; }
.comparison-toolbar h3 { font-size: .9rem; margin: 0; }
.comparison-toolbar select { width: min(55%, 240px); font-size: .78rem; }
.comparison-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.comparison-table { width: 100%; font-size: .8rem; border-collapse: collapse; }
.comparison-table th, .comparison-table td { text-align: left; vertical-align: top; padding: .65rem .6rem; border-bottom: 1px solid var(--line); }
.comparison-table th { font-weight: 500; }
.comparison-table th:first-child { width: 18%; color: var(--muted); }
.comparison-table td { width: 41%; }
.comparison-note { font-size: .8rem; color: var(--muted); }
.profile-detail { border-bottom: 1px solid var(--line); }
.profile-detail:first-child { border-top: 1px solid var(--line); }
.profile-detail > summary { font-size: .92rem; padding-block: 1rem; min-height: 58px; }
.profile-detail[open] > summary { color: var(--accent); }
.profile-detail > div, .profile-detail > section { padding-bottom: 1rem; }
.profile-detail p { font-size: .87rem; max-width: 68ch; }
.detail-source { display: block; color: var(--muted); font-size: .72rem; margin-top: .7rem; }
.detail-source a { color: inherit; }
.profile-checked { color: var(--muted); font-size: .7rem; margin-top: 1.25rem; }
.region-facts { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.region-facts h4 { margin-bottom: .6rem; font-size: .95rem; }
.region-facts .fact-grid { grid-template-columns: 1fr; margin: .6rem 0; gap: .6rem; }
.region-facts a { font-size: .72rem; }
.relationship-list { padding: 0; margin: 0 0 1rem; list-style: none; }
.relationship-list li { display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.relationship-list li > .text-button { justify-self: start; padding: 0; min-height: 36px; font-size: .9rem; }
.relationship-list li > span:last-child { grid-column: 1 / -1; color: var(--muted); font-size: .78rem; }
.relationship-badge { color: var(--muted); font-size: .65rem; align-self: center; padding: .1rem .35rem; background: #eeeee8; }
.relationship-source { grid-column: 1 / -1; font-size: .7rem; }
.grape-source { display: grid; gap: 1rem; }
.source-record { font-size: .83rem; }.source-record p { margin: .25rem 0 0; font-size: .73rem; color: var(--muted); }
.detail-count { color: var(--muted); font-size: .7rem; margin-left: .4rem; }
.map-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; justify-content: space-between; margin: 1rem 0; }
.map-toolbar label { width: 160px; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 4px; }
.segmented button { border: 0; min-height: 44px; padding: .4rem .65rem; font-size: .78rem; }
.segmented button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.map-frame { width: 100%; max-height: 520px; overflow: auto; padding: .5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
#grape-network { display: block; width: 100%; min-width: 650px; height: auto; }
.map-label { fill: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .04em; }
.network-edge { fill: none; stroke: #c8cac3; stroke-width: 1.5; }
.network-edge.alias { stroke-dasharray: 5 5; }.network-edge.parent { stroke: #657d57; }.network-edge.mutation { stroke: #87647c; stroke-dasharray: 2 4; }.network-edge.blend { stroke: #a9844f; }.network-edge.trait { stroke: #63808b; stroke-dasharray: 8 5; }.network-edge.champagne { stroke: #8d8043; }.network-edge.style { stroke-dasharray: 2 6; }
.grape-node { cursor: pointer; }.node-hitarea { fill: white; stroke: var(--line); stroke-width: 1; }
.grape-node:hover .node-hitarea { fill: #f5f4ef; stroke: var(--accent); }
.grape-node.is-selected .node-hitarea { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.grape-node.is-muted .node-hitarea { fill: #f3f3ee; stroke-dasharray: 3 3; }.grape-node circle { fill: var(--mixed); }.grape-node.red circle { fill: var(--red); }.grape-node.white circle { fill: var(--white); }.grape-node.rose circle { fill: var(--rose); }
.grape-name { font-size: 13px; font-weight: 500; fill: var(--ink); }.grape-subtitle { font-size: 10px; fill: var(--muted); }
.site-footer { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3.5rem; padding-block: 2rem; border-top: 1px solid var(--line); }
.site-footer h2 { font: 400 1.5rem/1.3 Georgia, serif; letter-spacing: -.025em; }
.site-footer p { color: var(--muted); font-size: .8rem; max-width: 56ch; }
.about-details { grid-column: 2; border-bottom: 1px solid var(--line); }.about-details:nth-of-type(1) { grid-row: 1; align-self: start; }
.about-details a { font-size: .8rem; }.glossary { display: grid; gap: 1rem; }.glossary dd { font-size: .8rem; color: var(--muted); }
.name-directory { grid-column: 1 / -1; margin-top: 1.5rem; border-block: 1px solid var(--line); }
.name-directory > summary { min-height: 58px; font-size: .92rem; }
.name-directory > p { max-width: 85ch; }
.name-directory-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .45fr); gap: 1rem; max-width: 750px; }
.name-directory-controls label { display: block; }
.name-directory-controls input { display: block; margin-top: .3rem; font-size: .85rem; }
.filter-name-list { max-height: 520px; overflow-y: auto; padding: 0 .5rem .5rem 0; scrollbar-width: thin; }
.footer-mark { grid-column: 1 / -1; margin: 2rem 0 0; font-size: .7rem !important; }
@media (max-width: 1000px) { .site-header, .page-intro, .page-shell, .site-footer { width: min(100% - 3rem, 1200px); }.page-shell { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); gap: 1.8rem; }.facts-panel { padding-left: 1.8rem; }.comparison-toolbar { flex-wrap: wrap; }.comparison-toolbar select { width: 100%; } }
@media (max-width: 760px) {
  .site-header, .page-intro, .page-shell, .site-footer { width: calc(100% - 2.5rem); }
  .site-header { min-height: 68px; }.wordmark { font-size: 1.4rem; }.header-link { font-size: .75rem; }
  .page-intro { padding-block: 1.7rem; align-items: end; gap: 1rem; flex-wrap: wrap; }.total-badge { font-size: .73rem; }
  .page-shell { display: block; padding-bottom: 2rem; }.library-panel { position: static; max-height: none; overflow: visible; padding: 0; }.facts-panel { border: 0; padding: 0; }
  .grape-list { max-height: none; overflow: visible; padding: 0; }.grape-card { min-height: 62px; padding-inline: .6rem; }
  body[data-mobile-view="library"] .facts-panel { display: none; }
  body[data-mobile-view="profile"] .library-panel, body[data-mobile-view="profile"] .page-intro { display: none; }
  body[data-mobile-view="profile"] .page-shell { padding-top: .8rem; }
  .profile-navigation { margin-bottom: 1rem; }.profile-title { font-size: 2.7rem; }
  .comparison-toolbar { flex-wrap: nowrap; }.comparison-toolbar select { width: 55%; }
  .site-footer { display: block; }.about-details { margin-top: 1rem; }
  .name-directory-controls { grid-template-columns: 1fr; gap: .4rem; }.name-directory-controls input { margin-bottom: .2rem; }
}
@media (max-width: 400px) { .site-header, .page-intro, .page-shell, .site-footer { width: calc(100% - 2rem); }.profile-navigation .eyebrow { font-size: .6rem; }.fact-grid { grid-template-columns: 1fr; gap: 1rem; }.comparison-toolbar { flex-wrap: wrap; }.comparison-toolbar select { width: 100%; }.wine-finder .button-secondary { width: 100%; }.grape-card-kind { font-size: .63rem; }.grape-card { gap: .2rem .4rem; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }* { transition: none !important; } }

.discovery-list { list-style: none; padding: 0; }
.discovery-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.discovery-list li p { margin: 0.35rem 0; }
.discovery-list li a { display: inline-block; margin-right: 0.75rem; font-size: 0.8rem; }
.network-edge.geography, .network-edge.wine_style { stroke-dasharray: 5 4; }
.product-review { margin: .7rem 0; }
.product-review > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.wine-example { border-top: 1px solid var(--line); padding-block: .8rem; overflow-wrap: anywhere; }
.wine-example h4 { margin: .35rem 0; }
.wine-example p { margin: .5rem 0; }
.wine-composition { padding-left: 1.1rem; }
.wine-composition li { margin-bottom: .35rem; }
.wine-composition .text-button { margin-left: .65rem; }
.wine-interpretation { font-size: .85rem; }
.wine-example > a { display: inline-block; margin-right: .7rem; font-size: .8rem; }
