/* tyasiapp.app/q4-resale-price-index (IDEA-20261030-11). Loaded after site.css on that page only.
   Chart colours are dataviz palette slots on the dark surface, validated together
   (scripts: validate_palette.js "#9085e9,#199e70" --mode dark --surface "#110d18"):
   violet marks an item whose sample covers the full month, aqua a shorter window. */
main.q4 {
  --q4-full: #9085e9;
  --q4-short: #199e70;
  --q4-quiet: rgba(244, 241, 248, .16);
  --q4-panel: rgba(255, 255, 255, .035);
  --q4-panel-solid: #110d18;
  --q4-line: rgba(255, 255, 255, .08);
  max-width: 1120px; padding-top: clamp(32px, 6vw, 72px);
}
.fine { font-size: 13px; color: var(--faint); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.q4 h2 { font-size: clamp(20px, 2.4vw, 26px); line-height: 1.2; letter-spacing: -.01em; }
.q4-section { margin-top: clamp(48px, 8vw, 88px); }
.q4-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.q4-eyebrow { margin: 0 0 18px; color: var(--violet); font: 500 11px/1.4 var(--font-mono); letter-spacing: .18em; text-transform: uppercase; }
.q4 .q4-eyebrow { font-size: 11px; letter-spacing: .18em; }

/* Hero: the title and lede beside a mosaic of eight of the real photos. */
.q4-hero { display: grid; gap: 32px; align-items: center; }
.q4-hero h1 { margin-bottom: 18px; font-size: clamp(38px, 6.2vw, 66px); text-wrap: balance; }
.q4-h1-sub { display: block; margin-top: 12px; color: var(--muted); font-size: .46em; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.q4-hero .lede { max-width: 600px; margin: 0; }
.q4-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; }
.q4-hero-meta span { padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; }
.q4-hero-meta strong { color: var(--foreground); font-weight: 700; }
.q4-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.q4-mosaic img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.q4-mosaic img:nth-child(even) { transform: translateY(14px); }
.q4-mosaic img { transition: scale .3s ease; }
.q4-mosaic img:hover { scale: 1.04; }
@media (min-width: 900px) {
  .q4-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; }
  .q4-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); transform: rotate(-3deg); }
  .q4-mosaic img:nth-child(n+7) { display: none; }
  .q4-mosaic img:nth-child(even) { transform: none; }
  .q4-mosaic img:nth-child(3n+2) { transform: translateY(28px); }
}

/* What stood out: four headline tiles. */
.q4-tiles { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 620px) { .q4-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .q4-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.q4-tile { position: relative; padding: 20px 20px 18px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(160deg, rgba(var(--violet-rgb), .1), var(--q4-panel) 55%); }
.q4-tile p { margin: 0; }
.q4-tile-label { color: var(--faint); font: 500 11px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.q4-tile-value { margin-top: 10px !important; padding-right: 64px; color: var(--foreground); font-size: clamp(32px, 3.4vw, 42px); font-weight: 650; line-height: 1.05; letter-spacing: -.02em; }
.q4-tile-img { position: absolute; top: 16px; right: 16px; width: 56px; height: 56px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.q4-tile-body { margin-top: 12px !important; font-size: 14.5px; line-height: 1.55; }
.q4-tile-body strong { color: var(--foreground); font-weight: 650; }

/* The window strip: one column per item, height = days its sample covers. */
.q4-window { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .q4-window { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; } }
.q4-window h2 { margin: 0 0 16px; }
.q4-note { margin: 0 0 14px; padding: 16px 18px; border: 1px solid rgba(var(--violet-rgb), .45); border-radius: 14px; background: rgba(var(--violet-rgb), .07); }
.q4-note p { margin: 0; font-size: 15px; }
.q4-note strong { color: var(--violet-bright); }
.q4-window-fig { margin: 0; padding: 22px 20px 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--q4-panel); }
.q4-strip { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 170px; margin: 6px 0 0; padding: 0; list-style: none; border-bottom: 1px solid var(--q4-line); }
.q4-strip::before { content: ""; position: absolute; left: 0; right: 0; top: 0; border-top: 1px solid var(--q4-line); }
.q4-strip-top { margin: 0; color: var(--faint); font: 11px/1 var(--font-mono); text-align: right; }
.q4-strip li { flex: 1 1 0; display: flex; align-items: flex-end; height: 100%; min-width: 0; }
.q4-strip li span { display: block; width: 100%; border-radius: 3px 3px 0 0; background: var(--q4-full); transform-origin: bottom; }
.q4-strip li.is-short span { background: var(--q4-short); }
.q4-strip li:hover span { filter: brightness(1.25); }
.q4-window-fig figcaption .q4-legend { margin: 12px 0 0; }

/* Legend keys: the colour beside the text, never on it. */
.q4-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.q4-legend > span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.q4-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--q4-full); }
.q4-key.is-short { background: var(--q4-short); }

