:root {
  color-scheme: dark;
  --ink: #111416;
  --text: #f4f0e9;
  --muted: #b6b4b0;
  --faint: #898d90;
  --line: rgba(244,240,233,.16);
  --accent: #d4a9c1;
  --rail: 144px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
button, a, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.scene, .shade { position: fixed; inset: 0; pointer-events: none; }
.scene { overflow: hidden; background: #242321; }
.scene img {
  width: 100%; height: 100%; object-fit: cover; object-position: 64% center;
  transform: scale(1.035) translate(var(--mx,0px),var(--my,0px));
  filter: brightness(.80) saturate(.72); will-change: transform;
}
.shade {
  background: linear-gradient(90deg,rgba(17,20,22,.94),rgba(17,20,22,.90) 30%,rgba(17,20,22,.72) 51%,rgba(17,20,22,.27) 73%,rgba(17,20,22,.13)),
    linear-gradient(0deg,rgba(17,20,22,.38),transparent 35%,transparent 80%,rgba(17,20,22,.18));
}
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--rail);
  display: flex; flex-direction: column; padding: 28px 16px;
  overflow-y: auto; overscroll-behavior: contain;
}
.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brandmark { font-size: 30px; font-weight: 650; letter-spacing: -.08em; line-height: 1; }
.brand>span:last-child { font-size: 11px; font-weight: 550; letter-spacing: .12em; }
.side-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 64px; }
.side-nav button {
  display: flex; align-items: center; gap: 10px; min-height: 44px; width: 100%;
  position: relative; padding: 10px 9px; text-align: left;
  background: none; border: 0; color: var(--muted);
  transition: color .18s, transform .18s;
}
.side-nav button>svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .65; }
.nav-copy strong { font-size: 14px; font-weight: 450; line-height: 1.4; }
.nav-copy>span { display: none; }
.side-nav button::before {
  content: ''; position: absolute; left: -10px; top: 17px; bottom: 17px;
  width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .18s;
}
.side-nav button.active { color: var(--text); }
.side-nav button.active>svg { color: var(--accent); opacity: 1; }
.side-nav button.active::before { transform: scaleY(1); }
.side-nav button:hover { color: var(--text); transform: translateX(2px); }
.sidebar-bottom { margin-top: auto; padding-top: 40px; color: var(--faint); font-size: 12px; line-height: 1.7; }
.sidebar-bottom span, .sidebar-bottom small { display: block; font-size: inherit; }
.page { position: relative; z-index: 1; margin-left: var(--rail); padding: 0 clamp(32px,4.2vw,68px); min-height: 100svh; display: flex; flex-direction: column; }
header { height: 84px; display: flex; align-items: center; gap: 24px; }
.header-right { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex: 1; }
.header-note { color: var(--text); font-size: 14px; line-height: 1.5; }
.header-note>span:not([data-i18n]) { color: var(--faint); padding: 0 12px; }
.header-note>[data-i18n] { color: var(--muted); font-size: 12px; }
.language-switch { display: flex; flex-shrink: 0; gap: 3px; align-items: center; }
.language-switch button { min-width: 36px; min-height: 40px; padding: 8px 6px; background: none; border: 0; color: var(--muted); font-size: 12px; position: relative; }
.language-switch button[aria-pressed=true] { color: var(--text); }
.language-switch button::after { content: ''; position: absolute; height: 1px; left: 8px; right: 8px; bottom: 7px; background: var(--accent); transform: scaleX(0); transition: transform .18s; }
.language-switch button[aria-pressed=true]::after { transform: scaleX(1); }
.language-switch button:hover { color: var(--accent); }
main { width: 100%; max-width: 650px; flex: 1; padding: 44px 0 64px; }
main:focus { outline: none; }
.intro { margin-bottom: 38px; }
h1 { font-size: 42px; line-height: 1.1; font-weight: 500; letter-spacing: -.04em; margin: 0 0 14px; }
p { font-size: 16px; line-height: 1.65; margin: 0; color: var(--muted); }
.intro p { font-size: 15px; line-height: 1.6; }
h2,h3 { margin: 0; }
.workspace, .content { width: 100%; }
.section-top { display: flex; justify-content: space-between; align-items: center; }
.section-top h2 { font-size: 14px; font-weight: 450; color: var(--muted); }
.vintages { display: flex; align-items: stretch; gap: 12px; margin: 0 0 10px; border-bottom: 1px solid var(--line); }
.vintage { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; position: relative; padding: 11px 14px; background: none; border: 0; color: var(--muted); text-align: left; }
.vintage strong { font-size: 18px; line-height: 1.3; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.vintage span { font-size: 12px; line-height: 1.5; }
.vintage::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .22s; }
.vintage.active { color: var(--text); }
.vintage.active::after { transform: scaleX(1); }
.vintage:hover strong { color: var(--accent); }
.list-heading { display: flex; justify-content: flex-end; align-items: center; min-height: 26px; margin-bottom: 0; }
.list-heading h3 { font-size: 13px; font-weight: 450; color: var(--muted); }
.list-heading>span { font-size: 12px; color: var(--faint); }
.wine-list { display: flex; flex-direction: column; }
.wine-card { --wine-color: #dcc78f; border-bottom: 1px solid var(--line); }
.wine-card.red { --wine-color: #cf879d; }
.wine-card summary { list-style: none; position: relative; min-height: 105px; padding: 24px 38px 24px 0; }
.wine-card summary::-webkit-details-marker { display: none; }
.wine-label { display: flex; flex-direction: column; gap: 7px; }
.wine-type { display: flex; align-items: center; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.wine-type::before { content: ''; width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--wine-color); }
.wine-name { font-size: 27px; line-height: 1.2; font-weight: 500; letter-spacing: -.03em; color: var(--text); transition: transform .2s; }
.wine-card summary:hover .wine-name { transform: translateX(2px); }
.card-bottom { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.expand { display: block; font-size: 23px; font-weight: 300; line-height: 1; transition: color .2s; }
.wine-card summary:hover .expand { color: var(--text); }
.wine-card[open] .expand { font-size: 0; }
.wine-card[open] .expand::after { content: '−'; font-size: 23px; }
.wine-details { padding: 0 44px 24px 0; max-width: 490px; }
.wine-details p { font-size: 14px; line-height: 1.65; }
.wine-details .bottle-note { font-size: 12px; line-height: 1.6; margin-top: 8px; color: var(--muted); }
.year-empty { padding: 44px 0 24px; max-width: 400px; }
.year-empty::before { content: ""; display: block; width: 32px; height: 1px; background: var(--accent); margin-bottom: 24px; }
.year-empty p { font-size: 14px; line-height: 1.7; }
.year-empty h3 { font-size: 25px; font-weight: 450; line-height: 1.3; letter-spacing: -.025em; margin-bottom: 14px; }
.empty-note { font-size: 17px; line-height: 1.55; color: var(--muted); padding-top: 16px; max-width: 470px; }
footer { max-width: 650px; font-size: 12px; line-height: 1.5; letter-spacing: .03em; color: var(--faint); padding: 0 0 24px; }
.footer-divider { margin: 0 10px; }
.load-status { position: fixed; right: 24px; bottom: 24px; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px; min-width: 210px; max-width: 280px; background: #17191af5; color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 30px #0003; }
.wine-progress { width: 30px; height: 44px; flex-shrink: 0; }
.load-status p { font-size: 14px; color: var(--text); }
.load-percent { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.wine-stream { stroke-dasharray: 7 4; animation: pour .65s linear infinite; }
.load-status.error .wine-stream { display: none; }
.load-status button, .data-error button { border: 0; padding: 8px 0; background: none; color: var(--accent); text-decoration: underline; text-underline-offset: 4px; font-size: 14px; display: block; }
.data-error { color: #e4adb6; font-size: 14px; line-height: 1.6; padding: 24px 0; }
.menu-toggle, .menu-close { display: none; }
.menu-backdrop { position: fixed; inset: 0; z-index: 25; background: #090a0b80; border: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .28s, visibility .28s; }
.content.view-enter { animation: content-enter .22s ease-out both; }
.noscript { position: relative; padding: 24px; background: var(--ink); }
@keyframes content-enter { from { opacity: .4; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pour { to { stroke-dashoffset: -11; } }
@media (max-width: 1100px) {
  .shade { background: linear-gradient(90deg,rgba(17,20,22,.90),rgba(17,20,22,.82) 65%,rgba(17,20,22,.72)),linear-gradient(0deg,rgba(17,20,22,.2),transparent); }
}
@media (max-width: 1100px) and (min-width: 901px) {
  :root { --rail: 130px; }
  .sidebar { padding-left: 12px; padding-right: 10px; }
  .page { padding: 0 32px; }
  main { max-width: 570px; }
}
@media (max-width: 900px) {
  .page { margin-left: 0; padding: 0 22px; }
  header { height: 72px; gap: 18px; }
  .header-right { justify-content: flex-end; }
  .header-note { margin-right: auto; }
  .header-note>span { display: none; }
  main { max-width: 650px; padding-top: 32px; }
  h1 { font-size: 34px; }
  .intro { margin-bottom: 30px; }
  .sidebar { width: min(224px,86vw); padding: 25px 22px; background: #181b1e; transform: translateX(-102%); visibility: hidden; transition: transform .3s cubic-bezier(.22,1,.36,1),visibility .3s; }
  .sidebar-top { gap: 20px; }
  .side-nav { margin-top: 44px; }
  .side-nav button { padding: 11px 6px; }
  .menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .menu-open .menu-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
  body.menu-open { overflow: hidden; }
  .menu-toggle, .menu-close { display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; color: var(--text); min-height: 44px; padding: 8px 0; }
  .menu-toggle { font-size: 14px; }
  .menu-toggle svg, .menu-close svg { width: 20px; height: 20px; }
  .menu-close { width: 36px; flex-shrink: 0; }
  .language-switch button { min-height: 44px; }
}
@media (max-width: 600px) {
  .scene img { object-position: 58% center; }
  .header-note { display: block; font-size: 12px; max-width: 130px; }
  .header-right { flex: 1; }
  main { padding-top: 28px; padding-bottom: 48px; }
  h1 { font-size: 34px; }
  .intro p { font-size: 15px; }
  .vintages { gap: 12px; margin-bottom: 10px; }
  .wine-card summary { min-height: 96px; padding-top: 21px; padding-bottom: 21px; }
  .wine-name { font-size: 24px; }
  .wine-details { max-width: 100%; padding-right: 24px; }
  .load-status { left: auto; right: 22px; bottom: 18px; width: auto; max-width: calc(100vw - 44px); }
  footer { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scene img { transform: none; will-change: auto; }
  .wine-card summary:hover .wine-name, .side-nav button:hover { transform: none; }
}

.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; }
.plan-vintage { font-size: 14px; font-weight: 450; color: var(--muted); margin-bottom: 22px; }
.plan-list { margin: 0 0 0 3px; padding: 0 0 0 23px; list-style: none; border-left: 1px solid var(--line); }
.plan-entry { position: relative; display: grid; grid-template-columns: 160px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.plan-entry::before { content: ''; position: absolute; top: 32px; left: -27px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.plan-entry time { color: var(--muted); font-size: 13px; line-height: 1.6; }
.plan-entry h3 { font-size: 25px; line-height: 1.25; font-weight: 450; letter-spacing: -.025em; }
.plan-entry .plan-quantity { font-size: 15px; margin-top: 8px; }
.plan-entry .plan-status { font-size: 12px; color: #d3b69d; margin-top: 12px; }
@media(max-width:600px) { .plan-entry { grid-template-columns: 1fr; gap: 12px; } .plan-entry h3 { font-size: 23px; } }
.lab-toolbar { display: flex; flex-direction: column; gap: 22px; }
.lab-filters { display: flex; flex-wrap: wrap; gap: 2px 20px; border-bottom: 1px solid var(--line); }
.lab-filters button { position: relative; border: 0; background: none; padding: 12px 0; font-size: 13px; color: var(--muted); }
.lab-filters button[aria-pressed=true] { color: var(--text); }
.lab-filters button[aria-pressed=true]::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); }
.lab-select-label { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--muted); }
.lab-select-label select { min-width: 170px; max-width: 100%; padding: 8px 28px 8px 10px; font: inherit; color: var(--text); background: #1c2022; border: 1px solid var(--line); border-radius: 3px; }
.lab-stats { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 8px; font-size: 12px; color: var(--muted); }
.lab-stats strong { font-weight: 500; font-size: 20px; margin-right: 3px; color: var(--text); }
.lab-scope { font-size: 12px; margin-bottom: 26px; }
.lab-provisional { margin: -14px 0 24px; }
.lab-classification { display: block; font-size: 11px; color: #d3b69d; margin-top: 6px; }
.lab-timeline { position: relative; border-left: 1px solid var(--line); margin-left: 3px; padding-left: 23px; }
.lab-report { border-bottom: 1px solid var(--line); }
.lab-report>summary { list-style: none; position: relative; display: grid; grid-template-columns: 112px 1fr 18px; align-items: start; gap: 16px; padding: 22px 0; }
.lab-report>summary::-webkit-details-marker { display: none; }
.lab-report>summary::before { content: ''; position: absolute; left: -27px; top: 29px; width: 7px; height: 7px; border: 1px solid var(--accent); border-radius: 50%; background: #242323; transition: background .2s; }
.lab-report[open]>summary::before,.lab-report>summary:hover::before { background: var(--accent); }
.lab-date { font-size: 13px; line-height: 1.6; color: var(--muted); }
.lab-report h2 { font-size: 18px; font-weight: 450; letter-spacing: -.02em; line-height: 1.35; }
.lab-summary { display: block; font-size: 12px; color: var(--muted); line-height: 1.7; margin-top: 6px; }
.lab-expand { font-size: 22px; font-weight: 300; color: var(--faint); line-height: 1; transition: transform .2s; }
.lab-report[open] .lab-expand { transform: rotate(45deg); }
.lab-report-detail { padding: 0 0 26px; }
.lab-meta { font-size: 11px; line-height: 1.7; }
.lab-notes { margin: 18px 0 24px; border-left: 2px solid #b68d6b; padding-left: 14px; }
.lab-notes p,.lab-note { font-size: 12px; line-height: 1.7; }
.lab-notes p+p { margin-top: 8px; }
.lab-sample { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.lab-sample-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 5px; }
.lab-sample-heading h3 { font-size: 20px; font-weight: 450; letter-spacing: -.025em; }
.lab-sample-heading span { font-size: 12px; color: var(--muted); }
.lab-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px 16px; margin: 20px 0 0; }
.lab-metrics dt { font-size: 11px; line-height: 1.5; color: var(--muted); margin-bottom: 5px; }
.lab-metrics dd { margin: 0; font-size: 23px; line-height: 1.25; font-weight: 400; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lab-unit { margin-left: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.lab-metrics small { display: block; font-size: 11px; margin-top: 5px; color: var(--muted); }
.lab-links { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 28px; }
.lab-link { display: inline-block; color: var(--accent); font-size: 12px; line-height: 1.6; text-decoration: underline; text-underline-offset: 5px; padding: 10px 0; background: none; border: 0; }
.lab-link:hover { color: var(--text); }
.lab-reading { margin: 30px 0 14px; }
.lab-reading summary { padding: 10px 0; color: var(--muted); font-size: 13px; }
.lab-reading p { font-size: 12px; line-height: 1.7; margin: 10px 0; }
@media(max-width:600px) {
 .lab-filters { gap: 0 18px; }
 .lab-filters button { min-height: 44px; font-size: 12px; }
 .lab-report>summary { grid-template-columns: 1fr 18px; gap: 5px 14px; padding: 19px 0; }
 .lab-date { grid-column: 1; font-size: 12px; }
 .lab-report-title { grid-column: 1; }
 .lab-expand { grid-column: 2; grid-row: 1 / 3; align-self: center; }
 .lab-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 12px; }
 .lab-metrics dd { font-size: 21px; }
 .lab-timeline { padding-left: 18px; }
 .lab-report>summary::before { left: -22px; top: 26px; }
 .lab-select-label select { min-height: 42px; }
}
@media(max-width:360px) { .page { padding: 0 18px; } .header-note { display: none; } .wine-name { font-size: 22px; } .vintage { padding-left: 10px; padding-right: 10px; } }
