/* =====================================================================
   SPONSOR REPORT — heineken.kaisersport.si

   The page borrows the arena's stylesheet wholesale and adds only what a
   report needs and the site does not have: a figure grid, screenshot
   frames with captions, a channel table and a period selector.

   Colour comes from the arena's tokens, never from the sponsor's brand.
   A report dressed in the client's own green reads as something the client
   made about itself; in the arena's colours it reads as what it is, an
   account rendered by the venue.
   ===================================================================== */

/* ---- the sample-data warning. Loud on purpose: a report that looks
        finished but carries invented numbers is the one dangerous thing
        this page can do. ---- */
.demo-bar {
  /* the site header is fixed at top:0, so the bar clears it rather than
     hiding underneath */
  margin-top: var(--header-h, 76px);
  position: relative;
  z-index: 1;
  background: #FFB300;
  color: #1A1300;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
  padding: .7rem 1rem;
  font-weight: 700;
}

/* ---- cover ---- */
.rep-hero {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.rep-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
  margin-top: 1.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.rep-hero__meta div {
  min-width: 9rem;
}

.rep-hero__meta dt {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-vivid);
  margin-bottom: .3rem;
}

.rep-hero__meta dd {
  margin: 0;
  font-weight: 700;
  color: var(--fg);
}

/* ---- headline figures ---- */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.figure-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  background: var(--surface);
}

.figure-card__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 2.9rem);
  line-height: 1;
  color: var(--accent-vivid);
  letter-spacing: -.02em;
}

.figure-card__label {
  display: block;
  margin-top: .5rem;
  font-size: .95rem;
  color: var(--fg);
  font-weight: 700;
}

.figure-card__note {
  display: block;
  margin-top: .25rem;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ---- screenshots ---- */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1rem, 2.4vw, 1.8rem);
  margin-top: 1.6rem;
}

.shot {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
}

.shot__frame {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .04) 0 12px, transparent 12px 24px),
    rgba(255, 255, 255, .03);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
}

:root[data-theme="light"] .shot__frame {
  background:
    repeating-linear-gradient(45deg, rgba(0, 0, 0, .035) 0 12px, transparent 12px 24px),
    rgba(0, 0, 0, .025);
}

.shot__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot__body {
  padding: 1rem 1.1rem 1.2rem;
}

.shot__kicker {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-vivid);
}

.shot__title {
  display: block;
  margin-top: .35rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}

.shot__stats {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  margin-top: .7rem;
  font-size: .85rem;
  color: var(--muted);
}

.shot__stats b {
  color: var(--fg);
}

/* ---- channel table ---- */
.rep-table-wrap {
  overflow-x: auto;
  margin-top: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.rep-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: .95rem;
}

.rep-table th,
.rep-table td {
  padding: .85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.rep-table thead th {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-vivid);
  background: rgba(255, 255, 255, .03);
}

:root[data-theme="light"] .rep-table thead th {
  background: rgba(0, 0, 0, .03);
}

.rep-table tbody tr:last-child td {
  border-bottom: 0;
}

.rep-table td b {
  color: var(--fg);
}

.rep-table .num {
  text-align: right;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--fg);
  white-space: nowrap;
}

/* ---- bar chart, drawn from the numbers themselves ---- */
.bars {
  display: grid;
  gap: .9rem;
  margin-top: 1.6rem;
}

.bar {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) 1fr auto;
  align-items: center;
  gap: 1rem;
}

.bar__label {
  font-size: .9rem;
  color: var(--muted);
}

.bar__track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  overflow: hidden;
}

:root[data-theme="light"] .bar__track {
  background: rgba(0, 0, 0, .07);
}

.bar__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-vivid);
}

.bar__val {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--fg);
  font-size: .95rem;
  white-space: nowrap;
}

/* ---- takeaways ---- */
.takeaways {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}

.takeaway {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-vivid);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  background: var(--surface);
}

.takeaway h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--fg);
  margin-bottom: .4rem;
}

.takeaway p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
  margin: 0;
}

/* ---- footer of the report ---- */
.rep-foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-block: 2.5rem 3.5rem;
  color: var(--muted);
  font-size: .9rem;
}

.rep-foot strong {
  color: var(--fg);
}

@media print {
  .demo-bar,
  .header,
  .theme-toggle {
    display: none !important;
  }

  .shot,
  .figure-card,
  .takeaway {
    break-inside: avoid;
  }
}

/* =====================================================================
   GATE, BAR, LIST — the frame around the reports
   ===================================================================== */