/* Chart panels. */
.q4-card-panel { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--border); border-radius: 20px; background: var(--q4-panel); min-width: 0; }
.q4-panel-head { margin-bottom: 18px; }
.q4-panel-head h2 { margin: 0 0 8px; }
.q4-panel-head .fine { margin: 0; max-width: 640px; line-height: 1.55; }
.q4-trio { display: grid; gap: 18px; }
@media (min-width: 760px) { .q4-trio { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "cat cat" "bands days"; } .q4-panel-cat { grid-area: cat; } .q4-panel-bands { grid-area: bands; } .q4-panel-days { grid-area: days; } }
.q4-trio .q4-card-panel { display: flex; flex-direction: column; }
.q4-trio .q4-cols { margin-top: auto; }
@media (min-width: 1100px) { .q4-trio { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "cat bands days"; } }
.q4-track { display: block; height: 8px; border-radius: 0 4px 4px 0; background: rgba(255, 255, 255, .05); overflow: hidden; }
.q4-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--q4-full); transform-origin: left; }
.is-short > .q4-track .q4-fill { background: var(--q4-short); }

/* Chart 1: every item, two columns of ranked rows on wide screens. */
.q4-rank { counter-reset: rank; margin: 0; padding: 0; list-style: none; }
@media (min-width: 960px) { .q4-rank { column-count: 2; column-gap: 48px; column-rule: 1px solid var(--q4-line); } }
.q4-rank li { counter-increment: rank; break-inside: avoid; display: grid; grid-template-columns: minmax(0, 1fr) 9.5rem; grid-template-areas: "name val" "track n"; column-gap: 14px; row-gap: 4px; align-items: center; padding: 7px 0; }
.q4-rank li:hover .q4-fill { filter: brightness(1.2); }
.q4-rank-name { grid-area: name; color: var(--foreground); font-size: 14px; line-height: 1.3; }
.q4-rank-name::before { content: counter(rank); display: inline-block; min-width: 2.2ch; margin-right: 8px; color: var(--faint); font: 11px var(--font-mono); text-align: right; }
.q4-rank-val { grid-area: val; color: var(--foreground); font: 600 14px/1.3 var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.q4-rank .q4-track { grid-area: track; margin-left: calc(2.2ch + 8px); }
.q4-rank-n { grid-area: n; color: var(--faint); font-size: 11.5px; line-height: 1.3; text-align: right; }
@media (max-width: 619px) {
  .q4-rank li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track" "n n"; padding: 8px 0; }
  .q4-rank-n { margin-left: calc(2.2ch + 8px); text-align: left; }
}

/* Chart 2: categories, with every item's median as a dot. */
.q4-cats { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.q4-cats li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 8px; }
.q4-cats-name { color: var(--foreground); font-size: 14px; line-height: 1.3; }
.q4-cats-name small, .q4-sell-name small { display: block; color: var(--faint); font-size: 12px; }
.q4-cats-val { color: var(--foreground); font: 600 14px/1.3 var(--font-mono); text-align: right; }
.q4-cats-plot { grid-column: 1 / -1; position: relative; height: 16px; border-left: 1px solid var(--q4-line); }
.q4-cats-plot::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--q4-line); }
.q4-cats-plot .q4-fill { position: absolute; top: 3px; left: 0; height: 10px; z-index: 1; }
.q4-dot { position: absolute; top: 4px; z-index: 2; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: var(--foreground); box-shadow: 0 0 0 2px var(--q4-panel-solid); opacity: .85; }
.q4-cats-key { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--foreground); vertical-align: 1px; }

