/* charts.css — /charts/ hub and per-metal chart pages (2026-10-15).
   Uses the theme tokens from main.css (--gold, --charcoal, --border, --font). */

.cg-body { background: #fff; }
.cg {
    --cg-gray: #8a8a8a;
    --cg-line: #ececec;
    --cg-skel: #f1f1f1;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 16px 56px;
    color: var(--charcoal, #2C2C2C);
    font-family: var(--font, 'Montserrat', sans-serif);
    line-height: 1.55;
}
.cg a { color: inherit; }
.cg-dim { color: var(--cg-gray); }
.cg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Breadcrumb */
.cg-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 20px 0 0; margin: 0; font-size: 13px; color: var(--cg-gray); }
.cg-crumbs li + li::before { content: "›"; margin-right: 6px; color: #bbb; }
.cg-crumbs a { color: #666; text-decoration: none; } /* #666 = 5.74:1 (was #8a8a8a, 3.45:1) */
.cg-crumbs a:hover { color: var(--charcoal); text-decoration: underline; }

/* Hero */
.cg-hero { padding: 28px 0 8px; }
.cg-hero h1 { font-size: 40px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; color: var(--charcoal); }
.cg-spot { font-size: 16px; margin: 0 0 10px; }
.cg-spot strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.cg-spot .cg-dim { font-size: 14px; }
.cg-intro { font-size: 16px; color: #555; max-width: 640px; margin: 0 0 18px; }
.cg-metals { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 22px; font-size: 15px; }
.cg-metals a { text-decoration: none; color: #666; padding: 6px 0; border-bottom: 2px solid transparent; }
.cg-metals a:hover { color: var(--charcoal); }
.cg-metals a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Current metal is a non-link span (generator), styled as the selected tab. */
.cg-metals [aria-current="page"] { color: var(--charcoal); font-weight: 700; padding: 6px 0; border-bottom: 2px solid var(--gold); cursor: default; }
.cg-cta {
    display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px;
    background: var(--cta-bg, var(--gold, #E8960C)); color: var(--cta-fg, #fff) !important; font-weight: 700; font-size: 15px;
    border-radius: 10px; text-decoration: none;
}
.cg-cta:hover { background: var(--cta-bg-hover, var(--gold-dk, #C97D00)); }
.cg-cta:focus-visible, .cg button:focus-visible, .cg select:focus-visible, .cg a:focus-visible { outline: 3px solid rgba(232,150,12,.45); outline-offset: 2px; }
/* Per-metal primary CTA: matches each metal page's hero badge. Hub (no data-metal) keeps the default above. */
.cg[data-metal="gold"]      .cg-cta { --cta-bg: var(--gold, #E8960C); --cta-fg: var(--charcoal, #2C2C2C); --cta-bg-hover: #D1870B; --cta-ring: rgba(232,150,12,.45); }
.cg[data-metal="silver"]    .cg-cta { --cta-bg: #7F9AB5; --cta-fg: #fff; --cta-bg-hover: #728BA3; --cta-ring: rgba(127,154,181,.55); }
.cg[data-metal="platinum"]  .cg-cta { --cta-bg: #8E9BAE; --cta-fg: #fff; --cta-bg-hover: #808C9D; --cta-ring: rgba(142,155,174,.55); }
.cg[data-metal="palladium"] .cg-cta { --cta-bg: #6B7FA3; --cta-fg: #fff; --cta-bg-hover: #607293; --cta-ring: rgba(107,127,163,.55); }
.cg[data-metal] .cg-cta:focus-visible { outline-color: var(--cta-ring); }

/* Sections */
.cg-section { padding: 44px 0 0; }
.cg-section h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 6px; }
.cg-sub { color: #666; font-size: 14px; margin: 0 0 16px; }
.cg-tv { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 0; font-size: 13px; }
.cg-tv-btn, .cg-link-btn {
    background: none; border: 1px solid var(--border, #E0E0E0); border-radius: 8px; min-height: 44px; padding: 0 16px;
    font: inherit; font-size: 14px; font-weight: 600; color: var(--charcoal); cursor: pointer;
}
.cg-tv-btn:hover { border-color: #bbb; }
.cg-tv.is-open { display: block; }
.cg-tv-frame { width: 100%; height: 360px; }
/* Direct TradingView box (2026-10-15 r2): fixed height reserved before tv.js loads (no CLS). */
#cg-tv { display: block; height: 420px; overflow: hidden; border: 1px solid var(--border, #E0E0E0); border-radius: 8px; background: #f8f8f8; }
#cg-tv .cg-tv-fallback { margin: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center; }
#cg-tv.is-live { background: #fff; }
#cg-tv .cg-tv-frame { height: 420px; }

/* Tables */
.cg-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cg-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.cg-table th, .cg-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--cg-line); vertical-align: baseline; }
.cg-table thead th { font-size: 12px; font-weight: 600; color: var(--cg-gray); border-bottom: 1px solid #ddd; }
.cg-table tbody th { font-weight: 600; }
.cg-table tbody th a { text-decoration: none; border-bottom: 1px solid #d6d6d6; }
.cg-table tbody th a:hover, .cg-table td a:hover { border-bottom-color: var(--gold); }
.cg-table td a { text-decoration: none; border-bottom: 1px solid #d6d6d6; }
.cg-table .num { text-align: right; white-space: nowrap; }
.cg-table--compact th, .cg-table--compact td { padding: 7px 10px; }
.cg-buy { color: #666 !important; font-size: 13px; white-space: nowrap; }
/* r8: a left-aligned text column right after a right-aligned number gets extra room so they don't run together. */
.cg-table td.num + td:not(.num) { padding-left: 22px; }

/* Ratio stats */
.cg-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; border-top: 1px solid var(--cg-line); border-bottom: 1px solid var(--cg-line); }
.cg-stats div { padding: 16px 10px; }
.cg-stats dt { font-size: 12px; color: var(--cg-gray); }
.cg-stats dd { margin: 4px 0 0; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* More / related — one text-link style (2026-10-15 r5).
   Dark gold #8A5A00 on #fff = 5.93:1; hover #5C3B00 = 10.09:1. Underline is gold-tinted at rest. */
.cg-more { display: flex; flex-wrap: wrap; gap: 4px 28px; padding: 40px 0 0; font-size: 15px; }
.cg-related ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.cg-more a, .cg-related a {
    display: inline-block; padding: 12px 0; line-height: 20px; /* 44px tap height */
    color: #8A5A00; font-weight: 600;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
    text-decoration-color: rgba(232,150,12,.6);
}
/* Trailing arrow glyphs removed 2026-10-15 r6 (owner: plain text links). */
.cg-more a:hover, .cg-related a:hover, .cg-more a:focus-visible, .cg-related a:focus-visible {
    color: #5C3B00; text-decoration-thickness: 2px; text-decoration-color: currentColor;
}

/* FAQ */
.cg-faq-item { border-bottom: 1px solid var(--cg-line); }
.cg-faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 8px 0; }
.cg-faq-item summary::-webkit-details-marker { display: none; }
.cg-faq-item summary::after { content: "+"; font-size: 22px; color: var(--cg-gray); font-weight: 400; }
.cg-faq-item[open] summary::after { content: "–"; }
.cg-faq-item h3 { font-size: 16px; font-weight: 600; margin: 0; }
.cg-faq-a { margin: 0 0 18px; color: #555; font-size: 15px; max-width: 720px; }
.cg-faq-a a { color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--gold); }

/* Hub tiles (2026-10-15 r7). One link per tile; --m fills the bar and dot, --m-ink is the text-safe
   tone for border/focus. --m-ink on #fff: gold #8A5A00 5.93:1, silver #4F6B87 5.55:1,
   platinum #5B6779 5.74:1, palladium #4A5F86 6.42:1 (all >= 4.5:1). */
.cg-hub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0 0; }
.cg-hub-card[data-metal="gold"]      { --m: #E8960C; --m-ink: #8A5A00; }
.cg-hub-card[data-metal="silver"]    { --m: #7F9AB5; --m-ink: #4F6B87; }
.cg-hub-card[data-metal="platinum"]  { --m: #8E9BAE; --m-ink: #5B6779; }
.cg-hub-card[data-metal="palladium"] { --m: #6B7FA3; --m-ink: #4A5F86; }
.cg-hub-card {
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px;
    padding: 28px; background: #fff; border: 1px solid var(--cg-line); border-radius: 14px;
    text-decoration: none; color: var(--charcoal, #2C2C2C); cursor: pointer;
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.cg-hub-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--m);
    transition: height 150ms ease;
}
.cg-hub-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; line-height: 20px; }
.cg-hub-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--m); }
.cg-hub-spot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.cg-hub-price { font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.cg-hub-unit { font-size: 13px; color: #707070; }
/* Facts (r8): each fact is a stacked block (small label, value, optional coin line).
   Desktop: two equal columns side by side; phones: stacked with 16px between. */
.cg-hub-facts {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; align-items: start;
    margin: 12px 0 0; padding: 16px 0 0; border-top: 1px solid var(--cg-line);
}
.cg-hub-fact { min-width: 0; }
.cg-hub-facts dt { font-size: 12px; line-height: 16px; color: #666; font-weight: 400; }
.cg-hub-facts dd { margin: 4px 0 0; text-align: left; }
.cg-hub-val { font-size: 20px; line-height: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--charcoal, #2C2C2C); }
.cg-hub-val--pct { display: block; color: var(--m-ink); }
.cg-hub-val-unit { font-size: 13px; color: #666; }
.cg-hub-coin {
    margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--charcoal, #2C2C2C); text-wrap: balance;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cg-hub-card:hover, .cg-hub-card:focus-visible {
    border-color: var(--m-ink); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(44,44,44,.07);
}
.cg-hub-card:hover::before, .cg-hub-card:focus-visible::before { height: 6px; }
.cg-hub-card:hover .cg-hub-metal { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cg .cg-hub-card:focus-visible { outline: 3px solid var(--m-ink); outline-offset: 2px; }
.cg-hub-caption { margin: 14px 0 0; font-size: 13px; color: #707070; }
.cg-hub-caption::first-letter { text-transform: uppercase; } /* JS writes "updated N ago" */
@media (max-width: 639px) {
    .cg-hub { grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
    .cg-hub-card { padding: 20px; gap: 4px; }
    .cg-hub-facts { grid-template-columns: 1fr; gap: 16px; margin-top: 10px; padding-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .cg-hub-card, .cg-hub-card::before { transition: none; }
    .cg-hub-card:hover, .cg-hub-card:focus-visible { transform: none; }
}

/* ── Premium chart ─────────────────────────────────────────────────── */
.pc { position: relative; }
.pc-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; margin: 8px 0 12px; }
.pc-coin-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pc-coin {
    min-height: 44px; min-width: 260px; padding: 0 36px 0 12px; font: inherit; font-size: 15px; color: var(--charcoal);
    border: 1px solid var(--border, #E0E0E0); border-radius: 8px; background: #fff;
}
.pc-periods { display: flex; gap: 4px; margin-left: auto; }
.pc-period {
    min-height: 44px; min-width: 52px; padding: 0 12px; font: inherit; font-size: 14px; font-weight: 600; color: #777;
    background: none; border: 0; border-radius: 8px; cursor: pointer; white-space: nowrap;
}
.pc-period:hover { color: var(--charcoal); background: #f6f6f6; }
.pc-period[aria-pressed="true"] { color: var(--charcoal); background: #f1f1f1; }
.pc-period[hidden] { display: none; }

/* Headline (11/01 fit pass): big number with its label on one line, the period range under it. */
.pc-headline { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; min-height: 58px; }
.pc-big { font-size: 36px; line-height: 1.05; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--charcoal); }
.pc-big-label { font-size: 14px; color: #555; }
.pc-range { flex: 1 0 100%; font-size: 13px; color: var(--cg-gray); margin-top: 2px; min-height: 18px; }

.pc-legend { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 8px 0 4px; }
.pc-key { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: #444; cursor: pointer; user-select: none; }
.pc-key input { width: 18px; height: 18px; margin: 0; accent-color: var(--charcoal); cursor: pointer; }
.pc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.pc-dot--min { background: var(--gold, #E8960C); }
.pc-dot--avg { background: var(--charcoal, #2C2C2C); }
.pc-dot--band { background: rgba(232,150,12,.25); }
.pc-dot--melt { background: #767676; width: 14px; height: 2px; border-radius: 0; }   /* solid gray line: melt value (dashes = moving averages) */
.pc-dot--best { background: #2E7D4F; }   /* green: lowest price, apart from gold lowest premium (owner 11/18) */
.pc-dot--buyback { background: #7a7a7a; }
.pc-dot--gap { background: rgba(46,125,79,.16); border: 1px solid rgba(46,125,79,.45); border-radius: 2px; width: 14px; height: 10px; box-sizing: border-box; }
/* Dollar-panel legend (owner 11/01 Option A): own row above the premium keys; built by premium-chart.js. */
.pc-legend-b { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 0 18px; }

.pc-stage { position: relative; }
.pc-panel { position: relative; width: 100%; }
/* Desktop plot heights follow the viewport height so controls + both plots + dates fit a laptop
   screen (11/01 fit pass); premium-chart.js reads these heights. Floors keep plots readable. */
.pc-panel-a { height: 360px; height: clamp(240px, calc(100vh - 520px), 360px); height: clamp(240px, calc(100dvh - 520px), 360px); }
.pc-panel-b { height: 200px; height: clamp(140px, calc((100vh - 520px) * .55), 200px); height: clamp(140px, calc((100dvh - 520px) * .55), 200px); margin: 0 0 6px; }
.pc-skeleton { position: absolute; inset: 0; background: var(--cg-skel); border-radius: 8px; }
.pc-msg {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: #fafafa; border-radius: 8px; color: #666; font-size: 15px; text-align: center; padding: 16px;
}
.pc-msg button { background: none; border: 0; font: inherit; color: var(--charcoal); text-decoration: underline; text-decoration-color: var(--gold); cursor: pointer; min-height: 44px; }

.pc-tip-slot { min-height: 0; }
.pc-tip {
    position: absolute; z-index: 5; pointer-events: none; background: #fff; border: 1px solid #e3e3e3; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08); padding: 10px 12px; font-size: 13px; line-height: 1.5; min-width: 190px;
    font-variant-numeric: tabular-nums; color: #333;
}
.pc-tip b { display: block; font-size: 13px; margin-bottom: 2px; }
/* Popup rows (r8): [swatch] label ........ value. Rows without a series keep an empty swatch slot so labels align. */
.pc-tip .pc-tip-row { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.pc-tip .pc-tip-row--sep { border-top: 1px solid #eee; margin-top: 4px; padding-top: 4px; }   /* desktop: dollar rows | premium rows (owner 11/19) */
.pc-tip .pc-tip-k { color: #666; flex: 1 1 auto; white-space: nowrap; }
.pc-tip .pc-tip-v { margin-left: 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: #2C2C2C; }
.pc-sw { flex: none; display: inline-block; width: 16px; }
.pc-sw--line { height: 0; border-top: 2px solid; }
.pc-sw--band { height: 10px; border: 1px solid; border-radius: 2px; box-sizing: border-box; }
.pc-sw--none { height: 1px; }
.pc-sw--svg { height: 4px; line-height: 0; }
.pc-sw-svg { display: block; }
/* Moving-average chips (r8): own row under the main legend; built by premium-chart.js. */
.pc-legend-ma { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 0 18px; }
.pc-legend-ma[hidden], .pc-key[hidden], .pc-ma-note[hidden] { display: none; }
.pc-key--ma .pc-sw-svg { flex: none; }
.pc-ma-note { margin-top: 4px; }
.pc-ma-toggle {
    min-height: 44px; padding: 0 2px; font: inherit; font-size: 14px; font-weight: 600; color: var(--charcoal);
    background: none; border: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--gold, #E8960C);
    text-underline-offset: 3px;
}
.pc-ma-toggle[hidden] { display: none; }
/* Mouse/trackpad: compact legend rows (dollar keys split from the premium keys by a thin divider;
   the MA chips wrap to a second row when present). Touch keeps 44px rows. */
@media (hover: hover) and (pointer: fine) {
    .pc-legend { gap: 0 16px; margin: 6px 0 6px; }
    .pc-key { min-height: 28px; font-size: 13px; gap: 6px; }
    .pc-key input { width: 16px; height: 16px; }
    .pc-legend-b, .pc-legend-ma { flex: 0 1 auto; gap: 0 16px; }
    .pc-ma-toggle { min-height: 28px; font-size: 13px; }
    .pc-legend-b { padding-right: 16px; border-right: 1px solid var(--border, #E0E0E0); }
}
.pc-tip .pc-tip-note { color: var(--cg-gray); font-size: 12px; margin-top: 2px; }

.pc-note { font-size: 12px; color: var(--cg-gray); margin: 12px 0 0; }
.pc-latest { font-size: 14px; color: #555; margin: 8px 0 0; }

/* uPlot: remove default chrome */
.pc .uplot { font-family: var(--font, 'Montserrat', sans-serif); }
.pc .u-legend { display: none; }
.pc .u-cursor-x { border-right: 1px solid #c9c9c9; }
.pc .u-cursor-y { display: none; }

@media (max-width: 760px) {
    .cg-hero h1 { font-size: 30px; }
    .cg-section h2 { font-size: 22px; }
    .cg-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .pc-controls { flex-direction: column; align-items: stretch; }
    .pc-coin { width: 100%; min-width: 0; }
    .pc-periods { margin-left: 0; width: 100%; }
    .pc-period { flex: 1 1 0; min-width: 0; padding: 0 4px; font-size: 13px; }
    .pc-big { font-size: 32px; }
    .pc-panel-a { height: auto; aspect-ratio: 4 / 3; }
    .pc-panel-b { height: auto; }
    /* Tooltip pinned above the chart on phones (reserved slot, no layout shift) */
    .pc-tip-slot { position: relative; min-height: 112px; }
    .pc-tip.is-pinned { position: absolute; left: 0 !important; right: 0; top: 0 !important; min-width: 0; box-shadow: none; }
    /* Phones (11/01, dollar rows added): two columns so the reserved slot stays short.
       Date header and notes span both columns. */
    .pc-tip.is-pinned { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; padding: 8px 10px; font-size: 12px; }
    .pc-tip.is-pinned > b, .pc-tip.is-pinned .pc-tip-note { grid-column: 1 / -1; }
    .pc-tip.is-pinned .pc-tip-row--wide { grid-column: 1 / -1; }   /* "x to y" range values: full width (owner 11/19) */
    .pc-tip.is-pinned .pc-tip-v { margin-left: 6px; }
    .pc-tip.is-pinned .pc-tip-k { white-space: normal; line-height: 1.25; }
    .pc-tip-slot .pc-tip-hint { font-size: 13px; color: var(--cg-gray); padding: 10px 0; }
    .cg-table th, .cg-table td { padding: 10px 6px; }
    .cg-table--lowest-hide { display: none; }
    /* r8 phones: drop the low-value columns so the rest fit without sideways scroll.
       Lowest table: Pure metal (product names carry the weight). By-weight table: Products priced. */
    #cg-lowest-table tr > :nth-child(2), #cg-weight-table tr > :nth-child(4) { display: none; }
    .cg-table td.num + td:not(.num) { padding-left: 14px; }
    #cg-lowest-table .cg-buy { white-space: normal; font-size: 12px; }
    #cg-lowest-table td:last-child { min-width: 72px; }
    /* Top-align so each row's first lines line up when a name or dealer wraps. */
    .cg-table tbody th, .cg-table td { line-height: 20px; vertical-align: top; }
}
.pc-coin-name { margin: 0; min-height: 44px; display: flex; align-items: center; font-size: 15px; font-weight: 600; }
.pc-stats { margin: 6px 0 0; font-size: 13px; color: #555; font-variant-numeric: tabular-nums; min-height: 20px; }
/* Weight chips above the lowest-premiums table */
.cg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.cg-chip { min-height: 36px; padding: 0 14px; border: 1px solid var(--border, #E0E0E0); border-radius: 18px; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: #666; cursor: pointer; }
.cg-chip:hover { color: var(--charcoal); border-color: #c8c8c8; }
.cg-chip[aria-pressed="true"] { background: var(--charcoal, #2C2C2C); border-color: var(--charcoal, #2C2C2C); color: #fff; }
.cg-chip[hidden] { display: none; }
@media (max-width: 600px) { .cg-chip { min-height: 40px; } }

/* ── Phone + landscape-phone popup (owner 11/19): two blocks, Price (top chart) | Premium (bottom chart) ── */
.pc-tip--c .pc-tip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 2px; }
.pc-tip--c .pc-tip-head b { margin: 0; }
.pc-tip-head span { color: var(--cg-gray); font-size: 12px; }
.pc-tip-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; }
.pc-tip-colh { color: var(--cg-gray); font-size: 11px; padding-left: 22px; }
.pc-tip--c .pc-tip-row { gap: 6px; align-items: flex-start; }
.pc-tip--c .pc-sw { margin-top: 8px; }
.pc-tip--c .pc-sw--band { margin-top: 4px; }
.pc-tip--c .pc-tip-cols > div + div { border-left: 1px solid #eee; padding-left: 12px; }
/* Labels stay on one line; a long value (a gold range) wraps after its dash, right-aligned. */
.pc-tip.pc-tip--c .pc-tip-k { white-space: nowrap; flex: 0 0 auto; }
.pc-tip.pc-tip--c .pc-tip-v { white-space: normal; min-width: 0; flex: 1 1 auto; text-align: right; }
@media (max-width: 600px) {
    .pc-tip.pc-tip--c.is-pinned { display: block; }
    /* Narrow phones: tighter swatches and gaps so gold values fit their half (360 px tested). */
    .pc-tip--c.is-pinned .pc-tip-cols { column-gap: 10px; }
    .pc-tip--c.is-pinned .pc-tip-cols > div + div { padding-left: 8px; }
    .pc-tip--c.is-pinned .pc-tip-row { gap: 4px; }
    .pc-tip--c.is-pinned .pc-sw { width: 12px; }
    .pc-tip--c.is-pinned .pc-tip-colh { padding-left: 16px; }
    .pc-tip.pc-tip--c.is-pinned .pc-tip-v { margin-left: 2px; }
}
/* Landscape phones (touch + short viewport): the popup is a column beside the charts, which give
   up its width (line-end labels move inside the plot). A mouse never matches (pointer: coarse). */
@media (pointer: coarse) and (max-height: 500px) and (min-width: 601px) {
    .pc--side .pc-stage { padding-right: 236px; }
    .pc-tip.is-side { position: absolute; right: 0; width: 226px; min-width: 0; box-shadow: none; padding: 8px 10px; font-size: 12px; line-height: 1.45; box-sizing: border-box; }
    .pc-tip.is-side .pc-tip-head { flex-direction: column; gap: 0; margin-bottom: 4px; }
    .pc-tip.is-side .pc-tip-cols { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
    .pc-tip.is-side .pc-tip-cols > div + div { border-left: 0; padding-left: 0; border-top: 1px solid #eee; padding-top: 2px; }
    .pc-tip-hint.is-side { position: absolute; top: 0; right: 0; width: 226px; font-size: 13px; color: var(--cg-gray); padding: 10px; box-sizing: border-box; }
    .pc-tip-hint.is-side[hidden] { display: none; }
}
