/* The weekend tape and the Monday scorecard (tape agent, SPEC-v5 T5). Tokens from /tokens.css; no new colours.
   The one loud element per page: the weekend track on /tape, the study-vs-ours comparison on /scorecard. */

.tp, .sc5 { padding-bottom: var(--space-12); }
.tp-head { padding: var(--space-8) 0 var(--space-6); max-width: 60rem; }
.tp-crumb { margin: 0 0 var(--space-2); font-size: var(--fs-14); }
.tp-crumb a, .tp-feeds a { color: var(--text-dim); }
.tp-feeds { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-4) 0 0; font-size: var(--fs-14); }
.tp-h2 { font-size: var(--fs-20); font-weight: 700; margin: 0 0 var(--space-3); letter-spacing: -0.005em; }
.tp-h2 a { color: inherit; }
.tp-dim { color: var(--text-dim); }
.tp-name { display: block; font-weight: 400; font-size: var(--fs-12); color: var(--text-dim); }
.tp-why { display: block; font-size: var(--fs-12); color: var(--text-dim); max-width: 34ch; }
.r { text-align: right; }

/* ---- the weekend track: a real sequence (Fri close → Sat/Sun → Monday prints) ---------------------------------- */
.tp-track-wrap { margin: 0 0 var(--space-8); }
.tp-track { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(7.5rem, 1fr);
  overflow-x: auto; scrollbar-width: thin; position: relative; }
.tp-stop { position: relative; padding: 22px var(--space-3) var(--space-2) 0; min-width: 0; }
.tp-stop::before { content: ""; position: absolute; top: 9px; left: 0; right: 0; height: 2px; background: var(--line); }
.tp-stop:first-child::before { left: 6px; }
.tp-stop:last-child::before { right: auto; width: 6px; }
.tp-stop-dot { position: absolute; top: 3px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-dim); box-sizing: border-box; }
.tp-k-implied .tp-stop-dot, .tp-k-closes .tp-stop-dot { border-color: var(--closed); }
.tp-k-scorecard .tp-stop-dot { border-color: var(--focus); }
.tp-st-dry_run .tp-stop-dot, .tp-st-sent .tp-stop-dot { background: currentColor; }
.tp-k-implied.tp-st-dry_run, .tp-k-implied.tp-st-sent, .tp-k-closes.tp-st-dry_run, .tp-k-closes.tp-st-sent { color: var(--closed); }
.tp-k-scorecard.tp-st-dry_run, .tp-k-scorecard.tp-st-sent { color: var(--focus); }
.tp-stop[class*="tp-k-event"] .tp-stop-dot { border-radius: 3px; transform: rotate(45deg) scale(.85); border-color: var(--text); }
.tp-stop[class*="tp-k-event"] { color: var(--text); }
.tp-st-held .tp-stop-dot, .tp-st-skipped .tp-stop-dot { border-style: dashed; }
.tp-stop-time { display: block; font-size: var(--fs-12); color: var(--text-dim); white-space: nowrap; }
.tp-stop-what { display: block; font-size: var(--fs-14); font-weight: 600; color: var(--text); line-height: 1.25;
  overflow-wrap: anywhere; }
