/* ==========================================================================
   Wine dossier — the wine page's "At a glance" squares + passes and the classic
   sections (Components/WineDossier.razor + Components/Dossier/*). Port of the app's
   components/v2/wine/glance/* and components/v2/wine/*.
   wd-* = the dossier's sections · wg-* = the glance symbols, passes and blocks.
   The shared grid / pass / deck chrome is glance.css (--gl-* tokens); the tokens
   below mirror the app's lib/theme/colors.ts. Reuse them, never a raw hex.
   ========================================================================== */

:root {
    --wg-surface-alt: #eef2f0;      /* app colors.surfaceAlt */
    --wg-on-dark: #f6fbf8;          /* app colors.textOnDark */
    --wg-mustard: #d4a341;          /* app colors.vinblikMustard — silt, low emissions */
    --wg-bone: #e8dfc4;             /* app colors.vinblikBone — sand */
    --wg-rust: #a85a2a;             /* app colors.vinblikRust — clay, high emissions */
    --wg-burg: #7a1a23;             /* app colors.vinblikBurg — link / post glyphs */
    --wg-forest: #1a3a2a;           /* app colors.vinblikForest — classic vintage bars */
    --wg-ink18: rgba(11, 11, 12, 0.18); /* app colors.vinblikInk18 — bedding planes */
    --wg-warn: #9a5b12;             /* app colors.lookupWarn — average line, frost */
    --wg-warn-bg: #fbefdc;          /* app colors.lookupWarnBg */
    /* Bedrock, roughly each rock's own colour — never the topsoil's rust/mustard/bone */
    --wg-rock-chalk: #f1eee6;       /* app colors.rockChalk */
    --wg-rock-limestone: #dbd4c3;   /* app colors.rockLimestone */
    --wg-rock-marl: #c2b6a0;        /* app colors.rockMarl */
    --wg-rock-clay: #7a6656;        /* app colors.rockClay */
    --wg-rock-sand: #d8c08f;        /* app colors.rockSand */
    --wg-rock-gravel: #a7a29a;      /* app colors.rockGravel */
    --wg-rock-slate: #5f6b73;       /* app colors.rockSlate */
    --wg-rock-granite: #c3a59b;     /* app colors.rockGranite */
    --wg-rock-volcanic: #3f3b3a;    /* app colors.rockVolcanic */
}

/* ── The dossier: a reading column of sections ── */
.wd { display: flex; flex-direction: column; max-width: 780px; min-width: 0; }
.wd-section { padding: 1.1rem 0 1.25rem; border-top: 1px solid var(--gl-border-light); min-width: 0; }
.wd-section:first-child { border-top: 0; padding-top: 0.25rem; }
.wd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 0.8rem; min-width: 0; }
.wd-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-dark-text);
    margin: 0;
    min-width: 0;
}
.wd-note {
    font-size: 0.72rem;
    color: var(--gl-placeholder);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wd-loading { display: flex; flex-direction: column; gap: 0.75rem; }
.wd-sk-title { height: 1.2rem; width: 160px; }
.wd-sk-grid { height: 280px; border-radius: 14px; }
.wd-sk-row { height: 90px; border-radius: 12px; }

.wd-info-btn {
    all: unset;
    cursor: pointer;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-muted);
}
.wd-info-btn:hover { background: var(--color-secondary-bg); color: var(--gl-heading); }
.wd-info-btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.wd-info {
    margin: 0 0 1rem;
    padding: 0.8rem 1rem;
    background: var(--color-secondary-bg);
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.45;
}
.wd-info dt { font-weight: 700; color: var(--gl-heading); }
.wd-info dd { margin: 0 0 0.55rem; color: var(--gl-text-secondary); }
.wd-info dd:last-child { margin-bottom: 0; }

