/* Crewlist: the crew list (browse), your reports, crew lead profile, top billing, earnings, account.
   Tokens and shared parts (.btn, .field, .mk, .eyebrow...) live in styles.css.
   Prefixes: pg- shared, cl- call-sheet lines, br- browse, rp- reports, cr- crew lead, st- top billing, ea- earnings, ac- account. */

/* ---------- shared: page heads with a double rule, like the top of a printed sheet ---------- */
.pg-head, .br-head, .rn-head, .hw-head, .bd-head { position: relative; margin: 6px 0 30px; padding-bottom: 22px; border-bottom: 4px double var(--frame); }
.pg-head h1, .br-head h1, .rn-head h1, .hw-head h1, .bd-head h1 { font-size: clamp(2.4rem, 9.4vw, 5rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.rn-head h1 { font-size: clamp(2rem, 7vw, 3.8rem); }
.pg-head .lede, .br-head .lede, .hw-head .lede, .bd-head .lede { margin: 14px 0 0; }
/* the marker swipe wipes in on load, once */
main h1 .mk::before, main h2 .mk::before { transform: skewX(-6deg) scaleX(1); animation: pg-swipe 0.62s 0.25s var(--ease) backwards; }
@keyframes pg-swipe { from { transform: skewX(-6deg) scaleX(0); } }
h1 em.mk, h2 em.mk { font-style: italic; }
.pg-section { margin: 52px 0 0; }
.pg-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-top: 12px; border-top: 4px double var(--frame); flex-wrap: wrap; }
.pg-section-head h2 { font-size: clamp(1.4rem, 3.4vw, 1.9rem); font-weight: 800; }
.pg-section-head .muted, .pg-head .muted { font: 400 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.pg-small { font: 400 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); margin: 0 0 10px; }

/* the node: a signal dot with a navy ring, marks live and top places */
.pg-node { position: relative; display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 1.5px var(--deep); }

/* square portrait tile: the agent's emblem on its role colour */
.pg-tile { flex: none; width: 52px; height: 52px; border-radius: 4px; background: var(--cat, var(--navy)); color: var(--tile-ink); display: grid; place-items: center; position: relative; overflow: hidden; }
.pg-tile svg { width: 78%; height: 78%; }
.pg-tile .glyph { width: 56%; height: 56%; }
.pg-tile-s { width: 40px; height: 40px; }
.pg-tile-person { background: var(--navy); font: 700 1.1rem var(--serif); }

/* status pills: Rolling / Wrapped / Stopped (and Draft) */
.pg-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 2px 9px; border: 1px solid currentColor; border-radius: 2px; font: 400 0.66rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }
.pg-done { color: var(--good); background: rgba(79, 201, 138, 0.1); }
.pg-failed { color: var(--bad); background: rgba(255, 107, 94, 0.1); }
.pg-draft { color: var(--muted); }
.pg-running { color: var(--navy); border-color: var(--navy); background: repeating-linear-gradient(-45deg, var(--signal) 0 6px, #ffe676 6px 12px); }

/* tables read like a printed sheet */
.pg-table-wrap { border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); background: var(--sheet); overflow: hidden; }
.pg-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.pg-table th { text-align: left; padding: 11px 14px; font: 400 0.68rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); border-bottom: 1px solid var(--frame); background: var(--paper-2); }
.pg-table td { padding: 13px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.pg-table tbody tr:last-child td { border-bottom: 0; }
.pg-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-table td a { font-weight: 650; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.pg-table td a:hover { text-decoration-color: var(--signal); text-decoration-thickness: 3px; }
.pg-table td small { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.pg-table tfoot td { border-top: 1px solid var(--frame); border-bottom: 0; background: var(--paper-2); font-weight: 650; }
.show-s { display: none !important; }

/* ---------- call-sheet lines (browse, crew lead profile) ---------- */
.cl-sheet { border-top: 3px solid var(--frame); }
.cl-colhead, .cl-row { display: grid; grid-template-columns: 62px minmax(0, 1fr) 150px 74px 200px; column-gap: 22px; align-items: start; }
.cl-colhead { padding: 10px 14px; border-bottom: 1px solid var(--frame); background: var(--paper-2); font: 400 0.68rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); }
.cl-colhead span:nth-child(4) { text-align: right; }
.cl-row { position: relative; padding: 18px 14px; border-bottom: 1px solid var(--rule-2); text-decoration: none; color: var(--navy); transition: background-color 0.2s, transform 0.25s var(--ease); }
.cl-row:hover, .cl-row:focus-visible { background: var(--sheet); outline-offset: -2px; }
.cl-no { position: relative; z-index: 0; justify-self: start; padding: 3px 7px; font: 400 0.82rem/1.2 var(--mono); letter-spacing: 0.04em; color: var(--ink-2); }
.cl-no::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--mark); border-radius: 2px 4px 2px 5px; transform: skewX(-8deg) scaleX(0); transform-origin: 0 50%; transition: transform 0.52s var(--ease); }
.cl-row:hover .cl-no::before, .cl-row:focus-visible .cl-no::before, .cl-row.is-pick .cl-no::before { transform: skewX(-8deg) scaleX(1); }
.cl-row:hover .cl-no, .cl-row.is-pick .cl-no { color: var(--navy); }
.cl-crew { display: flex; gap: 16px; align-items: flex-start; min-width: 0; }
.cl-art { flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 4px; background: var(--cat, var(--navy)); color: var(--tile-ink); overflow: hidden; }
.cl-art .emblem, .cl-art .glyph { width: 86%; height: 86%; }
.cl-art .glyph { width: 52%; height: 52%; }
.cl-text { display: grid; gap: 2px; min-width: 0; }
.cl-text strong { font: 700 1.4rem/1.1 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.cl-by { font: 400 0.72rem/1.3 var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.cl-tag { margin-top: 4px; color: var(--ink-2); font-size: 0.94rem; line-height: 1.45; text-wrap: pretty; max-width: 40rem; }
.cl-role { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; padding-top: 4px; font: 400 0.7rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); }
.cl-role i, .st-cat i, .br-tab-l i, .ag-role i { flex: none; width: 8px; height: 8px; background: var(--cat, var(--navy)); border-radius: 1px; }
.cl-pick { padding: 1px 6px; background: var(--signal); color: var(--on-signal); font-weight: 400; border-radius: 2px; letter-spacing: 0.08em; }
.cl-rate { padding-top: 2px; text-align: right; font: 400 1.4rem/1.1 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cl-rate small { margin-left: 3px; font-size: 0.7rem; letter-spacing: 0.04em; color: var(--muted); }
.cl-call { display: grid; gap: 3px; padding-top: 4px; min-width: 0; }
.cl-on { display: inline-flex; align-items: center; gap: 7px; font: 400 0.7rem/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--good); }
.cl-on i, .ag-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(24, 122, 79, 0.18); flex: none; }
.cl-sub { font-size: 0.84rem; color: var(--muted); overflow-wrap: anywhere; }
.cl-star { color: var(--star); font-weight: 650; }

