/* Rewind (web/rewind.html): what hosted-page.css doesn't already give it. Cards, buttons, fields, callouts and errors are
   the agents page's own. */
.hp-rewind { max-width: 1120px; }
/* the four illustrated steps: the agents page's cards (hosted-page.css .how-steps), four across where they fit */
.rw-steps { --how-n: 4; margin-bottom: var(--sp-3); }
.rw-steps .how-h { font-size: 14.5px; font-weight: 500; }
.rw-ill-hold { stroke-dasharray: 4 5; }
/* a phone: each picture beside its one line, centred (the agents page's steps have a heading and a line) */
@media (max-width: 639px) { .rw-steps .how-art { grid-row: auto; } }
.rw-how { margin: 0 0 var(--sp-5); font-size: 13px; }
/* the label over the visitor's rule is a full sentence: it wraps at phone width instead of the house label's ellipsis */
.hp-label.rw-rule-k { white-space: normal; }
.rw-note { margin: 0 0 var(--sp-4); }
.rw-note p { margin: 0; }
.rw-note p + p { margin-top: var(--sp-2); }
.rw-field { grid-template-rows: auto; }
.rw-privacy { margin-top: var(--sp-3); }
.rw-can { margin-top: var(--sp-3); font-size: 13px; color: var(--text-2); }
.rw-can ul { margin: var(--sp-2) 0 0; padding-left: 18px; }
.rw-can li { margin: 2px 0; }
.rw-can em { font-style: normal; color: var(--text); }
.rw-rule { margin: 0 0 var(--sp-2); font-size: 14.5px; color: var(--text); }
#rw-result:focus { outline: none; }

/* a result as cards: this rule and simply holding the same size, neither one coloured; only the difference is, and its
   sign is in its text too */
