/* The daily market read: today's five, the day pages, the record.
   Kept in its own sheet; the verdict-card classes it builds on live in style.css. */

.daily-h { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px; }
.daily-h > div { flex: 1 1 60ch; min-width: 0; }
.daily-h .next-read { margin: -4px 0 8px; font-weight: 600; }
.day-strip { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; }
.day-pill { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none; line-height: 1; }
.day-pill b { font-size: 15px; font-weight: 750; }
.day-pill small { font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-top: 2px; }
.day-pill.up { border-bottom: 3px solid var(--up); } .day-pill.down { border-bottom: 3px solid var(--down); }
.day-pill.here { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.day-pill.here small { color: rgba(255,255,255,.7); }
.day-pill.more { background: var(--panel-2); }
.day-pill:hover { border-color: var(--accent); text-decoration: none; }

.dcard .vcard-mid { flex-wrap: wrap; }
.score-ring { --ring: 0deg; width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--flat) var(--ring), var(--line) 0); position: relative; }
.score-ring.up { background: conic-gradient(var(--up) var(--ring), var(--line) 0); }
.score-ring.down { background: conic-gradient(var(--down) var(--ring), var(--line) 0); }
.score-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--panel); }
.score-ring b { position: relative; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.dout { display: block; padding: 6px 8px; border-radius: 6px; font-size: 12px; margin-top: 4px; }
.dout.up { background: var(--up-bg); color: var(--up); } .dout.down { background: var(--down-bg); color: var(--down); }
.dout b { color: inherit; }
.dcard.was-right { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.dcard.was-wrong { border-color: color-mix(in srgb, var(--down) 45%, var(--line)); }

/* the path so far: one cell per session, coloured by whether the name stood the way it leaned */
.dpath { display: inline-flex; gap: 3px; margin: 4px 0 2px; }
.dpath i { display: block; width: 14px; height: 8px; border-radius: 2px; background: var(--line); }
.dpath i.ok { background: var(--up); } .dpath i.no { background: var(--down); }
.dpath i.ref { box-shadow: 0 0 0 1.5px var(--ink) inset; }
.dout .sub { display: block; opacity: .8; margin-top: 2px; }
.dpath-tbl td.ok { background: var(--up-bg); color: var(--up); }
.dpath-tbl td.no { background: var(--down-bg); color: var(--down); }
.dpath-tbl td i.ref { font-style: normal; font-size: 9px; margin-left: 3px; vertical-align: 1px; }
.dpath-tbl tfoot th { text-align: left; font-weight: 600; font-size: 12px; white-space: nowrap; }
.dpath-tbl tfoot td { font-variant-numeric: tabular-nums; }
.dpath-tbl tfoot tr.expect th, .dpath-tbl tfoot tr.expect td { color: var(--ink-3); font-size: 11.5px; padding-top: 0; }
.dpath-tbl tfoot tr:not(.expect) th, .dpath-tbl tfoot tr:not(.expect) td { border-top: 1px solid var(--line); }
.dpath-tbl td.up { color: var(--up); } .dpath-tbl td.down { color: var(--down); }

.day-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.primary { background: var(--accent); color: #fff; }
.tbl tr.pick-up td { background: color-mix(in srgb, var(--up-bg) 60%, var(--panel)); }
.tbl tr.pick-down td { background: color-mix(in srgb, var(--down-bg) 60%, var(--panel)); }
.chip.up { background: var(--up-bg); color: var(--up); border-color: transparent; }
.chip.down { background: var(--down-bg); color: var(--down); border-color: transparent; }
.day-curve .spark { width: 100%; height: 120px; }
.kpi b.up { color: var(--up); } .kpi b.down { color: var(--down); }

/* stock page block */
.mread { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 16px; align-items: center; }
.mread-trail { display: flex; align-items: flex-end; gap: 2px; height: 42px; margin-top: 8px; }
.mread-trail a { flex: 1 1 0; display: block; height: var(--h, 0%); min-height: 2px; background: var(--ink-3); border-radius: 2px 2px 0 0; opacity: .85; }
.mread-trail a.up { background: var(--up); } .mread-trail a.down { background: var(--down); }
.mread-trail a:hover { opacity: 1; outline: 1px solid var(--accent); }
@media (max-width: 760px) { .mread { grid-template-columns: 1fr; } .day-strip { width: 100%; } }

/* coming-up, grouped by date */
.tbl tr.group-row th { background: var(--panel-2); color: var(--ink); font-size: 12.5px; text-transform: none; letter-spacing: 0; padding: 7px 10px; border-top: 1px solid var(--line); }
.home-h1 { font-size: 30px; font-weight: 700; margin: 0 0 .4em; text-shadow: 0 1px 2px color-mix(in srgb, var(--panel) 70%, transparent); }

/* ---- the week ahead + the record ------------------------------------- */
.week { margin: 0 0 18px; }
.week-record { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.acc-kpi { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 260px; }
.acc-kpi b { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; min-width: 72px; }
.acc-kpi span { font-size: 13px; color: var(--ink-2); }
.acc-trend { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.acc-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.acc-spark .spark-base { stroke: var(--line); stroke-dasharray: 2 2; }
.week-tbl td { vertical-align: top; }
.week-tabs { padding-bottom: 10px; }
.week-tabs small { font-weight: 500; opacity: .8; }
.week-tbl td.up { color: var(--up); } .week-tbl td.down { color: var(--down); }
.week-tbl tr.is-decided td { opacity: .78; }
.week-sofar { display: block; font-size: 12px; }
.week-sofar.up { color: var(--up); } .week-sofar.down { color: var(--down); } .week-sofar.flat { color: var(--ink-3); }
.dpath i.mid { background: var(--ink-3); opacity: .5; }
.week-mini { font-size: 12px; line-height: 1.4; }
.week-mini b { font-variant-numeric: tabular-nums; }

/* The pattern library and tester (/patterns). */
.pt-form .pt-row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.pt-field { display: flex; flex-direction: column; gap: 4px; position: relative; min-width: 0; }
.pt-field > span { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.pt-field input, .pt-field select { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); min-width: 0; }
.pt-field input:focus, .pt-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.pt-field-sym { flex: 1 1 220px; }
.pt-field-pat { flex: 1 1 260px; }
.pt-field-h input { width: 92px; }
.pt-field-h small { position: absolute; right: 10px; bottom: 9px; font-size: 11px; color: var(--ink-3); pointer-events: none; }
.pt-field-go { flex-direction: row; gap: 8px; }
.pt-field .watch-hits { top: 100%; left: 0; }
.pt-params { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel-2); }
.pt-params[hidden] { display: none; }
.pt-params-lbl { flex: 0 0 100%; font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.pt-param { display: flex; flex-direction: column; gap: 3px; }
.pt-param > span { font-size: 12px; color: var(--ink-2); }
.pt-param input { font: inherit; font-size: 13.5px; width: 110px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); }
.pt-param small { font-size: 11px; color: var(--ink-3); max-width: 220px; }
.pt-note { margin: 10px 0 0; font-size: 12px; }
select option:disabled { color: var(--ink-3); }

.pt-state { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 999px; background: var(--line); color: var(--ink-2); vertical-align: 2px; }
.pt-state.live { background: var(--up); color: #fff; }
.pt-state.recent { background: var(--accent); color: #fff; }
.pt-state.progress { background: var(--flat-bg); color: var(--ink); border: 1px solid var(--flat); }
.pt-summary { margin-top: 14px; }
.pt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pt-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none; font-size: 13px; }
.pt-chip:hover { border-color: var(--accent); text-decoration: none; }
.pt-chip b { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.pt-chip span { color: var(--ink-3); font-size: 12px; }
.pt-chip.up { border-left-color: var(--up); } .pt-chip.down { border-left-color: var(--down); } .pt-chip.neutral { border-left-color: var(--ink-3); }
.pt-chip.live b { color: var(--up); } .pt-chip.recent b { color: var(--accent); }

.pt-card { margin-top: 12px; }
.pt-card.live { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); }
.pt-card.recent { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.pt-body { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 18px; }
.pt-explain h4 { margin: 12px 0 3px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.pt-explain h4:first-child { margin-top: 0; }
.pt-explain p { margin: 0; font-size: 14px; line-height: 1.5; }
.pt-explain .pt-disclaimer { margin-top: 12px; font-size: 12px; color: var(--ink-3); }
.pt-rec { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: 10px 12px; }
.pt-rec-big b { display: block; font-size: 28px; font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; }
.pt-rec-big.up b { color: var(--up); } .pt-rec-big.down b { color: var(--down); }
.pt-rec-big span { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.3; }
.pt-rec-nums { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 10px 0 0; font-size: 12px; }
.pt-rec-nums dt { color: var(--ink-3); } .pt-rec-nums dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.pt-progress { position: relative; height: 18px; margin-top: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pt-progress i { position: absolute; inset: 0 auto 0 0; background: var(--flat); }
.pt-progress span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 18px; font-weight: 600; }
.pt-rule { border-top: 1px solid var(--line); }
.pt-rule > summary { cursor: pointer; padding: 8px 16px; font-size: 12.5px; color: var(--ink-2); }
.pt-rule > summary .mono { font-size: 11.5px; color: var(--ink-3); }
.pt-rule-b { padding: 0 16px 14px; font-size: 13px; }
.pt-rule-b ol { margin: 6px 0 0; padding-left: 20px; } .pt-rule-b li { margin: 3px 0; }
.pt-rule-b h5 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.pt-hits { list-style: none; margin: 0; padding: 0; } .pt-hits li { padding: 4px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.pt-hits .mono { color: var(--ink-3); margin-right: 6px; }
.pt-what { color: var(--ink-2); }
.tbl td.pt-what { max-width: 38ch; font-size: 12px; }

.pt-fam { margin-top: 12px; }
.pt-def { border-top: 1px solid var(--line); }
.pt-def:first-child { border-top: 0; }
.pt-def > summary { cursor: pointer; padding: 10px 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.pt-def > summary b { font-size: 14px; }
.pt-def-mean { font-size: 12.5px; color: var(--ink-2); }
.pt-def-params { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 10px 0 0; font-size: 12.5px; }
.pt-def-params dd { margin: 0; color: var(--ink-2); }

.pchart .pmark-span { fill: var(--accent); opacity: .08; }
.pchart .pmark-span.up { fill: var(--up); } .pchart .pmark-span.down { fill: var(--down); }
.pchart .pmark { fill: var(--accent); stroke: var(--panel); stroke-width: 1; }
.pchart .pmark.up { fill: var(--up); } .pchart .pmark.down { fill: var(--down); } .pchart .pmark.neutral { fill: var(--ink-3); }
.pchart .pchart-level { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 4 3; }
.pchart .pchart-level-lbl { fill: var(--accent); }
.pchart .pchart-last { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.pchart .pchart-session { stroke: var(--line-2); stroke-width: 1; }

@media (max-width: 720px) {
  .pt-body { grid-template-columns: 1fr; }
  .pt-field-go { flex: 1 1 100%; }
}

/* ---- the outlook page --------------------------------------------------- */
.ol-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.ol-card { margin: 0; border-top: 3px solid var(--line); }
.ol-card.up { border-top-color: var(--up); } .ol-card.down { border-top-color: var(--down); } .ol-card.flat { border-top-color: var(--flat); }
.ol-body { display: flex; flex-direction: column; gap: 12px; }
.ol-lead { display: flex; gap: 14px; align-items: center; }
.ol-lean { display: flex; flex-direction: column; gap: 4px; }
.ol-lean small { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.ol-refs { display: grid; grid-template-columns: max-content 1fr; gap: 5px 12px; margin: 0; font-size: 13px; }
.ol-refs dt { color: var(--ink-3); } .ol-refs dd { margin: 0; font-variant-numeric: tabular-nums; }
.ol-refs dd small { font-size: 11.5px; }
.ol-evidence { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.ol-evidence .pt-chip { padding: 5px 9px; font-size: 12px; }
.ol-card .pt-rule { border-top: 1px solid var(--line); }
.ol-card .pt-explain h4 { margin: 10px 0 2px; font-size: 13px; }
.ol-card .pt-explain p { margin: 0 0 6px; font-size: 13px; }

/* ---- alerts: the bell, the ask buttons, the account panels -------------- */
.bell { position: relative; text-decoration: none; font-size: 15px; line-height: 1; padding: 4px; }
.bell-badge { position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--down); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; }
.bell-badge[hidden] { display: none; }
.ask-form { display: inline; }
.askbtn.on { background: var(--up); color: #fff; border-color: var(--up); }
.askbtn.busy { opacity: .6; pointer-events: none; }
.acct-devices { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.acct-asks { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.acct-asks li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }
.acct-asks li.is-paused { opacity: .6; }
.acct-asks .sym { font-weight: 700; min-width: 90px; }
.acct-asks .what { flex: 1 1 auto; line-height: 1.4; }
.acct-asks .acts { display: flex; gap: 6px; }
.acct-asks .acts form { display: inline; }
.acct-ask-form { padding-top: 12px; border-top: 1px dashed var(--line); }
.acct-ask-form .pt-field-sym { flex: 1 1 200px; }
.tbl tr.is-new td { background: color-mix(in srgb, var(--up) 8%, transparent); }
.toast a { color: inherit; text-decoration: underline; }
.toast.is-on { pointer-events: auto; }
@media (max-width: 640px) {
  .acct-asks li { flex-wrap: wrap; }
  .ol-refs { grid-template-columns: 1fr; gap: 2px; }
  .ol-refs dt { margin-top: 6px; }
}
.ask-form { display: inline-flex; gap: 6px; align-items: center; }
.ask-stage { font: inherit; font-size: 12px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); max-width: 210px; }

/* ---- performers: week / month / quarter / half year / year and the stars ---- */
.performers { margin: 18px 0; }
.perf-h { align-items: flex-start; gap: 12px; }
.perf-lede { margin: 4px 0 0; font-size: 13px; max-width: 78ch; }
.perf-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 0; }
.perf-tabs.page { padding: 0 0 12px; }
.perf-tab { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--panel); }
.perf-tab:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.perf-tab.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.perf-tab.is-star { color: var(--flat); border-color: color-mix(in srgb, var(--gold) 60%, var(--line)); }
.perf-tab.is-star.is-on { background: var(--gold); border-color: var(--gold); color: #1d1500; }
/* losers: the same panel read from the bottom - red where the gainers are gold */
.perf-tab.is-loss.is-on, .losers .perf-tab.is-on { background: var(--down); border-color: var(--down); color: #fff; }
.losers .perf-tab.is-star { color: var(--down); border-color: color-mix(in srgb, var(--down) 50%, var(--line)); }
.losers .prank.r1, .losers .prank.r2, .losers .prank.r3 { background: var(--down-bg); border-color: var(--down); color: var(--down); }
.losers .pod.r1 { border: 2px solid var(--down); background: linear-gradient(160deg, color-mix(in srgb, var(--down) 14%, var(--panel)), var(--panel) 70%); }
.losers .pod.r2, .losers .pod.r3 { border-color: color-mix(in srgb, var(--down) 50%, var(--line)); }
.losers .perf-tbl .pspan.in { background: color-mix(in srgb, var(--down-bg) 70%, transparent); }
.perf-side { margin-bottom: -4px; }
.perf-note { font-size: 13px; color: var(--ink-2); }
.perf-foot { font-size: 12.5px; }
.perf-tbl td { vertical-align: middle; }
.perf-tbl .pmove b { font-size: 15px; }
.perf-tbl .pmove .sub, .psteps { display: block; font-size: 11px; }
.perf-tbl .pspan.in { background: color-mix(in srgb, var(--up-bg) 70%, transparent); }
.perf-tbl .pspan .sub { display: block; font-size: 11px; }

/* the rank badge: big and unmistakable, gold / silver / bronze for the top three */
.prank { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px;
  border-radius: 999px; font-weight: 800; font-size: 14px; background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); }
.prank.top { border-color: var(--up); color: var(--up); }
.prank.r1 { background: var(--gold); border-color: var(--gold); color: #1d1500; font-size: 16px; min-width: 36px; height: 36px; }
.prank.r2 { background: #b8c0cc; border-color: #b8c0cc; color: #141a22; }
.prank.r3 { background: #c8834a; border-color: #c8834a; color: #1b0f05; }

.pown { display: inline-block; width: 38px; height: 6px; border-radius: 3px; background: var(--line); margin-right: 6px; vertical-align: middle; overflow: hidden; }
.pown i { display: block; height: 100%; width: var(--p); background: var(--accent); }

.chip.stretched { background: var(--flat-bg); color: var(--flat); border: 1px solid color-mix(in srgb, var(--flat) 40%, transparent); }
.chip.star-chip { margin-left: 8px; font-size: 12px; vertical-align: 2px; }

svg.steps { display: block; }
svg.steps .steps-zero { stroke: var(--line); stroke-width: 1; }
svg.steps .steps-bar.up { fill: var(--up); }
svg.steps .steps-bar.down { fill: var(--down); }

/* the podium: ranks one to three of the star list */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 4px 14px 14px; }
.pod { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink); position: relative; }
.pod:hover { text-decoration: none; border-color: var(--accent); color: var(--ink); }
.pod.r1 { border: 2px solid var(--gold); background: linear-gradient(160deg, color-mix(in srgb, var(--gold) 18%, var(--panel)), var(--panel) 70%); }
.pod.r2 { border-color: #b8c0cc; }
.pod.r3 { border-color: #c8834a; }
.pod-rank { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.pod-rank small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px; }
.pod.r1 .pod-rank { font-size: 52px; color: var(--flat); }
.pod-id b { font-size: 18px; display: block; }
.pod-id span { font-size: 12.5px; color: var(--ink-3); }
.pod-lists { font-size: 13px; color: var(--ink-2); }
.pod-spans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.pod-span { display: flex; flex-direction: column; align-items: center; padding: 5px 2px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line-2); font-size: 12px; text-align: center; }
.pod-span.in { border-color: var(--up); background: var(--up-bg); }
.pod-span small { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.pod-span em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.pod .chip.stretched { align-self: flex-start; font-size: 11.5px; }

@media (max-width: 900px) {
  .podium { grid-template-columns: 1fr; }
  .pod-rank { font-size: 34px; } .pod.r1 .pod-rank { font-size: 42px; }
}

/* phone / tablet list */
.perf-compact .perf-tabs { padding: 0 0 10px; overflow-x: auto; flex-wrap: nowrap; }
.perf-compact .perf-tab { white-space: nowrap; }
.perf-compact .ph-row { gap: 10px; grid-template-columns: auto minmax(0, 1fr) auto; }
.perf-compact .prank { min-width: 28px; height: 28px; font-size: 13px; flex: none; }

/* ---- week by week (/weekly) ------------------------------------------- */
.wk-box rect { stroke: none; }
.wk-box.wk-up rect { fill: color-mix(in srgb, var(--up) 9%, transparent); }
.wk-box.wk-down rect { fill: color-mix(in srgb, var(--down) 9%, transparent); }
.wk-box.wk-flat rect { fill: color-mix(in srgb, var(--ink-3) 9%, transparent); }
.wk-box line { stroke-width: 2; }
.wk-box.wk-up line { stroke: var(--up); } .wk-box.wk-down line { stroke: var(--down); } .wk-box.wk-flat line { stroke: var(--ink-3); }
.wk-line { stroke-width: 1.6; fill: none; }
.wk-line-close { stroke: var(--accent); stroke-width: 2.2; }
.wk-line-high, .wk-line-low { stroke: var(--flat); stroke-dasharray: 5 3; }
.wk-line-ext { stroke-dasharray: 2 4; opacity: .8; }
.wk-zone { fill: color-mix(in srgb, var(--ink-3) 6%, transparent); }
.wk-zone-lbl { font-size: 10px; }
.wk-band { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: color-mix(in srgb, var(--accent) 40%, transparent); stroke-width: 1; }
.wk-mid { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 5 3; }
.wk-mid-pt { fill: var(--panel); stroke: var(--accent); stroke-width: 1.8; }
.wk-angle { fill: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.wk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.wk-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wk-key { display: inline-block; width: 18px; height: 10px; }
.wk-key-box { background: color-mix(in srgb, var(--up) 14%, transparent); border-left: 2px solid var(--up); border-right: 2px solid var(--up); }
.wk-key-close { height: 0; border-top: 2.2px solid var(--accent); }
.wk-key-high, .wk-key-low { height: 0; border-top: 1.6px dashed var(--flat); }
.wk-key-band { background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.wk-key-mid { height: 0; border-top: 1.8px dashed var(--accent); }
.wk-read h4 { margin: 12px 0 3px; font-size: 14px; }
.wk-read h4:first-child { margin-top: 0; }
.wk-read p { margin: 0 0 6px; font-size: 13.5px; }
@media (max-width: 720px) {
  .panel-b:has(> svg.wk-chart) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel-b > svg.wk-chart { min-width: 640px; max-width: none; }
}

/* Today's five by period: Week · Month · Quarter · Half year · Year */
.period-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 8px; }
.period-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; font-weight: 650; text-decoration: none; }
.period-chip:hover { border-color: var(--accent); text-decoration: none; }
.period-chip.here { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.daily-title .period-of { font-weight: 600; color: var(--ink-3); }
.period-switch.ph-period { flex-wrap: nowrap; overflow-x: auto; margin: 4px 0 10px; padding-bottom: 2px; scrollbar-width: none; }
.period-switch.ph-period::-webkit-scrollbar { display: none; }
.period-switch.ph-period .period-chip { flex: 0 0 auto; min-height: 40px; padding: 0 12px; font-size: 13px; }

/* Today's five as two tabbed rows of cards, scrolled sideways (home and day pages) */
.dfive-tabs { padding: 4px 0 0; }
.dfive-tab i { font-style: normal; font-size: 11px; font-weight: 600; opacity: .75; margin-left: 2px; }
.dfive-tab.up { color: var(--up); } .dfive-tab.down { color: var(--down); }
.dfive-tab.up.is-on { background: var(--up); border-color: var(--up); color: #fff; }
.dfive-tab.down.is-on { background: var(--down); border-color: var(--down); color: #fff; }
.dfive-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 6px; font-size: 12.5px; }
.dfive-arrows { display: inline-flex; gap: 6px; }
.dfive-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.dfive-arrow:hover { border-color: var(--accent); color: var(--accent); }
.dfive-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 2px 2px 10px; overscroll-behavior-x: contain; }
.dfive-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dfive-track > .vwrap { flex: 0 0 min(372px, 86%); width: min(372px, 86%); min-width: 0; scroll-snap-align: start; display: flex; }
.dfive-track .vcard, .dfive-track .vcard-mid, .dfive-track .vlevels, .dfive-track .vlv { min-width: 0; }
.dfive-track .vcard { margin: 0; width: 100%; display: flex; flex-direction: column; }
.dfive-track .vcard-foot { margin-top: auto; padding-top: 4px; }
.dfive-track .vcard > svg { width: 100%; height: auto; }
.dfive-track .vlevels { grid-template-columns: repeat(3, minmax(0, 1fr)); flex-basis: 100%; }
.dfive-track .vwrap .vcard-top { padding-right: 70px; }
.dfive-track .vwrap .bookbtn span { display: none; }
.dfive-track .vwrap .bookbtn { width: 26px; padding: 0; justify-content: center; }
.dcard.is-next { border-style: dashed; }
.dcard.is-next::before { opacity: .45; }

/* ---- card candles (Chart::miniCandles) ------------------------------
   The name's last sessions with its entry (solid) and upside / downside
   (dashed) references across them; the sessions since the read are
   shaded. Drawn in left to right once, and only when motion is welcome. */
.ph-mc { margin: 0; }
.ph-mc svg.mc { display: block; width: 100%; height: 88px; overflow: visible; }
.mc .candle-wick, .mc .candle-body, .mc .candle-na line, .mc-ref { vector-effect: non-scaling-stroke; }
.mc .candle-wick { stroke-width: 1; }
.mc .candle-body { stroke-width: 1; }
.mc .candle-up .candle-body { fill: var(--up); }
.mc-ref { stroke-width: 1.2; }
.mc-entry { stroke: var(--ink-3); }
.mc-upr { stroke: var(--up); stroke-dasharray: 4 3; }
.mc-dn { stroke: var(--down); stroke-dasharray: 4 3; }
.mc-after { fill: var(--accent-bg); }
.ph-mc figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; margin-top: 4px; font-size: 10.5px; color: var(--ink-3); }
.ph-mc figcaption i { display: inline-block; width: 12px; height: 0; margin: 0 3px 0 6px; border-top: 1.5px dashed; vertical-align: middle; }
.ph-mc figcaption i:first-child { margin-left: 0; }
.ph-mc .k-up { color: var(--up); } .ph-mc .k-dn { color: var(--down); }
.ph-mc .k-en { color: var(--ink-3); border-top-style: solid; }
.ph-mc .k-since { width: 10px; height: 9px; border: 0; background: var(--accent-bg); outline: 1px solid var(--line); vertical-align: -1px; }

/* Score rings fill to their value on load; chance rings draw their arc.
   Registering --ring lets the conic gradient animate. */
@property --ring { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@media (prefers-reduced-motion: no-preference) {
  .score-ring { animation: ring-fill .9s cubic-bezier(.2, .7, .2, 1) both; }
  .ring .ring-arc { animation: ring-arc .9s cubic-bezier(.2, .7, .2, 1) both; }
  .mc .candle { transform-box: fill-box; transform-origin: 50% 50%; animation: mc-in .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 14ms); }
  .mc-ref { animation: mc-fade .6s .25s ease-out both; }
}
@keyframes ring-fill { from { --ring: 0deg; } }
@keyframes ring-arc { from { stroke-dasharray: 0 999; } }
@keyframes mc-in { from { opacity: 0; transform: scaleY(.15); } to { opacity: 1; transform: none; } }
@keyframes mc-fade { from { opacity: 0; } }
