/* Rally Sunday polish layer (Claude, 24 Oct 2026; for Codex review).
   Presentation only. Loaded last; uses existing shared component classes; no selectors, fields, bindings,
   accessible names, copy or behaviour change. Revert: remove this file and its <link> in index.html.
   Palette is the existing one: ink #1d1d1f, secondary #626267, line #dedee3, ground #f5f5f7, Rally blue #0071e3,
   link #0066cc. Light mode only. No animation.

   Type scale (one hierarchy for the Sunday screens; weights 600 for UI headings, 400 for text):
     page title 34 · section title 22 · card title 20 · headline 17 · body 15–17 · secondary 13–14 · caption 12 caps */
:root{--rp-ink:var(--r-ink,#1d1d1f);--rp-ink-2:var(--r-ink-2,#626267);--rp-line:var(--r-line,#dedee3);--rp-ground:var(--r-bg,#f5f5f7);
 --rp-blue:var(--r-blue,#0071e3);--rp-link:var(--r-link,#0066cc);--rp-blue-tint:#eaf3ff;--rp-fill:rgba(120,120,128,.12)}

/* 0. Typographic details: balanced headings, no orphans in explanations, even-width figures where numbers line up. */
h2,h3,.sheethead h2{text-wrap:balance}
/* Page titles keep normal wrapping: balancing pushed the "·" separator to the start of line two on phones. */
.callout p,.sheettext,.grace-note,.livecourt>small,.outlook-facts dd{text-wrap:pretty}
.livecourt>header span,.hostbar b,.viewerboard td,.resultrow b,.outlook-facts dd,.operating-note{font-variant-numeric:tabular-nums}

/* 1. Section and card titles: one size per level (was 14, 17 and 22px mixed for the same level). */
.sectionhead h2,.sectionhead h3,.panelhead h2{font-size:22px;line-height:1.25;font-weight:600;letter-spacing:-.012em;color:var(--rp-ink)}
.sectionhead .tiny{font-size:14px}
.hostbar b{font-size:20px;line-height:1.25;font-weight:600;letter-spacing:-.01em}
.hostbar p{font-size:14px;line-height:1.4;color:var(--rp-ink-2)}
.participantname b,.winner-option b,.resultrow b{font-weight:600}
.resultrow b{line-height:1.35}
.resultrow small,.result-review small{font-size:13px;line-height:1.4}
.viewerboard th{font-size:13px;font-weight:600;color:var(--rp-ink-2)}
#sheet legend{font-size:15px;font-weight:600;color:var(--rp-ink);margin-bottom:8px}

/* 2. One readable callout (Grace period, End choices, group size, notices, Thanks for playing). */
.callout{font-size:15px;line-height:1.45;padding:16px}
.callout>b:first-child{display:block;font-size:15px;line-height:1.35;font-weight:600;color:var(--rp-ink);margin:0 0 4px}
.callout>p{font-size:15px;line-height:1.45;margin:0;color:var(--rp-ink-2)}
.callout>p+p{margin-top:8px}
.callout>.btn,.callout>button,.callout>.actions{margin-top:12px}
.end-choices{display:grid;gap:12px}

/* 3. Play outlook: one surface, one type scale. */
.capacitystrip .callout{border-color:transparent;background:var(--rp-ground)}
.capacitystrip .smallcaps{display:block;margin-bottom:12px}
.outlook-facts{gap:8px}
.outlook-facts dt{font-size:15px;font-weight:600;color:var(--rp-ink);margin:0 0 4px}
.outlook-facts dd,.outlook-facts dd span{font-size:15px;line-height:1.45;color:var(--rp-ink-2)}

/* 4. Live courts. The court is the unit of the screen: a real title, a status capsule, two teams as pairs, one
      primary action aligned across cards. */
.livecourt{display:flex;flex-direction:column}
.livecourt>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px}
.livecourt>header b{font-size:20px;line-height:1.2;font-weight:600;letter-spacing:-.012em;color:var(--rp-ink)}
.livecourt>header span{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:4px 10px;border-radius:999px;font-size:13px;line-height:18px;font-weight:600;background:var(--rp-blue-tint);color:var(--rp-link)}
.livecourt>header span::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.livecourt.nextlive>header span,.livecourt.reserved-live>header span,.livecourt:has(>.courtmatch>p)>header span{background:var(--rp-fill);color:var(--rp-ink-2)}
.livecourt.nextlive>header span::before,.livecourt.reserved-live>header span::before,.livecourt:has(>.courtmatch>p)>header span::before{display:none}
.livecourt .courtmatch{padding:0}
.livecourt .courtmatch>p{font-size:15px;color:var(--rp-ink-2);margin:0}
.livecourt .court-team{gap:0;border:1px solid var(--rp-line);border-radius:14px;overflow:hidden;background:#fff}
.livecourt .court-player-change{border:0;border-radius:0;min-height:48px;padding:12px 14px;font-size:16px;font-weight:500;color:var(--rp-ink);background:#fff}
.livecourt .court-player-change+.court-player-change{box-shadow:inset 0 1px 0 var(--rp-line)}
.livecourt .court-player-change:focus-visible{outline:2px solid var(--rp-blue);outline-offset:-3px}
.livecourt .court-player-change>span:first-child{min-width:0;overflow-wrap:anywhere;text-align:left}
.livecourt .change-player-label{color:var(--rp-link);font-size:14px;font-weight:500;flex-shrink:0}
.livecourt .vsline{display:flex;align-items:center;gap:12px;margin:10px 2px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#8e8e93}
.livecourt .vsline::before,.livecourt .vsline::after{content:"";flex:1;height:1px;background:var(--rp-line)}
.livecourt .btn[data-score]{margin-top:auto;background:var(--rp-blue);border-color:var(--rp-blue);color:#fff;font-size:16px;font-weight:600;min-height:50px;border-radius:12px}
.livecourt .courtmatch+.btn[data-score]{margin-top:auto}
.livecourt .courtmatch{margin-bottom:20px}
.livecourt .btn[data-score]:hover{background:var(--rp-link);border-color:var(--rp-link);color:#fff}
.livecourt .btn[data-score]:disabled{background:var(--rp-ground);border-color:var(--rp-line);color:var(--rp-ink-2)}
.livecourt .grace-note,.livecourt>small{font-size:13px;line-height:1.45;color:var(--rp-ink-2);margin-top:10px}
.livecourt.nextlive>small{margin-top:auto;padding-top:12px}

/* 5. Session header and status line. */
.rolebadge{background:#fff;border:1px solid var(--rp-line);color:var(--rp-ink);font-size:13px;padding:4px 12px}
.operating-note{font-size:14px;line-height:1.45;color:var(--rp-ink-2);background:#fff;border:1px solid var(--rp-line);border-radius:12px;padding:12px 14px}
.hostbar .actions>.btn{white-space:nowrap;flex:1 1 auto;min-width:0}

/* 6. Players list: status as a status, consistent destructive control (existing grid/flex layout kept). */
.participant .participant-actions>.danger-quiet{border:1px solid var(--rp-line)!important;border-radius:10px;background:#fff!important;font-weight:500}
.participant .participant-actions>.danger-quiet:hover{background:#fff1f0!important}
.participant .participant-actions>.attendance-status{order:-1;grid-column:1/-1!important;grid-row:auto!important;justify-self:start;align-self:center;height:auto;margin:0;padding:4px 10px;font-size:13px;line-height:1.35}
.attendance-status{font-size:13px}
.attendance-status.skipped{background:#fff4e5;color:#7a4b00}
.skill-edit{position:relative;z-index:1}
.skill-edit::after{content:"";position:absolute;inset:-5px -2px}

/* 7. Checkbox rows: readable label, box aligned with the first line, full-height tap row. */
.livecheckbox{display:flex;align-items:flex-start;gap:12px;min-height:44px;padding-block:11px;font-size:15px;line-height:1.4;color:var(--rp-ink)}
.livecheckbox input{width:22px;height:22px;margin:0;flex-shrink:0}

/* 8. Awards: same content, less empty space before the standings. */
.community-grid>.sharecard{padding:20px}
.community-grid>.sharecard h3{margin:6px 0;font-size:20px;line-height:1.25}
.community-grid>.sharecard .sheettext{margin:0;font-size:15px;line-height:1.45}

/* 9. Entry cards (home, My Rally): heading, text and buttons no longer touch. */
section.panel.operations-entry h2{font-size:22px;line-height:1.25;letter-spacing:-.012em;margin:0 0 6px}
section.panel.operations-entry p{margin:0 0 16px}
.operations-entry h2+.actions,.operations-entry h2+.btn,.operations-entry h2+div{margin-top:16px}

@media (max-width:420px){
 .hostbar .actions>.btn{flex:1 1 calc(50% - 8px)}
 .livecourt>header b{font-size:20px}
}

/* Keep the short Place header on one line on narrow confirmation sheets. */
#sheet .placement-review th:first-child{white-space:nowrap}
