/* The Average Sneaker (/stories/the-average-sneaker): page-specific layer over stories/story.css. */
.avg-sneaker .story-kicker, .avg-sneaker .step .step-num, .avg-sneaker .keep-grid .kk { font-size: 13px; }
.avg-sneaker .story-photo figcaption, .avg-sneaker .step-photos figcaption, .avg-sneaker .chart-note { font-size: 13px; }
.avg-sneaker .chart-box .tick text, .avg-sneaker .axis-label, .avg-sneaker .rule-label, .avg-sneaker .chart-box .note-text { font-size: 13px; }
.avg-sneaker .chart-box .note-text.big { font-size: 20px; }
.avg-sneaker .chart-box .note-text.rowlab { font-weight: 600; fill: var(--ink); }
.avg-sneaker .chart-sub, .avg-sneaker .chart-legend { font-size: 13px; }
.avg-sneaker .chart-box .tick text { fill: var(--ink3); }

/* hero: the stack animates into the average */
.avg-sneaker h1 { max-width: 16ch; font-size: clamp(2.1rem, 4.2vw, 3.5rem); }
.avg-sneaker .story-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.avg-hero { max-width: 620px; margin: 0 auto; width: 100%; }
.avg-hero svg { display: block; width: 100%; height: auto; overflow: visible; }
.avg-hero .hero-stack path { fill: none; stroke: #077a76; stroke-opacity: .06; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.avg-hero .hero-mean, .avg-sneaker .shape-root .mean-line { fill: none; stroke: #1c2426; stroke-width: 3.2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.avg-hero figcaption { text-align: left; max-width: 52ch; }

/* shape layers inside the sticky chart */
.avg-sneaker .shape-root path { vector-effect: non-scaling-stroke; }
.avg-sneaker .shape-root text { font-family: 'Source Sans 3', system-ui, sans-serif; }
.avg-sneaker .shape-root .lab { font-size: 13px; fill: var(--ink); font-weight: 600; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.avg-sneaker .shape-root .lab.sub { fill: var(--ink3); font-weight: 400; }
.avg-sneaker .shape-root .lab.serif { font-family: Fraunces, Georgia, serif; font-size: 16px; font-weight: 500; }
.avg-sneaker .shape-root .lab.teal { fill: var(--teal); }
.avg-sneaker .shape-root .dim { stroke: var(--ink2); stroke-width: 1px; fill: none; }

/* thumbnails of real shoes inside step cards */
.avg-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: .4rem 0 .9rem; }
.avg-thumbs figure { margin: 0; }
.avg-thumbs img { width: 100%; height: auto; aspect-ratio: 7 / 5; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; display: block; }
.avg-thumbs figcaption { font-size: 13px; line-height: 1.3; color: var(--ink2); margin-top: 3px; }
.avg-thumbs figcaption b { color: var(--teal); }
.avg-thumbs .t-src { display: block; color: var(--ink3); }
.step[data-step^="mode"] .avg-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* color swatch rows */
.avg-zones { display: grid; gap: 6px; margin: .3rem 0 .8rem; }
.avg-zones .zrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .95rem; color: var(--ink2); }
.avg-zones .zl { min-width: 3.4em; font-weight: 700; color: var(--ink); }
.avg-zones .sw { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.avg-zones .sw i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(28, 36, 38, .35); display: inline-block; }
.avg-zones .sw b { color: var(--ink); }