.rep-body {
  background: var(--bg);
}

/* ---- password gate ---- */
.gate {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding-block: clamp(2rem, 8vh, 6rem);
}

.gate__inner {
  max-width: 30rem;
  text-align: center;
}

.gate__logo {
  height: 34px;
  width: auto;
  margin-bottom: 2rem;
}

.gate__lead {
  color: var(--muted);
  margin-top: .9rem;
  line-height: 1.6;
}

.gate__form {
  display: grid;
  gap: .8rem;
  margin-top: 2rem;
  text-align: left;
}

.gate__label {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-vivid);
}

.gate__input {
  font: inherit;
  font-size: 1.05rem;
  padding: .95rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
}

.gate__input:focus-visible {
  outline: 2px solid var(--accent-vivid);
  outline-offset: 2px;
}

.gate__error {
  margin-top: 1rem;
  color: #fff;
  background: var(--accent-vivid);
  border-radius: var(--radius);
  padding: .7rem 1rem;
  font-weight: 600;
}

.gate__foot {
  margin-top: 2rem;
  font-size: .88rem;
  color: var(--muted);
}

/* ---- the thin bar that replaces the site header ---- */
.rep-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.rep-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 56px;
}

.rep-bar__home {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.rep-bar__home img {
  height: 32px;
  width: auto;
}

.rep-bar__right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.rep-bar__link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.rep-bar__link:hover {
  color: var(--accent-vivid);
}

/* ---- the two names, side by side ---- */
.rep-topline {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.rep-topline__logo {
  height: 30px;
  width: auto;
}

.rep-topline__x {
  color: var(--muted);
  font-size: 1.2rem;
}

/* Sized to sit level with the Heineken wordmark beside it: both are
   wordmarks, so they are matched on cap height rather than box height. */
.rep-topline__msa {
  height: 48px;
  width: auto;
}

.rep-draft {
  display: inline-block;
  margin-top: 1.2rem;
  background: #FFB300;
  color: #1A1300;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: .45rem .8rem;
  border-radius: var(--radius);
}

.rep-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ---- list of months ---- */
.rep-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.rep-item {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.4rem 1.5rem 1.5rem;
  text-decoration: none;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.rep-item:hover {
  border-color: var(--accent-vivid);
  transform: translateY(-3px);
}

.rep-item__head {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.rep-item__month {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--fg);
  text-transform: capitalize;
}

.rep-item__draft {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: #FFB300;
  color: #1A1300;
  padding: .2rem .45rem;
  border-radius: 4px;
  font-weight: 700;
}

.rep-item__lead {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.55;
  margin-top: .6rem;
}

.rep-item__figs {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1.2rem;
  margin-top: .9rem;
  font-size: .85rem;
  color: var(--muted);
}

.rep-item__figs b {
  color: var(--accent-vivid);
  font-family: var(--font-display);
  font-weight: 800;
}

.rep-item .link-arrow {
  margin-top: 1.1rem;
}

.rep-foot__note {
  margin-top: .5rem;
  font-size: .82rem;
  line-height: 1.5;
}

/* =====================================================================
   PRINT — this is the PDF
   The report is dark on screen; on paper that is a waste of toner and
   harder to read, so printing forces the light palette and drops
   everything that is not the report itself.
   ===================================================================== */
@media print {
  :root,
  :root[data-theme="dark"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --fg: #12161f;
    --muted: #4a5061;
    --line: #c9ced8;
  }

  .rep-bar,
  .rep-actions,
  .demo-bar,
  .rep-draft {
    display: none !important;
  }

  .logo-light {
    display: none !important;
  }

  .logo-dark {
    display: block !important;
  }

  body,
  .section,
  .section--light {
    background: #fff !important;
    color: #12161f !important;
  }

  .section {
    padding-block: 1.2rem !important;
  }

  .figure-card,
  .takeaway,
  .shot,
  .rep-table-wrap {
    border-color: #c9ced8 !important;
    background: #fff !important;
    break-inside: avoid;
  }

  .figure-card__num,
  .index__no,
  .index__label,
  .figure-card__label,
  .shot__kicker,
  .rep-table thead th {
    color: #b3271e !important;
    background: none !important;
  }

  .section__title,
  h1, h2, h3 {
    color: #12161f !important;
    break-after: avoid;
  }

  .bar__fill {
    background: #b3271e !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .bar__track {
    background: #e6e9ef !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }

  @page {
    margin: 14mm;
  }
}

/* The site's h1 is sized for a hero; on the gate and inside the report it
   has to behave like an ordinary heading. */
.gate h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.1;
  margin-top: .4rem;
}

/* =====================================================================
   ADMIN
   ===================================================================== */
.adm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  margin: 1.5rem 0 2rem;
}

.adm-status {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--muted);
}

.adm-status.is-bad {
  color: #fff;
  background: var(--accent-vivid);
  padding: .3rem .6rem;
  border-radius: 4px;
}

.adm-input {
  font: inherit;
  width: 100%;
  padding: .6rem .8rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--fg);
}

