/*
 * MyCellar: the public pages (landing.html and signin.html).
 * Every colour comes from tokens.css (light by default, dark via
 * prefers-color-scheme or data-theme), so these pages share the cellar
 * view's palette, type, frosted surfaces and focus rings.
 * Load order in the HTML: tokens.css, then this file.
 */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at top, var(--page-glow), transparent 32%),
    linear-gradient(180deg, var(--page-top) 0%, var(--page-mid) 34%, var(--ground) 100%);
  background-color: var(--ground);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a:focus-visible { border-radius: var(--r-sm); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--panel);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--float-shadow);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Header ---------- */
.site-header { padding: 14px 0 0; }
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -.005em;
  padding: 4px 4px 4px 0;
}

/* Brand mark: a bottle top seen from above, with a "ready" status ring. */
.brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.3), transparent 45%), #6e1830;
  box-shadow: 0 0 0 2.5px var(--st-ready), inset 0 0 0 3px rgba(0,0,0,.32);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 32%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,.4), rgba(0,0,0,.1) 70%);
}

/* Frosted pill, as used for the cellar view's floating controls. */
.float-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--float-line);
  border-radius: var(--r-pill);
  background: var(--float-bg);
  box-shadow: var(--float-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s ease, transform .15s ease;
}
.float-pill:hover { border-color: var(--muted); }
.float-pill:active { transform: translateY(1px); }
.float-pill svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Buttons ---------- */
/* The shared Material buttons (components.css), one size up on the public pages. */
.btn { gap: 10px; min-height: 48px; padding: 12px 24px; font-size: 16px; }
.btn.ghost { color: var(--on-surface); }
.btn.block { width: 100%; }
.btn svg { flex: 0 0 auto; }

/* ---------- Landing: hero ---------- */
main { flex: 1 0 auto; }

.hero {
  display: grid;
  gap: 40px;
  padding-top: 44px;
  padding-bottom: 8px;
}
.hero-copy { display: grid; gap: 18px; align-content: center; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 8.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.hero .lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 34em;
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 8px; }

/* ---------- Landing: fridge preview (echoes .fridge in cellar.css) ---------- */
.preview {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.mini-fridge {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, var(--cab-edge), var(--cab) 6%, var(--cab) 94%, var(--cab-edge));
  border-radius: 12px 12px 6px 6px;
  padding: 12px 26px 16px 12px;
  position: relative;
  box-shadow: var(--shadow);
}
.mini-fridge::after { /* door handle */
  content: "";
  position: absolute;
  right: 10px;
  top: 30%;
  width: 6px;
  height: 24%;
  border-radius: var(--r-xs);
  background: linear-gradient(90deg, #11161a, #3a4247, #11161a);
}
.mini-glass {
  background:
    linear-gradient(115deg, rgba(255,255,255,.07) 0 18%, transparent 18% 60%, rgba(255,255,255,.035) 60% 70%, transparent 70%),
    var(--interior);
  border: 2px solid #050809;
  border-radius: var(--r-xs);
  padding: 0 10px 8px;
}
.mini-led { height: 12px; margin: 0 24% 8px; border-radius: 0 0 8px 8px; background: #182026; position: relative; }
.mini-led::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%; bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--led);
  box-shadow: 0 0 14px 4px rgba(127, 196, 255, .4);
}
.mini-rung { position: relative; padding: 5px 0 11px; }
.mini-rung::after { /* wire rack */
  content: "";
  position: absolute;
  left: -4px; right: -4px; bottom: 3px;
  height: 4px;
  border-top: 2px solid var(--wire);
  border-bottom: 1px solid rgba(169, 180, 186, .45);
  border-radius: 2px;
}
.mini-slots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; justify-items: center; }
.mini-slots.mag { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mini-base { margin-top: 6px; padding-top: 10px; border-top: 3px solid #1f272c; background: linear-gradient(180deg, #0f1519, var(--interior)); }

.mini-slots > span {
  width: 100%;
  max-width: 54px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.mini-slots.mag > span { max-width: 78px; }

.mini-slots .empty::before {
  content: "";
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px dashed #3b474e;
}

/* A bottle top: wine colour, punt, status ring (same recipe as .bottle). */
.mini-slots .b {
  position: relative;
  width: 84%;
  max-width: none;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), transparent 42%), var(--wine, #5a1426);
  box-shadow: 0 0 0 2.5px var(--status, var(--st-none)), inset 0 0 0 3px rgba(0,0,0,.35);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--vint, #f4e9ec);
  font-variant-numeric: tabular-nums;
}
.mini-slots.mag .b { font-size: 12px; }
.mini-slots .b::before { /* punt */
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,.35), rgba(0,0,0,.08) 70%);
}
.mini-slots .b i { position: relative; font-style: normal; }

