/* ============================================================
   verified.fyi — research data stories (/research)
   Builds on shared.css tokens. Charts are plain HTML/CSS boxes
   drawn from the story dataset, so they reflow on small screens
   and follow the light/dark tokens without extra rules.
   ============================================================ */

/* verdict spectrum fills, danger → trusted */
.v0 { background: var(--danger) }
.v1 { background: var(--susp) }
.v2 { background: var(--caution) }
.v3 { background: var(--safe) }
.v4 { background: var(--trusted) }

/* ---- story hero ---------------------------------------------- */
.rs-hero { text-align: center; padding: 76px 0 8px; position: relative }
.rs-hero-in { position: relative; z-index: 2; max-width: 840px; margin: 0 auto; padding: 0 20px }
.rs-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 22px }
.rs-kicker a { color: var(--coral) }
.rs-kicker a::after { content: "·"; margin-left: 10px; color: var(--ink-3) }
.rs-kicker a:hover { text-decoration: underline }
.rs-hero h1 { font-size: 92px; letter-spacing: -.05em; line-height: .96; margin-bottom: 26px }
.rs-hero h1 .u { position: relative; white-space: nowrap }
.rs-hero h1 .u svg { position: absolute; left: 0; right: 0; bottom: -10px; width: 100%; height: 16px; color: var(--coral) }
.rs-dek { font-size: 21px; color: var(--ink-2); font-weight: 500; line-height: 1.55; max-width: 690px; margin: 0 auto }
.rs-dek b { color: var(--ink) }
.rs-byline { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 24px; font-size: 13.5px; font-weight: 600; color: var(--ink-3) }
.rs-byline span + span::before { content: "·"; margin-right: 18px; color: var(--line) }

.rs-band { margin-top: 52px }
.rs-band .bstat .n { font-size: 48px }
.rs-band .bstat .l { max-width: 220px; margin: 6px auto 0; line-height: 1.45 }

/* ---- story body ---------------------------------------------- */
.rs-sec { margin-top: 92px }
.rs-sec .sec-head { max-width: 680px }
.rs-sec .sec-head h2 { font-size: 38px; letter-spacing: -.03em }
.rs-prose { max-width: 680px }
.rs-prose p { font-size: 17.5px; line-height: 1.75; color: var(--ink-2); font-weight: 500; margin-bottom: 18px }
.rs-prose b { color: var(--ink) }
.rs-prose a { color: var(--brand); font-weight: 700 }

.rs-chart { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-soft); padding: 30px 32px 24px; margin: 34px 0 30px }
.rs-chart-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 22px }
.rs-chart-h h3 { font-size: 18px; letter-spacing: -.01em }
.rs-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; font-weight: 700; color: var(--ink-2) }
.rs-legend span { display: inline-flex; align-items: center; gap: 6px }
.rs-legend i { width: 10px; height: 10px; border-radius: 3px }
.rs-cap { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-top: 18px; line-height: 1.5 }
.rs-data { margin-top: 14px; font-size: 13px; color: var(--ink-2) }
.rs-data summary { cursor: pointer; font-weight: 700; color: var(--brand); width: max-content }
.rs-data table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 12.5px }
.rs-data th, .rs-data td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums }
.rs-data th:first-child, .rs-data td:first-child { text-align: left }
.rs-data th { font-family: var(--mono); font-size: 11px; color: var(--ink-3); font-weight: 700 }
.rs-data-scroll { overflow-x: auto }

/* charts animate in once scrolled into view (.in is added by the page script) */
.rs-chart .bar i, .rs-day .col, .rs-db-line, .rs-db-dot, .rs-chart .bars .bb { transition: width .9s cubic-bezier(.2,.8,.2,1), height .9s cubic-bezier(.2,.8,.2,1), left .9s cubic-bezier(.2,.8,.2,1), opacity .5s }
.rs-chart:not(.in) .bar i { width: 0 !important }
.rs-chart:not(.in) .rs-day .col, .rs-chart:not(.in) .bars .bb { height: 0 !important }
.rs-chart:not(.in) .rs-db-dot, .rs-chart:not(.in) .rs-db-line { opacity: 0 }
@media (prefers-reduced-motion: reduce) {
  .rs-chart .bar i, .rs-day .col, .rs-db-line, .rs-db-dot, .rs-chart .bars .bb, .rs-face { transition: none }
}

