/* The Way It Was — on top of /hub.css (the brand). Only what the timeline adds.
   Anatomy: kicker · the edition · the card in hand · the timeline, earlier on
   the left and later on the right · the action. Red only as the signal. */
/* masthead: set left, a ruled timeline running under the title, earlier to later */
.gh-timeline .gh-title { letter-spacing: -.02em; }
.gh-timeline .gh-tagline { border-top: 0; padding-top: 0; margin-top: 10px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.gh-timeline .gh-tagline::after { content: ""; display: block; height: 12px; min-width: 120px; background: linear-gradient(var(--ink), var(--ink)) 0 100% / 100% 1px no-repeat, repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 24px) 0 100% / 100% 7px no-repeat; }
.gh-timeline .wrap { border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
@media (max-width: 560px) { .gh-timeline .gh-tagline { grid-template-columns: 1fr; } .gh-timeline .gh-tagline::after { min-width: 0; } }

.tw { --ok: #1b6b3a; --card: 196px; --gap: 56px; }
.tw .screen { padding: 34px 0 72px; }
.tw h1 { margin: 0; font-size: clamp(34px, 4.8vw, 58px); line-height: 1.02; max-width: 24ch; }
.tw h1.play-title { font-size: clamp(28px, 3.4vw, 40px); max-width: none; }
.tw .head .dek { margin-top: 10px; }
.tw .how { margin: 12px 0 0; color: var(--ink-soft); font-size: 15px; max-width: 78ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ok { color: var(--ok); } .no { color: var(--red); }

/* progress and points */
.status { margin: 22px 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.step { width: 38px; padding-top: 6px; border-top: 3px solid var(--rule-soft); font: 700 12.5px/1 var(--sans); color: var(--ink-soft); }
.step.is-current { border-top-color: var(--ink); color: var(--ink); }
.step.is-right { border-top-color: var(--ok); color: var(--ok); }
.step.is-wrong { border-top-color: var(--red); color: var(--red); }
.points { margin: 0; font-size: 14.5px; }
.points b { font: 800 26px/1 var(--display); font-stretch: 75%; font-variant-numeric: tabular-nums; }
.lastline { margin: 14px 0 0; min-height: 24px; font-size: 15.5px; }
.lastline:empty { min-height: 0; margin: 0; }

/* the card on the left, the count and the rules beside it (above it on a narrow screen) */
.deal { margin-top: 22px; display: grid; grid-template-columns: minmax(0, 406px) minmax(0, 1fr); gap: 8px 44px; align-items: start; }
.deal .brief { grid-column: 2; grid-row: 1; padding-top: 6px; max-width: 560px; }
.deal .hand { grid-column: 1; grid-row: 1; margin-top: 0; }
.deal .status { margin-top: 0; }
@media (max-width: 820px) { .deal { grid-template-columns: 1fr; } .deal .brief, .deal .hand { grid-column: 1; grid-row: auto; } .deal .brief { padding-top: 0; } }
/* the card in hand: a loose card lying on the page, with a handle that says what to do with it */
.hand { margin: 18px 0 0 6px; max-width: 400px; background: #fff; border: 2px solid var(--ink); box-shadow: 0 1px 0 var(--ink), 0 10px 22px rgba(15, 20, 25, .2); rotate: -1.2deg; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: rotate .15s ease-out, translate .15s ease-out, box-shadow .15s ease-out; }
.hand:hover { rotate: 0deg; translate: 0 -4px; box-shadow: 0 1px 0 var(--ink), 0 18px 30px rgba(15, 20, 25, .26); }
.hand:active { cursor: grabbing; }
.hand > div { padding: 14px 18px 16px; }
.hand .grip { margin: 0; display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--ink); color: #fff; font: 700 12.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.hand .grip::before { content: ""; flex: none; width: 14px; height: 14px; background: radial-gradient(circle, #fff 1.5px, transparent 1.6px) 0 0 / 7px 7px; }
.hand .grip::after { content: "\2193"; margin-left: auto; font-size: 15px; }
.hand .meta { margin: 0 0 6px; }
.hand .hed { margin: 0; font-size: clamp(22px, 2.4vw, 27px); line-height: 1.08; }
.hand .detail { margin: 8px 0 0; font: 400 16.5px/1.45 var(--serif); color: #232b35; }
.hand .hint { margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.hand .hint .rowmenu { font-weight: 400; padding: 0; text-align: left; }
.hand.is-lifted { opacity: .35; border-style: dashed; box-shadow: none; rotate: 0deg; translate: none; }
.hand:focus-visible { outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .hand { transition: none; } }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; }
/* the card while it is carried: the same card it becomes on the timeline */
.ghost { position: fixed; z-index: 50; top: 0; left: 0; width: var(--card); min-height: 120px; padding: 12px 14px 14px; pointer-events: none; background: #fff; border: 2px solid var(--ink); box-shadow: 0 16px 30px rgba(15, 20, 25, .3); rotate: -3deg; }
.ghost .when { color: var(--ink-soft); }
.ghost.is-over { rotate: 0deg; }

/* the timeline: a panel of its own, a heavy ruled line, and the cards hanging from it */
.tl { margin: 30px 0 0; padding: 14px 18px 6px; background: var(--paper-deep); border-top: 4px solid var(--ink); }
.tl-axis { display: flex; align-items: center; gap: 14px; }
.tl-go { flex: none; padding: 6px 0; border: 0; background: none; font: 700 15px/1 var(--sans); color: var(--ink); }
.tl-go:hover { color: var(--red); }
.tl-line { flex: 1; height: 16px; background: linear-gradient(var(--ink), var(--ink)) 0 50% / 100% 4px no-repeat, repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 28px) 0 50% / 100% 16px no-repeat; }
.tl-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding: 0 0 14px; scrollbar-width: thin; scrollbar-color: var(--ink-soft) transparent; }
.tl-scroll:focus-visible { outline-offset: 0; }
.tl-row { list-style: none; margin: 0 auto; padding: 14px 2px 2px; display: flex; align-items: stretch; gap: 8px; width: max-content; min-width: 100%; justify-content: center; }
.tl-row > li { position: relative; flex: none; display: flex; }
.tl-row > li::before { content: ""; position: absolute; top: -14px; left: 50%; width: 1px; height: 14px; background: var(--ink-soft); }
.tl-card::before { background: var(--ink) !important; width: 4px !important; margin-left: -2px; }
.tl-card, .slot.is-picked { width: var(--card); min-height: 168px; padding: 12px 14px 14px; flex-direction: column; align-items: flex-start; text-align: left; }
.tl-card { background: #fff; border: 1px solid var(--ink); border-top: 5px solid var(--ink); }
.when { display: block; font: 800 34px/1 var(--display); font-stretch: 75%; letter-spacing: -.012em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.what { display: block; margin-top: 8px; font: 600 15px/1.3 var(--sans); }
.mark { display: block; margin-top: auto; padding-top: 10px; font: 700 12.5px/1 var(--sans); color: var(--ink-soft); }
.tl-card.is-given { background: var(--navy); border-color: var(--navy); color: #fff; }
.tl-card.is-given .mark { color: #a9b6c9; }
.tl-card.is-right { border-top-color: var(--ok); } .tl-card.is-right .mark { color: var(--ok); }
.tl-card.is-wrong { border-top-color: var(--red); } .tl-card.is-wrong .mark { color: var(--red); }
@keyframes tw-new { from { background: #fff; box-shadow: 0 0 0 2px var(--ink); } to { box-shadow: 0 0 0 2px transparent; } }
.tl-card.is-new { animation: tw-new 1.4s ease-out; }
@media (prefers-reduced-motion: reduce) { .tl-card.is-new { animation: none; } }

.slot { display: flex; align-items: center; justify-content: center; width: var(--gap); min-height: 168px; margin: 0; padding: 0; border: 2px dashed var(--ink-soft); border-radius: 0; background: rgba(255, 255, 255, .45); color: var(--ink); }
.slot .plus { font: 600 28px/1 var(--sans); }
.slot:hover, .slot.is-over { border: 2px solid var(--ink); background: #fff; color: var(--ink); }
/* while a card is carried the gaps show, and the one under it opens to the card's width */
.slot { transition: width .12s ease-out; }
.tl-scroll.is-open .slot { border-color: var(--ink); }
.slot.is-over { width: var(--card); border: 2px dashed var(--ink); background: #fff; }
.slot.is-over .plus { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .slot { transition: none; } }
.slot.is-picked { display: flex; border: 2px solid var(--ink); background: #fff; color: var(--ink); justify-content: flex-start; }
.slot.is-picked .when { color: var(--ink-soft); }

.play .action { margin-top: 14px; }

/* the score */
.scorehead { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px 44px; align-items: start; }
.score .steps { margin-bottom: 18px; }
.score .scored { margin: 0; font-size: 64px; }
.score .scored small { font-size: 16px; }
.score .side .muted { margin: 14px 0 0; font-size: 14.5px; }
.signoff { margin: 16px 0 0; font: italic 400 18px/1.3 var(--serif); color: var(--ink-soft); }
.score .tl { margin-top: 34px; }
.results { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.result { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 0 28px; padding: 22px 0; border-bottom: 1px solid var(--rule-soft); }
.result .date { margin: 0; padding-left: 12px; border-left: 3px solid var(--rule-soft); font: 800 24px/1.1 var(--display); font-stretch: 75%; letter-spacing: -.012em; align-self: start; }
.result.is-right .date { border-left-color: var(--ok); }
.result.is-wrong .date { border-left-color: var(--red); }
.result .hed { margin: 0; font-size: clamp(22px, 2.3vw, 28px); line-height: 1.1; max-width: 34ch; }
.result .outcome { margin: 8px 0 0; font: 600 15px/1.4 var(--sans); }
.result .outcome .muted { font-weight: 400; }
.result .detail { margin: 8px 0 0; font: 400 17.5px/1.55 var(--serif); color: #232b35; max-width: 62ch; }

@media (max-width: 900px) { .scorehead { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .tw { --card: 158px; --gap: 46px; }
  .when { font-size: 27px; }
  .what { font-size: 13.5px; }
  .tl-card, .slot, .slot.is-picked { min-height: 150px; }
  .result { grid-template-columns: 1fr; gap: 8px; }
  .step { width: 30px; }
  .hand { margin-left: 2px; max-width: 340px; }
  .hand > div { padding: 12px 14px 14px; }
  .hand .detail { font-size: 16px; }
  /* the strip runs to the screen's edges so a swipe has room */
  .tl { margin-inline: -16px; padding-inline: 16px; }
  .tl-scroll { margin-inline: -16px; padding-inline: 16px; }
}