.wd-crumbs { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.wd-crumb { font-size: 0.875rem; color: var(--color-muted); text-decoration: none; padding: 0 1px; }
.wd-crumb.leaf { color: var(--gl-heading); font-weight: 700; }
.wd-crumb:hover { text-decoration: underline; color: var(--color-brand); }
.wd-crumb-sep { display: inline-flex; color: var(--gl-border-soft); }

.wd-meters { margin-bottom: 12px; }
.wd-meter { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; }
.wd-meter-label { font-size: 0.82rem; color: var(--gl-text-secondary); }
.wd-meter-right { display: flex; align-items: center; gap: 10px; }
.wd-meter-value { font-size: 0.76rem; color: var(--color-muted); }
.wd-gap { margin-bottom: 12px; }
.wd-prose { font-size: 0.875rem; line-height: 1.55; color: var(--gl-text-secondary); margin: 0; }
.wd-line { font-size: 0.82rem; color: var(--gl-text-secondary); margin: 0 0 10px; }
.wg-source.wd-credit-above { margin: -4px 0 12px; }

.wd-producer-name { font-weight: 700; color: var(--gl-heading); margin-bottom: 0.4rem; }
.wd-link { display: inline-block; margin-top: 0.7rem; font-size: 0.85rem; font-weight: 700; color: var(--color-brand); text-decoration: none; }
.wd-link:hover { text-decoration: underline; }

.wd-posts { display: flex; flex-direction: column; gap: 14px; }
.wd-post { display: flex; align-items: flex-start; gap: 11px; text-decoration: none; color: inherit; }
a.wd-post:hover .wd-post-title { color: var(--color-brand); }
a.wd-post:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 3px; border-radius: 6px; }
.wd-post-icon { display: inline-flex; color: var(--wg-burg); margin-top: 1px; }
.wd-post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wd-post-title { font-size: 0.82rem; line-height: 1.4; color: var(--gl-heading); }
.wd-post-meta { font-size: 0.7rem; color: var(--color-muted); margin-top: 3px; }
.wd-go { color: var(--gl-placeholder); font-size: 0.85rem; flex-shrink: 0; }