.rw-figs { margin: var(--sp-4) 0 var(--sp-3); font-size: 15px; }
.rw-start { margin: 0 0 var(--sp-2); color: var(--text-2); }
.rw-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: var(--sp-2); margin: 0; }
/* the figure on top, so the figures line up whatever their labels' length; read as label then figure */
.rw-stat { display: flex; flex-direction: column; min-width: 0; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.rw-stat dt { margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: var(--text-2); text-wrap: balance; }
.rw-stat dd { margin: 0; }
.rw-stat-v { order: -1; font: 600 20px/1.25 var(--mono); color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rw-stat-c { margin-top: 2px; font-size: 12.5px; line-height: 1.35; color: var(--text-3); }
.rw-stat-up .rw-stat-v { color: var(--up); }
.rw-stat-down .rw-stat-v { color: var(--down); }
/* the four lines every result carries, at the result's own size */
.rw-always { margin: var(--sp-3) 0; padding-left: 18px; font-size: 15px; line-height: 1.5; }
.rw-always li { margin: 0 0 6px; }

/* the value line: its book against simply holding, in two colours that aren't gain or loss (green and red are the
   Difference card's), holding's line also dashed so the colour isn't the only difference; the key under it matches */
.rw-fig { margin: var(--sp-3) 0; }
.rw-chart { display: block; width: 100%; height: 160px; border-bottom: 1px solid var(--line); }
.rw-chart-s { height: 96px; }
.rw-chart polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.rw-value { stroke: var(--accent); }
.rw-hold { stroke: var(--amber); stroke-dasharray: 5 4; }
.rw-axis { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.rw-legend i { display: inline-block; width: 16px; height: 0; margin: 0 6px 3px 0; border-top: 2px solid var(--accent); vertical-align: middle; }
.rw-legend i.rw-k-hold { margin-left: 10px; border-top: 2px dashed var(--amber); }

.rw-trades { margin: var(--sp-3) 0; font-size: 13.5px; }
.rw-trades summary { cursor: pointer; color: var(--text-2); }
.rw-table { margin-top: var(--sp-2); max-height: 360px; overflow: auto; }
.rw-table table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.rw-table th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 500; color: var(--text-3); }
.rw-table th, .rw-table td { padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line); }
.rw-next { margin: var(--sp-4) 0 var(--sp-2); }
.rw-next > p { margin: 0 0 var(--sp-2); }
.rw-next .hp-hint { margin-top: var(--sp-2); }
.rw-copy { margin-top: var(--sp-3); }
.rw-copy .hp-hint { margin-top: 6px; overflow-wrap: anywhere; }

/* the team's examples: three equal cards, side by side where they fit */
.rw-ex-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--sp-3); margin-top: var(--sp-3); }
/* the rule's text takes the slack, so the three cards' figures and charts line up */
.rw-ex { display: flex; flex-direction: column; min-width: 0; padding: var(--sp-4); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.rw-ex h3 { margin: 0 0 var(--sp-2); font-size: 15px; font-weight: 600; }
.rw-ex-rule { flex-grow: 1; font-size: 13.5px; color: var(--text-2); }
.rw-ex .rw-figs { margin-bottom: 0; }
.rw-ex .rw-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rw-ex .rw-stat { padding: var(--sp-2) var(--sp-3); background: var(--surface); }
.rw-ex .rw-stat-v { font-size: 17px; }
.rw-ex .rw-fig { margin-bottom: 0; }
/* the line under the cards, with room to breathe */
/* .card prefix: the house .card p margin (0 0 sp-3) outranks a lone class and would drop the gap to 0 */
.card .rw-ex-not { margin: var(--sp-6) 0 var(--sp-3); }
.rw-week { margin-top: var(--sp-3); }

/* ---------- the AI replay: the way in, the panel, the run ---------- */
.rw-ai-chip { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text); font-size: 10.5px;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.card .rw-ai-note { margin: var(--sp-2) 0 0; }
@media (max-width: 639px) { .rw-ai-run .rw-stats > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.rw-ai-pick { display: grid; gap: var(--sp-4); margin: var(--sp-4) 0; }
@media (min-width: 640px) { .rw-ai-pick { grid-template-columns: 1fr 1fr; } }
.rw-ai-set { min-width: 0; margin: 0 0 var(--sp-3); padding: 0; border: 0; }
.rw-ai-set legend { padding: 0; }
.rw-ai-opt { display: flex; gap: 10px; align-items: baseline; margin: 6px 0; cursor: pointer; }
.rw-ai-opt input { flex: none; accent-color: var(--accent); }
.rw-ai-opt-c { color: var(--text-2); font-size: 13px; }
.rw-ai-cost { margin: var(--sp-3) 0; }
.card .rw-ai-cost-v { margin: 0 0 var(--sp-2); font-size: 15px; }
.card .rw-ai-step { margin: var(--sp-2) 0 6px; font-size: 15px; }
.rw-ai-bar { display: block; width: 100%; height: 8px; margin: 0 0 var(--sp-4); border: 0; border-radius: 999px; overflow: hidden;
  background: var(--surface-3); -webkit-appearance: none; appearance: none; }
.rw-ai-bar::-webkit-progress-bar { background: var(--surface-3); border-radius: 999px; }
.rw-ai-bar::-webkit-progress-value { background: var(--violet); border-radius: 999px; }
.rw-ai-bar::-moz-progress-bar { background: var(--violet); border-radius: 999px; }
.rw-ai-url { overflow-wrap: anywhere; }
/* the AI's line violet, the fixed rule's blue dotted, holding amber dashed: none of them the Difference card's green or red */
.rw-ai-line { stroke: var(--violet); }
.rw-legend i.rw-k-ai { border-top-color: var(--violet); }
.rw-said { margin: var(--sp-4) 0; }
.rw-said summary { cursor: pointer; font-weight: 600; }
.rw-said ul { margin: var(--sp-2) 0 0; padding-left: 18px; font-size: 13px; }
.rw-said li { margin: 0 0 var(--sp-2); overflow-wrap: anywhere; }
.rw-said-o { display: block; color: var(--text-2); }