/* Chart 3: the 15 best sellers with their photos. */
.q4-sell { display: grid; gap: 12px 48px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 960px) { .q4-sell { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(8, auto); grid-auto-flow: column; } }
.q4-sell li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "img name val" "img track track"; column-gap: 12px; row-gap: 5px; align-items: center; }
.q4-sell img { grid-area: img; width: 40px; height: 40px; object-fit: cover; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); }
.q4-sell-name { grid-area: name; color: var(--foreground); font-size: 14px; line-height: 1.3; }
.q4-sell-val { grid-area: val; color: var(--foreground); font: 600 14px/1.3 var(--font-mono); text-align: right; align-self: start; }
.q4-sell .q4-track { grid-area: track; }

/* Charts 4 and 5: columns from one baseline, value on the cap. */
.q4-cols { display: flex; align-items: stretch; gap: 8px; height: 220px; margin: 8px 0 0; padding: 0; list-style: none; }
.q4-cols li { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.q4-col-val { color: var(--foreground); font: 600 14px/1.3 var(--font-mono); margin-bottom: 6px; white-space: nowrap; }
.q4-col-bar { flex: 1; display: flex; align-items: flex-end; justify-content: center; width: 100%; border-bottom: 1px solid var(--q4-line); }
.q4-col-fill { display: block; width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--q4-quiet); transform-origin: bottom; }
.q4-cols--bands .q4-col-fill { max-width: 24px; background: var(--q4-full); }
.q4-cols li.is-hot .q4-col-fill { background: var(--q4-full); }
.q4-col-name { min-height: 2.6em; margin-top: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.3; text-align: center; }
.q4-col-name abbr { text-decoration: none; }
.q4-cols li.is-hot .q4-col-name, .q4-cols li.is-hot .q4-col-val { color: var(--violet-bright); }
.q4-col-note { margin: 12px 0 0; color: var(--faint); font-size: 12.5px; }