a.tp-stop-what { text-decoration: none; }
a.tp-stop-what:hover { text-decoration: underline; }
.tp-stop-state { display: block; font-size: var(--fs-12); color: var(--text-dim); }
.tp-st-held .tp-stop-what, .tp-st-skipped .tp-stop-what, .tp-st-upcoming .tp-stop-what { color: var(--text-dim); font-weight: 500; }
@media (max-width: 719px) {
  .tp-track { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; }
  .tp-stop { padding: 0 0 var(--space-3) 28px; display: grid; grid-template-columns: 6.5rem 1fr; column-gap: var(--space-2); }
  .tp-stop::before { top: 0; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .tp-stop:first-child::before { top: 8px; left: 6px; }
  .tp-stop:last-child::before { bottom: auto; height: 8px; width: 2px; }
  .tp-stop-dot { top: 2px; }
  .tp-stop-state { grid-column: 2; }
}

.tp-weekscore { padding: var(--space-4); margin: 0 0 var(--space-6); max-width: 60rem; }
.tp-empty { padding: var(--space-6); max-width: 40rem; }

/* ---- posts ------------------------------------------------------------------------------------------------------- */
.tp-feed { display: grid; gap: var(--space-8); }
.tp-post { border-top: 1px solid var(--line); padding-top: var(--space-6); scroll-margin-top: var(--space-6); }
.tp-post:target .tp-post-title { color: var(--focus); }
.tp-post-meta { margin: 0; font-size: var(--fs-14); color: var(--text-dim); display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: baseline; }
.tp-kind { font-weight: 700; color: var(--text); }
.tp-kind-closes .tp-kind, .tp-kind-implied .tp-kind { color: var(--closed); }
.tp-kind-scorecard .tp-kind { color: var(--focus); }
.tp-dry { font-size: var(--fs-12); border: 1px dashed var(--line); border-radius: var(--radius-s); padding: 1px 6px; }
.tp-post-title { font-size: var(--fs-28); line-height: 1.15; margin: var(--space-1) 0 var(--space-4); font-stretch: 85%; font-weight: 800; }
.tp-post-title a { color: inherit; text-decoration: none; }
.tp-post-title a:hover { text-decoration: underline; }
.tp-post-body { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .tp-post-body { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; } }
.tp-card { margin: 0; }
.tp-card img { display: block; width: 100%; height: auto; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--surface); }
.tp-card figcaption { display: flex; gap: var(--space-4); margin-top: var(--space-2); font-size: var(--fs-12); }
.tp-card figcaption a { color: var(--text-dim); }
.tp-copy { display: grid; gap: var(--space-4); min-width: 0; }
.tp-x { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: var(--space-4); }
.tp-x-lab { margin: 0 0 var(--space-2); font-size: var(--fs-12); color: var(--text-dim); display: flex; justify-content: space-between; }
.tp-x-text { margin: 0; white-space: pre-line; font-size: var(--fs-16); line-height: 1.45; overflow-wrap: anywhere; }
.tp-x-reply { margin: var(--space-3) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: var(--fs-14);
  color: var(--text-dim); overflow-wrap: anywhere; }
.tp-x-reply .tp-x-lab { display: block; margin-bottom: var(--space-1); }
.tp-rows > summary, .tp-tg > summary, .sc5-defs > summary { cursor: pointer; font-weight: 600; font-size: var(--fs-14); padding: var(--space-2) 0; }
.tp-tg-text { white-space: pre-wrap; font-family: inherit; font-size: var(--fs-14); color: var(--text-dim); margin: 0;
  background: var(--surface); border-radius: var(--radius-m); padding: var(--space-4); overflow-wrap: anywhere; }
.tp-held { margin: 0; font-size: var(--fs-14); color: var(--text-dim); border-left: 2px dashed var(--line); padding-left: var(--space-3); }
.tp-held .tp-kind { color: var(--text-dim); }