/* Wine colours */
.w-red   { --wine: #5a1426; }
.w-claret{ --wine: #6e1830; }
.w-white { --wine: #d8c98a; --vint: #2b2410; }
.w-pale  { --wine: #ece0b0; --vint: #2b2410; }
.w-rose  { --wine: #e59aa5; --vint: #3a1219; }
.w-tawny { --wine: #7a3418; }

/* Drinking-window status */
.s-ready { --status: var(--st-ready); }
.s-last  { --status: var(--st-last); }
.s-wait  { --status: var(--st-wait); }
.s-past  { --status: var(--st-past); }

.mini-feet { display: flex; justify-content: space-between; width: 100%; max-width: 380px; padding: 0 16px; margin-top: -18px; }
.mini-feet span { width: 20px; height: 7px; background: #151a1d; border-radius: 0 0 4px 4px; }

.preview figcaption {
  max-width: 34em;
  margin: 0 auto 28px;   /* breathing room under the caption */
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  text-wrap: pretty;
}

/* ---------- Landing: features (Material filled cards with an icon) ---------- */
.features {
  display: grid;
  gap: 12px;
  padding-top: 32px;
  padding-bottom: 32px;
}
.feature { display: grid; gap: 8px; align-content: start; padding: 20px; border-radius: var(--r-md); background: var(--surface-container-low); }
.feature-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-container); color: var(--on-primary-container); margin-bottom: 4px; }
.feature-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.closing { display: grid; justify-items: center; gap: 14px; text-align: center; padding-bottom: 72px; }
.closing p { margin: 0; color: var(--muted); }
.feature h2 { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.2; }
.feature p { color: var(--muted); font-size: 15px; max-width: 32em; text-wrap: pretty; }

/* ---------- Sign-in ---------- */
.auth-main {
  display: grid;
  place-items: center;
  padding: 28px 16px 40px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  display: grid;
  gap: 22px;
  padding: 28px 22px 24px;
  border: 1px solid var(--float-line);
  border-radius: 24px;
  background: var(--float-bg);
  box-shadow: var(--nav-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.auth-head { display: grid; gap: 10px; justify-items: center; text-align: center; }
.auth-head .brand-mark { width: 40px; height: 40px; margin-bottom: 6px; box-shadow: 0 0 0 3px var(--st-ready), inset 0 0 0 4px rgba(0,0,0,.32); }
.auth-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 8vw, 36px);
  line-height: 1.08;
  text-wrap: balance;
}
.auth-head p:not(.eyebrow) { color: var(--muted); font-size: 15px; max-width: 30em; text-wrap: pretty; }

.auth-actions { display: grid; gap: 14px; }

.google-g { width: 18px; height: 18px; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.email-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--field);
  color: var(--ink);
  font-size: 16px; /* stops iOS zooming on focus */
}
.field input::placeholder { color: var(--muted); opacity: .85; }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.dev-block { display: grid; gap: 8px; justify-items: center; padding-top: 16px; border-top: 1px dashed var(--line); }
.dev-block:has(#dev-signin[hidden]) { display: none; }
.dev-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.dev-hint::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st-last); }

.auth-status {
  min-height: 1.5em;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.auth-status:empty { min-height: 0; }
.auth-status.error, .auth-status[data-tone="error"] { color: var(--ink); }
.auth-status.error::before, .auth-status[data-tone="error"]::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px; margin-right: 8px;
  border-radius: 50%;
  background: var(--st-past);
  vertical-align: .1em;
}


/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .container { padding: 0 28px; }
  .site-header { padding-top: 22px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }   /* four features: 2 x 2 */
  .auth-card { padding: 36px 36px 30px; }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 56px;
    align-items: center;
    padding-top: 72px;
    padding-bottom: 24px;
  }
  .hero .lead { font-size: 18px; }
  .features { padding-bottom: 40px; }
  .auth-main { padding-top: 48px; }
}

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

/* ---------- Footer (landing, wine pages, privacy) ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 20px 0 calc(20px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer a, .feature a { color: var(--accent); }

/* ---------- Text pages (privacy, wine pages) ---------- */
.prose { max-width: 760px; padding-top: 24px; padding-bottom: 56px; }
.prose h1 { font-family: var(--display); font-size: clamp(32px, 7vw, 44px); line-height: 1.1; margin: 8px 0 12px; }
.prose h2 { font-family: var(--display); font-size: 22px; line-height: 1.2; margin: 32px 0 8px; }
.prose p, .prose li { line-height: 1.6; max-width: 65ch; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }
.prose a { color: var(--accent); }
.prose .lead { color: var(--muted); font-size: 17px; }

/* ---------- Wine pages (rendered by the API: /wines and below) ---------- */
.wine-page .crumbs { font-size: 14px; color: var(--muted); }
.wine-page .crumbs a { color: var(--muted); }
.wine-page .count { color: var(--muted); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.wine-page h2 .count { font-family: var(--body); margin-left: 4px; }
.wine-page .letters { display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 600; }
.wine-page h3 { font-family: var(--display); font-size: 20px; margin: 22px 0 6px; }

/* Search: one field and a button, on every list page. */
.wine-search { display: flex; gap: 8px; max-width: 520px; margin: 18px 0 8px; }
.wine-search input { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--ink); background: var(--field);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 10px 16px; }
.wine-search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }


.wine-page .group h2 { font-size: 20px; margin: 26px 0 8px; }
.wine-page .group h2 a { color: var(--ink); text-decoration: none; }
.wine-page .group h2 a:hover { text-decoration: underline; }

.wine-page .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 16px 0 0; }
.wine-page .facts dt { color: var(--muted); }
.wine-page .facts dd { margin: 0; }
.vintages { max-width: 360px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.vintages th, .vintages td { text-align: left; padding: 6px 18px 6px 0; border-bottom: 1px solid var(--line); }
.vintages thead th { color: var(--muted); font-weight: 500; font-size: 13px; }
.wine-page .cta { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; justify-content: space-between; padding: 16px 20px; margin-top: 24px; border-radius: var(--r-md); border: 0; background: var(--secondary-container); color: var(--on-secondary-container); }
.wine-page .cta p { margin: 0; }


/* ======================================================================
   Material 3, as in the app (22–24 Nov 2026): the sans throughout, a top app bar, buttons,
   chips, lists and cards from the shared colour roles. The wine page reuses the building blocks
   of the app's bottle details (status pill, window bar, facts, "How we know", notes).
   ====================================================================== */
body { background: var(--surface); background-attachment: initial; }

/* Top app bar: brand on the left; "Wines" (text button) and "Sign in" (tonal) on the right.
   A hairline appears once the page scrolls (scripts/shared/site.js). */
.site-header { position: sticky; top: 0; z-index: 30; padding: 0; background: var(--surface); transition: box-shadow var(--dur-short) var(--ease); }
body.page-scrolled .site-header { box-shadow: inset 0 -1px 0 var(--outline-variant); }
.site-header .container { min-height: 64px; }
.brand { font-family: var(--body); font-size: 20px; font-weight: 600; letter-spacing: 0; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--r-pill);
  color: var(--primary); font-size: 14px; font-weight: 500; text-decoration: none; transition: background-color var(--dur-short) var(--ease); }
.text-btn:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.text-btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.site-nav .btn, .site-header .btn { min-height: 40px; padding: 8px 20px; font-size: 14px; }
/* "Back to home" on sign-in and privacy: a text button, not a frosted pill. */
.float-pill { border: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--primary); font-weight: 500; min-height: 40px; padding: 0 12px; }
.float-pill:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }

/* Type: Material's scale in Figtree. */
.hero h1 { font-family: var(--body); font-weight: 500; letter-spacing: -.01em; }
.prose h1, .wine-page h1 { font-family: var(--body); font-size: clamp(26px, 6vw, 32px); font-weight: 500; line-height: 1.2; letter-spacing: 0; }
/* Documents (privacy): Material title size; the catalogue's section labels: small, in the primary colour. */
.prose h2 { font-family: var(--body); font-size: 20px; font-weight: 500; letter-spacing: 0; color: var(--on-surface); margin: 28px 0 8px; }
.wine-page h2 { font-family: var(--body); font-size: 14px; font-weight: 500; letter-spacing: .01em; color: var(--primary); margin: 24px 0 8px; }
.feature h2 { font-family: var(--body); font-size: 18px; font-weight: 500; }
.lead { color: var(--on-surface-variant); }

/* Landing: two buttons; the fridge in a card with a legend; a closing tonal card. */
.hero-actions { gap: 10px; }
.preview { background: var(--surface-container-low); border-radius: var(--r-lg); padding: 20px 16px 14px; margin: 0; }
.legend-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; padding: 0; list-style: none; }
.legend-chips li { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--outline-variant); font-size: 12.5px; font-weight: 500; color: var(--on-surface-variant); }
.legend-chips i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.preview figcaption { margin-top: 8px; font-size: 12.5px; color: var(--on-surface-variant); }
.closing { justify-items: start; text-align: left; background: var(--primary-container); color: var(--on-primary-container);
  border-radius: var(--r-lg); padding: 24px; margin-bottom: 48px; }