.adm-input--sm {
  width: auto;
}

.adm-input--file {
  padding: .4rem;
  font-size: .82rem;
}

.adm-input:focus-visible {
  outline: 2px solid var(--accent-vivid);
  outline-offset: 1px;
}

.adm-field {
  display: grid;
  gap: .35rem;
  margin-top: 1rem;
}

.adm-field > span {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.adm-field--tight {
  margin-top: 0;
}

.adm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

/* ---- list of reports ---- */
.adm-list {
  display: grid;
  gap: .6rem;
}

.adm-row {
  display: grid;
  grid-template-columns: minmax(7rem, auto) auto 1fr auto auto;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.adm-row__month {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--fg);
  text-transform: capitalize;
}

.adm-row__badge {
  font-family: var(--font-mono);
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .45rem;
  border-radius: 4px;
  background: #FFB300;
  color: #1A1300;
  font-weight: 700;
}

.adm-row__badge.is-live {
  background: #1E9E5A;
  color: #fff;
}

.adm-row__lead {
  color: var(--muted);
  font-size: .88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-row__btn {
  font: inherit;
  font-size: .82rem;
  padding: .4rem .8rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: none;
  color: var(--fg);
  cursor: pointer;
}

.adm-row__btn:hover {
  border-color: var(--accent-vivid);
  color: var(--accent-vivid);
}

.adm-row__btn--del:hover {
  background: var(--accent-vivid);
  color: #fff;
}

.adm-empty {
  color: var(--muted);
}

/* ---- editor ---- */
.adm-editor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.adm-editor-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.adm-block {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.adm-block__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--fg);
  margin-bottom: .9rem;
}

.adm-rows {
  display: grid;
  gap: .8rem;
}

.adm-line {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) 2rem;
  gap: .7rem;
  align-items: end;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.adm-x {
  align-self: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: none;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.adm-x:hover {
  background: var(--accent-vivid);
  border-color: var(--accent-vivid);
  color: #fff;
}

.adm-add {
  margin-top: .8rem;
}

.adm-thumb {
  margin-top: .5rem;
  width: 100%;
  max-width: 110px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.adm-note {
  margin-top: 2rem;
  color: var(--muted);
  font-size: .88rem;
}

/* ---- password dialog ---- */
.adm-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  padding: 1.6rem;
  max-width: 28rem;
  width: 92vw;
}

.adm-dialog::backdrop {
  background: rgba(0, 0, 0, .6);
}

.adm-dialog h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  margin-bottom: .4rem;
}

.adm-dialog__actions {
  display: flex;
  gap: .8rem;
  justify-content: flex-end;
  margin-top: 1.4rem;
}

/* =====================================================================
   CHARTS
   One measure per chart and one hue: these are magnitude comparisons,
   not questions of identity, so a categorical palette would be the wrong
   tool. A single series needs no legend — the heading says what is
   plotted — and only the last point carries a label, because a number on
   every point stops being read.
   ===================================================================== */
.chart__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--fg);
  margin-top: 2.6rem;
}

.chart__note {
  color: var(--muted);
  font-size: .88rem;
  margin-top: .3rem;
}

