/* Public pages (proposal H, light honey): docs/design/proposals/round3/h.html. Tokens only; --fl-solid/--fl-tint come from the flavour. */

body.public { background: var(--color-bg-canvas); color: var(--color-text-primary); font: 400 var(--font-size-md)/1.55 var(--font-body); }
.public a { color: var(--color-ember); text-underline-offset: 3px; }
.public :focus-visible { outline: 2px solid var(--color-ember); outline-offset: 2px; border-radius: 6px; }
.public ::selection { background: var(--color-selection); }

.pub { max-width: var(--content-max); margin: 0 auto; padding: 14px 14px 32px; }
.pub__preview { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 14px; margin-bottom: 8px; border-radius: var(--radius-md); background: var(--color-preview-muted); color: var(--color-preview); font-weight: 600; font-size: var(--font-size-sm); }
.pub__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 14px; }
.pub__brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-text-primary); }
.pub__lang { display: inline-flex; border: 1px solid var(--color-border-default); border-radius: var(--radius-full); padding: 3px; background: var(--color-bg-surface); }
.pub__lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 11px; border-radius: var(--radius-full); font-size: var(--font-size-sm); font-weight: 600; text-decoration: none; color: var(--color-text-secondary); }
.pub__lang a[aria-current] { background: var(--color-ember-muted); color: var(--color-ember-ink); }
.pub__foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 0 4px; color: var(--color-text-tertiary); font-size: var(--font-size-sm); }
.pub__foot p { margin: 0; }
.pub__theme fieldset { display: inline-flex; margin: 0; padding: 3px; min-width: 0; border: 1px solid var(--color-border-default); border-radius: var(--radius-full); background: var(--color-bg-surface); }
.pub__theme button { min-width: 44px; min-height: 44px; padding: 0 var(--space-3); border: 0; border-radius: var(--radius-full); background: transparent; color: var(--color-text-secondary); font: 600 var(--font-size-sm) var(--font-body); cursor: pointer; }
.pub__theme button[aria-pressed="true"] { background: var(--color-ember-muted); color: var(--color-ember-ink); }
.pub__more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 600; }
.pub__notfound { font: 600 var(--font-size-xl)/1.2 var(--font-display); margin: 0; }

.pcard { background: var(--color-bg-surface); border-radius: var(--radius-card); box-shadow: var(--shadow-card); margin-bottom: 14px; position: relative; overflow: hidden; }
.pcard > .pad { padding: var(--space-5); }
.pcard h2 { font: 600 19px/1.25 var(--font-display); margin: 0 0 12px; }
.sub { margin: 8px 0 0; color: var(--color-text-secondary); text-wrap: pretty; }

.hero { background: var(--fl-solid); color: var(--color-text-inverse); }
.hero__body { padding: 22px var(--space-5) var(--space-5); position: relative; }
.hero__orn { position: absolute; right: -34px; top: -12px; width: 206px; color: var(--color-text-inverse); }
.hero__orn svg { display: block; width: 100%; height: auto; }
.hero__orn path { fill: none; stroke: currentColor; stroke-opacity: 0.25; stroke-width: 2; }
.hero__orn path.on { fill: currentColor; fill-opacity: 0.12; }
.hero h1 { font: 600 clamp(36px, 9vw, 48px)/1.04 var(--font-display); letter-spacing: -0.02em; margin: 0; max-width: 70%; text-wrap: balance; overflow-wrap: anywhere; }
.hero .sub, .hero .meta { max-width: 62%; color: var(--fl-tint); }
.hero .meta { margin: 10px 0 0; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.facts { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-top: 18px; }
.f { container-type: inline-size; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--color-text-inverse) 14%, transparent); }
.f .v { display: block; font: 600 clamp(0.9rem, 15cqw, 1.25rem)/1.15 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.f .l { display: block; font-size: 12.5px; color: var(--fl-tint); }

.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md { max-width: 62ch; text-wrap: pretty; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0 0; font-size: 15px; }
.kv dt { color: var(--color-text-secondary); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }

.chartcard .chart { max-width: 480px; margin-inline: auto; }
.chartcard text { font-size: 14px; }
.chartcard .ch-band-label { font-size: 14px; }
.chartcard .ch-band { fill: var(--fl-tint); opacity: 0.6; }
.chartcard .ch-sg { stroke: var(--fl-solid); }
.chartcard .ch-dot { stroke: var(--fl-solid); }
.chartcard .ch-title-sg { fill: var(--fl-solid); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 16px 1fr; gap: 14px; position: relative; padding-bottom: 16px; }
.tl li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 20px; bottom: -2px; width: 2px; background: var(--color-border-subtle); }
.tl .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--color-ember); margin-top: 3px; box-shadow: 0 0 0 4px var(--color-ember-muted); }
.tl .now .dot { background: var(--color-bg-surface); border: 3px solid var(--color-ember); }
.tl .future .dot { background: transparent; box-shadow: none; border: 2px dashed var(--color-border-default); }
.tl .when { font-size: var(--font-size-sm); color: var(--color-text-tertiary); }
.tl .what { font-weight: 600; }
.tl .desc { font-size: 14.5px; color: var(--color-text-secondary); overflow-wrap: anywhere; }

.taste { display: grid; gap: 12px; margin: 0 0 16px; }
.taste div { display: grid; gap: 2px; }
.taste dt { font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text-secondary); }
.taste dd { margin: 0; overflow-wrap: anywhere; }
.when-tag { display: inline-block; font-size: var(--font-size-sm); padding: 3px 10px; border-radius: var(--radius-full); background: var(--color-bg-sunken); color: var(--color-text-secondary); margin-bottom: 12px; }

