/* Service-only styles (tokens only; see DESIGN.md). Shell.tsx imports this after ds.css on every page; the Worker-rendered pages load the same file as /hub.css. */

/* ---------- Home: this week's card, company chips and lists ---------- */
.weekend-card { background: var(--accent-weak); border-radius: var(--r2); padding: var(--s4) var(--s5); margin-bottom: var(--s5); }
.weekend-card .wk-k { margin: 0 0 var(--s1); color: var(--text-2); font-size: var(--t-cap); font-weight: 600; }
.weekend-card .wk-v, .wk-v { margin: 0 0 var(--s3); font-size: var(--t-lg); font-weight: 800; letter-spacing: -.02em; line-height: 1.45; }
.weekend-card .row-actions { margin-top: var(--s3); }
.wk-list { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: var(--s1); }
.wk-list li { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--t-sm); min-width: 0; }
.wk-list li span:first-child { font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
.wk-list .v { color: var(--text-2); text-align: right; flex: none; }
.tool .quick-chips { list-style: none; padding: 0; }
.tool .quick-chip { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s4); font-size: var(--t-sm); text-decoration: none; }
.tool .fields { display: grid; gap: var(--s2); margin: var(--s2) 0 var(--s4); }
.search-row { display: flex; gap: var(--s2); align-items: stretch; }
.search-row input { flex: 1 1 auto; min-width: 0; }
.search-row .btn { flex: none; }
.count { color: var(--text-2); font-size: var(--t-cap); margin: var(--s3) 0 0; }
.count-i { color: var(--text-2); font-size: var(--t-cap); font-weight: 600; }

/* ---------- Company rows (ranking, search results) ---------- */
.rks { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: 0; }
ol.rks { counter-reset: none; }
.rk { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: var(--s3); align-items: center; border-bottom: 1px solid var(--rule); padding: var(--s3) 0; min-width: 0; }
.rk:last-child { border-bottom: 0; }
.rk-n { grid-row: 1 / span 2; color: var(--text-3); font-weight: 700; min-width: 1.75rem; text-align: right; font-variant-numeric: tabular-nums; }
.rk-t { grid-column: 2; font-weight: 700; color: var(--ink); text-decoration: none; word-break: keep-all; overflow-wrap: anywhere; line-height: 1.4; }
.rk-m { grid-column: 2; color: var(--text-2); font-size: var(--t-cap); line-height: 1.5; }
.rk-add { grid-column: 3; grid-row: 1 / span 2; min-height: 2.75rem; padding: 0 var(--s3); white-space: nowrap; }
.plain-rk .rk { grid-template-columns: minmax(0, 1fr) auto; }
.plain-rk .rk-t, .plain-rk .rk-m { grid-column: 1; }
.plain-rk .rk-add { grid-column: 2; }

/* ---------- Dividend events on company pages ---------- */
.evs { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
.ev { border: 1px solid var(--rule); border-radius: var(--r2); padding: var(--s3) var(--s4); }
.ev-t { margin: 0 0 var(--s2); line-height: 1.5; word-break: keep-all; overflow-wrap: anywhere; }
.ev-m { margin: 0; color: var(--text-2); font-size: var(--t-sm); line-height: 1.7; display: flex; flex-wrap: wrap; gap: 0 var(--s4); }
.ev-d { white-space: nowrap; }
.chip-d { display: inline-block; margin-left: var(--s1); padding: 0 var(--s2); border-radius: 999px; background: var(--accent-weak); color: var(--accent); font-size: var(--t-cap); font-weight: 700; }
.badge.on { background: var(--accent); color: var(--on-accent); }
.day h3 { margin-top: 0; }
.day h4 { margin: var(--s4) 0 var(--s1); font-size: var(--t-sm); color: var(--text-2); }

/* ---------- Pager, calendar grid ---------- */
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s5); margin: var(--s4) 0; flex-wrap: wrap; }
.pager a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3); font-weight: 700; }
.cal { table-layout: fixed; width: 100%; }
.cal th, .cal td { text-align: center; padding: var(--s2) 0; }
.cal td { height: 3.25rem; vertical-align: top; }
.cal .cal-d { display: block; font-weight: 600; }
.cal a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink); text-decoration: none; }
.cal .cal-n { display: inline-block; min-width: 1.5rem; padding: 0 var(--s1); border-radius: 999px; background: var(--accent-weak); color: var(--accent); font-size: var(--t-cap); font-weight: 800; }
.cal td[aria-current='date'] .cal-d { color: var(--accent); }
.cal td.empty { background: transparent; }

/* ---------- My holdings ---------- */
.hds { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
.hd { border: 1px solid var(--rule); border-radius: var(--r2); padding: var(--s3) var(--s4); min-width: 0; }
.hd-b { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.hd-t { font-weight: 700; color: var(--ink); text-decoration: none; word-break: keep-all; overflow-wrap: anywhere; }
.hd-s { color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-m { margin: var(--s1) 0 var(--s2); color: var(--text-2); font-size: var(--t-sm); line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
.hd .row-actions { margin-top: 0; }
.hd .btn { min-height: 2.75rem; }
.cal-list .k { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.cal-date { font-weight: 700; }

@media (max-width: 47.99rem) {
  .search-row { flex-direction: row; }
  .weekend-card { padding: var(--s4); }
  .cal td { height: 2.75rem; }
  .wk-list li { flex-direction: column; gap: 0; }
  .wk-list .v { text-align: left; }
}

/* Visually hidden text that stays available to screen readers (captions, link context). */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