.tp-table { width: 100%; border-collapse: collapse; font-size: var(--fs-14); }
.tp-table th, .tp-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.tp-table thead th { font-size: var(--fs-12); color: var(--text-dim); font-weight: 600; white-space: nowrap; }
.tp-table .r { text-align: right; }
.tp-table tbody th { font-weight: 600; white-space: nowrap; }
.tp-lvl-low th, .tp-lvl-low td.num { color: var(--text-dim); }
.tp-conf { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
.tp-conf-mark { width: 10px; height: 10px; border-radius: 50%; border: 1.6px solid var(--text); box-sizing: border-box; }
.tp-conf-high .tp-conf-mark { background: var(--text); }
.tp-conf-medium .tp-conf-mark { background: linear-gradient(90deg, var(--text) 50%, transparent 50%); }
.tp-conf-low .tp-conf-mark { border-color: var(--closed); }
.tp-conf-low { color: var(--closed); }

.tp-archive { margin-top: var(--space-12); }
.tp-archive ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.tp-archive a[aria-current] { font-weight: 700; color: var(--text); }

/* ---- /scorecard ------------------------------------------------------------------------------------------------- */
.sc5-lead { display: grid; gap: var(--space-4); align-items: end; margin: 0 0 var(--space-8); }
@media (min-width: 720px) { .sc5-lead { grid-template-columns: auto minmax(0, 36rem); justify-content: start; column-gap: var(--space-8); } }
.sc5-big { margin: 0; line-height: .9; }
.sc5-big .display { font-size: clamp(5rem, 12vw, 9rem); color: var(--focus); }
.sc5-big-text { margin: 0 0 var(--space-3); font-size: var(--fs-20); line-height: 1.4; color: var(--text-dim); }
.sc5-big-text strong { color: var(--text); }

.sc5-compare { margin: 0 0 var(--space-12); padding: var(--space-6); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.sc5-compare figcaption p { margin: 0 0 var(--space-4); max-width: 60ch; font-size: var(--fs-14); }
.sc5-axis { position: relative; height: 18px; margin-left: calc(var(--sc5-who) + var(--sc5-lab)); margin-right: var(--sc5-val);
  font-size: var(--fs-12); color: var(--text-dim); }
.sc5-axis span { position: absolute; transform: translateX(-50%); }
.sc5-compare { --sc5-who: 15rem; --sc5-lab: 4.5rem; --sc5-val: 11rem; }
.sc5-rows { list-style: none; margin: 0; padding: 0; }
.sc5-pair { display: grid; grid-template-columns: var(--sc5-who) minmax(0, 1fr); padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.sc5-who a { font-weight: 700; display: block; }
.sc5-who span { display: block; font-size: var(--fs-12); padding-right: var(--space-4); }
.sc5-line { display: grid; grid-template-columns: var(--sc5-lab) minmax(0, 1fr) var(--sc5-val); align-items: center; min-height: 26px; }
.sc5-lab { font-size: var(--fs-12); color: var(--text-dim); }
.sc5-track { position: relative; height: 12px; background: linear-gradient(var(--line), var(--line)) center / 100% 2px no-repeat; }
.sc5-mid { position: absolute; left: 50%; top: -6px; bottom: -6px; border-left: 1.5px dashed var(--text-dim); }
.sc5-dot { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--text-dim);
  box-shadow: 0 0 0 2px var(--surface); }
.sc5-ours .sc5-dot { background: var(--focus); width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.sc5-ci { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: 3px; background: var(--focus); opacity: .35; }
.sc5-val { padding-left: var(--space-3); font-weight: 700; white-space: nowrap; }
.sc5-val small { font-weight: 400; color: var(--text-dim); font-size: var(--fs-12); }
.sc5-ours .sc5-lab, .sc5-ours .sc5-val { color: var(--text); }
.sc5-extra, .sc5-def { margin: var(--space-2) 0 0 var(--sc5-lab); font-size: var(--fs-12); max-width: 70ch; }
@media (max-width: 879px) {
  .sc5-compare { --sc5-who: 0px; --sc5-lab: 3.5rem; --sc5-val: 6.5rem; padding: var(--space-4); }
  .sc5-pair { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .sc5-val small { display: block; }
  .sc5-extra, .sc5-def { margin-left: 0; }
}

.sc5-grid { display: grid; gap: var(--space-8) var(--space-12); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .sc5-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sc5-note { font-size: var(--fs-14); margin: 0 0 var(--space-3); max-width: 60ch; }
.sc5-weeks { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: grid; gap: 6px; font-size: var(--fs-14); }
.sc5-weeks li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.5rem 4rem; gap: var(--space-3); align-items: center; }
.sc5-weeks li.sc5-wk-out { grid-template-columns: 6.5rem minmax(0, 1fr); }
.sc5-wkbar { height: 8px; background: var(--line); border-radius: 4px; position: relative; overflow: hidden; }
.sc5-wkbar i { position: absolute; inset: 0 auto 0 0; background: var(--focus); border-radius: 4px; }
.sc5-wkbar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid var(--bg); }
.sc5-ipo { padding: var(--space-4) var(--space-6); margin: var(--space-12) 0 var(--space-6); }
.sc5-ipo p { margin: 0; }
.sc5-defs dl { display: grid; gap: var(--space-2); margin: var(--space-2) 0; font-size: var(--fs-14); }
.sc5-defs dl div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: var(--space-3); }
.sc5-defs dt { font-weight: 700; }
.sc5-defs dd { margin: 0; color: var(--text-dim); }
.sc5-defs ul { font-size: var(--fs-14); color: var(--text-dim); }
@media (max-width: 719px) { .sc5-big-text { font-size: var(--fs-16); } .tp-post-title { font-size: var(--fs-20); } }

/* FIXES-W5: the weekend's one number up top, the method box, graded misses, unchecked rows */
.tp-headline { display: flex; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4);
  margin: var(--space-4) 0; max-width: 60rem; }
.tp-headline strong { font-size: var(--fs-32, 2rem); line-height: 1; letter-spacing: -0.01em; }
.tp-headline a { color: var(--text); text-decoration: none; }
.tp-headline > span { flex: 1 1 16rem; min-width: 0; }
.tp-method { padding: var(--space-4); margin: var(--space-4) 0 0; max-width: 60rem; font-size: var(--fs-14); }
.tp-method p { margin: 0 0 var(--space-2); }
.tp-post-times { margin: var(--space-1) 0 0; font-size: var(--fs-12); color: var(--text-dim); }
.tp-graded tr.tp-miss th, .tp-graded tr.tp-miss td { background: color-mix(in srgb, var(--down) 12%, transparent); }
.tp-graded tr.tp-miss th { box-shadow: inset 3px 0 0 var(--down); }
.tp-conf-unchecked .tp-conf-mark { width: 10px; height: 2px; border-radius: 1px; background: var(--text-dim);
  border: 0; vertical-align: middle; }
/* a grid child sizes to its content by default: an open graded table must scroll inside its wrapper, not the page */
.tp-post-body > *, .tp-copy, .tp-rows, .tp-x { min-width: 0; max-width: 100%; }
.tp-rows .table-wrap { overflow-x: auto; }

/* ---- "This week": the weekday posts (integrate7, SPEC-v7 M1). Same tokens; a quieter list than the weekend feed -- */
.tp-wk { margin: 0 0 var(--space-8); max-width: 60rem; }
.tp-wk-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--space-4); }
.tp-wk-sub { margin: 0 0 var(--space-3); font-size: var(--fs-14); color: var(--text-dim); }
.tp-wk-day { font-size: var(--fs-14); font-weight: 700; color: var(--text-dim); text-transform: none; margin: var(--space-4) 0 var(--space-2);
  padding-bottom: var(--space-1); border-bottom: 1px solid var(--line); }