/* ---------- browse: the crew list ---------- */
.br-head { margin-bottom: 26px; }
.br-bar { display: flex; gap: 10px; align-items: stretch; margin: 0 0 18px; }
.br-find { position: relative; flex: 1 1 auto; min-width: 0; }
.br-find svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
.br-find input { width: 100%; min-height: 48px; padding-left: 42px; }
.br-bar select { flex: none; min-height: 48px; width: auto; max-width: 11.5rem; }
.br-bar .btn { flex: none; min-height: 48px; }
.br-tabs { display: flex; flex-wrap: wrap; border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); margin: 0 0 14px; }
.br-tab { position: relative; z-index: 0; flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 16px; text-decoration: none; font: 400 0.74rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); border-left: 1px solid var(--rule-2); transition: color 0.2s; }
.br-tab:first-child { border-left: 0; }
.br-tab::before { content: ""; position: absolute; z-index: -1; inset: 8px 6px; background: var(--mark); border-radius: 2px 5px 3px 6px / 4px 3px 6px 3px; transform: skewX(-6deg) scaleX(0); transform-origin: 0 50%; transition: transform 0.52s var(--ease); }
.br-tab:hover { color: var(--navy); }
.br-tab:hover::before { transform: skewX(-6deg) scaleX(0.35); }
.br-tab.on { color: var(--navy); font-weight: 700; }
.br-tab.on::before, .br-tab.on:hover::before { transform: skewX(-6deg) scaleX(1); }
.br-tab-l { display: inline-flex; align-items: center; gap: 8px; }
.br-n { font-variant-numeric: tabular-nums; opacity: 0.7; }
.br-count { margin: 0 0 14px; font: 400 0.74rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); min-height: 1.4em; }
.br-count strong { color: var(--navy); font-weight: 400; }

