:root {
  --bg: #0c0e14; --card: #16181f; --line: #242833; --text: #f4f6fb; --muted: #8b93a7;
  --dim: #6d7688; --gold: #d4af37; --gold-ink: #0f172a; --green: #34d399; --teal: #2dd4bf; --amber: #fbbf24;
  --rose: #fb7185; --blue: #60a5fa; --violet: #c4b5fd; --red: #f87171; --purple: #d8b4fe; --yellow: #facc15;
  --lavender: #c4b5fd; --sky: #7dd3fc; --secondary: #222633;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; max-width: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.45 ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }
body { min-height: 100vh; overflow-x: clip; }
h1, h2, h3 { margin: 0; font-weight: 700; }
button, input { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 0 32px; height: 64px; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--card) 50%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(8px); width: 100%; max-width: 100%; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.trophy { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(212, 175, 55, .1); border: 1px solid rgba(212, 175, 55, .2); color: var(--gold); }
.trophy svg { display: block; }
.brand h1 { font-size: 18px; letter-spacing: -0.025em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand p { margin: -2px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.periods { display: flex; justify-content: center; gap: 0; background: rgba(34, 38, 51, .5); border: 0;
  border-radius: 8px; padding: 4px; width: max-content; max-width: 100%; margin: 0 auto; min-width: 0; }
.period-row { display: contents; }
.periods[hidden] { display: none; }
.periods button, .pop button, .btn { border: 0; background: none; cursor: pointer; }
.periods button { color: var(--muted); border-radius: 6px; padding: 6px 12px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.periods button:hover { color: var(--text); background: var(--secondary); }
.period-custom { display: inline-flex; align-items: center; gap: 6px; }
.cal-ico { width: 16px; height: 16px; flex: 0 0 auto; }
.periods button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); font-weight: 500; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.periods button[aria-pressed="true"]:hover { color: var(--gold-ink); background: var(--gold); }
.actions { display: flex; gap: 8px; align-items: center; min-width: 0; }
.btn { border: 1px solid #2e3444; background: #141820; border-radius: 8px; padding: 7px 12px; font-weight: 600; }
.btn.refresh { display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--secondary);
  border-radius: 8px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.btn.refresh:hover { background: color-mix(in srgb, var(--secondary) 80%, #000); }
.refresh-ico { display: block; flex: 0 0 auto; }
.btn.ghost { background: none; color: var(--muted); font-weight: 500; border-color: transparent; }
.btn:disabled { opacity: .6; }
.popover { position: fixed; z-index: 30; background: var(--card); border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px;
  padding: 0; width: min(680px, calc(100% - 16px)); max-width: calc(100% - 16px); max-height: calc(100vh - 16px); overflow: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45); color: var(--text); }
.popover h3 { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.pop-cal { display: flex; flex-direction: row; align-items: stretch; min-width: 0; }
.pop-presets { display: flex; flex-direction: column; gap: 4px; padding: 12px; margin: 0;
  border-right: 1px solid rgba(255, 255, 255, .08); border-bottom: 0; flex: 0 0 auto; }
.pop-presets button, .pop-apply { border: 0; background: transparent; border-radius: 6px; padding: 6px 10px; cursor: pointer;
  color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; }
.pop-presets button:hover { color: var(--text); background: var(--secondary); }
.pop-apply { background: var(--gold); color: var(--gold-ink); font-weight: 700; font-size: 12px; padding: 6px 12px; border-radius: 6px; }
.pop-apply:disabled { opacity: .4; cursor: default; }
.pop-cal-main { padding: 8px; min-width: 0; flex: 1 1 auto; }
.cal-months { display: flex; gap: 8px; }
.cal-month { min-width: 0; flex: 1 1 240px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 0 4px 6px; }
.cal-head strong { font-size: 14px; font-weight: 600; flex: 1; text-align: center; }
.cal-nav { width: 28px; height: 28px; border: 0; background: none; color: var(--muted); border-radius: 6px; cursor: pointer;
  display: grid; place-items: center; }
.cal-nav:hover { color: var(--text); background: var(--secondary); }
.cal-nav.spacer { visibility: hidden; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-dow, .cal-day { text-align: center; font-size: 12px; }
.cal-dow { color: var(--muted); font-weight: 500; padding: 4px 0; }
.cal-day { border: 1px solid transparent; background: none; color: var(--text); border-radius: 8px; height: 32px; cursor: pointer; font-weight: 500; }
.cal-day:hover { background: var(--secondary); }
.cal-day.out { color: rgba(139, 147, 167, .55); }
.cal-day.off { color: rgba(139, 147, 167, .35); cursor: default; }
.cal-day.off:hover { background: none; }
.cal-day.today { border-color: rgba(255, 255, 255, .7); }
.cal-day.in { background: rgba(212, 175, 55, .18); border-radius: 0; }
.cal-day.on, .cal-day.on:hover { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 6px; }
.cal-hint { color: var(--muted); font-size: 12px; min-width: 0; }
/* Jacob 2026-10-21: the Updated line stays put however many tabs there are. It has its own grid cell, level with the
   FIRST row of tabs, and the tab buttons wrap into more rows inside their own cell (never under or over it). */
.subbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tabs updated";
  align-items: start; column-gap: 16px; row-gap: 8px; padding: 24px 32px; min-width: 0; max-width: 100%; }
.tabs { grid-area: tabs; display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.tabs button { position: relative; background: rgba(34, 38, 51, .5); border: 1px solid transparent; color: var(--muted);
  border-radius: 12px; padding: 10px 20px; font-size: 14px; font-weight: 700; cursor: pointer; max-width: 100%; }
.tabs button:hover { color: var(--text); background: var(--secondary); }
.tabs button[aria-selected="true"] { color: var(--accent, var(--green));
  border-color: color-mix(in srgb, var(--accent, var(--green)) 30%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent, var(--green)) 20%, transparent), color-mix(in srgb, var(--accent, var(--green)) 12%, transparent));
  box-shadow: 0 8px 16px -6px color-mix(in srgb, var(--accent, var(--green)) 40%, transparent); }
.tab-dot { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent, var(--green)); animation: tab-pulse 1.6s ease-in-out infinite; }
@keyframes tab-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes goldPulse { 0%, 100% { box-shadow: 0 0 12px rgba(212, 175, 55, .3); } 50% { box-shadow: 0 0 24px rgba(212, 175, 55, .5); } }
@keyframes goldPulseIn { 0%, 100% { box-shadow: inset 0 0 12px rgba(212, 175, 55, .28); } 50% { box-shadow: inset 0 0 22px rgba(212, 175, 55, .5); } }
.updated { grid-area: updated; justify-self: end; align-self: start; display: flex; align-items: center;
  min-height: 42px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.updated.has-team-hint { flex-direction: column; align-items: flex-end; justify-content: center; }
.team-hint { display: block; max-width: 260px; white-space: normal; text-align: right; font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
main { padding: 0 32px 48px; display: grid; gap: 24px; max-width: 1440px; margin: 0 auto; width: 100%; min-width: 0; }
.loading, .soon-panel { color: var(--muted); }
.soon-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px 20px; text-align: center; }
.soon-panel strong { color: var(--text); display: block; font-size: 18px; margin-bottom: 6px; }
.tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 16px; min-width: 0; width: 100%; }
.tile { --accent: var(--teal); background: linear-gradient(to bottom right, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent) 5%, var(--bg)));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); border-radius: 12px;
  padding: 20px; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.tile .k { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; margin-bottom: 8px;
  color: var(--muted); font-size: 14px; font-weight: 500; line-height: 1.3; min-height: 2.6em; }
/* Jacob 2026-10-13: every big number starts on the same line as the first card's (titles get two lines' room) */
.tile .k span:first-child { min-width: 0; }
.tile .k span:last-child { font-size: 18px; flex: 0 0 auto; }
.tile .v { font-size: 36px; font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; color: var(--accent); }
.tile .sub, .tile .why, .side-line, .card-note, .footnote { color: var(--muted); font-size: 12px; }
.side-line { margin-top: 6px; font-size: 10px; letter-spacing: -0.02em; line-height: 1.2; }
.goal-meta, .show-line { display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 12px; }
.goal-meta { margin-top: 12px; margin-bottom: 4px; }
.show-line { margin-bottom: 2px; }
.side-line b.buy { color: var(--blue); font-weight: 650; }
.side-line b.sell { color: var(--purple); font-weight: 650; }
.tone-emerald { --accent: #34d399; background: linear-gradient(to bottom right, rgba(16, 185, 129, .15), rgba(5, 150, 105, .05)); border-color: rgba(16, 185, 129, .2); }
.tone-teal { --accent: #2dd4bf; background: linear-gradient(to bottom right, rgba(20, 184, 166, .15), rgba(13, 148, 136, .05)); border-color: rgba(20, 184, 166, .2); }
.tone-amber { --accent: #fbbf24; background: linear-gradient(to bottom right, rgba(245, 158, 11, .15), rgba(217, 119, 6, .05)); border-color: rgba(245, 158, 11, .2); }
.tone-gold { --accent: #facc15; background: linear-gradient(to bottom right, rgba(234, 179, 8, .15), rgba(202, 138, 4, .05)); border-color: rgba(234, 179, 8, .2); }
.tone-rose { --accent: #fb7185; background: linear-gradient(to bottom right, rgba(244, 63, 94, .15), rgba(225, 29, 72, .05)); border-color: rgba(244, 63, 94, .2); }
.split { display: grid; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .07); min-width: 0; }
.split-lab { font-size: 9.5px; letter-spacing: .05em; color: rgba(139, 147, 167, .7); font-weight: 600; text-transform: uppercase; margin-bottom: 2px; }
.split-row { display: flex; justify-content: space-between; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(255, 255, 255, .05); border-radius: 6px; padding: 3px 8px; font-size: 11px; min-width: 0; }
.split-row .pill { font-weight: 700; }
.split-row .num { color: #d5dbea; }
.side-buyer .pill { color: var(--blue); }
.side-seller .pill { color: var(--purple); }
.side-soi .pill { color: var(--muted); }
.type-vip .pill { color: var(--purple); }
.type-virtual .pill { color: var(--blue); }
.type-phone .pill { color: var(--yellow); }
.type-other .pill, .type-soi .pill { color: var(--dim); }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar { height: 6px; background: rgba(255, 255, 255, .05); border-radius: 99px; overflow: hidden; margin-top: 0; flex: 0 0 6px; width: 100%; min-width: 0; }
.bar-row .bar { margin-top: 0; }
.bar i { display: block; height: 100%; background: currentColor; border-radius: 99px; }
.tile .bar { color: var(--accent); }
.bar.tone-emerald, .tone-emerald .bar { color: var(--green); }
.bar.tone-amber { color: var(--amber); }
.bar.tone-rose { color: var(--rose); }
.panel { background: rgba(22, 24, 31, .3); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 14px 14px 10px;
  min-width: 0; max-width: 100%; overflow: hidden; }
.isa-board { padding: 0 0 12px; }
.isa-board h2 { font-size: 18px; margin: 0; padding: 16px 24px; border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: rgba(22, 24, 31, .5); }
.legacy { display: grid; gap: 16px; min-width: 0; max-width: 100%; }
.legacy .panel, .legacy .grid2, .legacy .tiles, .legacy .tscroll, .legacy .funnel, .legacy .chart,
.legacy .tile, .legacy .fstep, .legacy .swing { min-width: 0; max-width: 100%; }
.legacy .tiles { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.legacy .tile { min-height: 0; }
.legacy .tile .label { color: var(--muted); font-size: 13px; font-weight: 650; }
.legacy .tile .value { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-top: 4px; color: var(--text); }
.legacy .tone-green .value { color: var(--green); }
.legacy .tone-teal .value { color: var(--teal); }
.legacy .tone-amber .value { color: var(--amber); }
.legacy .tone-gold .value { color: var(--gold); }
.legacy .tone-blue .value { color: var(--blue); }
.legacy .tone-violet .value { color: var(--violet); }
.legacy .tone-red .value { color: var(--rose); }
.legacy .tile.soon { border-style: dashed; }
.legacy .tile.soon .value { font-size: 15px; color: var(--muted); font-weight: 700; }
.legacy .tile .sub, .legacy .tile .help, .legacy .lead, .legacy .psub, .legacy .legend, .legacy .fstep {
  overflow-wrap: anywhere; }
.legacy .panel h2 { font-size: 17px; margin-bottom: 8px; }
.legacy .panel .psub { color: var(--muted); font-size: 12.5px; margin: 4px 0 12px; }
.legacy .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.legacy .tscroll { overflow-x: auto; width: 100%; max-width: 100%; min-width: 0; }
.legacy table { width: max-content; min-width: 100%; border-collapse: collapse; }
.legacy th, .legacy td { text-align: left; white-space: nowrap; color: var(--text); border-top: 0;
  border-bottom: 1px solid #1c2030; padding: 8px 10px; font-variant-numeric: tabular-nums; }
.legacy th { color: var(--dim); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.legacy td.r, .legacy th.r { text-align: right; }
.legacy tr.total td { color: var(--muted); font-weight: 700; }
.legacy .notice { background: #1b1607; border: 1px solid #4a3a10; color: #f3dc9b; border-radius: 12px; padding: 10px 14px; }
.legacy .notice.info { background: #0c1a2c; border-color: #1d3c63; color: #b9d5f5; }
.legacy .funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.legacy .fstep { background: #12141c; border: 1px solid #2a2f3c; border-radius: 12px; padding: 12px; }
.legacy .fstep .k { color: var(--muted); font-size: 12px; }
.legacy .fstep .v { font-size: 22px; font-weight: 800; color: var(--text); }
.legacy .fstep .g, .legacy .fstep .rate { color: var(--muted); font-size: 12px; }
.legacy .fstep .rate { color: var(--gold); font-weight: 700; }
.legacy .chart { overflow: hidden; }
.legacy .chart svg { width: 100%; height: auto; display: block; }
.legacy .swing { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.legacy .swing > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.legacy .swing .amt { white-space: nowrap; font-weight: 800; }
.legacy .neg { color: var(--rose); }
.legacy .pos { color: var(--green); }
.legacy .status { font-weight: 700; white-space: nowrap; }
.legacy .s-on_track { color: var(--green); }
.legacy .s-close { color: var(--gold); }
.legacy .s-behind { color: var(--rose); }
.legacy .medal, .legacy .rank1 td:nth-child(2) { color: var(--gold); font-weight: 800; }
.legacy .fm-rule { border-top: 1px solid #1c2030; padding: 12px 0; }
.legacy .fm-rule h3 { font-size: 14.5px; display: flex; gap: 8px; }
.legacy .fm-rule a { color: var(--blue); }
.legacy .fm-lists-title { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  border-top: 1px solid #1c2030; padding-top: 12px; margin-top: 4px; }
.legacy .fm-list { border-top: 1px solid #1c2030; padding: 12px 0; min-width: 0; }
.legacy .fm-lists-title + .fm-list { border-top: 0; }
.legacy .fm-list h3 { font-size: 14.5px; display: flex; gap: 8px; }
.legacy .fm-list a { color: var(--blue); }
.legacy .fm-list p, .legacy .fm-list li { overflow-wrap: anywhere; }
.legacy .fm-list .fm-by { color: var(--muted); font-size: 12.5px; }
.legacy .fm-list li[hidden] { display: none; }
.legacy .fm-list a.fm-name, .fm-list a.fm-name { font-weight: 600; text-decoration: underline; display: inline-block; padding: 4px 0; }
.legacy .fm-more { margin-top: 8px; min-height: 40px; border: 1px solid #2e3444; background: #141820; border-radius: 8px;
  padding: 7px 12px; font-weight: 600; cursor: pointer; color: var(--text); max-width: 100%; }
.legacy .bar { height: 6px; background: #1a1e28; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.legacy .bar > i { display: block; height: 100%; background: var(--blue); }
.legacy .bar.gold > i { background: var(--gold); }
.legacy .bar.green > i { background: var(--green); }
.legacy .missing { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }
.legacy-foot { color: var(--dim); font-size: 12px; margin: 4px 2px 0; max-width: 100%; }
.panel h2 { font-size: 18px; margin-bottom: 10px; }
.scroller { overflow-x: auto; width: 100%; max-width: 100%; min-width: 0; border-radius: 12px; }
table.board { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 920px; }
th { text-align: center; font-size: 12px; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 12px 8px; white-space: normal; }
th.left, td.left { text-align: left; }
th.c-vip { color: rgba(216, 180, 254, .8); }
th.c-virtual { color: rgba(125, 211, 252, .8); }
th.c-phone { color: rgba(252, 211, 77, .8); }
td.c-vip { color: #d8b4fe; }
td.c-virtual { color: #7dd3fc; }
td.c-phone { color: #fcd34d; }
td { text-align: center; padding: 12px 8px; border-top: 1px solid rgba(255, 255, 255, .06); font-variant-numeric: tabular-nums; }
td.c-booked { color: #34d399; font-weight: 700; font-size: 18px; }
td.c-pending { color: #7dd3fc; font-weight: 700; font-size: 18px; }
td.c-closed { color: #fcd34d; font-weight: 700; font-size: 18px; }
td.c-sched { color: #c4b5fd; font-weight: 700; font-size: 18px; }
td.c-held { color: #2dd4bf; font-weight: 700; font-size: 18px; }
td.c-signed { color: #facc15; font-weight: 700; font-size: 18px; }
td.c-show { font-size: 18px; font-weight: 700; }
td.c-show.show-good { color: var(--green); font-weight: 700; }
td.c-show.show-mid { color: var(--amber); font-weight: 700; }
td.c-show.show-bad { color: var(--red); font-weight: 700; }
td.name { font-weight: 600; color: var(--text); text-align: left; }
td.rank { font-weight: 700; font-size: 14px; }
tr.rank-1 td.rank, tr.rank-2 td.rank, tr.rank-3 td.rank { font-size: 20px; }
td.rank, th.rank, td.name, th.name { position: sticky; z-index: 2; background: transparent; }
td.rank, th.rank { left: 0; min-width: 42px; }
td.name, th.name { left: 42px; box-shadow: none; }
table.board tbody tr:not(.total) td { line-height: 28px; }
tr.rank-1 { background: rgba(234, 179, 8, .03); animation: goldPulse 2s ease-in-out infinite; }
tr.rank-1 td, tr.rank-1 td.rank, tr.rank-1 td.name { background: transparent; box-shadow: none; border-top-color: transparent; }
tr.rank-1 td.rank { z-index: 4; }
tr.rank-1 td.name { color: #f0d060; }
tr.total td { color: var(--dim); font-weight: 700; border-top: 1px solid #2e3444; font-size: 12px; letter-spacing: .04em; }
tr.total td.left { text-transform: uppercase; }
tr.total td.rank, tr.total td.name { background: transparent; }
tr.total td.c-booked { color: var(--green); text-transform: none; letter-spacing: 0; }
tr.total td.c-vip { color: var(--purple); }
tr.total td.c-virtual { color: var(--blue); }
tr.total td.c-phone { color: var(--yellow); }
tr.total td.c-pending { color: var(--blue); }
tr.total td.c-closed { color: var(--amber); }
tr.total td.c-sched { color: var(--lavender); }
tr.total td.c-held { color: var(--teal); }
tr.total td.c-signed { color: var(--gold); }
tr.total td.c-show { text-transform: none; letter-spacing: 0; }
tr.total td.na { color: var(--dim); text-transform: none; letter-spacing: 0; }
td.na, .na { color: var(--dim); font-weight: 500; font-style: normal; }
td.fee-amber, .fee-amber { color: var(--amber); font-weight: 650; }
th.c-status, td.c-status, .st { white-space: normal; }
.st { font-weight: 600; font-size: 12px; display: inline-block; line-height: 1.2; text-align: center; max-width: 5.5rem; }
td.c-status { min-width: 5.5rem; }
.st-on_fire, .st-on_track { color: var(--green); }
.st-close { color: var(--gold); }
.st-behind { color: var(--amber); }
.st-needs_push { color: var(--red); }
.defs { color: #c5cad6; font-size: 12.5px; margin: 10px 2px 0; }
.defs b { color: var(--text); }
.footnote { margin: 6px 2px 0; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.isa-card { text-align: left; background: rgba(22, 24, 31, .3); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; padding: 16px;
  cursor: pointer; color: inherit; width: 100%; min-width: 0; }
.isa-card:hover, .isa-card:focus-visible { border-color: rgba(250, 204, 21, .5); background: rgba(255, 255, 255, .03); outline: none; }
.isa-card.rank-1 { border-color: rgba(234, 179, 8, .3); background: rgba(234, 179, 8, .03); box-shadow: none; }
.isa-card .who { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 8px; }
.isa-card.rank-1 .who { color: #f0d060; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 8px 0 0; text-align: center; }
.metrics b { display: block; font-size: 18px; font-weight: 700; }
.metrics b.m-booked { color: #34d399; }
.metrics b.m-pending { color: #7dd3fc; }
.metrics b.m-held { color: #2dd4bf; }
.metrics b.m-signed { color: #facc15; }
.metrics span { color: var(--muted); font-size: 10px; }
.hint { color: rgba(139, 147, 167, .7); font-size: 10px; text-align: center; margin: 8px 0 0;
  text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.card-note { font-size: 10px; color: rgba(139, 147, 167, .6); padding-top: 8px; margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, .08); }
.section-label { letter-spacing: .05em; color: var(--muted); font-size: 14px; font-weight: 600; margin: 0 2px 12px; text-transform: uppercase; }
.backdrop, .osa-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .70); backdrop-filter: blur(4px);
  z-index: 40; display: grid; place-items: center; padding: 24px 16px; overflow: auto; }
.modal, .osa-modal { width: min(1024px, 100%); max-width: 100%; max-height: min(860px, 92vh); overflow: auto;
  background: #12141a; border: 1px solid rgba(234, 179, 8, .25); border-radius: 16px; padding: 0; min-width: 0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.modal header, .osa-modal-h { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 16px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(234, 179, 8, .04); }
.modal header > div:first-child, .osa-modal-h > div:first-child { min-width: 0; flex: 1 1 auto; }
.modal h2, .osa-modal h3 { font-size: 16px; font-weight: 700; overflow-wrap: break-word; margin: 0; }
.modal .period, .osa-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.income { text-align: right; margin-left: auto; }
.income .lab { color: var(--muted); font-size: 10px; letter-spacing: .08em; font-weight: 650; text-transform: uppercase; }
.income .amt { color: #fde047; font-size: 20px; font-weight: 900; line-height: 1.15; }
.x, .osa-x, .g-x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 6px; line-height: 1; }
.sec { margin-top: 0; min-width: 0; border-top: 1px solid rgba(255, 255, 255, .06); }
.sec-h, .osa-dsec-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; padding: 10px 20px;
  background: rgba(255, 255, 255, .02); }
.sec-title, .osa-dsec-h strong { font-size: 14px; font-weight: 700; }
.sec-title.signed, .sec h3.signed { color: #facc15; }
.sec-title.pending, .sec h3.pending, .osa-dsec-h strong { color: #7dd3fc; }
.sec-title.closed, .sec h3.closed { color: #34d399; }
.sec-note, .osa-dsec-h > span { color: var(--muted); font-size: 11px; flex: 1 1 140px; font-weight: 400; }
.sec-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sec-total, .osa-dmeta { color: #fde047; font-size: 14px; font-weight: 700; white-space: nowrap; }
.sec-total.na, .sec-total.fee-lock { color: #fbbf24; font-weight: 650; font-size: 12px; }
.modal table, .osa-dtable, .goal-modal table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 14px; }
.modal th, .modal td, .osa-dtable th, .osa-dtable td, .goal-modal th, .goal-modal td {
  padding: 8px 8px; font-size: 14px; font-weight: 400; }
.modal th, .modal td { white-space: nowrap; }
.osa-dtable th, .osa-dtable td, .goal-modal th, .goal-modal td { white-space: normal; }
.modal th, .osa-dtable th, .goal-modal th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); font-weight: 650; padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.modal td.col-prop, .modal th.col-prop { padding-left: 20px; }
.modal td.col-fee, .modal th.col-fee { padding-right: 20px; text-align: right; }
.modal th.col-fee { color: #fde047; }
.modal td.col-client, .modal td.col-status, .modal td.col-date { color: var(--muted); }
.modal td.col-date, .modal th.col-date { text-align: right; }
/* Long addresses and client names wrap, so the date and fee columns always stay inside the card. */
.modal td.col-prop, .modal td.col-client { white-space: normal; overflow-wrap: anywhere; }
.modal tr.total td.total-label { text-align: right; white-space: normal; }
.modal a, .modal .pop-link, .osa-modal a, .goal-modal a, .pop-link {
  color: var(--text); font-weight: 400; text-decoration: none; overflow-wrap: anywhere; }
.modal a:hover, .pop-link:hover { color: #fde047; text-decoration: underline; }
.modal td.fee-gold, .modal .fee-gold, .modal tr.total td.col-fee { color: #fde047; font-weight: 800; }
.modal tr.total td, .modal tr.total td.left { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); font-weight: 650; }
.modal tr.total td.col-fee { font-size: 14px; font-weight: 900; color: #fde047; }
.fee-lock { color: #fbbf24; font-weight: 650; font-size: 12px; }
.note { color: var(--amber); font-size: 11px; margin: 0; padding: 8px 20px; }
.fresh { color: var(--muted); font-size: 11px; margin: 0; padding: 10px 20px; border-top: 1px solid rgba(255, 255, 255, .08); }
.empty { color: var(--muted); font-size: 12px; padding: 16px 20px; }
.q-card { text-align: left; cursor: pointer; }
.pop-open { border: 0; background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.q-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.q-card { background: var(--card); border: 1px solid #2a2440; border-radius: 16px; padding: 14px; min-width: 0; }
.q-card .v { font-size: 28px; font-weight: 800; color: var(--violet); }
.found { display: grid; gap: 8px; min-width: 0; }
.found a { color: var(--blue); overflow-wrap: anywhere; }
/* ISA Activity (Jacob 2026-10-21): two numbers in one tile. Stacked in a narrow tile, side by side when it is wide. */
.tile-activity { container-type: inline-size; text-align: left; color: inherit; font: inherit; cursor: pointer;
  width: 100%; }
.tile-activity:hover, .tile-activity:focus-visible { border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  outline: none; }
.act-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.act-half { min-width: 0; }
.act-lab { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.25; margin-bottom: 2px; }
.tile-activity .v { font-size: 30px; }
.act-dials .v { color: var(--sky); }
.act-half .sub { font-size: 10px; line-height: 1.3; margin-top: 2px; overflow-wrap: anywhere; }
.act-foot { color: var(--dim); font-size: 10px; line-height: 1.3; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .07); }
.tile-activity .hint { margin-top: 6px; }
@container (min-width: 240px) {
  .act-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.act-scroll { overflow-x: auto; width: 100%; max-width: 100%; min-width: 0; }
.act-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.act-table th, .act-table td { padding: 8px 8px; white-space: nowrap; text-align: right; }
.act-table th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650;
  border-bottom: 1px solid rgba(255, 255, 255, .08); white-space: normal; vertical-align: bottom; }
.act-table th.col-name, .act-table td.col-name { text-align: left; padding-left: 20px; white-space: normal; }
.act-table td.col-num:last-child, .act-table th.col-num:last-child { padding-right: 20px; }
.act-table td.c-dials { color: var(--sky); font-weight: 700; }
.act-table td.c-booked { color: var(--green); font-weight: 700; font-size: 14px; }
.act-table tr.total td { color: var(--muted); font-weight: 800; border-top: 1px solid #2e3444; }
.act-flag { display: block; color: var(--amber); font-size: 10px; font-weight: 500; }
.act-from { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }
.act-first { color: var(--amber); font-size: 10px; line-height: 1.3; margin-top: 4px; }
.act-first-note { color: var(--amber); }
.sec-title.activity { color: var(--sky); }
.act-note { color: var(--muted); font-size: 11px; margin: 0; padding: 4px 20px; }
.win-update {
  position: fixed; z-index: 10000; left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom));
  box-sizing: border-box; max-width: 620px; margin: 0 auto; padding: 10px 10px 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid #3f4a61; border-radius: 10px; background: #171b25; color: #f4f6fb;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45); font-size: 13px; line-height: 1.35;
}
.win-update[hidden] { display: none; }
.win-update button {
  flex: 0 0 auto; min-height: 44px; padding: 0 14px; border: 1px solid #6ee7b7; border-radius: 8px;
  background: #103c31; color: #d1fae5; font: inherit; font-weight: 800; cursor: pointer;
}
@media (max-width: 1279px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* 7 tiles in 4 (or 2) columns leave one cell free in the last row: the ISA Activity tile takes it */
  .tile-activity { grid-column: span 2; }
  .cards, .q-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "periods periods";
    height: auto; padding: 10px 16px 8px; gap: 8px; align-items: center; }
  .brand { grid-area: brand; }
  .actions { grid-area: actions; justify-self: end; }
  .periods { grid-area: periods; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 100%;
    margin: 0; background: transparent; border: 0; padding: 0; border-radius: 0; }
  .period-row { display: flex; width: 100%; background: rgba(34, 38, 51, .5); border: 0; border-radius: 8px; padding: 4px; }
  .period-row button { flex: 1 1 0; min-width: 0; padding: 6px 2px; font-size: 12px; white-space: nowrap; }
  .periods > .period-custom { width: 100%; justify-content: center; border: 0; background: rgba(34, 38, 51, .5); border-radius: 8px; padding: 10px 8px; }
  .btn.refresh { width: 40px; height: 40px; padding: 0; border-radius: 8px; position: relative; justify-content: center; }
  .refresh-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .subbar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 16px 16px 12px; }
  .updated { order: -1; display: block; min-height: 0; width: 100%; text-align: right; white-space: normal; }
  .updated:empty { display: none; }
  .updated.has-team-hint { align-items: stretch; }
  .team-hint { max-width: none; width: 100%; }
  .act-pair { grid-template-columns: minmax(0, 1fr); }
  .act-table { font-size: 12px; }
  .act-table th, .act-table td { padding: 6px 4px; }
  .act-table th { font-size: 9.5px; letter-spacing: .03em; }
  .act-table th.col-name, .act-table td.col-name { padding-left: 12px; max-width: 6.5rem; }
  .act-table td.col-num:last-child, .act-table th.col-num:last-child { padding-right: 12px; }
  .act-note { padding: 4px 12px; }
  .tabs button { padding: 8px 12px; font-size: 13px; }
  main { padding: 0 16px 36px; gap: 16px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cards, .q-grid { grid-template-columns: 1fr; }
  .tile .v { font-size: 30px; }
  .tile { min-height: 0; padding: 16px; }
  .pop-cal { flex-direction: column; }
  .pop-presets { flex-direction: row; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); overflow-x: auto; }
  .cal-months { flex-direction: column; }
  table.board thead { display: none; }
  td.rank, td.name { background: #0c0e14; }
  tr.rank-1 { animation-name: goldPulseIn; }  /* the pinned name column would cover a glow outside the row */
  tr.rank-1 td.rank, tr.rank-1 td.name { background: #131314; }
  td.name { white-space: normal; max-width: 6.5rem; }
  .backdrop, .osa-back { padding: 0; place-items: stretch; }
  .modal, .osa-modal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .modal .col-client, .modal .col-date { display: none; }
  .modal th, .modal td, .osa-dtable th, .osa-dtable td, .goal-modal th, .goal-modal td { white-space: normal; }
  .modal td.col-fee, .modal th.col-fee, .modal .fee-gold, .modal .fee-lock { white-space: nowrap; }
  .modal table, .osa-dtable, .goal-modal table { min-width: 0; }
  .panel { padding: 12px 10px 8px; }
  .legacy .tiles { grid-template-columns: 1fr 1fr; }
  .legacy .grid2 { grid-template-columns: 1fr; }
  .legacy .funnel { grid-template-columns: 1fr 1fr; }
  .legacy .tile .value { font-size: 26px; }
}

/* Jacob 11-20 (ask 1372): a read-only seat. The label, and no edit controls even before a tab redraws (cosmetic:
   the server refuses every write for this seat). */
.ro-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; color: var(--muted, #94a3b8); border: 1px solid currentColor; white-space: nowrap; }
body.win-ro .au-action button, body.win-ro .au-action input, body.win-ro .au-notes textarea,
body.win-ro .au-notes button, body.win-ro .contest-complete, body.win-ro .contest-del { display: none !important; }
body.win-ro .au-action select, body.win-ro .mkt-inputs input { pointer-events: none; }