.tp-wk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.tp-wd { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); grid-template-areas: "card head" "card more";
  column-gap: var(--space-4); align-items: start; scroll-margin-top: var(--space-6); }
.tp-wd:target .tp-wd-title { color: var(--focus); }
.tp-wd-card { grid-area: card; display: block; }
.tp-wd-card img { display: block; width: 100%; height: auto; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface); }
.tp-wd-head { grid-area: head; min-width: 0; }
.tp-wd-more { grid-area: more; min-width: 0; }
.tp-wd-title { font-size: var(--fs-16); font-weight: 700; line-height: 1.25; margin: 2px 0 var(--space-1); }
.tp-wd-title a { color: inherit; text-decoration: none; }
.tp-wd-title a:hover { text-decoration: underline; }
.tp-wd-text { margin: 0; white-space: pre-line; font-size: var(--fs-14); line-height: 1.45; overflow-wrap: anywhere; }
.tp-wd-note { margin: var(--space-1) 0 0; font-size: var(--fs-12); }
.tp-wd-rx > summary { cursor: pointer; font-weight: 600; font-size: var(--fs-12); padding: var(--space-1) 0; color: var(--text-dim); }
.tp-wd-rx .tp-tg-text { font-size: var(--fs-12); padding: var(--space-3); }
.tp-wk-empty { padding: var(--space-4); margin: 0; font-size: var(--fs-14); color: var(--text-dim); max-width: 44rem; }
.tp-feed-h { margin-top: var(--space-2); }
@media (max-width: 719px) {
  .tp-wd { grid-template-columns: 6.5rem minmax(0, 1fr); grid-template-areas: "card head" "more more"; column-gap: var(--space-3); }
  .tp-wd-more { margin-top: var(--space-2); }
  .tp-wd-title { font-size: var(--fs-14); }
}
/* empty13: weekend posts shown on the site only (never "posted") */
.tp-st-site .tp-stop-dot { background: currentColor; opacity: .55; }
.tp-k-implied.tp-st-site, .tp-k-closes.tp-st-site { color: var(--closed); }
.tp-k-scorecard.tp-st-site { color: var(--focus); }
.tp-site-note { font-size: var(--fs-14); margin: var(--space-3, 12px) 0; padding: 10px 14px; max-width: 72ch; }