.wd-links { display: flex; flex-direction: column; }
.wd-linkrow {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid var(--gl-border-light);
    text-decoration: none;
    color: inherit;
    min-width: 0;
}
.wd-linkrow:last-child { border-bottom: 0; }
.wd-linkrow:hover .wd-linkrow-name { color: var(--color-brand); }
.wd-linkrow:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 6px; }
.wd-linkrow-icon { display: inline-flex; color: var(--wg-burg); }
.wd-linkrow-name { flex: 1; min-width: 0; font-size: 0.875rem; font-weight: 700; color: var(--gl-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-linkrow-sub { max-width: 45%; font-size: 0.76rem; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-photo-credit { font-size: 0.62rem; color: var(--color-muted); margin: 10px 0 0; }

/* The shared deck's items are <button>s, which shrink to their content even as display:block;
   stretch them to the pass's width (minus their stepped margins), like the app's deck.
   (Belongs in glance.css — reported to the integrator.) */
.wd .gl-deck-item { width: -webkit-fill-available; width: -moz-available; width: stretch; }

/* ── Symbols (squares + pass headers) ── */
/* base/reset.css gives every svg width:100%, which beats an svg's own width attribute: put
   the attribute back in charge inside the dossier (icons, mini symbols, gauges), and let only
   the drawings meant to stretch take the full width. */
.wd svg { width: auto; }
.wg-svg { display: block; overflow: visible; }
.wd .wg-country, .wd .wg-strata-svg { width: 100%; }
.wg-country { overflow: hidden; } /* the neighbours stop at the box, like the app's */
.wg-land { fill: var(--wg-surface-alt); stroke: var(--gl-border-soft); }
.wg-neighbours { fill: var(--color-secondary-bg); stroke: var(--gl-border-light); }
.wg-dot { fill: var(--color-brand); }
.wg-dot--ring { stroke: var(--color-card-bg); }
.wg-pulse {
    fill: var(--color-brand);
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: wg-pulse 2.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}
@keyframes wg-pulse {
    from { transform: scale(0.8); opacity: 0.4; }
    to { transform: scale(2.7); opacity: 0; }
}
.wg-country-label { font-family: var(--font-body); font-size: 11px; font-weight: 700; fill: var(--gl-heading); }
.wg-country-label--halo { stroke: var(--color-card-bg); stroke-linejoin: round; }

.wg-rows { width: 100%; display: flex; flex-direction: column; gap: 9px; }
.wg-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.wg-row-label { min-width: 0; font-size: 0.78rem; color: var(--gl-text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-dots { display: inline-flex; gap: 4px; flex-shrink: 0; }
.wg-dot5 { width: 8px; height: 8px; border-radius: 50%; background: var(--gl-border-soft); }
.wg-dot5.on { background: var(--color-brand); }

.wg-vrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wg-vyear { font-size: 0.78rem; color: var(--color-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wg-vscore { min-width: 22px; text-align: right; font-size: 0.78rem; color: var(--color-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wg-vyear.mine, .wg-vscore.mine { color: var(--gl-heading); font-weight: 700; }
.wg-vtrack { flex: 1; min-width: 20px; height: 6px; border-radius: 3px; background: var(--gl-border-light); overflow: hidden; }
.wg-vfill { display: block; height: 100%; border-radius: 3px; background: var(--gl-border-soft); }
.wg-vfill.mine { background: var(--color-brand); }
.wg-clabel { min-width: 52px; }
.wg-cvalue { min-width: 34px; }
.wg-climate-now { background: var(--color-brand); fill: var(--color-brand); }
.wg-climate-low { background: var(--wg-mustard); fill: var(--wg-mustard); }
.wg-climate-high { background: var(--wg-rust); fill: var(--wg-rust); }

.wg-ring {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--color-brand);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--gl-heading);
    font-variant-numeric: tabular-nums;
}

.wg-fill-brand { fill: var(--color-brand); }
.wg-fill-secondary { fill: var(--gl-text-secondary); }
.wg-fill-soft { fill: var(--gl-border-soft); }
.wg-frame { stroke: var(--gl-border-soft); }

/* Strata: topsoil (clay rust · silt mustard · sand bone) and bedrock (rock colours) */
.wg-strata { position: relative; display: block; width: 100%; }
.wg-strata-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wg-strata-label {
    position: absolute;
    left: 10px;
    right: 10px;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wg-bed { stroke: var(--wg-ink18); }
.wg-soil-clay { fill: var(--wg-rust); background: var(--wg-rust); }
.wg-soil-silt { fill: var(--wg-mustard); background: var(--wg-mustard); }
.wg-soil-sand { fill: var(--wg-bone); background: var(--wg-bone); }
.wg-rock-chalk { fill: var(--wg-rock-chalk); background: var(--wg-rock-chalk); }
.wg-rock-limestone { fill: var(--wg-rock-limestone); background: var(--wg-rock-limestone); }
.wg-rock-marl { fill: var(--wg-rock-marl); background: var(--wg-rock-marl); }
.wg-rock-clay { fill: var(--wg-rock-clay); background: var(--wg-rock-clay); }
.wg-rock-sand { fill: var(--wg-rock-sand); background: var(--wg-rock-sand); }
.wg-rock-gravel { fill: var(--wg-rock-gravel); background: var(--wg-rock-gravel); }
.wg-rock-slate { fill: var(--wg-rock-slate); background: var(--wg-rock-slate); }
.wg-rock-granite { fill: var(--wg-rock-granite); background: var(--wg-rock-granite); }
.wg-rock-volcanic { fill: var(--wg-rock-volcanic); background: var(--wg-rock-volcanic); }
.wg-ink-on-dark { color: var(--wg-on-dark); }
.wg-ink-secondary { color: var(--gl-text-secondary); }
.wg-ink-heading { color: var(--gl-heading); }

/* Gauges (grape pass) */
.wg-gauges { display: flex; justify-content: space-around; margin-top: 4px; }
.wg-gauge { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.wg-gauge-track { stroke: var(--wg-surface-alt); }
.wg-gauge-fill { stroke: var(--color-brand); }
.wg-tick-on { stroke: var(--gl-heading); }
.wg-tick-off { stroke: var(--gl-border-soft); }
.wg-gauge-handle { fill: var(--color-card-bg); stroke: var(--color-brand); }
.wg-gauge-value { font-size: 0.82rem; font-weight: 800; color: var(--gl-heading); margin-top: 2px; }
.wg-gauge-label { font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); font-weight: 700; }

/* Series bars (official figures, Danish imports) */
.wg-series { position: relative; display: block; width: 100%; }
.wg-series-row { display: flex; gap: 5px; height: 100%; }
.wg-series-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.wg-series-btn { all: unset; box-sizing: border-box; flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; cursor: pointer; border-radius: 4px; }
.wg-series-btn:hover .wg-series-bar:not(.sel) { background: var(--gl-placeholder); }
.wg-series-btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 1px; }
.wg-series-value {
    display: block;
    height: 16px;
    max-width: 100%;
    font-size: 0.6rem;
    line-height: 16px;
    color: var(--color-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}
.wg-series-slot { align-self: stretch; display: flex; align-items: flex-end; }
.wg-series-bar { display: block; width: 100%; box-sizing: border-box; border-radius: 3px 3px 0 0; background: var(--gl-border-soft); }
.wg-series-bar.sel { background: var(--color-brand); }
.wg-series-bar.prelim { background: transparent; border: 1px dashed var(--gl-placeholder); border-bottom: 0; }
.wg-series-year { display: block; height: 16px; line-height: 16px; font-size: 0.66rem; color: var(--color-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.wg-series-col.sel .wg-series-year, .wg-series-col.sel .wg-series-value { color: var(--gl-heading); font-weight: 700; }
.wg-series-avg { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--wg-warn); pointer-events: none; }

/* ── Pass parts ── */
/* The ticket edge between a pass's picture and its fields: a dashed line with two notches. */
.wg-perf { position: relative; height: 0; border-top: 1px dashed var(--gl-border-soft); margin: 14px -1rem; }
.wg-perf::before, .wg-perf::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 8px;
    height: 16px;
    background: var(--color-primary-bg);
    border: 1px solid var(--gl-border-light);
}
.wg-perf::before { left: -1px; border-left: 0; border-radius: 0 8px 8px 0; }
.wg-perf::after { right: -1px; border-right: 0; border-radius: 8px 0 0 8px; }

.wg-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
.wg-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wg-field { min-width: 0; padding-right: 8px; }
.wg-field-label {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wg-field-value {
    margin-top: 1px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gl-heading);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wg-source { font-size: 0.7rem; line-height: 1.45; color: var(--gl-placeholder); margin: 6px 0 0; }
.wg-source a { color: inherit; text-decoration: underline; }
.wg-source a:hover { color: var(--color-brand); }
.wg-gap { margin-top: 12px; }
.wg-gap14 { margin-top: 14px; }
.wg-prose { font-size: 0.85rem; line-height: 1.5; color: var(--gl-text-secondary); margin: 12px 0 0; }
.wg-layer-title, .wg-block-title, .wg-extra-label {
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 700;
}
.wg-extra-label { margin-bottom: 10px; }
.wg-layer-hint, .wg-block-hint { font-size: 0.78rem; line-height: 1.35; color: var(--gl-text-secondary); margin: 2px 0 10px; }
.wg-label { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted); font-weight: 700; margin: 12px 0 7px; }
.wg-label--gap { margin-top: 16px; }
.wg-note { font-size: 0.82rem; line-height: 1.4; color: var(--gl-text-secondary); margin: 12px 0 0; }
.wg-note--small { font-size: 0.76rem; margin-top: 8px; }
.wg-line { font-size: 0.82rem; line-height: 1.4; color: var(--gl-text-secondary); margin: 4px 0 0; }
.wg-inline-link { all: unset; color: var(--color-brand); font-weight: 700; cursor: pointer; }
.wg-inline-link:hover { text-decoration: underline; }
.wg-inline-link:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.wg-linkrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-brand);
    text-decoration: none;
}
.wg-linkrow:hover { text-decoration: underline; }
.wg-linkbtn { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.wg-linkbtn:focus-visible, .wg-linkrow:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 4px; }

.wg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wg-chip {
    background: var(--color-secondary-bg);
    border: 1px solid var(--gl-border-light);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    color: var(--gl-text-secondary);
}
.wg-chip.strong { background: var(--color-brand); border-color: var(--color-brand); color: var(--wg-on-dark); font-weight: 700; }
.wg-chip-more { background: var(--color-card-bg); color: var(--color-brand); font-weight: 700; cursor: pointer; font-family: inherit; }
.wg-chip-more:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }

/* Appellation: the UNESCO badge */
.wg-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--color-brand-soft);
    text-decoration: none;
    color: inherit;
}
.wg-badge:hover { filter: brightness(0.98); }
.wg-badge:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.wg-badge-icon { display: inline-flex; color: var(--color-brand); }
.wg-badge-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wg-badge-title { font-size: 0.82rem; font-weight: 700; color: var(--gl-heading); }
.wg-badge-sub { font-size: 0.76rem; color: var(--gl-text-secondary); margin-top: 1px; }
.wg-badge-go { color: var(--color-muted); }

/* Danish imports: the big figure */
.wg-bigrow { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 8px; margin-top: 6px; }
.wg-big { font-size: 1.6rem; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: var(--gl-heading); font-variant-numeric: tabular-nums; }
.wg-bigsub { font-size: 0.78rem; color: var(--color-muted); }

/* Grape family tree */
.wg-tree { margin-top: 4px; }
.wg-tree-row { display: flex; gap: 10px; }
.wg-node {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gl-border-light);
    border-radius: 12px;
    padding: 8px 10px;
    background: var(--color-secondary-bg);
}
.wg-node.strong { background: var(--color-brand); border-color: var(--color-brand); }
.wg-node-name { font-size: 0.84rem; font-weight: 700; color: var(--gl-heading); overflow-wrap: anywhere; }
.wg-node-note { font-size: 0.7rem; color: var(--color-muted); margin-top: 1px; }
.wg-node.strong .wg-node-name { color: var(--wg-on-dark); }
.wg-node.strong .wg-node-note { color: var(--wg-on-dark); opacity: 0.8; }
.wg-joint { position: relative; height: 18px; }
.wg-joint-bar {
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 9px;
    border: 1px solid var(--gl-border-soft);
    border-top: 0;
    border-radius: 0 0 6px 6px;
}
.wg-joint-stem { position: absolute; top: 9px; left: 50%; width: 1px; height: 9px; background: var(--gl-border-soft); }
.wg-tree-child { width: 50%; margin: 0 auto; display: flex; }

/* Legends */
.wg-legend { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 4px; margin-top: 2px; }
.wg-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--gl-text-secondary); }
.wg-legend-bar { display: inline-block; width: 10px; height: 6px; border-radius: 3px; }
.wg-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* Warmth scale: two label layouts (narrow / wide), the one that fits is shown */
.wg-warmth { container-type: inline-size; margin-top: 4px; }
.wg-warmth-box { position: relative; width: 100%; }
.wg-warmth-wide { display: none; }
@container (min-width: 600px) {
    .wg-warmth-narrow { display: none; }
    .wg-warmth-wide { display: block; }
}
.wg-ws-axis { position: absolute; left: 0; right: 0; height: 1px; background: var(--gl-border-soft); }
.wg-ws-tick { position: absolute; width: 1px; height: 7px; background: var(--gl-border-soft); }
.wg-ws-ticklabel {
    position: absolute;
    width: 28px;
    margin-left: -14px;
    text-align: center;
    font-size: 0.62rem;
    color: var(--gl-placeholder);
    font-variant-numeric: tabular-nums;
}
.wg-ws-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gl-placeholder); transform: translate(-50%, -50%); }
.wg-ws-dot.here { width: 10px; height: 10px; background: var(--color-brand); }
.wg-ws-stem { position: absolute; width: 1px; background: var(--gl-border-soft); }
.wg-ws-label {
    position: absolute;
    text-align: center;
    font-size: 0.62rem;
    line-height: 13px;
    color: var(--gl-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wg-ws-label.here { font-size: 0.7rem; font-weight: 700; color: var(--gl-heading); }
/* the name sits over any stem of a label in a higher row */
.wg-ws-label { z-index: 1; }
.wg-ws-text { background: var(--color-card-bg); padding: 0 2px; }
.wg-ws-band { position: absolute; height: 8px; border-radius: 4px; }

/* Vintage pass */
.wg-vtop { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 14px; }
.wg-vbig { font-size: 3.4rem; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--gl-heading); font-variant-numeric: tabular-nums; }
.wg-vtop-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.wg-vword { font-size: 1rem; font-weight: 800; color: var(--gl-heading); }
.wg-vmeta { font-size: 0.76rem; color: var(--color-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-own-badge {
    margin-top: 4px;
    background: var(--color-brand);
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wg-on-dark);
    font-weight: 800;
}
.wg-seasons { display: flex; gap: 8px; margin-top: 14px; }
.wg-season { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.wg-season-mm { font-size: 0.66rem; color: var(--color-muted); min-height: 15px; font-variant-numeric: tabular-nums; }
.wg-season-col { height: 54px; display: flex; align-items: flex-end; }
.wg-season-bar { display: block; width: 16px; border-radius: 4px 4px 2px 2px; background: var(--color-brand); opacity: 0.8; }
.wg-season-name {
    max-width: 100%;
    margin-top: 4px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wg-season-temp { font-size: 0.76rem; color: var(--gl-heading); font-weight: 700; font-variant-numeric: tabular-nums; }
.wg-foot { font-size: 0.76rem; color: var(--color-muted); margin: 10px 0 0; }
.wg-climate { margin-top: 16px; }
.wg-topsoil { margin-top: 18px; }
.wg-topsoil-facts { font-size: 0.82rem; color: var(--gl-heading); font-weight: 700; margin-top: 10px; }
.wg-dial-hint { font-size: 0.72rem; color: var(--color-muted); text-align: center; margin: 4px 0 0; }

/* The year dial: a rail that slides so the chosen year sits in the middle */
.wg-dial { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.wg-dial-step {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--gl-border-soft);
    background: var(--color-secondary-bg);
    color: var(--color-brand);
    font-size: 1.1rem;
    line-height: 1;
    font-family: inherit;
    cursor: pointer;
}
.wg-dial-step:disabled { opacity: 0.35; cursor: default; }
.wg-dial-step:not(:disabled):hover { background: var(--color-brand-soft); }
.wg-dial-step:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.wg-dial-window {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 62px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, currentColor 16%, currentColor 84%, transparent);
    mask-image: linear-gradient(90deg, transparent, currentColor 16%, currentColor 84%, transparent);
}
.wg-dial-window:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; border-radius: 8px; }
.wg-dial-track { position: absolute; top: 0; left: 50%; display: flex; transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
.wg-dial-item {
    all: unset;
    box-sizing: border-box;
    height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-top: 4px;
    cursor: pointer;
}
.wg-dial-tick { width: 1px; height: 10px; background: var(--gl-border-soft); }
.wg-dial-label { font-size: 0.66rem; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.wg-dial-swatch { width: 10px; height: 10px; border-radius: 50%; box-sizing: border-box; }
.wg-dial-swatch.none { background: transparent; border: 1px dashed var(--gl-border-soft); }
.wg-dial-item.sel .wg-dial-tick { width: 2px; height: 14px; background: var(--color-brand); }
.wg-dial-item.sel .wg-dial-label { font-size: 0.8rem; font-weight: 800; color: var(--gl-heading); }
.wg-dial-item:hover .wg-dial-label { color: var(--gl-heading); }

/* Official figures pass */
.wg-offbig { font-size: 1.9rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; color: var(--gl-heading); margin-top: 6px; font-variant-numeric: tabular-nums; }
.wg-offline { font-size: 0.85rem; line-height: 1.4; color: var(--gl-text-secondary); margin: 4px 0 0; }
.wg-frost {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--wg-warn-bg);
    cursor: pointer;
}
.wg-frost:hover { filter: brightness(0.98); }
.wg-frost:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.wg-frost-icon { color: var(--wg-warn); font-size: 1.1rem; }
.wg-frost-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wg-frost-title { font-size: 0.82rem; font-weight: 700; color: var(--gl-heading); }
.wg-frost-sub { font-size: 0.76rem; color: var(--gl-text-secondary); margin-top: 1px; }
.wg-frost-go { display: inline-flex; color: var(--wg-warn); }
.wg-official { display: flex; flex-direction: column; }
.wg-official .wg-layer-title { margin-bottom: 10px; }

/* Origin map */
.wg-map-wrap { border: 1px solid var(--gl-border-light); border-radius: 12px; overflow: hidden; }
.wg-map { height: 200px; background: var(--color-secondary-bg); }
.wg-map .leaflet-control-attribution { display: none; }
.wg-map-readout {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 9px 12px;
    background: var(--color-card-bg);
    border-top: 1px solid var(--gl-border-light);
    font-size: 0.76rem;
    color: var(--gl-text-secondary);
}
.wg-map-readout span { display: inline-flex; align-items: center; gap: 6px; }
.wg-map-readout svg { color: var(--wg-burg); }

/* Soil bar (topsoil) */
.wg-soilbar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin-bottom: 9px; }
.wg-soilbar > span { display: block; }
.wg-soil-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.76rem; color: var(--gl-text-secondary); }
.wg-soil-legend span { display: inline-flex; align-items: center; gap: 6px; }

/* What makes a good year */
.wg-goodyear { display: flex; flex-direction: column; gap: 14px; }
.wg-gy-row { display: flex; flex-direction: column; gap: 3px; }
.wg-gy-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wg-gy-factor { font-size: 0.875rem; font-weight: 700; color: var(--gl-heading); }
.wg-gy-dir { font-size: 0.76rem; color: var(--color-brand); text-align: right; }
.wg-gy-avgs { font-size: 0.76rem; color: var(--color-muted); white-space: pre-wrap; }

/* Classic vintage & weather */
.wg-vw-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 2px 0;
    overflow-x: auto;
    direction: rtl; /* opens scrolled to the newest years (rendered newest first) */
    scrollbar-width: thin;
}
.wg-vw-col {
    all: unset;
    direction: ltr;
    flex: 0 0 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    border-radius: 4px;
}
.wg-vw-col:focus-visible { outline: 2px solid var(--color-brand); outline-offset: -2px; }
.wg-vw-track { height: 64px; display: flex; align-items: flex-end; }
.wg-vw-bar { display: block; width: 18px; border-radius: 3px; background: var(--wg-forest); }
.wg-vw-marker { width: 18px; height: 3px; border-radius: 2px; margin-top: 5px; background: transparent; }
.wg-vw-col.sel .wg-vw-marker { background: var(--color-brand); }
.wg-vw-year { font-size: 0.62rem; color: var(--gl-placeholder); margin-top: 4px; }
.wg-vw-col.sel .wg-vw-year { color: var(--color-brand); font-weight: 700; }
.wg-vw-detail {
    margin-top: 14px;
    padding: 14px;
    background: var(--color-secondary-bg);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.wg-vw-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.wg-vw-dyear { font-size: 1.4rem; font-weight: 800; color: var(--gl-heading); }
.wg-vw-dscore { font-size: 0.82rem; font-weight: 700; color: var(--color-brand); }
.wg-vw-partial { font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wg-mustard); font-weight: 700; }
.wg-vw-none { font-size: 0.82rem; color: var(--color-muted); margin: 0; }
.wg-vw-weather { display: flex; flex-direction: column; gap: 12px; }
.wg-stats { display: flex; gap: 10px; }
.wg-stat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--color-card-bg); border-radius: 10px; padding: 11px; }
.wg-stat-value { font-size: 1.1rem; font-weight: 700; color: var(--gl-heading); font-variant-numeric: tabular-nums; }
.wg-stat-label { font-size: 0.7rem; color: var(--color-muted); margin-top: 2px; }
.wg-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--color-card-bg);
    border: 1px solid var(--gl-border-light);
    border-radius: 10px;
    overflow: hidden;
    font-size: 0.82rem;
}
.wg-table th, .wg-table td { padding: 9px 12px; text-align: right; }
.wg-table th:first-child, .wg-table td:first-child { text-align: left; }
.wg-table th {
    background: var(--wg-surface-alt);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 700;
}
.wg-table td { color: var(--gl-heading); font-variant-numeric: tabular-nums; border-top: 1px solid var(--gl-border-light); }
.wg-table td:first-child { color: var(--gl-text-secondary); }
.wg-vw-extra { font-size: 0.76rem; color: var(--color-muted); margin: 0; }
.wg-vw-climate { display: flex; flex-direction: column; gap: 6px; padding-top: 10px; border-top: 1px solid var(--gl-border-light); }
.wg-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; }
.wg-kv-label { color: var(--gl-text-secondary); }
.wg-kv-value { text-align: right; color: var(--gl-heading); font-weight: 700; }
.wg-vw-analog { padding-top: 12px; border-top: 1px solid var(--gl-border-light); display: flex; flex-direction: column; gap: 8px; }
.wg-vw-analog-head { font-size: 0.82rem; font-weight: 700; color: var(--gl-heading); white-space: pre-wrap; }

@media (max-width: 520px) {
    .wg-perf { margin-inline: -0.8rem; }
    .wg-vbig { font-size: 2.8rem; }
    .wd-note { max-width: 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .wg-pulse { animation: none; }
    .wg-dial-track { transition: none; }
}