.chart {
  position: relative;
  margin: 1rem 0 0;
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* recessive chrome: hairline, solid, one step off the surface */
.ch-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.ch-tick {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.ch-area {
  fill: var(--accent-vivid);
  opacity: .1;
}

.ch-line {
  fill: none;
  stroke: var(--accent-vivid);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* the ring is the surface colour, so a dot stays legible over the line */
.ch-dot {
  fill: var(--accent-vivid);
  stroke: var(--surface);
  stroke-width: 2;
}

.ch-endlabel {
  fill: var(--fg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
}

.ch-cross {
  stroke: var(--accent-vivid);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  pointer-events: none;
}

.ch-hit {
  fill: transparent;
  cursor: crosshair;
}

.ch-hit:focus-visible {
  outline: 2px solid var(--accent-vivid);
  outline-offset: -2px;
}

.ch-tip {
  position: absolute;
  z-index: 5;
  transform: translate(-50%, -120%);
  pointer-events: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .5rem .7rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  white-space: nowrap;
  font-size: .85rem;
}

.ch-tip b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--fg);
  display: block;
}

.ch-tip span {
  color: var(--muted);
  font-size: .78rem;
}

/* ---- age profile ---- */
.agebars {
  display: grid;
  gap: .55rem;
  margin-top: 1rem;
  max-width: 46rem;
}

.agebar {
  display: grid;
  grid-template-columns: 4.5rem 1fr 3rem;
  align-items: center;
  gap: .9rem;
}

.agebar__label {
  font-size: .9rem;
  color: var(--muted);
}

.agebar__track {
  height: 14px;
  background: rgba(255, 255, 255, .06);
}

:root[data-theme="light"] .agebar__track {
  background: rgba(0, 0, 0, .06);
}

/* square at the baseline, rounded at the data end */
.agebar__fill {
  display: block;
  height: 100%;
  background: var(--accent-vivid);
  border-radius: 0 4px 4px 0;
}

.agebar__val {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--fg);
  font-size: .92rem;
  text-align: right;
}

/* the channel bars follow the same spec */
.bar__fill {
  border-radius: 0 4px 4px 0;
}

.bar__track {
  border-radius: 0;
}

@media print {
  .ch-tip,
  .ch-cross {
    display: none !important;
  }

  .ch-area,
  .ch-line,
  .ch-dot,
  .agebar__fill {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .chart {
    break-inside: avoid;
  }
}

/* =====================================================================
   SECTION NAVIGATION
   The report is long and a sponsor usually comes for one number, not for
   a read-through. The bar sticks under the top bar; the active entry is
   set from what is actually on screen, not from the last link clicked.
   ===================================================================== */
.secnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
}

.secnav__inner {
  display: flex;
  gap: .3rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: .45rem;
}

.secnav__inner::-webkit-scrollbar {
  display: none;
}

.secnav__link {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  white-space: nowrap;
  padding: .5rem .8rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--muted);
  font-size: .88rem;
  transition: color .2s var(--ease), background .2s var(--ease);
}

.secnav__link:hover {
  color: var(--fg);
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}

.secnav__link.is-here {
  color: var(--fg);
  background: color-mix(in srgb, var(--accent-vivid) 14%, transparent);
}

.secnav__no {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .08em;
  color: var(--accent-vivid);
}

/* the sticky bar must not cover the heading it just scrolled to */
.section[id] {
  scroll-margin-top: 4.5rem;
}

@media print {
  .secnav {
    display: none !important;
  }
}

/* =====================================================================
   ICONS
   One stroke weight and one size, so a row of them reads as a set. They
   sit in the muted ink and only take the accent where they are the mark
   for a figure — an icon in the data colour beside a number in the data
   colour is two things competing for the same job.
   ===================================================================== */
.ic {
  width: 20px;
  height: 20px;
  flex: none;
}

.secnav__ic {
  width: 16px;
  height: 16px;
  opacity: .8;
}

.secnav__link {
  gap: .45rem;
  align-items: center;
}

.secnav__link.is-here .secnav__ic {
  color: var(--accent-vivid);
  opacity: 1;
}

/* the figure card leads with its mark, then the number */
.figure-card {
  position: relative;
}

.figure-card__ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent-vivid) 12%, transparent);
  color: var(--accent-vivid);
  margin-bottom: .8rem;
}