.closing p { color: var(--on-primary-container); font-size: 17px; }
.site-footer { background: var(--surface-container-low); border-top: 0; }
.site-footer a { color: var(--primary); text-decoration: none; font-weight: 500; }

/* ---------- Catalogue ---------- */
.crumbs { font-size: 13px; font-weight: 500; color: var(--on-surface-variant); margin: 12px 0 4px; }
.crumbs a { color: var(--primary); text-decoration: none; }
.wine-page a { color: var(--primary); }
/* Search bar: a 56 px pill; Enter searches. */
.wine-search { position: relative; display: block; margin: 16px 0 8px; max-width: 640px; }
.wine-search input { width: 100%; height: 56px; border: 0; border-radius: var(--r-xl); background: var(--surface-container-high);
  color: var(--on-surface); font-size: 16px; padding: 0 20px 0 52px; }
.wine-search input:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.wine-search::before { content: ""; position: absolute; left: 18px; top: 16px; width: 24px; height: 24px; background: var(--on-surface-variant);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='7' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m20.5 20.5-5-5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='7' fill='none' stroke='black' stroke-width='1.8'/%3E%3Cpath d='m20.5 20.5-5-5' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
/* Style chips (the wine's colour as a dot). */
.style-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 8px 0 0; list-style: none; }
.style-chips a { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px 0 12px; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--outline); color: var(--on-surface-variant); font-size: 14px; font-weight: 500; text-decoration: none; }
.style-chips a:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.style-chips i { width: 10px; height: 10px; border-radius: 50%; background: var(--w); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
/* Lists: Material list items with a chevron, on a container card. */
.m-list { list-style: none; margin: 0; padding: 0; background: var(--surface-container-lowest); border-radius: var(--r-md); overflow: hidden; max-width: 760px; }
.m-list li + li { border-top: 1px solid var(--outline-variant); }
.m-list a { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; min-height: 56px; padding: 10px 12px 10px 16px;
  color: var(--on-surface); text-decoration: none; transition: background-color var(--dur-short) var(--ease); }
.m-list a:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.m-list .h { font-size: 16px; display: block; }
.m-list .s { font-size: 13.5px; color: var(--on-surface-variant); display: block; }
.m-list a::after { content: ""; width: 20px; height: 20px; background: var(--on-surface-variant);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.m-list .more .h { color: var(--primary); font-weight: 500; }
/* A wine's row: the app's bottle top (as in Full cellar) in the style's colour, without the status
   ring: the rim and punt only. */
.m-list a:has(> .cat-bottle) { grid-template-columns: auto 1fr auto; gap: 16px; }
.cat-bottle {
  position: relative; width: 40px; aspect-ratio: 1; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.28), transparent 42%), var(--wine);
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.35);
}
.cat-bottle::before { /* punt */
  content: ""; position: absolute; inset: 30%; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,.35), rgba(0,0,0,.08) 70%);
}
/* Producers A to Z: one letter at a time (CSS :target; every link stays in the page). */
.az { display: flex; flex-wrap: wrap; gap: 2px; margin: 4px 0 8px; }
.az a { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 18px; color: var(--on-surface-variant); font-size: 14px; font-weight: 500; text-decoration: none; }
.az a:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.letter-group { display: none; scroll-margin-top: 140px; }
.letter-group:target { display: block; }
.az-groups:not(:has(.letter-group:target)) .letter-group:first-child { display: block; }
.az a.on, .az a[aria-current="true"] { background: var(--secondary-container); color: var(--on-secondary-container); }