.stage { font-size: var(--font-size-sm); font-weight: 600; color: var(--color-text-secondary); margin: 14px 0 6px; }
.stage:first-of-type { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 11px; border-radius: var(--radius-full); background: var(--color-bg-sunken); font-size: 14px; }
.comp { margin: 0 0 6px; overflow-wrap: anywhere; }
.comp--abv { color: var(--color-text-secondary); }
.public details { margin-top: 16px; border-top: 1px solid var(--color-border-subtle); padding-top: 12px; }
.public summary { cursor: pointer; font-weight: 600; color: var(--color-ember); list-style: none; min-height: 32px; display: flex; align-items: center; gap: 8px; }
.public summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--duration-fast) var(--ease-standard); }
.public details[open] summary::before { transform: rotate(45deg); }
.public table:not(.sr-only) { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14.5px; }
.public td { padding: 6px 0; border-bottom: 1px solid var(--color-border-subtle); }
.public td.n { text-align: right; color: var(--color-text-secondary); font-variant-numeric: tabular-nums; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-2); }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-md); background: var(--color-bg-sunken); }

.more { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.other { border-radius: var(--radius-lg); padding: 12px; min-height: 104px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; background: var(--fl-tint); color: var(--color-text-primary); }
.other .flavor-icon { color: var(--fl-solid); }
.other b { font: 600 15px/1.2 var(--font-display); overflow-wrap: anywhere; }
.other span { font-size: 12.5px; color: var(--color-text-secondary); margin-top: auto; }

@media (max-width: 599px) {
  .facts { display: flex; flex-wrap: nowrap; }
  .f--abv, .f--age, .f--bottled { container-type: normal; flex: 0 0 auto; }
  .f--abv .v, .f--age .v { font-size: 1.25rem; }
  .f--bottled .v { font-size: 0.95rem; }
  .f--sweet { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 420px) {
  .f { padding: 9px; }
  .f--abv .v, .f--age .v { font-size: 1rem; }
  .f--bottled .v { font-size: 0.8rem; }
  .f--sweet .v { font-size: clamp(0.8rem, 15cqw, 1.25rem); }
  .more { gap: var(--space-2); }
  .other { padding: 10px; }
}
@media (max-width: 340px) {
  .facts { flex-wrap: wrap; }
  .f--sweet { flex-basis: 100%; order: 1; }
}
@media (min-width: 600px) {
  .facts { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .hero__orn { right: -20px; top: -16px; width: 230px; }
}
@media (min-width: 900px) {
  .pub { padding-top: 36px; }
  .pcard > .pad, .hero__body { padding: 26px; }
}

/* dark: plain card surface with a thin flavour accent; flavour solids are lightened where they are text, icon or stroke */
@media (prefers-color-scheme: dark) {
  [data-theme="system"] [style*="--fl-solid"] { --fl-light: color-mix(in srgb, var(--fl-solid) 55%, white); }
  [data-theme="system"] [style*="--fl-tint"] { --fl-tint: var(--color-bg-surface) !important; }
  [data-theme="system"] .hero { background: var(--color-bg-surface); color: var(--color-text-primary); box-shadow: var(--shadow-card), inset 4px 0 0 var(--fl-solid); }
  [data-theme="system"] .hero .sub, [data-theme="system"] .hero .meta, [data-theme="system"] .f .l { color: var(--color-text-secondary); }
  [data-theme="system"] .hero__orn { color: var(--fl-light); }
  [data-theme="system"] .f { background: var(--color-bg-raised); }
  [data-theme="system"] :is(.other, .gal__card) { box-shadow: inset 3px 0 0 var(--fl-solid); }
  [data-theme="system"] :is(.other, .gal__card) .flavor-icon { color: var(--fl-light); }
  [data-theme="system"] .chartcard .ch-band { fill: var(--color-bg-raised); }
  [data-theme="system"] .chartcard :is(.ch-sg, .ch-dot) { stroke: var(--fl-light); }
  [data-theme="system"] .chartcard .ch-title-sg { fill: var(--fl-light); }
}
[data-theme="dark"] [style*="--fl-solid"] { --fl-light: color-mix(in srgb, var(--fl-solid) 55%, white); }
[data-theme="dark"] [style*="--fl-tint"] { --fl-tint: var(--color-bg-surface) !important; }
[data-theme="dark"] .hero { background: var(--color-bg-surface); color: var(--color-text-primary); box-shadow: var(--shadow-card), inset 4px 0 0 var(--fl-solid); }
[data-theme="dark"] .hero .sub, [data-theme="dark"] .hero .meta, [data-theme="dark"] .f .l { color: var(--color-text-secondary); }
[data-theme="dark"] .hero__orn { color: var(--fl-light); }
[data-theme="dark"] .f { background: var(--color-bg-raised); }
[data-theme="dark"] :is(.other, .gal__card) { box-shadow: inset 3px 0 0 var(--fl-solid); }
[data-theme="dark"] :is(.other, .gal__card) .flavor-icon { color: var(--fl-light); }
[data-theme="dark"] .chartcard .ch-band { fill: var(--color-bg-raised); }
[data-theme="dark"] .chartcard :is(.ch-sg, .ch-dot) { stroke: var(--fl-light); }
[data-theme="dark"] .chartcard .ch-title-sg { fill: var(--fl-light); }