.figure-card {
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.figure-card:hover {
  border-color: color-mix(in srgb, var(--accent-vivid) 45%, var(--line));
  transform: translateY(-2px);
}

/* channel rows */
.bar__label {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.bar__ic,
.td__ic,
.shot__ic {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--muted);
}

.cell-ic {
  white-space: nowrap;
}

.cell-ic .td__ic {
  vertical-align: -3px;
  margin-right: .5rem;
}

.shot__kicker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.shot__ic {
  width: 15px;
  height: 15px;
  color: var(--accent-vivid);
}

/* findings */
.takeaway {
  position: relative;
}

.takeaway__ic {
  display: inline-flex;
  color: var(--accent-vivid);
  margin-bottom: .6rem;
}

/* rows and cards lift a little under the pointer, so the page answers back */
.shot {
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}

.shot:hover {
  border-color: color-mix(in srgb, var(--accent-vivid) 45%, var(--line));
  transform: translateY(-3px);
}

.rep-table tbody tr {
  transition: background .2s var(--ease);
}

.rep-table tbody tr:hover {
  background: color-mix(in srgb, var(--fg) 4%, transparent);
}

.bar {
  padding-block: .15rem;
}

.bar:hover .bar__fill {
  filter: brightness(1.12);
}

@media print {
  .figure-card__ic {
    background: none !important;
    print-color-adjust: exact;
  }
}

/* The mark sits on the same line as the name it belongs to. An SVG with a
   width but no display sits on its own baseline line in a table cell. */
.cell-ic .td__ic {
  display: inline-block;
  vertical-align: -4px;
  margin-right: .45rem;
}

.cell-ic {
  white-space: normal;
}

/* The track and fill are spans. As grid items they were blockified for
   free; once the label became a flex box the fill's height:100% had no
   block box to resolve against and the bar painted nothing. Say it. */
.bar__track {
  display: block;
}

.bar__fill {
  display: block;
}

/* =====================================================================
   REVEALS
   The report advances the way a deck does: a section arrives as a unit,
   and the pieces inside it land in order rather than all at once.

   Everything here is scoped to html.js. A browser that never runs the
   script — and the printer, which is this page's PDF — gets the finished
   page, never a blank one waiting for an animation that will not come.
   ===================================================================== */
.js .step .rise,
.js .step .stagger > * {
  opacity: 0;
  transform: translateY(18px);
}

.js .step.is-in .rise,
.js .step.is-in .stagger > * {
  opacity: 1;
  transform: none;
  transition: opacity .55s var(--ease, cubic-bezier(.22,.61,.36,1)),
              transform .55s var(--ease, cubic-bezier(.22,.61,.36,1));
}

/* the heading first, then whatever follows it */
.js .step.is-in .rise {
  transition-delay: .05s;
}

/* each card a beat after the one before, capped so a long row does not
   turn into a queue the reader waits out */
.js .step.is-in .stagger > * {
  transition-delay: calc(.12s + var(--i, 0) * .07s);
}

/* the bar grows to its width; the width itself is set from data-w */
.js .bar__fill,
.js .agebar__fill {
  width: 0;
  transition: width .8s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(.2s + var(--i, 0) * .07s);
}

/* the trend line draws itself left to right, the area fades under it */
.js .chart .ch-line {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
}

.js .step.is-in .chart .ch-line {
  transition: stroke-dashoffset 1.1s cubic-bezier(.33,.9,.4,1) .25s;
  stroke-dashoffset: 0;
}

.js .chart .ch-area,
.js .chart .ch-dot,
.js .chart .ch-endlabel {
  opacity: 0;
}

.js .step.is-in .chart .ch-area {
  transition: opacity .7s ease .5s;
  opacity: .1;
}

.js .step.is-in .chart .ch-dot,
.js .step.is-in .chart .ch-endlabel {
  transition: opacity .5s ease .9s;
  opacity: 1;
}

/* the cover is above the fold, so it plays on load rather than on scroll */
.js .rep-hero .rep-topline,
.js .rep-hero h1,
.js .rep-hero .page-hero__lead,
.js .rep-hero .rep-hero__meta,
.js .rep-hero .rep-actions {
  animation: rep-in .6s cubic-bezier(.22,.61,.36,1) both;
}

.js .rep-hero h1 { animation-delay: .06s; }
.js .rep-hero .page-hero__lead { animation-delay: .12s; }
.js .rep-hero .rep-hero__meta { animation-delay: .18s; }
.js .rep-hero .rep-actions { animation-delay: .24s; }

@keyframes rep-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Motion is the decoration here, never the information. Switched off, the
   page is identical — only instant. */
@media (prefers-reduced-motion: reduce) {
  /* .ch-area is deliberately a 10% wash; a blanket opacity:1 here turned
     it into a solid block of the accent. */
  .js .chart .ch-area {
    opacity: .1 !important;
    transition: none !important;
  }

  .js .step .rise,
  .js .step .stagger > *,
  .js .chart .ch-dot,
  .js .chart .ch-endlabel,
  .js .rep-hero > .shell > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  .js .chart .ch-line {
    stroke-dashoffset: 0 !important;
  }
}

@media print {
  .js .step .rise,
  .js .step .stagger > *,
  .js .chart .ch-dot,
  .js .chart .ch-endlabel {
    opacity: 1 !important;
    transform: none !important;
  }

  .js .chart .ch-area { opacity: .1 !important; }
  .js .chart .ch-line { stroke-dashoffset: 0 !important; }
}