/* ---- chart: verdict spectrum by age -------------------------- */
.rs-spec { display: grid; grid-template-columns: 1fr 290px; gap: 30px; align-items: start }
.rs-rows { display: flex; flex-direction: column; gap: 4px }
.rs-row { display: grid; grid-template-columns: 92px 1fr 40px; gap: 12px; align-items: center; width: 100%; padding: 5px 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer }
.rs-row:hover, .rs-row.on { background: var(--cream-2) }
.rs-row:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px }
.rs-row .lb { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap }
.rs-row.on .lb { color: var(--ink) }
.rs-row .bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--line-2) }
.rs-row .bar i { display: block; height: 100% }
.rs-row .av { font-family: var(--display); font-size: 15px; font-weight: 800; text-align: right }
.rs-axis { display: grid; grid-template-columns: 92px 1fr 40px; gap: 12px; padding: 4px 8px 0; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); font-weight: 700 }
.rs-axis .ends { display: flex; justify-content: space-between }
.rs-axis .r { text-align: right }

.rs-readout { position: sticky; top: 96px; background: var(--cream); border: 1px solid var(--line); border-radius: 22px; padding: 26px 22px 22px; text-align: center }
.rs-face { width: 78px; height: 78px; border-radius: 50%; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; transition: background-color .35s }
.rs-face svg { width: 40px; height: 40px; color: #fff }
.rs-readout .age { font-size: 14px; font-weight: 700; color: var(--ink-2) }
.rs-readout .big { font-family: var(--display); font-size: 60px; font-weight: 800; letter-spacing: -.04em; line-height: 1; margin: 8px 0 4px; transition: color .35s }
.rs-readout .what { font-size: 14px; font-weight: 600; color: var(--ink-2) }
.rs-readout .meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line) }
.rs-readout .meta b { display: block; font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em }
.rs-readout .meta span { font-size: 11.5px; font-weight: 600; color: var(--ink-3) }
.rs-slider { margin-top: 18px; text-align: left }
.rs-slider label { display: block; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px }
.rs-slider input { width: 100%; accent-color: var(--brand); cursor: pointer }
.rs-slider .ends { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--ink-3) }

/* ---- chart: first 30 days ------------------------------------ */
.rs-days { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 230px; padding-top: 26px }
.rs-day { flex: 1; height: 100%; display: flex; align-items: flex-end }
.rs-day .col { width: 100%; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 4px 4px 0 0; overflow: hidden; background: var(--line) }
.rs-day .col i { display: block; background: var(--danger) }
.rs-day:hover .col { filter: brightness(.92) }
.rs-mark { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--ink-3); pointer-events: none }
.rs-mark span { position: absolute; top: 0; left: 8px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ink-2); white-space: nowrap }
.rs-days-x { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--ink-3) }

.rs-quote { margin: 44px 0; padding: 30px 34px; border-left: 5px solid var(--coral); border-radius: 0 22px 22px 0; background: var(--coral-soft); font-family: var(--display); font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3 }
.rs-quote small { display: block; margin-top: 10px; font-family: var(--body); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--ink-2) }

/* ---- chart: newborn vs established dumbbells ----------------- */
.rs-db-group + .rs-db-group { margin-top: 26px }
.rs-db-group h4 { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--coral); margin-bottom: 4px }
.rs-db-group h4 + p { font-size: 13.5px; color: var(--ink-3); font-weight: 600; margin-bottom: 8px }
.rs-db-row { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line-2) }
.rs-db-row .lb { font-size: 14.5px; font-weight: 700 }
.rs-db-track { position: relative; height: 46px; margin: 0 10px }
.rs-db-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--line-2) }
.rs-db-line { position: absolute; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--line) }
.rs-db-dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line) }
.rs-db-dot.nb { background: var(--danger) }
.rs-db-dot.es { background: var(--trusted) }
.rs-db-dot b { position: absolute; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; font-weight: 700; white-space: nowrap }
.rs-db-dot.nb b { top: 15px; color: var(--danger) }
.rs-db-dot.es b { bottom: 15px; color: var(--trusted) }
.rs-db-axis { display: grid; grid-template-columns: 230px 1fr; gap: 18px; margin-top: 6px }
.rs-db-axis div { display: flex; justify-content: space-between; margin: 0 10px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--ink-3) }