/* ---------- Wine page: the app's bottle-details building blocks ---------- */
.wine-page .eb { font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--on-surface-variant); margin-top: 12px; }
.wine-page h1 { margin-top: 4px; }
.wine-detail { display: grid; gap: 16px; max-width: 640px; }
.spill { justify-self: start; display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill); border: 1px solid var(--c); color: var(--on-surface); }
.spill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.trk { position: relative; height: 34px; }
.trk .axis { position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--outline-variant); }
.trk .bar { position: absolute; top: 8px; height: 8px; border-radius: 4px; background: var(--st-ready); opacity: .85; }
.trk .tick { position: absolute; top: 20px; font-size: 11.5px; font-weight: 500; color: var(--on-surface-variant); transform: translateX(-50%); white-space: nowrap; }
.trk .tick.start { transform: none; }
.vrows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.vrows li { display: grid; grid-template-columns: 140px 1fr; gap: 10px; align-items: center; font-size: 15px; }
.wine-page .facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.wine-page .facts dt { color: var(--on-surface-variant); font-size: 13px; padding-top: 2px; }
.wine-page .facts dd { margin: 0; overflow-wrap: anywhere; }
.wine-page .facts a { text-decoration: none; }
.how { border-radius: var(--r-md); background: var(--surface-container-high); padding: 6px 0; }
.how .r { display: grid; grid-template-columns: 112px 1fr auto; gap: 12px; align-items: start; padding: 8px 16px; font-size: 14px; }
.how .k { color: var(--on-surface-variant); }
.how small { display: block; color: var(--on-surface-variant); font-size: 12.5px; }
.sure { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: var(--r-sm); background: var(--surface-container-highest); color: var(--on-surface-variant); white-space: nowrap; }
.sure.high { color: var(--st-ready-text); } .sure.good { color: var(--st-wait-text); } .sure.fair { color: var(--st-last-text); }
.tn { display: grid; gap: 8px; }
.tnote { margin: 0; display: grid; gap: 4px; padding-left: 12px; border-left: 2px solid var(--outline-variant); }
.tnote blockquote { margin: 0; } .tnote figcaption { font-size: 12.5px; font-weight: 600; color: var(--on-surface-variant); }
.srcs { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 2px; }
.wine-page .vintages th, .wine-page .vintages td { border-bottom-color: var(--outline-variant); }
.cta-card { background: var(--primary-container); color: var(--on-primary-container); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 10px; justify-items: start; }
.cta-card h2 { margin: 0; color: var(--on-primary-container); font-size: 18px; }
.cta-card p { margin: 0; }
.wine-layout { display: grid; gap: 24px; }
.wine-aside { display: grid; gap: 12px; align-content: start; }
.wine-aside h2 { margin-top: 8px; }
@media (min-width: 960px) {
  .wine-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
  .wine-aside { position: sticky; top: 88px; }
}
.prose.wine-page { max-width: 1120px; }
/* The article list rules (.prose ul: padding, grid; .prose li: 65ch) don't apply to these. */
.prose .m-list, .prose .style-chips, .prose .vrows { padding-left: 0; }
.prose .m-list { display: block; gap: 0; }
.prose .style-chips { display: flex; }
.prose .m-list li, .prose .style-chips li, .prose .vrows li { max-width: none; }
.wine-page .crumbs { font-size: 13px; font-weight: 500; color: var(--on-surface-variant); }
.wine-page .crumbs a { color: var(--primary); text-decoration: none; }
.wine-page .group h2 { font-size: 14px; font-weight: 500; color: var(--primary); margin: 24px 0 8px; }
.wine-page .group h2 a { color: inherit; text-decoration: none; }

/* ---------- Home: the demo fridge (scripts/demo/demo-fridge.js; drawn by fridge.css) ---------- */
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 10px; }
.demo-head b { font-size: 15px; font-weight: 500; }
.demo-head small { font-size: 12.5px; color: var(--on-surface-variant); }
.demo-tag { font-size: 11.5px; font-weight: 500; padding: 3px 8px; border-radius: var(--r-xs); background: var(--surface-container-highest); color: var(--on-surface-variant); }
.demo-fridge .fridge-col { touch-action: pan-y pinch-zoom; }
.demo-fridge .fridge-dots { margin: 12px auto 0; }     /* the dots themselves: bottle-sheet.css (page-dots.js) */
#demo-note a { color: var(--primary); font-weight: 500; }
.demo-fridge:not(.live) .fridge-dots { display: none; }
/* The bottle details' "your own details" notice (the app's own lives in cellar.css). */
#dlg .notice-stack { margin: 0; padding: 10px 14px; border-radius: var(--r-lg); background: var(--surface-container-high); color: var(--on-surface-variant); font-size: 13px; }
#dlg .notice-stack p { margin: 0; } #dlg .notice-stack p + p { margin-top: 6px; }
#dlg .demo-cta { margin-top: 4px; }
#dlg .demo-cta h2 { font-size: 17px; font-weight: 500; margin: 0; }
#demo-stage, .demo-fridge .demo-head, .demo-fridge .legend-chips { width: 100%; }   /* the card centres its children */
/* A type's styles (migration 019): chips under the heading of a style page; the current one filled. */
.sub-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 4px 0 8px; list-style: none; }
.sub-chips a { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--outline); color: var(--on-surface-variant); font-size: 14px; font-weight: 500; text-decoration: none; }
.sub-chips a:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.sub-chips a[aria-current="page"] { background: var(--secondary-container); color: var(--on-secondary-container); box-shadow: none; }
.wine-detail .sections .facts { margin: 0 0 14px; }
