/* CALENDAR2 lane (owner, Oct 6: "the calendar is nice but I wonder if you could make it better"): /calendar for a trader
   deciding what to watch this week, in the HUD look of /sources' chip board and the /drivers model map (hud.css):
     .c2-hud    the week as a timeline (a column per day, its events biggest first, the blue now line) beside the next
                90 days as a heat map (one square per day, brighter = more events)
     .c2-card   the week's biggest: when, coin, event, what the past ones like it did at the next day / 7 days / 30 days,
                their strip and the coin's own drivers, the links
     .c2-r      everything else, one line per event under its day's header; phones read two short lines
   Linked by web/templates/calendar.html only, so site.css stays untouched; the old board's tiles, badges, chips, strips
   and month grid keep their site.css rules. Tokens from site.css :root. Small print stays readable: nothing under 11px,
   and on a phone nothing under 11.5px (tests/test_ux_viz10.py). Every motion rule sits behind
   prefers-reduced-motion: no-preference, and calendar2.js adds .c2-in only then. */

/* ------------------------------------------------------------------------------------------------ the week panel */
.c2-hero .cc-dek { margin-bottom: 0; }
.c2-hud { position: relative; margin: 18px 0 0; padding: 16px 18px 18px; border: 1px solid var(--line2); border-radius: 16px;
  background: radial-gradient(ellipse at 18% 0%, rgba(79,140,255,.09), rgba(79,140,255,0) 55%), linear-gradient(180deg, #0C0F14, #07080B);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 24px 60px -30px #000; }
.c2-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 32px; align-items: start; }
.c2-k { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink3); }
.c2-k b { color: var(--ink); font-weight: 600; letter-spacing: .06em; }
.c2-k2 { display: block; }
.c2-asof { letter-spacing: .08em; text-transform: none; }
.c2-led { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--blue); box-shadow: 0 0 8px var(--blue); }
.c2-h { margin: 6px 0 6px; font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
.c2-st { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 4px 0 0; }
.c2-st p { margin: 0; padding: 6px 0 0; border-top: 1px solid #262D38; min-width: 72px; }
.c2-st b { display: block; font-size: 22px; line-height: 1.15; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.c2-st b.c2-pv { color: var(--blue); text-shadow: 0 0 14px rgba(79,140,255,.45); }
.c2-st span { display: block; margin-top: 2px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.c2-nx { margin: 12px 0 0; font-size: 12.5px; color: var(--ink3); }
.c2-nx a { color: var(--ink); text-decoration: none; border-bottom: 1px dotted var(--ink3); }
.c2-nx a:hover { color: var(--blue); border-color: var(--blue); }
.c2-nx .ccclk { margin: 0 6px; color: var(--blue); }

/* the next 90 days: Monday-first week columns of day squares */
.c2-heat { min-width: 0; }
.c2-hm { --cs: 13px; --cg: 3px; margin: 8px 0 0; }
.c2-hm-m, .c2-hm-g { display: grid; grid-template-columns: repeat(var(--cols), var(--cs)); column-gap: var(--cg); }
.c2-hm-m { height: 15px; font-size: 11px; color: var(--ink3); }
.c2-hm-m span { white-space: nowrap; }
.c2-hc-c { display: grid; grid-template-rows: repeat(7, var(--cs)); row-gap: var(--cg); }
.c2-hc { display: block; width: var(--cs); height: var(--cs); border-radius: 3px; background: #131821; box-shadow: inset 0 0 0 1px rgba(255,255,255,.025); }
.c2-hc.out { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); }
.c2-hc.l1 { background: rgba(79,140,255,.3); }
.c2-hc.l2 { background: rgba(79,140,255,.5); }
.c2-hc.l3 { background: rgba(79,140,255,.75); box-shadow: 0 0 6px rgba(79,140,255,.35); }
.c2-hc.l4 { background: #7FB0FF; box-shadow: 0 0 9px rgba(79,140,255,.75); }
a.c2-hc:hover, a.c2-hc:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 1px; }
.c2-hc.c2-dim { opacity: .25; }
.c2-hc.c2-na { opacity: .3; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.12) 0 1px, transparent 1px 4px); }
.c2-hm-k { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; font-size: 11px; color: var(--ink3); }
.c2-hm-k .c2-hc { --cs: 10px; width: 10px; height: 10px; }
.c2-hm-k .c2-hc:first-of-type { margin-left: 4px; }
.c2-hm-k .c2-hc:last-of-type { margin-right: 4px; }

/* the week: a column per day, its events biggest first, the now line */
.c2-tl { position: relative; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
.c2-day { position: relative; min-width: 0; min-height: 148px; padding: 9px 9px 10px; border: 1px solid #222934; border-radius: 10px;
  background: #0C1015; transition: opacity .3s; }
.c2-day.lv1 { border-color: #263552; }
.c2-day.lv2 { border-color: #2C4473; background: linear-gradient(180deg, rgba(79,140,255,.05), rgba(79,140,255,0) 60%), #0C1015; }
.c2-day.lv3, .c2-day.lv4 { border-color: rgba(79,140,255,.6); background: linear-gradient(180deg, rgba(79,140,255,.1), rgba(79,140,255,0) 65%), #0C1015;
  box-shadow: 0 0 22px -6px rgba(79,140,255,.35); }
.c2-day.past { opacity: .42; }
.c2-dh { display: flex; align-items: baseline; gap: 5px; margin: 0 0 6px; font-size: 11px; letter-spacing: .1em; color: var(--ink3); }
.c2-dh b { font-size: 17px; letter-spacing: 0; color: var(--ink); font-weight: 700; }
.c2-dn { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(79,140,255,.14); color: var(--blue);
  font-style: normal; font-weight: 700; text-align: center; letter-spacing: 0; }
.c2-dn:empty { display: none; }
.c2-mt { display: flex; gap: 2px; height: 3px; margin: 0 0 8px; }
.c2-mt i { flex: 1; border-radius: 1px; background: #1A2029; }
.lv1 .c2-mt i:nth-child(-n+1), .lv2 .c2-mt i:nth-child(-n+2), .lv3 .c2-mt i:nth-child(-n+3), .lv4 .c2-mt i { background: var(--blue); box-shadow: 0 0 5px rgba(79,140,255,.6); }
.c2-tks { display: grid; gap: 5px; }
.c2-tk { --kc: var(--ink2); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "s c" "w w"; gap: 1px 6px; padding: 5px 7px 5px 8px;
  border: 1px solid var(--line2); border-left: 2px solid var(--kc); border-radius: 7px; background: rgba(0,0,0,.32); color: var(--ink2);
  text-decoration: none; font-size: 11.5px; line-height: 1.3; min-width: 0; }
.c2-tk:hover, .c2-tk:focus-visible { background: rgba(79,140,255,.08); border-color: var(--blue-dim); border-left-color: var(--kc); color: var(--ink); }
.c2-tk > b { grid-area: s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: var(--ink); letter-spacing: .02em; }
.c2-tk > em { grid-area: c; font-style: normal; font-family: var(--mono); font-weight: 700; font-size: 11.5px; white-space: nowrap; }
.c2-tkw { grid-area: w; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11px; color: var(--ink3); }
.c2-tv { grid-area: s; justify-self: end; align-self: center; width: 7px; height: 7px; border-radius: 50%; margin-right: -3px; }
.c2-tv-proven { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.c2-tv-likely { background: transparent; box-shadow: inset 0 0 0 1.5px var(--steel); }
.c2-tkm { font-size: 11px; color: var(--ink3); text-decoration: none; }
.c2-tkm.c2-m0, .c2-m3 { display: none; }
.c2-tkm:hover { color: var(--blue); }
.c2-q { margin: 2px 0 0; font-size: 11px; color: var(--ink4); }
.c2-day:not(.quiet) .c2-q { display: none; }
.c2-tk.hot { border-color: rgba(79,140,255,.7); border-left-color: var(--kc); }
.c2-now { position: absolute; z-index: 2; top: -7px; bottom: -7px; left: calc(var(--p, 0) * 100%); width: 2px; margin-left: -1px; border-radius: 2px;
  background: var(--blue); box-shadow: 0 0 10px var(--blue), 0 0 2px var(--blue); pointer-events: none; }
.c2-now span { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); padding: 1px 6px; border-radius: 999px; background: var(--blue);
  color: #050608; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.c2-now[hidden] { display: none; }

/* ------------------------------------------------------------------------------------------------ toolbar extras */
.cchero .cc-filt { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.cchero .cc-filt > .cc-kinds, .cchero .cc-filt > .cc-fnote, .cchero .cc-filt > .c2-saved { flex: 1 1 100%; }
.cchero .cc-filt > .cc-more[open] { flex: 1 1 100%; order: 3; }
.c2-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.c2-tools[hidden], .cc-filt [hidden], .c2-board [hidden], .c2-hud [hidden] { display: none !important; }
.c2-coin input { width: 132px; min-height: 34px; padding: 0 12px; border: 1px solid var(--line2); border-radius: 999px; background: var(--bg1);
  color: var(--ink); font: 12px var(--mono); }
.c2-coin input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,140,255,.15); }
.c2-coin input.on { border-color: var(--blue); color: var(--blue); background: rgba(79,140,255,.08); }
button.ccp { font: inherit; font-size: 11.5px; }
.c2-mine[aria-pressed="true"] { color: var(--gold); border-color: var(--gold-dim); background: rgba(255,215,94,.08); }
.c2-addall { color: var(--blue); border-color: var(--blue-dim); background: rgba(79,140,255,.05); }
.c2-addall b { color: var(--blue); font-weight: 700; }
.c2-addall:hover { border-color: var(--blue); }
.c2-saved { margin: 0; font-size: 11.5px; color: var(--ink3); }
.c2-saved b { color: var(--gold); font-weight: 600; }
.c2-saved[hidden] { display: none; }

/* ------------------------------------------------------------------------------------------------ groups */
.c2-board { gap: 26px; }
.c2-gh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 0 0 6px; }
.c2-gh .ccg-h { margin: 0; }
.c2-why { margin: 0 0 12px; max-width: 120ch; font-size: 11.5px; line-height: 1.6; color: var(--ink3); }
.c2-g .ccg-s a { color: var(--ink2); }
.c2-g[data-hide], .c2-board [data-hide] { display: none !important; }

/* ------------------------------------------------------------------------------------------------ the week's biggest */
table.c2-cards, .c2-cards tbody { display: block; width: 100%; }
.c2-cards tbody { display: grid; gap: 10px; }
.c2-cards thead.vh { position: absolute; }
tr.c2-card { position: relative; display: grid; grid-template-columns: 124px minmax(128px, .8fr) minmax(170px, 1.05fr) repeat(3, minmax(150px, 1fr));
  grid-template-areas: "w t x h1 h7 h30" "w s s s o o"; column-gap: 14px; row-gap: 12px; align-items: start; padding: 14px 16px 14px;
  border: 1px solid var(--line2); border-radius: 14px; background-color: var(--bg2);
  background-image: linear-gradient(180deg, rgba(255,255,255,.034), rgba(255,255,255,.008) 38%, rgba(255,255,255,0) 70%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 1px 1px rgba(0,0,0,.6), 0 20px 44px -24px rgba(0,0,0,.9); transition: border-color .3s, box-shadow .3s; }
tr.c2-card:hover { background-color: var(--bg2); border-color: #313948; }
tr.c2-card > td { display: block; width: auto; min-width: 0; padding: 0; border: 0; white-space: normal; text-align: left; }
tr.c2-card > td.ccw { grid-area: w; }
tr.c2-card > td.cct { grid-area: t; display: flex; align-items: center; min-width: 0; white-space: nowrap; }
tr.c2-card > td.ccx { grid-area: x; }
tr.c2-card > td.c2-hz[data-h="1d"] { grid-area: h1; }
tr.c2-card > td.c2-hz[data-h="7d"] { grid-area: h7; }
tr.c2-card > td.c2-hz[data-h="30d"] { grid-area: h30; }
tr.c2-card > td.c2-none { grid-column: 4 / 7; grid-row: 1; }
tr.c2-card > td.c2-sx { grid-area: s; }
tr.c2-card > td.cco { grid-area: o; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 2px 4px; align-self: end; }
tr.c2-card.wl-on { border-color: rgba(255,215,94,.35); }
tr.c2-card.c2-flash { animation: c2-flash 1.6s ease-out; }
@keyframes c2-flash { 0%, 30% { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,140,255,.25), 0 20px 44px -24px #000; } }
.c2-card .ccd { min-width: 0; width: 100%; }
.c2-card .starb { position: absolute; left: 16px; bottom: 14px; }
.c2-card .ccx > small, .c2-r .ccx > small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink3); line-height: 1.4; }
.c2-card .ccx .c2-sw { color: var(--ink2); }
.c2-card .ccbdg, .c2-r .ccbdg { font-size: 11.5px; white-space: normal; }
.c2-card .ccbdg b, .c2-r .ccbdg b { font-size: 11px; letter-spacing: .12em; }
.c2-card .ccpm, .c2-r .ccpm { display: block; margin-top: 5px; font-size: 11.5px; }

/* the light logo: the coin's monogram colours (viz's palette) with its image on top */
.c2-lg { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px;
  margin-right: 10px; overflow: hidden; border: 1px solid #1F2E36; border-radius: 6px; background: #131C21; color: var(--steel);
  font: 700 11px/1 var(--mono); vertical-align: middle; }
.c2-lg-b { width: 30px; height: 30px; border-radius: 7px; }
/* viz.py's monogram palettes, one hash for both (web/calendar2.py logo) */
.c2-lg.p0 { color: #4F8CFF; background: #0E1B16; } .c2-lg.p1 { color: #5FD3E8; background: #101A1F; } .c2-lg.p2 { color: #9C9CFF; background: #14211C; }
.c2-lg.p3 { color: #F48FC6; background: #0F1D22; } .c2-lg.p4 { color: #FFD75E; background: #1A1410; } .c2-lg.p5 { color: #8FA6BF; background: #1B1013; }
.c2-lg.p6 { color: #4F8CFF; background: #122019; } .c2-lg.p7 { color: #B9A6F2; background: #16121E; } .c2-lg.p8 { color: #C4CDD4; background: #0E1B16; }
.c2-lg.p9 { color: #5FD3E8; background: #131C21; } .c2-lg.p10 { color: #FFD75E; background: #1A1711; } .c2-lg.p11 { color: #7FB7FF; background: #10161E; }
.c2-lg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cct-n { min-width: 0; }
.cct-n small { max-width: 160px; }

/* the three reads: each a recessed well; the one the Read pills point at lit */
tr.c2-card > td.c2-hz, .c2-hz { padding: 8px 10px 9px; border-radius: 10px; background: #080A0E; box-shadow: inset 0 2px 6px rgba(0,0,0,.75), inset 0 0 0 1px rgba(255,255,255,.04);
  transition: box-shadow .3s; }
.c2-hz.on { box-shadow: inset 0 2px 6px rgba(0,0,0,.75), inset 0 0 0 1px rgba(79,140,255,.55), 0 0 16px -6px rgba(79,140,255,.6); }
.c2-hz p { margin: 0; }
.c2-hl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink3); }
.c2-hz.on .c2-hl { color: var(--blue); }
.c2-hv { margin: 3px 0 5px !important; font-family: var(--mono); font-size: 17px; font-weight: 700; white-space: nowrap; }
.c2-hv.t-good { color: var(--mint); } .c2-hv.t-bad { color: var(--red); } .c2-hv.t-flat { color: var(--amber); }
.c2-bar { position: relative; display: block; height: 5px; margin: 0 0 6px; border-radius: 3px; background: rgba(255,77,94,.42); overflow: hidden; }
.c2-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--mint); box-shadow: 0 0 6px rgba(56,242,164,.4); border-radius: 3px 0 0 3px; }
.c2-bar::after { content: ""; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: rgba(5,6,8,.85); }
.c2-hn, .c2-hr, .c2-hf { font-size: 11.5px; line-height: 1.45; color: var(--ink3); }
.c2-hn b { font-weight: 600; color: var(--ink2); }
.c2-ty i { font-style: normal; }
.c2-hn .t-good { color: var(--mint); } .c2-hn .t-bad { color: var(--red); } .c2-hn .t-flat { color: var(--amber); }
.c2-hr { color: var(--ink2); }
.c2-hr span { white-space: nowrap; }
tr.c2-card > td.c2-none { align-self: stretch; display: flex; align-items: center; border: 1px dashed var(--line2); background: transparent; box-shadow: none; }

/* the strip of past cases and the coin's drivers under it */
tr.c2-card > td.c2-sx { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.c2-sx .ccs-cap { font-size: 11.5px; color: var(--ink3); }
.c2-sx .ccs-cap b { font-weight: 600; color: var(--ink2); }
.c2-sx .ccs-cap b.t-good { color: var(--mint); } .c2-sx .ccs-cap b.t-bad { color: var(--red); }
.c2-sx .ccflip { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.c2-drv { display: grid; gap: 6px; margin: 0; padding: 8px 0 0; list-style: none; border-top: 1px dashed var(--line2); font-size: 13px; line-height: 1.45; color: var(--ink2); }
.c2-drv li { display: flex; align-items: baseline; gap: 9px; margin: 0; }
.c2-drv .vb { flex: none; }
.c2-drv .dim { color: var(--ink3); }
.c2-card .cco a { display: flex; align-items: center; justify-content: flex-end; min-height: 30px; padding: 0 8px; border-radius: 7px; font-size: 12px;
  color: var(--ink2); text-decoration: none; white-space: nowrap; }
.c2-card .cco a:hover { color: var(--blue); background: rgba(79,140,255,.07); }
.c2-card .cco a.c2-add, .c2-r .c2-add { margin-left: 4px; border: 1px solid var(--blue-dim); border-radius: 999px; color: var(--blue); background: rgba(79,140,255,.04); }
.c2-card .cco a.c2-add:hover, .c2-r .c2-add:hover { border-color: var(--blue); background: rgba(79,140,255,.1); }
.c2-add.done { color: var(--mint) !important; border-color: var(--mint-dim) !important; }

/* ------------------------------------------------------------------------------------------------ one line per event */
table.c2-rows { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 1px solid var(--line2); border-radius: 14px;
  background-color: var(--bg2); background-image: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 50%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 20px 44px -26px rgba(0,0,0,.9); font-size: 13px; }
.c2-rows thead.vh { position: absolute; }
.c2-rows tbody tr:hover { background: rgba(255,255,255,.02); }
tr.c2-dhr th { padding: 9px 14px 7px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.025); text-align: left; text-transform: none;
  letter-spacing: 0; font-weight: 400; }
.c2-rows tbody:first-of-type tr.c2-dhr th { border-top: 0; }
.c2-rows tbody + tbody tr.c2-dhr th { border-top: 1px solid var(--line2); }
.c2-dhd { font-size: 11.5px; letter-spacing: .1em; color: var(--ink); font-weight: 700; }
.c2-dhn { margin-left: 8px; padding: 1px 7px; border-radius: 999px; background: var(--bg3); font-size: 11px; color: var(--ink2); }
.c2-dhc { float: right; font-size: 11.5px; font-weight: 600; color: var(--ink3) !important; }
tr.c2-r td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.c2-rows tbody:last-of-type tr.c2-r:last-child td { border-bottom: 0; }
tr.c2-r td.cct { width: 23%; white-space: nowrap; }
tr.c2-r td.cct .c2-lg { margin-right: 9px; border-radius: 6px; }
tr.c2-r td.cct .cct-n { display: inline-flex; flex-direction: row; align-items: baseline; gap: 7px; vertical-align: middle; }
tr.c2-r td.cct .cct-n a { color: var(--ink); }
tr.c2-r td.cct .cct-n b { font-size: 14px; }
tr.c2-r td.cct .cct-n small { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--ink3); }
tr.c2-r td.ccx > small { display: inline; margin: 0 0 0 8px; }
tr.c2-r td.ccx > small.ccalso, tr.c2-r td.ccx > small.ccpm { display: block; margin: 4px 0 0; }
tr.c2-r td.c2-o { width: 30%; white-space: nowrap; }
tr.c2-r td.c2-o .ccchip { min-width: 86px; justify-content: center; font-size: 12.5px; padding: 4px 8px; text-decoration: none; }
tr.c2-r td.c2-o a.ccchip:hover { border-color: var(--blue); }
tr.c2-r td.c2-o small { margin-left: 9px; font-size: 11.5px; color: var(--ink3); }
.c2-vm { margin-left: 9px; padding: 2px 6px; font-size: 11px; letter-spacing: .08em; cursor: default; vertical-align: middle; }
tr.c2-r td.cco { width: 1%; white-space: nowrap; text-align: right; }
tr.c2-r td.cco a { font-size: 12px; color: var(--ink2); text-decoration: none; }
tr.c2-r td.cco a:hover { color: var(--blue); }
tr.c2-r .c2-add { display: inline-flex; align-items: center; margin: 0 0 0 8px; padding: 2px 9px; font-size: 11.5px; text-decoration: none; }
tr.c2-r td.c2-d { width: 64px; white-space: nowrap; font-size: 11.5px; letter-spacing: .06em; color: var(--ink2); }
tr.c2-r.wl-on td.cct .cct-n b { color: var(--gold); }
tr.c2-r .starb { margin-right: 8px; }
tr.c2-r.c2-flash td { animation: c2-rowflash 1.6s ease-out; }
@keyframes c2-rowflash { 0%, 30% { background: rgba(79,140,255,.14); } }

/* ------------------------------------------------------------------------------------------------ the month grid's heat */
.ccmonth .cd.c2-lv1 { box-shadow: inset 0 2px 0 rgba(79,140,255,.35); }
.ccmonth .cd.c2-lv2 { box-shadow: inset 0 2px 0 rgba(79,140,255,.6); background: linear-gradient(180deg, rgba(79,140,255,.05), rgba(79,140,255,0) 50%), var(--bg2); }
.ccmonth .cd.c2-lv3, .ccmonth .cd.c2-lv4 { box-shadow: inset 0 2px 0 var(--blue), inset 0 0 18px -8px rgba(79,140,255,.6);
  background: linear-gradient(180deg, rgba(79,140,255,.1), rgba(79,140,255,0) 60%), var(--bg2); }
.c2-mk { white-space: nowrap; }
.c2-mk i { display: inline-block; width: 10px; height: 10px; margin-right: 2px; border-radius: 2px; vertical-align: -1px; background: #131821; }
.c2-mk i.c2-lv1 { background: rgba(79,140,255,.3); } .c2-mk i.c2-lv2 { background: rgba(79,140,255,.5); }
.c2-mk i.c2-lv3 { background: rgba(79,140,255,.75); } .c2-mk i.c2-lv4 { background: #7FB0FF; margin-right: 6px; }
.ccmonth .cd-more { display: block; color: var(--ink3); text-decoration: none; }
.ccmonth .cd-more:hover { color: var(--blue); }
.cca-list .ccai:target { background: rgba(79,140,255,.08); }

/* ------------------------------------------------------------------------------------------------ motion (never required) */
@media (prefers-reduced-motion: no-preference) {
  .c2-k .c2-led { animation: c2-blink 1.8s ease-in-out infinite; }
  .c2-hud.c2-in .c2-day { animation: c2-rise .55s cubic-bezier(.2,.8,.25,1) backwards; animation-delay: calc(var(--i, 0) * 70ms); }
  .c2-hud.c2-in .c2-tk { animation: c2-pop .42s cubic-bezier(.2,.8,.3,1.25) backwards; animation-delay: calc(var(--i, 0) * 70ms + 260ms); }
  .c2-hud.c2-in .c2-mt i { animation: c2-lit .3s ease-out backwards; animation-delay: calc(var(--i, 0) * 70ms + 420ms); }
  .c2-hud.c2-in .c2-hc[class*=" l"] { animation: c2-lit .4s ease-out backwards; animation-delay: calc(var(--k, 0) * 9ms + 150ms); }
  .c2-hud.c2-in .c2-now { animation: c2-sweep 1.1s cubic-bezier(.2,.8,.2,1) backwards .2s, c2-glow 2.4s ease-in-out 1.4s infinite; }
  .c2-tk, .c2-hz, .c2-day { transition: background-color .2s, border-color .2s, box-shadow .3s, opacity .3s; }
  .c2-cards tr.c2-card.c2-move { transition: transform .5s cubic-bezier(.2,.75,.25,1); }
}
@keyframes c2-blink { 50% { opacity: .35; } }
@keyframes c2-rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes c2-pop { from { opacity: 0; transform: scale(.92); } }
@keyframes c2-lit { from { opacity: 0; } }
@keyframes c2-sweep { from { left: 0; opacity: 0; } }
@keyframes c2-glow { 50% { box-shadow: 0 0 18px var(--blue), 0 0 4px var(--blue); } }
@media (prefers-reduced-motion: reduce) {
  tr.c2-card.c2-flash, tr.c2-r.c2-flash td { animation: none; }
}

/* ------------------------------------------------------------------------------------------------ tablets */
@media (max-width: 1180px) {
  tr.c2-card { grid-template-columns: 116px minmax(130px, 1fr) repeat(3, minmax(120px, 1fr));
    grid-template-areas: "w t h1 h7 h30" "w x h1 h7 h30" "w s s o o"; }
}
@media (max-width: 980px) {
  .c2-top { grid-template-columns: minmax(0, 1fr); }
  tr.c2-card { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "w t t" "x x x" "h1 h7 h30" "s s s" "o o o";
    column-gap: 8px; row-gap: 10px; padding: 12px; }
  tr.c2-card > td.c2-none { grid-column: 1 / -1; grid-row: 3; }
  tr.c2-card > td.cco { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; align-self: auto; }
  .c2-card .starb { left: auto; right: 12px; top: 12px; bottom: auto; }
  tr.c2-card > td.cct { padding-right: 44px; }
}

/* ------------------------------------------------------------------------------------------------ phones */
@media (max-width: 760px) {
  .c2-hud { padding: 14px 12px 14px; border-radius: 14px; }
  .c2-h { font-size: 24px; }
  .c2-k, .c2-hm-m, .c2-hm-k, .c2-dh, .c2-tkw, .c2-tkm, .c2-q, .c2-hl, .c2-dhn, .c2-vm, .c2-sx .ccflip, .c2-now span, .c2-lg,
  .c2-card .ccbdg b, .c2-r .ccbdg b { font-size: 11.5px; }
  .c2-k { letter-spacing: .12em; }
  .c2-nx { font-size: 12px; }
  .c2-st { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px 12px; }
  .c2-st p { min-width: 0; }
  .c2-st b { font-size: 18px; }
  .c2-st span { font-size: 11.5px; letter-spacing: .06em; }
  .c2-hm { --cs: calc((100% - 13 * var(--cg)) / var(--cols)); }
  .c2-hm-m, .c2-hm-g { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
  .c2-hc-c { grid-template-rows: none; }
  .c2-hc { width: auto; height: auto; aspect-ratio: 1; }
  .c2-hm-k .c2-hc { width: 10px; height: 10px; aspect-ratio: auto; }
  /* the week turns into an agenda: one short line per day, its events wrapping beside the date; the now line runs across */
  .c2-tl { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 14px; border: 1px solid #222934; border-radius: 10px; overflow: hidden; }
  .c2-day { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 6px; align-items: center; min-height: 0; padding: 7px 10px;
    border: 0; border-bottom: 1px solid #1A2029; border-radius: 0; background: transparent; }
  .c2-day:last-child { border-bottom: 0; }
  .c2-day.lv2, .c2-day.lv3, .c2-day.lv4 { background: rgba(79,140,255,.05); box-shadow: inset 2px 0 0 var(--blue); }
  .c2-day.lv1 { box-shadow: inset 2px 0 0 var(--blue-dim); }
  .c2-dh { margin: 0; gap: 4px; letter-spacing: .06em; white-space: nowrap; }
  .c2-dh b { font-size: 15px; }
  .c2-dh span:last-of-type { display: none; }
  .c2-dn { margin-left: 4px; min-width: 0; }
  .c2-mt { display: none; }
  .c2-tks { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
  .c2-tk { grid-template-columns: auto auto; grid-template-areas: "s c"; align-items: baseline; gap: 0 6px; padding: 4px 8px; max-width: 100%; }
  .c2-tkw { display: none; }
  .c2-tks > .c2-tk:not(.c2-v3) { display: none; }
  .c2-tkm.c2-m0 { display: inline; }
  .c2-m5 { display: none; } .c2-m3 { display: inline; }
  .c2-tv { grid-area: auto; justify-self: auto; margin: 0; }
  .c2-q { margin: 0; color: var(--ink4); }
  .c2-now { top: 0; bottom: auto; left: -1px; right: -1px; width: auto; height: 2px; margin: -1px 0 0; }
  .c2-now { height: 3px; }
  .c2-now span { display: none; }
  .c2-tools { width: 100%; }
  .c2-coin input { width: 110px; }
  /* the week's biggest: three short reads side by side, the rest stacked */
  tr.c2-card { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-areas: "w w w t t t" "x x x x x x" "h1 h1 h7 h7 h30 h30" "s s s s s s" "o o o o o o";
    padding: 11px 10px 10px; }
  tr.c2-card > td.c2-none { grid-column: 1 / -1; }
  .c2-card .ccd small { white-space: nowrap; }
  .c2-hz { padding: 7px 7px 8px; }
  .c2-hv { font-size: 15px; }
  .c2-hn, .c2-hr, .c2-hf, .c2-sx .ccs-cap, .c2-card .ccx > small { font-size: 11.5px; }
  .c2-hr { display: none; }
  .c2-ty { display: block; }
  .c2-ty i { display: none; }
  .c2-drv { font-size: 12.5px; }
  .c2-drv li { display: block; }
  .c2-drv .vb { margin-right: 6px; }
  .c2-card .cco a { min-height: 34px; font-size: 12px; }
  /* one line per event becomes two short ones: the coin and its read, then the event and its cases */
  table.c2-rows, .c2-rows tbody { display: block; }
  .c2-rows tbody tr.c2-dhr { display: block; }
  tr.c2-dhr th { display: block; padding: 8px 12px 6px; }
  tr.c2-r { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "t o a" "x x n"; gap: 3px 8px; align-items: center;
    padding: 8px 10px 8px 12px; border-bottom: 1px solid var(--line); }
  .c2-later tr.c2-r { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "d t o a" "x x x n"; }
  .c2-later tr.c2-r td.c2-d { font-weight: 700; color: var(--ink2); }
  .c2-hw { display: none; }
  tr.c2-r td { display: block; width: auto !important; padding: 0; border: 0; }
  tr.c2-r td.c2-d { grid-area: d; font-size: 11.5px; color: var(--ink3); }
  tr.c2-r td.cct { grid-area: t; display: flex; align-items: center; min-width: 0; overflow: hidden; }
  tr.c2-r td.cct .cct-n small { display: none; }
  tr.c2-r td.ccx { grid-area: x; min-width: 0; overflow: hidden; }
  tr.c2-r td.c2-o { display: contents; }
  tr.c2-r td.c2-o .ccchip { grid-area: o; min-width: 0; padding: 3px 8px; font-size: 12px; }
  tr.c2-r td.c2-o small { grid-area: n; justify-self: end; margin: 0; white-space: nowrap; }
  tr.c2-r td.cco { grid-area: a; }
  tr.c2-r .c2-add { margin: 0; padding: 3px 8px; }
  tr.c2-r td.ccx .ccbdg { display: inline; padding: 2px 6px; border: 0; background: none; }
  tr.c2-r td.ccx > small { display: inline; margin: 0 0 0 4px; }
  tr.c2-r td.ccx > small.ccalso, tr.c2-r td.ccx > small.ccpm { display: block; margin: 2px 0 0; }
  .c2-rows tbody:last-of-type tr.c2-r:last-child { border-bottom: 0; }
  .c2-dhc { font-size: 11.5px; }
  .c2-why { font-size: 11.5px; }
}
@media (max-width: 380px) {
  tr.c2-r td.cct .c2-lg { display: none; }
  .c2-hv { font-size: 14px; }
}