/* ---- "is it just us?" cross-check ---------------------------- */
.rs-check { display: grid; grid-template-columns: 1fr 1.1fr; gap: 34px; align-items: center }
.rs-check > * { min-width: 0 }
.rs-check h3 { font-size: 24px; margin-bottom: 12px; letter-spacing: -.02em }
.rs-check p { font-size: 15.5px; color: var(--ink-2); font-weight: 500; line-height: 1.65 }
.rs-check p + p { margin-top: 10px }
.rs-check b { color: var(--ink) }
.rs-check .bars { height: 170px; padding-top: 4px }
.rs-check .bars .col .bb { background: var(--danger); min-height: 3px }
.rs-check .bars .col .lb { white-space: normal; text-align: center; line-height: 1.25 }

/* ---- exceptions ---------------------------------------------- */
.rs-callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 30px }
.rs-callout { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px }
.rs-callout .n { font-family: var(--display); font-size: 48px; font-weight: 800; letter-spacing: -.04em; line-height: 1 }
.rs-callout h3 { font-size: 19px; margin: 12px 0 8px }
.rs-callout p { font-size: 14.5px; color: var(--ink-2); font-weight: 500; line-height: 1.65 }

/* ---- takeaways ----------------------------------------------- */
.rs-tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px }
.rs-tip { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px }
.rs-tip .n { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--cream); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; font-size: 15px; margin-bottom: 14px }
.rs-tip h3 { font-size: 17px; margin-bottom: 8px }
.rs-tip p { font-size: 14.5px; color: var(--ink-2); font-weight: 500; line-height: 1.6 }
.rs-try { margin-top: 30px; text-align: center; background: linear-gradient(160deg, var(--card), var(--cream-2)); border: 1px solid var(--line); border-radius: 32px; padding: 46px 30px; box-shadow: var(--shadow-soft) }
.rs-try h2 { font-size: 32px; margin-bottom: 10px }
.rs-try p { font-size: 16.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 24px }
.rs-try .scanwrap { max-width: 560px; margin: 0 auto }

/* ---- methodology, citation, sharing -------------------------- */
.rs-method { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 32px 34px; margin-top: 30px }
.rs-method dl { display: grid; grid-template-columns: 170px 1fr; gap: 14px 24px }
.rs-method dt { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding-top: 3px }
.rs-method dd { font-size: 15px; color: var(--ink-2); font-weight: 500; line-height: 1.65 }
.rs-method dd b { color: var(--ink) }
.rs-method dd a { color: var(--brand); font-weight: 700 }

.rs-cite { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; margin-top: 16px }
.rs-cite > div { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px }
.rs-cite h3 { font-size: 16px; margin-bottom: 12px }
.rs-cite .ref { font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: var(--ink-2); background: var(--cream-2); border-radius: 12px; padding: 14px 16px; user-select: all; overflow-wrap: anywhere }
.rs-cite .note { font-size: 13px; color: var(--ink-3); font-weight: 600; margin-top: 12px; line-height: 1.5 }
.rs-cite .note a { color: var(--brand); font-weight: 700 }
.rs-share { display: flex; flex-wrap: wrap; gap: 8px }
.rs-share a, .rs-share button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-family: var(--display); font-size: 13.5px; font-weight: 700; cursor: pointer }
.rs-share a:hover, .rs-share button:hover { border-color: var(--ink-3) }
.rs-share .dl { background: var(--ink); border-color: var(--ink); color: var(--cream) }

