/* Time travel (timetravel.js) and "Rapha noticed..." (patterns.js). Scoped to their own classes; uses the page's
   tokens (--accent, --line, --surface...). Motion only when the user hasn't asked for less. */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; text-overflow: ellipsis; border: 0; }  /* ellipsis: the layout check skips it as intended clipping */

/* ---------- the slim timeline ---------- */
.tt[hidden], .tt-view[hidden] { display: none; }
.tt { padding: 10px 16px 8px; }
.tt-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.tt-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--ink-2); flex: none; }
.tt-date { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-spacer { flex: 1 1 0; }
.tt-back, .tt-cmp { white-space: nowrap; flex: none; }
.tt-cmp { padding: 4px 10px; font-size: 12px; }
.tt-cmp.on { background: var(--accent-soft); border-color: var(--rapha-accent-line); color: var(--accent); font-weight: 600; }
.tt-track { position: relative; margin: 6px 0 0; }
.tt-track input[type=range] { width: 100%; margin: 0; height: 32px; background: transparent; cursor: pointer; accent-color: var(--accent);
  -webkit-appearance: none; appearance: none; position: relative; z-index: 1; touch-action: pan-y; }
.tt-track input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line); }
.tt-track input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.tt-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.tt-track input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface);
  border: 2px solid var(--accent); box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.tt-track input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.tt-marks { position: absolute; left: 11px; right: 11px; top: 50%; height: 0; pointer-events: none; }
.tt-mark { position: absolute; top: -7px; width: 2px; height: 14px; margin-left: -1px; border-radius: 1px; background: var(--ink-3); opacity: .55; }
.tt-mark.lab { background: var(--blood); opacity: .8; }
.tt-mark.protocol, .tt-mark.protocol_end { background: var(--accent); opacity: .9; }
.tt-ends { display: flex; justify-content: space-between; margin-top: -2px; }
.tt-events { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 6px 0 2px; overscroll-behavior-x: contain; }
.tt-events::-webkit-scrollbar { display: none; }
.tt-events:empty { display: none; }
.tt-ev { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tt-ev .dot { color: var(--ink-3); }
.tt-ev.lab .dot { color: var(--blood); }
.tt-ev.protocol .dot, .tt-ev.protocol_end .dot { color: var(--accent); }
.tt-ev:hover { background: var(--surface-2); }
.tt-ev:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* A past date: the live Overview cards step aside for the snapshot */
body.tt-past .tab-panel[data-panel="overview"] > :not(#view-note):not(#tt):not(#tt-view) { display: none !important; }

/* ---------- the snapshot ---------- */
.tt-view { display: grid; gap: 16px; min-width: 0; }
.tt-view[aria-busy="true"] { opacity: .6; }
.tt-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--accent-soft); border: 1px solid var(--rapha-accent-line); font-size: 13px; color: var(--ink-2); }
.tt-banner .grow { flex: 1 1 240px; min-width: 0; }
.tt-tag { font-weight: 700; color: var(--accent); white-space: nowrap; }
.tt-how h3 { font-size: 18px; margin: 2px 0 12px; }
.tt-how .eyebrow { color: var(--accent); }
.tt-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tt-rows li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; font-size: 14.5px; line-height: 1.45; }
.tt-rows .ic { font-size: 12px; line-height: 1.9; }
.tt-rows .good .ic { color: var(--ok); } .tt-rows .watch .ic { color: var(--warn); } .tt-rows .bad .ic { color: var(--high); }
.tt-rows .area { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tt-stats.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tt-stats .stat .v { font-size: 22px; }
.tt-view h3 { font-size: 14px; }
.tt-view h4.eyebrow { margin: 12px 0 6px; }
.tt-rep { border-left: 3px solid var(--line); padding-left: 10px; margin-top: 10px; }
.tt-rep h4 { font-size: 13px; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.tt-chip { cursor: default; }
.tt-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.tt-two h4.eyebrow { margin-top: 0; }
.tt-kv { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tt-kv li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: baseline; font-size: 13.5px; }
.tt-kv li.muted { display: block; }
.tt-ins { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.tt-ins p { margin: 2px 0 0; color: var(--ink-2); }
.tt-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tt-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.tt-colh { font-size: 15px; margin: 0; padding: 0 2px; color: var(--accent); }
.tt-col .tt-two { grid-template-columns: minmax(0, 1fr); }
.tt-table { overflow-x: auto; margin-top: 8px; }
.tt-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tt-table caption { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 6px 0; }
.tt-table th, .tt-table td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.tt-table thead th { font-size: 11.5px; color: var(--ink-3); font-weight: 600; border-top: 0; }
.tt-table tbody th { font-weight: 600; }
.tt-table tr.nc td:last-child { font-size: 12px; }

@media (max-width: 900px) {
  .tt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tt-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tt { padding: 10px 12px 8px; }
  .tt-two { grid-template-columns: minmax(0, 1fr); }
  .tt-track input[type=range]::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -11px; }
  .tt-track input[type=range] { height: 40px; }
}
@media (prefers-reduced-motion: no-preference) {
  .tt-view { transition: opacity .15s ease; }
  .tt-ev, .tt-cmp { transition: background-color .12s ease; }
}

/* ---------- "Rapha noticed..." ---------- */
.rn-card[hidden], .rn-hidden-list[hidden] { display: none; }
.rn-card .card-head { flex-wrap: wrap; row-gap: 4px; }
.rn-sub { flex: 1 1 160px; min-width: 0; }
.rn-list { display: grid; gap: 12px; }
.rn-item { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.rn-item.rn-hidden { opacity: .75; }
.rn-text { margin: 0; font-size: 14.5px; line-height: 1.5; }
.rn-meta { margin-top: 6px; }
.rn-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.rn-actions .link-btn { white-space: nowrap; min-height: 28px; }
.rn-exp { font-size: 12px; padding: 5px 10px; }
.rn-exp:disabled { cursor: not-allowed; }
.rn-soon { white-space: nowrap; }
.rn-spacer { flex: 1 1 0; }
.cite.rn-cite { color: #0e6a78; border-color: #b9e0e6; background: #eaf7f9; }
.rn-pop .rn-pop-foot { color: var(--ink-3); font-size: 11.5px; display: grid; gap: 4px; }
.rn-how, .rn-hidden-list { margin-top: 12px; font-size: 13px; }
.rn-how summary, .rn-hidden-list summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.rn-hidden-list .rn-list { margin-top: 8px; }
.rn-method { color: var(--ink-2); margin: 6px 0 0; }