/* ---------- your reports ---------- */
.rp-tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 34rem; margin: 22px 0 0; border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); }
.rp-tally > div { padding: 10px 14px 12px; }
.rp-tally > div + div { border-left: 1px solid var(--rule-2); }
.rp-tally dt, .cr-stats dt, .ag-facts dt { font: 400 0.66rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.rp-tally dd { margin: 4px 0 0; font: 700 1.8rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.rp-tally dd small { font: 400 0.7rem var(--mono); color: var(--muted); }
.rp-sheet { border-top: 3px solid var(--frame); }
.rp-colhead, .rp-row { grid-template-columns: 84px minmax(0, 1fr) 150px 80px 100px; }
.rp-list { list-style: none; margin: 0; padding: 0; }
.rp-row { display: grid; column-gap: 22px; align-items: center; padding: 14px; border-bottom: 1px solid var(--rule-2); text-decoration: none; color: var(--navy); transition: background-color 0.2s; }
.rp-row:hover, .rp-row:focus-visible { background: var(--sheet); }
.rp-no { font: 400 0.8rem var(--mono); letter-spacing: 0.06em; color: var(--ink-2); }
.rp-who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rp-name { display: grid; min-width: 0; }
.rp-name strong { font: 700 1.2rem/1.15 var(--serif); }
.rp-name small { color: var(--muted); font-size: 0.86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-st { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-shared { font: 400 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.rp-cost, .rp-when { font: 400 0.84rem var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rp-colhead span:nth-child(4), .rp-cost { text-align: right; }
.rp-colhead span:nth-child(5), .rp-when { text-align: right; }

/* ---------- crew lead profile ---------- */
.cr-card { margin: 6px 0 0; padding: 0 0 26px; border-bottom: 4px double var(--frame); }
.cr-role { margin-bottom: 18px; }
.cr-main { display: flex; gap: 22px; align-items: center; }
.cr-who { min-width: 0; }
.cr-who h1 { font-size: clamp(2.2rem, 7vw, 4.2rem); font-weight: 800; line-height: 1; overflow-wrap: anywhere; }
.cr-handle { margin: 10px 0 0; font: 400 0.8rem/1.4 var(--mono); letter-spacing: 0.03em; color: var(--muted); }
.bio { margin: 12px 0 0; max-width: 40rem; color: var(--ink-2); font-size: 1.04rem; text-wrap: pretty; }
.bio-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; max-width: 36rem; }
.bio-form input { flex: 1 1 220px; min-width: 0; }
.cr-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 26px 0 0; border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); }
.cr-stats > div { padding: 12px 16px 14px; }
.cr-stats > div + div { border-left: 1px solid var(--rule-2); }
.cr-stats dd { margin: 4px 0 0; font: 700 2rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }

/* ---------- top billing ---------- */
.st-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 34px; border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); }
.st-pod { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "no txt" "no val"; column-gap: 16px; align-content: start; padding: 18px 18px 20px; text-decoration: none; color: var(--navy); transition: background-color 0.2s; }
.st-pod + .st-pod { border-left: 1px solid var(--rule-2); }
.st-pod:hover { background: var(--sheet); }
.st-pod-no { grid-area: no; position: relative; z-index: 0; align-self: start; padding: 0 8px; font: 800 4.4rem/1 var(--serif); font-style: italic; letter-spacing: -0.03em; }
.pod-1 .st-pod-no::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; top: 24%; bottom: 8%; background: var(--mark); border-radius: 2px 5px 3px 6px; transform: skewX(-8deg); animation: pg-swipe 0.62s 0.4s var(--ease) backwards; transform-origin: 0 50%; }
.st-pod-txt { grid-area: txt; display: grid; gap: 6px; justify-items: start; min-width: 0; padding-top: 8px; }
.st-pod-txt strong { font: 700 1.45rem/1.1 var(--serif); overflow-wrap: anywhere; }
.st-pod-val { grid-area: val; margin-top: 10px; font: 400 1.05rem var(--mono); font-variant-numeric: tabular-nums; }
.st-pod-val small, .st-val small { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-left: 4px; }
.st-seg { display: none; }
.st-boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 40px; align-items: start; }
.st-board { min-width: 0; }
.st-top-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0 10px; border-top: 4px double var(--frame); }
.st-top-row h2 { font-size: 1.35rem; font-weight: 800; }
.st-col { font: 400 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.st-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--frame); }
.st-rows li { display: grid; grid-template-columns: 34px 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.st-rank { font: 400 0.8rem var(--mono); color: var(--muted); }
.st-rank.st-top { position: relative; z-index: 0; color: var(--navy); font-weight: 700; justify-self: start; padding: 1px 5px; }
.st-rank.st-top::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--mark); border-radius: 2px 4px 2px 4px; transform: skewX(-8deg); }
.st-name { min-width: 0; display: grid; gap: 3px; }
.st-name a { text-decoration: none; }
.st-name strong { font: 700 1.1rem/1.15 var(--serif); overflow-wrap: anywhere; }
.st-name a:hover strong { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.st-name small { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font: 400 0.68rem/1.4 var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.st-cat { display: inline-flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }
.st-by { text-decoration: none; }
a.st-by:hover { color: var(--navy); text-decoration: underline; }
.st-val { text-align: right; font: 400 1.05rem var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-empty { margin: 0; padding: 18px 0; color: var(--muted); border-bottom: 1px solid var(--rule); }
.st-fresh-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--frame); }
.st-fresh-list li { border-bottom: 1px solid var(--rule); min-width: 0; }
.st-fresh-list a { display: flex; align-items: center; gap: 12px; padding: 12px 0; text-decoration: none; }
.st-fresh-list a:hover strong { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.st-fresh-list strong { display: block; font: 700 1.1rem/1.15 var(--serif); }
.st-fresh-list small { display: block; font: 400 0.7rem/1.4 var(--mono); color: var(--muted); letter-spacing: 0.04em; }

/* ---------- earnings ---------- */
.ea-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 30px; border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); }
.ea-stat { padding: 16px 20px 18px; min-width: 0; }
.ea-stat + .ea-stat { border-left: 1px solid var(--rule-2); }
.ea-tab { display: inline-block; font: 400 0.68rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.ea-main .ea-tab { position: relative; z-index: 0; color: var(--navy); padding: 1px 6px; margin-left: -6px; }
.ea-main .ea-tab::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--mark); border-radius: 2px 4px 2px 4px; transform: skewX(-8deg); }
.ea-big { margin: 8px 0 6px; font: 800 clamp(2.4rem, 5vw, 3.6rem)/1 var(--serif); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ea-big small { margin-left: 6px; font: 400 0.8rem var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.ea-stat .muted { margin: 0; font-size: 0.88rem; }
.ea-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.ea-chart { margin: 0; padding: 18px 20px 14px; background: var(--sheet); border: 1px solid var(--frame); position: relative; }
.ea-chart figcaption { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font: 700 1.1rem var(--serif); }
.ea-chart figcaption .muted { font: 400 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.ea-chart svg { width: 100%; height: auto; overflow: visible; }
.ea-base { stroke: var(--navy); stroke-width: 1.5; }
.ea-bar rect { fill: var(--deep2); }
.ea-bar:hover rect, .ea-now rect { fill: var(--navy-2); }
.ea-zero { fill: var(--rule-2); }
.ea-node { fill: var(--signal); stroke: var(--navy); stroke-width: 2; }
.ea-val { font: 400 14px var(--mono); fill: var(--navy); }
.ea-axis { display: flex; justify-content: space-between; margin-top: 8px; font: 400 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.ea-chart-empty { margin: 0; color: var(--muted); font-size: 0.92rem; }
.ea-chart:has(.ea-chart-empty) { padding-block: 14px; align-self: start; }
.ea-chart:has(.ea-chart-empty) figcaption { margin-bottom: 8px; }
.js .ea-chart.reveal .ea-bar { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform 0.6s var(--ease); transition-delay: calc(var(--k, 0) * 35ms + 150ms); }
.js .ea-chart.reveal.in .ea-bar { transform: none; }
.ea-move { padding: 16px 18px 18px; background: var(--sheet); border: 1px solid var(--frame); }
.ea-move label { display: block; margin: 12px 0 8px; font-weight: 650; }
.ea-move .row { display: flex; gap: 8px; }
.ea-move .row input { flex: 1; min-width: 0; font-family: var(--mono); }
.ea-hint { margin: 8px 0 0; font-size: 0.86rem; }

/* ---------- account ---------- */
.ac-top { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); }
.ac-bal { padding: 18px 22px 20px; min-width: 0; }
.ac-bal + .ac-bal { border-left: 1px solid var(--rule-2); }
.ac-bal.ac-main .ea-tab { position: relative; z-index: 0; color: var(--navy); padding: 1px 6px; margin-left: -6px; }
.ac-bal.ac-main .ea-tab::before { content: ""; position: absolute; z-index: -1; inset: 0; background: var(--mark); border-radius: 2px 4px 2px 4px; transform: skewX(-8deg); }
.ac-big { margin: 8px 0 8px; font: 800 clamp(2.6rem, 6vw, 4rem)/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ac-big small { margin-left: 6px; font: 400 0.82rem var(--mono); letter-spacing: 0.06em; color: var(--muted); }
.ac-bal p { margin: 0; }
.ac-note { margin: 18px 0 0; padding: 12px 14px; background: var(--paper-2); border-left: 4px solid var(--signal); font-size: 0.94rem; }
.ac-note strong { display: block; font: 400 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2); margin-bottom: 2px; }
.ac-kind { font-weight: 650; }
.ac-ledger td.pos { color: var(--good); }
.ac-ledger td.neg { color: var(--navy); }
.ac-signout { padding-top: 14px; border-top: 1px solid var(--rule-2); }

/* ---------- small screens: tables become stacked rows ---------- */
@media (max-width: 1040px) {
  .cl-colhead, .cl-row { grid-template-columns: 52px minmax(0, 1fr) 128px 64px; }
  .cl-colhead span:nth-child(5) { display: none; }
  .cl-call { grid-column: 2 / -1; grid-row: 2; flex-direction: row; display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline; padding-top: 0; }
  .st-fresh-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ea-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .st-boards { grid-template-columns: minmax(0, 1fr); }
  .st-podium { grid-template-columns: minmax(0, 1fr); }
  .st-pod + .st-pod { border-left: 0; border-top: 1px solid var(--rule-2); }
  .st-pod { padding: 12px 4px 14px; align-items: center; grid-template-areas: "no txt val"; grid-template-columns: auto minmax(0, 1fr) auto; }
  .st-pod-no { font-size: 3.2rem; min-width: 3.2rem; text-align: center; }
  .st-pod-txt { padding-top: 0; }
  .st-pod-txt strong { font-size: 1.25rem; }
  .st-pod-val { margin-top: 0; text-align: right; }
}
@media (max-width: 760px) {
  .hide-s { display: none !important; }
  .show-s { display: block !important; }
  .js .st-seg { display: flex; margin: 0 0 18px; border-top: 3px solid var(--frame); border-bottom: 1px solid var(--frame); }
  .js .st-seg button { position: relative; z-index: 0; flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 2px; border: 0; background: transparent; font: 400 0.7rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); cursor: pointer; border-left: 1px solid var(--rule-2); }
  .js .st-seg button:first-child { border-left: 0; }
  .js .st-seg button::before { content: ""; position: absolute; z-index: -1; inset: 8px 4px; background: var(--mark); border-radius: 2px 5px 3px 6px / 4px 3px 6px 3px; transform: skewX(-6deg) scaleX(0); transform-origin: 0 50%; transition: transform 0.45s var(--ease); }
  .js .st-seg button[aria-selected="true"] { color: var(--navy); font-weight: 700; }
  .js .st-seg button[aria-selected="true"]::before { transform: skewX(-6deg) scaleX(1); }
  .js .st-board { display: none; }
  .js .st-board.on { display: block; }
  .pg-table td, .pg-table th { padding-inline: 10px; }
}
@media (max-width: 700px) {
  .br-bar { flex-wrap: wrap; }
  .br-find { flex: 1 1 100%; }
  .br-bar select { flex: 1 1 0; max-width: none; }
  .br-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .br-tab { padding: 0 10px; border-left: 0; border-top: 1px solid var(--rule-2); }
  .br-tab:nth-child(-n + 3) { border-top: 0; }
  .br-tab:not(:nth-child(3n + 1)) { border-left: 1px solid var(--rule-2); }
  .br-tab { font-size: 0.68rem; letter-spacing: 0.06em; }
  /* call-sheet lines stack: number + rate on top, crew, then role and call */
  .cl-colhead, .rp-colhead { display: none; }
  .cl-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "no role rate" "crew crew crew" "call call call"; row-gap: 10px; column-gap: 12px; padding: 16px 4px; align-items: center; }
  .cl-no { grid-area: no; }
  .cl-role { grid-area: role; padding-top: 0; }
  .cl-rate { grid-area: rate; padding-top: 0; }
  .cl-crew { grid-area: crew; gap: 14px; }
  .cl-call { grid-area: call; grid-column: auto; grid-row: auto; padding: 8px 0 0; border-top: 1px dotted var(--rule-2); }
  .cl-text strong { font-size: 1.35rem; }
  .rp-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who st" "who cost" "no when"; row-gap: 4px; column-gap: 12px; padding: 14px 4px; align-items: center; }
  .rp-who { grid-area: who; }
  .rp-st { grid-area: st; justify-content: flex-end; }
  .rp-cost { grid-area: cost; }
  .rp-no { grid-area: no; }
  .rp-when { grid-area: when; }
  .rp-who + .rp-st { }
  .rp-name small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .cr-main { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ea-stats, .ac-top { grid-template-columns: minmax(0, 1fr); }
  .ea-stat + .ea-stat, .ac-bal + .ac-bal { border-left: 0; border-top: 1px solid var(--rule-2); }
  .ea-stat, .ac-bal { padding: 14px 4px 16px; }
  .st-fresh-list { grid-template-columns: minmax(0, 1fr); }
  .cr-stats > div, .rp-tally > div { padding-inline: 10px; }
}
@media (max-width: 340px) {
  .rp-tally dd { font-size: 1.5rem; }
  .cr-stats dd { font-size: 1.6rem; }
  .st-rows li { grid-template-columns: 28px 36px minmax(0, 1fr) auto; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  main h1 .mk::before, main h2 .mk::before, .pod-1 .st-pod-no::before { animation: none; }
  .cl-no::before, .br-tab::before, .st-seg button::before { transition: none; }
  .js .ea-chart.reveal .ea-bar { transform: none; transition: none; }
}

/* refinements */
.rn-head h1 { line-height: 1.12; }
.cr-card { border-bottom: 0; padding-bottom: 6px; }
.pg-head:has(.rp-tally) { border-bottom: 0; padding-bottom: 0; }
.cl-rate { white-space: nowrap; }
@media (max-width: 700px) {
  .cl-role { justify-content: flex-end; text-align: right; min-width: 0; }
  .cl-no { justify-self: start; }
}
main h1 em.mk, main h2 em.mk { display: inline-block; line-height: 1.02; padding: 0 0.05em; }
main h1 em.mk::before, main h2 em.mk::before { top: 6%; bottom: 4%; }
