/* brandsovertime.com — page layout around the design system's components (tokens.css + bundle.css).
   Only what the system leaves to the page: header/footer, section rhythm, the homepage module's layout,
   index cards, tables and lists. Every value is a token. */

html { scroll-behavior: smooth; scroll-padding-top: 128px; }
body { font-size: 17px; line-height: 1.55; overflow-x: hidden; }
img { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ink); color: var(--ground); }
:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: var(--radius-md); }
.skip:focus { left: 8px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px); }
.bot-eyebrow a { color: inherit; text-decoration: none; }
.bot-eyebrow a:hover { color: var(--ink); text-decoration: underline; }

/* type styles (tokens.json "type") */
.t-heading { margin: var(--space-3) 0 0; font-size: clamp(36px, 4.4vw, 60px); line-height: 1; font-weight: 700; letter-spacing: -.035em; font-variation-settings: 'opsz' 72; text-wrap: balance; }
.t-lede { margin: 0; font-size: 19px; line-height: 1.55; color: var(--ink-soft); max-width: 58ch; }
.t-body { font-size: 17px; line-height: 1.55; color: var(--ink-soft); max-width: 62ch; }
.t-label { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; }
.t-small { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.note { margin-top: var(--space-6); color: var(--ink-muted); max-width: 90ch; }

/* header + footer */
.site-head { max-width: 1280px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; }
.site-mark { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 21px; letter-spacing: -.025em; font-variation-settings: 'opsz' 32; }
.site-mark img { display: block; width: 24px; height: 20px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; }
.site-foot { border-top: 1px solid var(--line); padding: var(--space-14) 0 var(--space-18); }
.site-foot .wrap { display: grid; gap: var(--space-4); }
.site-foot .t-small { max-width: 90ch; }

/* sections: eyebrow, heading, one description, space-8, content; pad space-14 top, space-18 bottom */
.sec { border-top: 1px solid var(--line); padding: var(--space-14) 0 var(--space-18); }
.sec__desc { margin: var(--space-3) 0 0; }
.sec__body { margin-top: var(--space-8); }

/* hero */
.bot-hero__grid .tile-shot { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; background: var(--surface-raised); }
.tile-url { flex: 1 1 auto; height: 8px; border-radius: 4px; background: var(--line); }
.tile-shot--text { display: flex; align-items: flex-end; padding: var(--space-4); box-sizing: border-box; background: var(--surface); }
.tile-shot--text b { font-size: 22px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.bot-hero__grid--short { top: 60px; }
.hero-key { margin-top: 36px; max-width: 1168px; }
.hero-row { display: flex; flex-wrap: wrap; gap: 36px 64px; margin-top: var(--space-10); align-items: flex-start; }
.hero-row .t-lede { flex: 1 1 420px; }
.hero-row .bot-stats { flex: 1 1 520px; }
@media (max-width: 760px) {
  .bot-hero__wall { height: 360px; }
  .bot-hero__grid { width: 900px; margin-left: -360px; gap: 14px; }
  .bot-hero__veil { margin-top: -140px; }
  .bot-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bot-stat dd { font-size: 36px; }
  .bot-yearkey__note { font-size: 13px; }
}

/* homepage module */
.home { display: flex; flex-wrap: wrap; gap: 40px 56px; margin-top: 28px; align-items: flex-start; }
.home__frame { flex: 1 1 560px; min-width: 0; }
.home__frame-link { display: block; text-decoration: none; color: inherit; border-radius: var(--radius-lg); }
.home__frame .bot-capture__shot { aspect-ratio: 16 / 10; object-fit: contain; object-position: top center; background: var(--surface-raised); transition: opacity .25s ease; } /* never crop a capture: show it whole */
.home__read { flex: 1 1 380px; min-width: 0; }
.home__label { display: flex; align-items: center; gap: var(--space-3); margin: 0; }
.home__year { margin: var(--space-2) 0 0; font-size: 96px; line-height: .9; font-weight: 800; letter-spacing: -.05em; font-variation-settings: 'opsz' 96; font-variant-numeric: tabular-nums; }
.home__head { margin: 22px 0 0; font-size: 30px; line-height: 1.15; font-weight: 500; letter-spacing: -.02em; font-variation-settings: 'opsz' 32; text-wrap: pretty; }
.home__head.is-empty { color: var(--ink-muted); font-size: 22px; }
.home__tl { margin-top: 18px; }
.home__title { margin-top: 4px; }
.home__arch { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-4); min-height: 44px; font-size: 15px; }
.home__heads { list-style: none; margin: 20px 0 0; padding: 0; border-top: 1px solid var(--line); }
.home__heads li { display: flex; align-items: baseline; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.home__heads .bot-year { flex: 0 0 auto; }
.bot-scrubber__years { scrollbar-width: thin; }
.bot-scrubber__year[disabled] { cursor: default; opacity: .35; }
.bot-scrubber__year[disabled]::after { opacity: .5; }
@media (max-width: 760px) { .home__year { font-size: 64px; } .home__head { font-size: 24px; } .bot-scrubber__year { flex-basis: 34px; } }

/* measures by year */
.bot-tabs { margin-bottom: var(--space-4); }
.ychart[hidden] { display: none; }
.bot-bar:focus-visible { box-shadow: var(--focus-ring); }
.bot-swatch--ref { width: 16px; height: 0; border-radius: 0; background: none; border-top: 1.5px dashed var(--line-strong); }
.bot-swatch--subject { background: var(--subject); }
.bot-swatch--peer { background: var(--peer); }
.as-table { margin-top: var(--space-4); }
.as-table summary { cursor: pointer; font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
.as-table table { border-collapse: collapse; margin-top: var(--space-2); font: 500 13px/18px var(--font-mono); }
.as-table th, .as-table td { padding: 6px 18px 6px 0; text-align: left; border-bottom: 1px solid var(--line-faint); }
.as-table thead th { color: var(--ink-muted); font-weight: 400; }

/* before and after */
.ba-context { margin: 0 0 var(--space-6); }
.bot-ba--context .bot-ba__num--after { color: var(--ink-soft); font-weight: 500; }
.bot-ba__head > span:last-child { flex-wrap: wrap; }
.ba-chg-h { margin-left: auto; }
.bot-ba__name { cursor: help; }
@media (max-width: 760px) { .bot-ba__name { flex-basis: 100%; } .bot-ba__head > span:first-child { display: none; } }

/* against its sector */
.glance { list-style: none; margin: 0 0 var(--space-10); padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); }
.glance li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-4); }
.glance__v { margin: var(--space-2) 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.peers { border-bottom: 1px solid var(--line-faint); }

/* thin sample */
.thinnote { margin: var(--space-6) 0 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); padding: var(--space-4) 18px; color: var(--ink-soft); max-width: 80ch; }
.thinnote b { color: var(--ink); }