/* slider for the four differences */
.avg-ctrl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; margin-top: 6px; font-size: 13px; color: var(--ink2); }
.avg-ctrl[hidden] { display: none; }
.avg-ctrl input[type=range] { grid-column: 1 / -1; width: 100%; min-width: 0; height: 36px; accent-color: #077a76; margin: 0; }
.avg-ctrl .lo { text-align: left; font-weight: 600; }
.avg-ctrl .hi { text-align: right; font-weight: 600; color: var(--teal); }

/* search box: how average is your sneaker */
.avg-lookup { background: var(--wash); border: 1px solid #cfeae6; border-radius: 14px; padding: 16px; margin: 1rem 0 1.6rem; }
.lk-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.lk-row { display: flex; gap: 8px; }
.lk-row input { flex: 1 1 auto; min-width: 0; min-height: 48px; font: 400 16px/1.2 'Source Sans 3', system-ui, sans-serif; color: var(--ink); background: #fff;
  border: 1px solid #b9c7c7; border-radius: 10px; padding: 0 12px; }
.lk-row input:focus-visible, .lk-rand:focus-visible, .lk-chip:focus-visible, .lk-list button:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.lk-rand { min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1px solid #0c2422; background: #fff; color: #0c2422; font: 700 15px/1.2 'Source Sans 3', system-ui, sans-serif; cursor: pointer; white-space: nowrap; }
.lk-rand:hover { background: var(--tiff); }
.lk-status { font-size: 13px; color: var(--ink3); margin: 6px 0 0 !important; min-height: 1.3em; line-height: 1.3 !important; }
.lk-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.lk-list button { width: 100%; min-height: 44px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer;
  font: 400 15px/1.3 'Source Sans 3', system-ui, sans-serif; color: var(--ink); }
.lk-list button:hover { border-color: var(--teal); }
.lk-list .lk-meta { color: var(--ink3); font-size: 13px; margin-left: 6px; }
.lk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lk-chip { min-height: 44px; border: 1px solid #b9c7c7; background: #fff; border-radius: 22px; padding: 0 14px; cursor: pointer; font: 600 14px/1.2 'Source Sans 3', system-ui, sans-serif; color: var(--ink); text-align: left; }
.lk-chip:hover { border-color: var(--teal); }
.lk-out { margin-top: 14px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.lk-out[hidden] { display: none; }
.lk-out svg { width: 100%; height: auto; display: block; overflow: visible; }
.lk-out .lk-avg { fill: none; stroke: #1c2426; stroke-width: 3px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lk-out .lk-shoe { fill: rgba(129, 216, 208, .35); stroke: #077a76; stroke-width: 2.4px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.lk-out h3 { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; line-height: 1.25; margin: 0 0 4px; color: var(--ink); }
.lk-out p { margin: .4rem 0 0; font-size: .98rem; line-height: 1.5; }
.lk-out .lk-big { font-family: var(--serif); font-size: 2.3rem; line-height: 1; color: var(--teal); display: block; }
.lk-out .lk-photo { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; }
.lk-out .lk-photo img { width: 120px; height: auto; aspect-ratio: 7 / 5; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.lk-out .lk-photo span { font-size: 13px; color: var(--ink3); line-height: 1.4; }
.lk-track { position: relative; height: 12px; border-radius: 6px; background: #dfe7e7; margin: 10px 0 4px; }
.lk-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: var(--tiff); }
.lk-track b { position: absolute; top: -4px; width: 4px; height: 20px; margin-left: -2px; background: #0c2422; border-radius: 2px; }
.lk-scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink3); }
.lk-out .fine { font-size: 13px !important; color: var(--ink3) !important; }

/* call to action and method box */
.story .avg-cta { background: var(--tiff); color: var(--tiff-ink); border-radius: 14px; padding: 18px 20px; margin: 1.6rem 0; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.story .avg-cta p { margin: 0; color: var(--tiff-ink); flex: 1 1 18em; }
.story .avg-cta .btn-tiff { display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 24px; background: #fff; color: #0c2422; border: 2px solid #0c2422; font-weight: 700; text-decoration: none; }
.story .avg-cta .btn-tiff:hover, .story .avg-cta .btn-tiff:focus-visible { background: #0c2422; color: #fff; outline: none; }
.avg-method { border: 1px solid var(--line); border-radius: 12px; padding: 0 16px 6px; margin: 1.6rem 0; background: #fff; }
.avg-method summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.avg-method p { font-size: .92rem; color: var(--ink2); line-height: 1.62; }

@media (max-width: 899px) {
  .avg-sneaker .story-hero { grid-template-columns: 1fr; }
  .avg-hero { padding: 0 10px; box-sizing: border-box; }
  .avg-sneaker h1 { max-width: none; font-size: clamp(1.95rem, 8vw, 2.5rem); }
  .avg-sneaker .step-card { opacity: 0; }  /* the chart is busy: show only the active card */
  .avg-sneaker .step.active .step-card { opacity: 1; }
  .avg-sneaker .scrolly-graphic { height: 62vh; height: 62svh; min-height: 380px; }
  .avg-sneaker .chart-head { min-height: 104px; }
  .avg-thumbs { gap: 6px; }
  .avg-thumbs figcaption { font-size: 12.5px; }
  .step[data-step^="mode"] .avg-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lk-out { grid-template-columns: 1fr; }
  .lk-row { flex-wrap: wrap; }
  .lk-rand { flex: 1 1 100%; }
  .avg-cta { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) { .avg-sneaker .hero-stack path { transition: none; } }
