.day-shell { min-height: 70vh; }

.day-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title strip" "totals totals"; gap: 14px 40px; align-items: end; padding: 10px 0 18px; }
.day-title { grid-area: title; min-width: 0; }
.day-title h1 { font-size: clamp(36px, 4.2vw, 64px); line-height: 1; margin: 6px 0 6px; letter-spacing: -0.02em; }
.day-periods { margin: 0; font-size: var(--fs-small); color: var(--text-3); max-width: 70ch; }
.clock-badge { display: inline-block; margin-left: 8px; padding: 3px 7px; border-radius: 999px; border: 1px solid rgba(230, 237, 247, 0.35); color: var(--price-system); letter-spacing: 0.08em; }
.day-totals { grid-area: totals; display: flex; flex-wrap: wrap; gap: 8px 44px; margin: 0; padding-top: 14px; border-top: 1px solid var(--rule); }
.day-totals div { min-width: 0; }
.day-totals dt { font-size: var(--fs-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.day-totals dd { margin: 0; font: 400 26px/1.1 var(--f-num); letter-spacing: -0.03em; }
.day-totals .t-offer { color: var(--money-hi); text-shadow: 0 0 22px rgba(245, 165, 36, 0.3); }
.day-totals .t-back { color: var(--payback); }
.day-totals .t-price { color: var(--price-system); }

.day-strip { grid-area: strip; display: flex; align-items: flex-end; gap: 6px; }
.strip-step { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule); color: var(--text-2); text-decoration: none; transition: border-color var(--t-fast), color var(--t-fast); }
.strip-step:hover { border-color: var(--money-lo); color: var(--money-hi); }
.strip-step[aria-disabled="true"] { opacity: 0.25; pointer-events: none; }
.strip-days { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.sd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 18px; height: 100%; text-decoration: none; gap: 4px; }
.sd i { display: block; width: 3px; height: var(--h, 6px); border-radius: 2px; background: linear-gradient(to top, transparent, var(--c) 30%, #fff6e6 50%, var(--c) 70%, transparent); opacity: 0.8; transition: opacity var(--t-fast), width var(--t-fast); }
.sd b { font: 400 9.5px/1 var(--f-num); color: var(--text-4); }
.sd:hover i { opacity: 1; width: 5px; }
.sd:hover b { color: var(--text-2); }
.sd.current i { width: 6px; opacity: 1; box-shadow: 0 0 12px var(--c); }
.sd.current b { color: var(--money-hi); }
.sd.missing i { height: 1px; width: 8px; background: repeating-linear-gradient(90deg, var(--text-4) 0 2px, transparent 2px 4px); opacity: 0.7; }

.day-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 0 28px; }
.day-chart { min-width: 0; display: grid; grid-template-rows: auto 120px minmax(330px, 1fr) auto auto; height: calc(100dvh - var(--mast-h) - var(--clear) - 268px); min-height: 500px; }
.day-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-bottom: 6px; }
.play { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 10px; border-radius: 999px; border: 1px solid var(--money-lo); background: rgba(245, 165, 36, 0.08); color: var(--money-hi); cursor: pointer; font-size: var(--fs-ui); font-weight: 500; transition: background var(--t-fast), box-shadow var(--t-fast); }
.play:hover { background: rgba(245, 165, 36, 0.16); box-shadow: 0 0 22px rgba(245, 165, 36, 0.18); }
.play-ico { width: 18px; height: 18px; border-radius: 50%; background: var(--money); position: relative; box-shadow: 0 0 12px var(--money-glow); }
.play-ico::after { content: ""; position: absolute; left: 7px; top: 5px; border-left: 6px solid var(--ink-0); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.play.is-playing .play-ico::after { left: 6px; top: 5px; width: 2px; height: 8px; border: 0; background: var(--ink-0); box-shadow: 4px 0 0 var(--ink-0); }
.day-clock { font-size: var(--fs-small); color: var(--text-2); letter-spacing: 0; white-space: pre; }
.day-ctl { margin-left: auto; display: flex; gap: 8px; }
.day-speed .seg button { padding: 5px 9px; font-family: var(--f-num); font-size: 11px; }

.price-band { position: relative; }
.price-band svg { position: absolute; inset: 0; overflow: visible; }
.day-main { position: relative; outline: none; touch-action: pan-y; cursor: crosshair; }
.day-main:focus-visible { box-shadow: inset 0 0 0 1px var(--money-lo); border-radius: 8px; }
.day-main canvas.bars, .day-main svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.day-main svg { overflow: visible; pointer-events: none; }
.day-readout { top: 0; left: 0; }

.grid { stroke: rgba(255, 236, 214, 0.06); stroke-width: 1; shape-rendering: crispEdges; }
.axis0 { stroke: rgba(255, 236, 214, 0.22); stroke-width: 1; shape-rendering: crispEdges; }
.tick { fill: var(--text-3); font: 400 10.5px var(--f-num); }
.zone-label { fill: var(--text-3); font: 500 10px var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; }
.zone-label.payback { fill: var(--payback); }
.sysline { stroke: rgba(245, 165, 36, 0.55); stroke-width: 1; filter: drop-shadow(0 0 4px rgba(245, 165, 36, 0.8)); }
.playhead { stroke: rgba(255, 236, 214, 0.75); stroke-width: 1; }
.playhead-dot { fill: var(--money-hi); filter: drop-shadow(0 0 6px var(--money)); }
.col-hover { fill: rgba(255, 236, 214, 0.045); transition: opacity 120ms; }
.col-pin { fill: none; stroke: var(--money-hi); stroke-width: 1; stroke-dasharray: 2 3; }
.clockline { stroke: rgba(230, 237, 247, 0.4); stroke-dasharray: 3 4; }
.clocklabel { fill: var(--price-system); font: 500 10px var(--f-ui); letter-spacing: 0.1em; text-transform: uppercase; }
.ssp-line { fill: none; stroke: var(--price-system); stroke-width: 1.6; }
.future-mask { fill: rgba(14, 12, 10, 0.66); pointer-events: none; }
.mid-line { fill: none; stroke: var(--price-index); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.8; }
.band-label { fill: var(--price-system); font: 500 10px var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.band-label.mid { fill: var(--price-index); }
.peak { fill: var(--price-system); filter: drop-shadow(0 0 5px #fff); }
.peak-label { fill: var(--price-system); font: 500 11px var(--f-num); }

.day-legend { padding: 8px 0 0; font-size: 11.5px; }
.lg-line { display: inline-block; width: 16px; height: 0; border-top: 1.6px solid var(--price-system); }
.lg-line.mid { border-top: 1px dashed var(--price-index); }
.payback-chip { background: rgba(159, 179, 200, 0.12) !important; border: 1px solid var(--payback); }
.day-caption { margin: 12px 0 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.38; color: var(--text-1); min-height: 2.8em; max-width: 78ch; text-wrap: pretty; }

.day-board, .day-pin { position: relative; align-self: start; padding: 16px 0 0 22px; border-left: 1px solid var(--rule); min-height: 520px; }
.day-pin[hidden], .day-board[hidden] { display: none; }
.day-pin { position: sticky; top: calc(var(--mast-h) + 8px); max-height: calc(100dvh - var(--mast-h) - var(--clear) - 268px); min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.day-pin .pin-list { max-height: none; }
.board-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; margin-bottom: 14px; }
.board-title { grid-column: 1 / -1; }
.board-total { font-size: 30px; letter-spacing: -0.03em; color: var(--money-hi); text-shadow: 0 0 22px rgba(245, 165, 36, 0.32); line-height: 1; }
.board-seg { justify-self: end; }
.board-rows { position: relative; list-style: none; margin: 0; padding: 0; }
.brow { position: absolute; left: 0; right: 0; top: 0; height: 34px; display: grid; grid-template-columns: 22px 12px minmax(0, 1fr) auto; align-items: center; gap: 0 8px; transition: transform 520ms var(--ease-out), opacity 300ms; will-change: transform; }
.brow.is-zero { opacity: 0.35; }
.b-rank { font-size: 10.5px; color: var(--text-4); }
.b-name { background: none; border: 0; padding: 0; text-align: left; color: var(--text-1); font-size: 13px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-name:hover { color: var(--money-hi); }
.b-val { font-size: 13px; color: var(--text-1); }
.b-bar { grid-column: 3 / -1; height: 2px; margin-top: -6px; background: rgba(255, 236, 214, 0.05); border-radius: 2px; overflow: hidden; align-self: end; margin-bottom: 3px; }
.b-bar i { display: block; height: 100%; background: var(--c); transform-origin: left; transition: transform 300ms linear; box-shadow: 0 0 8px var(--c); }
.b-empty { color: var(--text-3); font-size: var(--fs-small); list-style: none; }
.board-other { display: flex; justify-content: space-between; padding: 10px 0 0; margin-top: 6px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--text-3); }
.board-note { font-size: 11.5px; color: var(--text-4); margin: 14px 0 0; line-height: 1.5; }

/* odometer */
.odo { display: inline-flex; font-family: var(--f-num); font-variant-numeric: tabular-nums; line-height: 1; height: 1em; overflow: hidden; vertical-align: -0.12em; }
.odo-d, .odo-c { display: inline-block; height: 1em; overflow: hidden; transition: max-width 300ms var(--ease-out), opacity 300ms; max-width: 1ch; }
.odo-strip { display: block; line-height: 1; transition: transform 260ms var(--ease-out); width: 1ch; word-break: break-all; white-space: normal; }
.odo-d { width: 1ch; }
.odo-lead { max-width: 0; opacity: 0; }
.odo-snap .odo-strip { transition: none; }

.day-flow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* the pinned half-hour */
.pin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pin-head h2 { font-size: 30px; margin: 4px 0 12px; line-height: 1.05; }
.pin-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0 0 14px; }
.pin-figs dt { font-size: var(--fs-micro); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.pin-figs dd { margin: 2px 0 0; font: 400 15px var(--f-num); }
.pin-sub { font: 500 var(--fs-micro)/1 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); margin: 16px 0 6px; display: flex; justify-content: space-between; gap: 10px; }
.pin-sub .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.pin-list { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow-y: auto; }
.pin-list li button { width: 100%; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 0; background: none; border: 0; border-bottom: 1px solid var(--rule); color: var(--text-1); cursor: pointer; text-align: left; font-size: 13px; }
.pin-list li button:hover .pn { color: var(--money-hi); }
.pin-list .pn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pin-list .pv { font-size: 12.5px; }
.pin-list .pi { font-size: 11px; color: var(--text-3); padding: 0 0 6px 20px; margin-top: -2px; border-bottom: 1px solid var(--rule); }
.pin-list li button:has(+ .pi) { border-bottom: 0; }
.pin-list.back .pv { color: var(--payback); }
.pin-rest { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--rule); }

.day-tables { margin-top: 28px; display: grid; gap: 10px; }

@media (max-width: 1100px) {
  .day-stage { grid-template-columns: 1fr; }
  .day-board, .day-pin { border-left: 0; border-top: 1px solid var(--rule); padding: 18px 0 0; min-height: 0; margin-top: 18px; }
  .board-rows { min-height: 0; }
}
@media (max-width: 760px) {
  .day-pin { position: relative; top: 0; max-height: none; }
  .day-head { grid-template-columns: 1fr; grid-template-areas: "title" "strip" "totals"; gap: 12px; }
  .day-title h1 { font-size: 34px; }
  .day-totals { gap: 10px 22px; }
  .day-totals dd { font-size: 19px; }
  .strip-days { height: 44px; }
  .sd { width: 15px; }
  .day-chart { height: auto; min-height: 0; grid-template-rows: auto 96px 340px auto auto; }
  .day-clock { font-size: 11px; white-space: normal; }
  .day-caption { font-size: 17px; }
  .brow { height: 30px; }
  .board-total { font-size: 24px; }
}
.day-morph { position: fixed; z-index: 6; pointer-events: none; }
.pin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pin-trace { text-decoration: none; color: var(--money-hi); border-color: var(--money-lo); }