/* every page */
.years { border-top: 1px solid var(--line); }
.yr { border-bottom: 1px solid var(--line); }
.yr summary { display: flex; align-items: center; gap: var(--space-4); min-height: 52px; cursor: pointer; list-style: none; }
.yr summary::-webkit-details-marker { display: none; }
.yr summary::after { content: "+"; margin-left: auto; font: 18px var(--font-mono); color: var(--ink-muted); }
.yr[open] summary::after { content: "–"; }
.yr__u { font-weight: 600; }
.yr__n { font: 400 12px/16px var(--font-mono); color: var(--ink-muted); }
.yr ul { list-style: none; margin: 0 0 var(--space-6); padding: 0; columns: 2 420px; column-gap: var(--space-10); }
.yr li { break-inside: avoid; padding: var(--space-2) 0; border-bottom: 1px solid var(--line-faint); }
.yr li a { display: block; font-size: 15px; text-decoration: none; }
.yr li a:hover { text-decoration: underline; }
.yr li span { font: 400 11px/14px var(--font-mono); color: var(--ink-muted); }

/* method */
.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-6); }
.method .t-small { margin-top: var(--space-2); }
.measures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 var(--space-10); margin: var(--space-10) 0 0; border-top: 1px solid var(--line); }
.measures div { padding: var(--space-3) 0; border-bottom: 1px solid var(--line-faint); }
.measures dd { margin: var(--space-1) 0 0; }