/* All 50 items: the category filter, the photo cards and the table view. */
.q4-items-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.q4-items-head h2 { margin: 0; }
.q4-items-head .fine { margin: 0; }
.q4-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.q4-filter[hidden] { display: none; }
.q4-filter button { min-height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font: 600 13px/1 var(--font-sans); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.q4-filter button:hover { border-color: rgba(var(--violet-rgb), .5); color: var(--foreground); }
.q4-filter button[aria-pressed="true"] { border-color: var(--violet-bright); background: var(--violet-bright); color: #14082a; }
.q4-filter button:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.q4-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
@media (min-width: 620px) { .q4-cards { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } }
.q4-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--q4-panel); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.q4-card[hidden] { display: none; }
.q4-card:hover { transform: translateY(-3px); border-color: rgba(var(--violet-rgb), .45); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.q4-card-img { position: relative; overflow: hidden; background: var(--surface); }
.q4-card-img img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.q4-card:hover .q4-card-img img { transform: scale(1.04); }
.q4-win { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(9, 5, 16, .78); backdrop-filter: blur(8px); color: var(--foreground); font-size: 11.5px; font-weight: 600; }
.q4-win::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--q4-full); }
.is-short .q4-win::before { background: var(--q4-short); }
.q4-card-body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
.q4-card-body p { margin: 0; }
.q4-card-group { color: var(--faint); font-size: 11.5px !important; line-height: 1.4 !important; }
.q4-card h3 { margin: 3px 0 10px; color: var(--foreground); font-size: 15px; font-weight: 650; line-height: 1.3; }
.q4-card-price { margin-top: auto !important; color: var(--foreground) !important; font-size: 24px !important; font-weight: 650; line-height: 1.1 !important; letter-spacing: -.01em; }
.q4-card-price small { display: block; margin-top: 4px; color: var(--faint); font-size: 11.5px; font-weight: 400; letter-spacing: 0; line-height: 1.35; }
.q4-card-range { margin-top: 4px !important; color: var(--muted); font: 12px/1.4 var(--font-mono) !important; }
.q4-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--q4-line); }
.q4-card-stats div { min-width: 0; }
.q4-card-stats dt { color: var(--faint); font-size: 11px; }
.q4-card-stats dd { margin: 2px 0 0; color: var(--foreground); font-size: 13px; font-weight: 600; }
.q4-card-stats small { color: var(--faint); font-weight: 400; }
.q4-tableview { margin-top: 22px; border: 1px solid var(--border); border-radius: 14px; background: var(--q4-panel); }
.q4-tableview summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; color: var(--foreground); font-size: 15px; font-weight: 620; cursor: pointer; list-style: none; }
.q4-tableview summary::-webkit-details-marker { display: none; }
.q4-tableview summary::after { content: "+"; margin-left: auto; color: var(--violet-bright); font-size: 20px; font-weight: 400; }
.q4-tableview[open] summary::after { content: "\2212"; }
.q4-table-wrap { overflow-x: auto; border-top: 1px solid var(--border); }
.q4-table { width: 100%; min-width: 720px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.q4-table caption { padding: 14px 16px 4px; color: var(--faint); font-size: 13px; text-align: left; caption-side: top; }
.q4-table th, .q4-table td { padding: 9px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
.q4-table tr[hidden] { display: none; }
.q4-table thead th { border-top: 0; color: var(--faint); font-size: 13px; font-weight: 600; white-space: nowrap; text-align: left; }
.q4-table .num { text-align: right; font-family: var(--font-mono); color: var(--foreground); font-size: 14px; font-weight: 600; }
.q4-table td.num span, .q4-table tbody th span { display: block; color: var(--faint); font: 400 12px/1.4 var(--font-sans); }
.q4-table tbody th { color: var(--foreground); font-size: 14px; font-weight: 650; text-align: left; }
.q4-photo { width: 64px; }
.q4-photo img { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--surface); }

/* Method, sign-up and credits. */
.q4-method { counter-reset: step; display: grid; gap: 12px; margin: 18px 0 0; padding: 0; list-style: none; }
.q4-method li { counter-increment: step; position: relative; margin: 0; padding: 16px 18px 16px 58px; border: 1px solid var(--border); border-radius: 14px; background: var(--q4-panel); font-size: 15px; line-height: 1.6; }
.q4-method li::before { content: counter(step); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(var(--violet-rgb), .18); color: var(--violet-bright); font-size: 13px; font-weight: 700; }
.q4-method strong { color: var(--foreground); }
.q4-signup { max-width: 760px; margin: clamp(48px, 8vw, 88px) auto 0; padding: clamp(26px, 4vw, 40px); border: 1px solid rgba(var(--violet-rgb), .35); border-radius: 22px; text-align: center;
  background: radial-gradient(30rem 16rem at 50% -10%, rgba(var(--violet-rgb), .22), transparent 70%), var(--q4-panel); }
.q4-signup h2 { margin: 0 0 10px; text-wrap: balance; }
.q4-signup p { margin: 0 0 8px; }
.q4-signup .cta { margin: 20px 0 14px; }
.q4-signup .q4-price { color: var(--foreground); font-weight: 620; }
.q4-signup .q4-fine { color: var(--muted); font-size: 14px; }
.q4-signup .limit-note { margin: 18px auto 0; max-width: 560px; padding: 14px 16px; border: 1px solid rgba(var(--violet-rgb), .32); border-radius: 12px; background: rgba(var(--violet-rgb), .08); color: var(--muted); font-size: 14.5px; line-height: 1.5; text-align: left; }
.q4-credits { margin: 14px 0; padding-left: 18px; }
@media (min-width: 760px) { .q4-credits { column-count: 2; column-gap: 32px; } }
.q4-credits li { break-inside: avoid; margin-bottom: 4px; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }

/* Motion: bars grow from their baseline once in view. The script
   adds .q4-js; without it, or with reduced motion, everything is drawn at rest. */
@media (prefers-reduced-motion: no-preference) {
  .q4-js .q4-reveal .q4-fill { transform: scaleX(0); transition: transform 1s cubic-bezier(.2, .7, .2, 1) .15s; }
  .q4-js .q4-reveal .q4-col-fill, .q4-js .q4-reveal .q4-strip span { transform: scaleY(0); transition: transform .9s cubic-bezier(.2, .7, .2, 1) .15s; }
  .q4-js .q4-reveal.in .q4-fill { transform: scaleX(1); }
  .q4-js .q4-reveal.in .q4-col-fill, .q4-js .q4-reveal.in .q4-strip span { transform: scaleY(1); }
}
@media print { .q4-js .q4-reveal * { transform: none !important; } }