/* ---- index ---------------------------------------------------- */
.rs-list { display: grid; gap: 22px }
.rs-item { display: grid; grid-template-columns: 1fr 1.05fr; background: var(--card); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-soft); transition: .18s }
.rs-item:hover { transform: translateY(-2px); box-shadow: var(--shadow) }
.rs-item .txt { padding: 36px 34px; display: flex; flex-direction: column; justify-content: center }
.rs-item .no { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--coral); margin-bottom: 12px }
.rs-item h2 { font-size: 30px; letter-spacing: -.03em; margin-bottom: 12px }
.rs-item p { font-size: 15.5px; color: var(--ink-2); font-weight: 500; line-height: 1.6 }
.rs-item .go { margin-top: 18px; font-size: 14.5px; font-weight: 700; color: var(--brand) }
.rs-item .media { display: flex; align-items: center; background: #1B2440 }
.rs-item .rs-stat { flex-direction: column; align-items: stretch; justify-content: center; gap: 14px; padding: 34px 32px }
.rs-stat-big { font-size: 84px; font-weight: 800; letter-spacing: -.045em; line-height: .9 }
.rs-stat-cap { font-size: 20px; font-weight: 800; letter-spacing: -.01em; line-height: 1.3; color: #F4F6FC; max-width: 24ch }
.rs-stat-note { font-family: var(--mono); font-size: 11.5px; color: #93A0C2 }
.rs-spectrum { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; max-width: 340px }
.rs-spectrum .lbl { font-family: var(--mono); font-size: 11px; color: #93A0C2 }
.rs-spectrum-rows { display: flex; flex-direction: column; gap: 3px }
.rs-spectrum .bar { height: 8px; display: flex; border-radius: 2px; overflow: hidden }
.rs-spectrum.dense .rs-spectrum-rows { gap: 1px }
.rs-spectrum.dense .bar { height: 3px; border-radius: 1px }
.rs-spectrum .bar i { flex-basis: 0 }
.rs-spectrum .v-d { background: var(--danger) }
.rs-spectrum .v-s { background: var(--susp) }
.rs-spectrum .v-c { background: var(--caution) }
.rs-spectrum .v-m { background: var(--safe) }
.rs-spectrum .v-t { background: var(--trusted) }

.rs-preview { background: var(--caution); color: #2A1B00; font-size: 14px; font-weight: 600; text-align: center; padding: 10px 16px }
.rs-preview b { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-right: 8px }
.rs-preview-pill { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--caution); color: #2A1B00; letter-spacing: .06em; vertical-align: 1px }

/* ---- responsive ----------------------------------------------- */
@media (max-width: 900px) {
  .rs-hero h1 { font-size: 64px }
  .rs-spec { grid-template-columns: 1fr }
  .rs-readout { position: static; order: -1 }
  .rs-check, .rs-cite, .rs-item { grid-template-columns: 1fr }
  .rs-item .media { order: -1 }
  .rs-tips { grid-template-columns: 1fr }
}
@media (max-width: 640px) {
  .rs-hero { padding: 44px 0 4px }
  .rs-hero h1 { font-size: 50px; margin-bottom: 20px }
  .rs-dek { font-size: 17px }
  .rs-band { margin-top: 36px }
  .rs-band .bstat .n { font-size: 34px }
  .rs-band .bstat .l { font-size: 12.5px }
  .rs-sec { margin-top: 64px }
  .rs-sec .sec-head h2 { font-size: 28px }
  .rs-prose p { font-size: 16px }
  .rs-chart { padding: 20px 14px 18px; border-radius: 20px; margin: 26px 0 22px }
  .rs-chart-h h3 { font-size: 16px }
  .rs-row, .rs-axis { grid-template-columns: 74px 1fr 30px; gap: 8px; padding-left: 4px; padding-right: 4px }
  .rs-row .lb { font-size: 10.5px }
  .rs-row .bar { height: 18px }
  .rs-row .av { font-size: 13px }
  .rs-readout .big { font-size: 50px }
  .rs-days { height: 180px; gap: 2px }
  .rs-check .bars { gap: 6px }
  .rs-check .bars .col .nn { font-size: 13px }
  .rs-check .bars .col .lb { font-size: 10px }
  .rs-quote { font-size: 21px; padding: 22px 22px }
  .rs-db-row, .rs-db-axis { grid-template-columns: 1fr; gap: 0 }
  .rs-db-axis > span { display: none }
  .rs-db-row .lb { font-size: 13.5px; padding-top: 4px }
  .rs-callouts { grid-template-columns: 1fr }
  .rs-callout, .rs-tip { padding: 22px 20px }
  .rs-try { padding: 32px 18px; border-radius: 24px }
  .rs-try h2 { font-size: 25px }
  .rs-method { padding: 22px 20px; border-radius: 20px }
  .rs-method dl { grid-template-columns: 1fr; gap: 4px }
  .rs-method dd { margin-bottom: 12px }
  .rs-item .txt { padding: 24px 22px }
  .rs-item h2 { font-size: 24px }
  .rs-item .rs-stat { padding: 26px 22px }
  .rs-stat-big { font-size: 64px }
  .rs-stat-cap { font-size: 18px }
}