/* index */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-4); }
.brand-card { display: flex; flex-direction: column; gap: 6px; padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); }
.brand-card:hover { background: var(--surface-raised); }
.brand-card__shot { position: relative; display: block; margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-4)) var(--space-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.brand-card__shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; background: #fff; }
.brand-card__shot .bot-year { position: absolute; left: 10px; top: 10px; }
.brand-card__name { font-size: 30px; line-height: 1.05; font-weight: 700; letter-spacing: -.03em; }
.brand-card__n { font: 400 12px/16px var(--font-mono); color: var(--ink-muted); }
.yspark { display: flex; align-items: flex-end; gap: var(--gap-strata); height: 24px; margin-top: var(--space-2); }
.yspark i { flex: 1 1 0; background: var(--year); border-radius: 1px 1px 0 0; }
.sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-4); }
.sector-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); min-height: 44px; }
.sector-card:hover { background: var(--surface-raised); }
.sector-card b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.sector-card span { font: 400 12px/16px var(--font-mono); color: var(--ink-muted); }
.az { margin-bottom: var(--space-8); }
.az ul { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
.az li { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; gap: 10px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line-faint); }
.az li a { text-decoration: none; }
.az li a:hover { text-decoration: underline; }
.az li > span { font: 400 11px/14px var(--font-mono); color: var(--ink-muted); }
.az .yspark { height: 18px; margin: 0; }

/* sector table: brightness within the sector (never a year colour) */
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.heat { border-collapse: collapse; width: 100%; font-size: 15px; }
.heat th, .heat td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.heat thead th { font: 400 11px/14px var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); vertical-align: bottom; white-space: normal; min-width: 84px; }
.heat tbody th { text-align: left; font-weight: 600; }
.heat tbody th a { text-decoration: none; color: var(--ink); }
.heat td { font: 500 13px/18px var(--font-mono); background: rgb(232 234 237 / calc(var(--t, 0) * 16%)); }
.heat td.pp { background: none; color: var(--ink-muted); }
.heat tr.thinrow td, .heat tr.thinrow th a { color: var(--ink-muted); background: none; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .home__frame .bot-capture__shot { transition: none; } }
.hero-row .bot-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
figure.bot-capture { margin: 0; }
.prose .t-label { margin: var(--space-8) 0 var(--space-2); } .prose .t-body { margin: 0 0 var(--space-3); }

/* sticky bar: site nav on top, this page's sections underneath */
.site-bar { position: sticky; top: 0; z-index: 30; background: var(--veil); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); border-bottom: 1px solid var(--line); }
.site-bar .site-head { padding-top: 6px; padding-bottom: 6px; }
.page-nav { border-top: 1px solid var(--line-faint); }
.page-nav__in { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 56px); display: flex; align-items: center; gap: var(--space-4); }
.page-nav__title { flex: 0 0 auto; font-weight: 700; letter-spacing: -.02em; text-decoration: none; color: var(--ink); min-height: 44px; display: inline-flex; align-items: center; padding-right: var(--space-4); border-right: 1px solid var(--line); }
.page-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; }
.page-nav ul::-webkit-scrollbar { display: none; }
.page-nav a:not(.page-nav__title) { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; white-space: nowrap; font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none; border-bottom: 2px solid transparent; }
.page-nav a:not(.page-nav__title):hover { color: var(--ink); }
.page-nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--ink); }
@media (max-width: 760px) {
  .site-bar .site-head { flex-wrap: nowrap; gap: var(--space-2); }
  .site-mark span { font-size: 17px; }
  .site-nav .bot-btn { padding: 0 8px; font-size: 14px; }
  .page-nav__title { display: none; }
  html { scroll-padding-top: 112px; }
}

/* breadcrumbs: real links, 44px targets */
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; font: 400 13px/16px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 6px; color: var(--ink-muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin: 0 -4px; color: var(--ink-soft); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; border-radius: 4px; }
.crumbs a:hover { color: var(--ink); text-decoration-color: currentColor; }
.crumbs [aria-current] { color: var(--ink-muted); }

/* back to top */
.to-top { position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 25; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: var(--radius-full); background: var(--ink); color: var(--ground); font: 600 14px/1 var(--font-sans); text-decoration: none; box-shadow: 0 8px 24px #00000066; transition: opacity .2s ease, transform .2s ease; }
.to-top:hover { background: var(--ink-soft); }
.to-top[hidden] { display: inline-flex; opacity: 0; transform: translateY(12px); pointer-events: none; }

/* stat tiles: the number scales to its tile, so "2015–24" never spills */
.bot-stat { container-type: inline-size; min-width: 0; }
.bot-stat dd { white-space: nowrap; font-size: min(44px, 23cqi); }
.bot-stat dd small { font-size: .6em; }
main:focus { outline: none; box-shadow: none; }
.site-bar { background: color-mix(in srgb, var(--ground) 96%, transparent); }
.site-mark span { white-space: nowrap; }
@media (max-width: 560px) {
  .site-nav { flex-wrap: nowrap; gap: 0; }
  .site-nav .bot-btn { padding: 0 7px; font-size: 13.5px; }
  .site-nav .bot-btn:last-child { display: none; } /* Method is in the page nav and the footer */
  .site-mark { gap: 8px; }
  .site-mark span { font-size: 16px; }
}

/* brands hub: search, filters, sort */
.hub-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4); margin-top: var(--space-8); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); }
.hub-field { display: flex; flex-direction: column; gap: var(--space-2); }
.hub-field--search { flex: 1 1 280px; }
.hub-field input, .hub-field select { min-height: 44px; box-sizing: border-box; padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--ground); color: var(--ink); font: 500 15px/1.2 var(--font-sans); }
.hub-field select { padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='none' stroke='%23C3C8D0' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.hub-field input::placeholder { color: var(--ink-muted); }
.hub-field input:focus-visible, .hub-field select:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.hub-dir[hidden] { display: none; }
.hub-check { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.hub-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.hub-sectors { flex: 1 1 100%; margin: 0; }
.bot-tab[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.hub-count { margin: var(--space-6) 0 var(--space-4); font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }
.hub-card[hidden] { display: none; }
.hub-card__metric { font: 500 13px/18px var(--font-mono); color: var(--ink); }
.hub-card__metric b { font-family: var(--font-sans); font-weight: 600; color: var(--ink-soft); margin-right: 6px; }
.brand-card__shot--none { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--surface-raised); }
@media (max-width: 560px) {
  .hub-controls { padding: var(--space-4); }
  .hub-field { flex: 1 1 100%; }
  .hub-sectors { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--space-4)); padding: 0 var(--space-4) 2px; }
  .hub-sectors .bot-tab { flex: 0 0 auto; }
}

/* hero wall of quoted headlines (text tiles, no screenshots) */
.head-tile .tile-shot--text { flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: var(--space-2); aspect-ratio: 4 / 3; border-top: 6px solid var(--year); }
.head-tile .tile-shot--text b { font-size: 24px; color: var(--ink); -webkit-line-clamp: 4; }
.head-tile .tile-shot--text span { font: 400 12px/16px var(--font-mono); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; }
.home__credit { margin: var(--space-3) 0 0; color: var(--ink-muted); }
.prose ul { margin: 0 0 var(--space-3); padding-left: 1.2em; max-width: 62ch; }
.prose li { margin: 4px 0; }
.yr li em { display: block; font: 400 11px/14px var(--font-mono); font-style: normal; color: var(--ink-soft); margin-top: 2px; }
.yr li.is-out a { color: var(--ink-muted); }
