:root {
  /* Winner Circle Traders brand board: Ink Black base, Win Orange as the single accent, white text.
     Green / red / blue / amber mean check-in states only, never decoration. */
  --ink-0: #0a0a0a;      /* page */
  --ink-1: #131211;      /* card (warm, leans toward the orange) */
  --ink-2: #1b1917;      /* raised, inputs */
  --ink-3: #272421;      /* tracks, pressed */
  --line: #2b2825;
  --text: #f5f3f0;
  --muted: #a29b93;      /* 6.8:1 on cards */
  --brand: #ff7a00;
  --on-brand: #0a0a0a;
  --brand-soft: rgba(255, 122, 0, 0.14);
  --ok: #2fbf71;   --ok-soft: rgba(47, 191, 113, 0.16);
  --bad: #ef4444;  --bad-soft: rgba(239, 68, 68, 0.16);
  --none: #60a5fa; --none-soft: rgba(96, 165, 250, 0.16);
  --warn: #facc15; --warn-soft: rgba(250, 204, 21, 0.14);
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --font-display: Montserrat, 'Segoe UI', system-ui, sans-serif;   /* headings, numbers, labels, buttons */
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* older names, kept so every existing rule keeps working */
  --bg: var(--ink-0);
  --surface: var(--ink-1);
  --surface-2: var(--ink-2);
  --surface-3: var(--ink-3);
  --border: var(--line);
  --green: var(--ok);   --green-soft: var(--ok-soft);
  --red: var(--bad);    --red-soft: var(--bad-soft);
  --amber: var(--warn); --amber-soft: var(--warn-soft);
  --blue: var(--none);  --blue-soft: var(--none-soft);
  --radius: var(--r-lg);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
h1, h2, h3 { margin: 0 0 6px; line-height: 1.2; font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
.eyebrow, .stat-label, .stat-value, .btn, .badge, .pill, .seg button, .brand b, .topnav a, .bottomnav a, .month-nav strong, .rules-row b, .lb .rank, .table th { font-family: var(--font-display); }
.stat-value, .rules-row b, .table .num, .lb .rank { font-variant-numeric: tabular-nums; }
p { margin: 0 0 10px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
blockquote { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid var(--border); color: var(--text); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 14px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.row-start { display: flex; justify-content: flex-start; gap: 10px; margin-top: 10px; }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wrap { flex-wrap: wrap; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px 20px; background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.lockup b { display: block; font: 700 15px/1.05 var(--font-display); letter-spacing: 0.02em; text-transform: uppercase; }
.lockup small { display: block; font: 600 9px/1.6 var(--font-display); letter-spacing: 0.62em; text-transform: uppercase; color: var(--brand); }
.brand.big { justify-content: center; gap: 14px; }
.brand.big .lockup b { font-size: 24px; }
.brand.big .lockup small { font-size: 12px; letter-spacing: 0.7em; }
.logo { width: 38px; height: 38px; flex: none; display: block; }
.brand.big .logo { width: 64px; height: 64px; }
.auth-program { text-align: center; color: var(--muted); font: 600 12px var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 14px; }
.topnav { display: flex; gap: 4px; flex: 1; }
.topnav a { color: var(--muted); padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 14px; }
.topnav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.topnav a.on { color: var(--text); background: var(--surface-2); }
.avatar { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.avatar:hover { text-decoration: none; border-color: var(--brand); }
.demo-bar { background: var(--brand-soft); color: var(--brand); text-align: center; font-size: 13px; padding: 6px 12px; }
#view { max-width: 1080px; margin: 0 auto; padding: 20px 20px 12px; }
.bottomnav, .subnav, .more-menu { display: none; }

@media (max-width: 760px) {
  .topnav { display: none; }
  .topbar { padding: 10px 16px; }
  #view { padding: 16px 16px 24px; }
  .bottomnav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: rgba(19, 18, 17, 0.97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); padding: 4px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottomnav a, .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 5px; min-height: 52px; color: var(--muted); font: 600 11px var(--font-display); border-radius: var(--r-md); background: none; border: 0; cursor: pointer; }
  .bottomnav svg { width: 22px; height: 22px; }
  .bottomnav span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
  .bottomnav .lock { width: 10px; height: 10px; }
  .bottomnav .on { color: var(--brand); }
  .bottomnav a:hover { text-decoration: none; }
  .more-menu:not([hidden]) {
    display: grid; position: fixed; z-index: 21; right: 8px; bottom: calc(66px + env(safe-area-inset-bottom)); min-width: 210px;
    background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px; box-shadow: var(--shadow);
  }
  .more-menu a { color: var(--text); font-weight: 600; font-size: 15px; padding: 12px 14px; border-radius: var(--r-md); }
  .more-menu a:hover { background: var(--ink-3); text-decoration: none; }
  .subnav:not([hidden]) { display: block; padding: 14px 16px 0; }
  .subnav .seg { margin: 0; }
  .subnav + #view { padding-top: 12px; }
  .hide-sm { display: none; }
  h1 { font-size: 23px; }
}

.loading { padding: 40px; text-align: center; color: var(--muted); }
.loading.full { min-height: 100vh; display: grid; place-items: center; }

/* ---------- surfaces ---------- */
.hero { margin: 6px 0 18px; }
.hero p { margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; display: block; color: var(--text); }
.card.flush { padding: 0; overflow: hidden; }
a.card:hover { text-decoration: none; border-color: var(--surface-3); }
.two-col, .three-col { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two-col > .card, .three-col > .card { margin-bottom: 0; }
.two-col, .three-col { margin-bottom: 16px; }
@media (max-width: 900px) { .three-col { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.tone-gold .stat-value { color: var(--brand); }
.stat.tone-green .stat-value { color: var(--green); }
.stat.tone-red .stat-value { color: var(--red); }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; }
  .stat-value { font-size: 24px; }
}

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.badge.tone-green { background: var(--green-soft); color: var(--green); }
.badge.tone-gold { background: var(--brand-soft); color: var(--brand); }
.badge.tone-red { background: var(--red-soft); color: var(--red); }
.badge.tone-amber { background: var(--amber-soft); color: var(--amber); }
.badge.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-red-text { color: var(--red); }
.tone-green-text { color: var(--green); }
.tone-amber-text { color: var(--amber); }

.bar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin: 10px 0 8px; }
.bar > div { height: 100%; background: var(--green); border-radius: 999px; }
.bar.bar-gold > div { background: var(--brand); }
.bar.bar-red > div { background: var(--red); }
.bar-list { list-style: none; margin: 8px 0; padding: 0; }
.bar-list li { display: grid; grid-template-columns: 1fr 90px 26px; gap: 10px; align-items: center; font-size: 14px; padding: 3px 0; }
.bar-list .bar { margin: 0; }
.bar-list b { text-align: right; }

/* ---------- banners ---------- */
.banner { border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 12px; border: 1px solid; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; row-gap: 2px; font-size: 13px; }
.banner strong { font: 700 12px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; }
.banner span { flex-basis: 100%; font-size: 13.5px; color: var(--text); }
.banner-red { background: var(--red-soft); border-color: rgba(239, 68, 68, 0.4); color: var(--red); }
.banner-amber { background: var(--amber-soft); border-color: rgba(250, 204, 21, 0.4); color: var(--amber); }
.banner-green { background: var(--green-soft); border-color: rgba(34, 197, 94, 0.3); color: var(--green); }
.banner-calm { background: var(--surface); border-color: var(--border); color: var(--muted); }

/* ---------- check-in ---------- */
.date-strip { display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto; padding-bottom: 2px; }
.date-chip { flex: 1; min-width: 74px; background: var(--surface); border: 1px solid var(--border); color: var(--muted); border-radius: var(--r-md); padding: 9px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: inherit; font-size: 12px; }
.date-chip strong { color: var(--text); font: 700 13.5px var(--font-display); }
.day-ring { width: 30px; height: 30px; margin-top: 2px; fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.day-ring circle { stroke: var(--ink-3); }
.ring-check circle, .ring-check path { stroke: var(--ok); }
.ring-x circle, .ring-x path { stroke: var(--bad); }
.ring-no_entry circle, .ring-no_entry path { stroke: var(--none); }

/* Today's score: one ring for discipline, streak and check-in rate beside it */
.score-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: center; }
.score-ring { position: relative; width: 132px; height: 132px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 10; }
.score-ring .track { stroke: var(--ink-3); }
.score-ring .val { stroke: var(--ok); stroke-linecap: round; }
.score-ring > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score-ring b { font: 800 24px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.score-ring span { font: 700 10px var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }
.score-ring small { font-size: 11px; color: var(--muted); }
.score-kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.score-kpis .stat { background: none; border: 0; padding: 0; }
.score-kpis .stat-value { font-size: 24px; }
.date-chip.on { border-color: var(--brand); background: var(--brand-soft); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.dot-check { background: var(--green); }
.dot-no_entry { background: var(--blue); }
.dot-x { background: var(--red); }
.dot-missed { background: transparent; border: 2px solid var(--red); }
.dot-today { background: transparent; border: 2px solid var(--brand); }
.dot-blank { background: var(--surface-3); }
.day-dots { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.day-dots { gap: 8px; }
.day-dots .dot { width: 22px; height: 22px; background: transparent; border: 3px solid var(--ink-3); }
.day-dots .dot-check { border-color: var(--ok); background: var(--ok-soft); }
.day-dots .dot-x { border-color: var(--bad); background: var(--bad-soft); }
.day-dots .dot-no_entry { border-color: var(--none); background: var(--none-soft); }
.day-dots .dot-missed { border: 2px dashed rgba(239, 68, 68, 0.6); }
.day-dots .dot-today { border-color: var(--brand); }

.checkin-card h3 { margin-bottom: 14px; }
.mark-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mark-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 124px; padding: 12px 8px; border-radius: 14px; cursor: pointer;
  background: var(--surface-2); border: 2px solid var(--border); color: var(--text);
  font: inherit; font-weight: 700; font-size: 14px; text-align: center; transition: transform 0.08s, border-color 0.15s, background 0.15s;
}
.mark-btn:active { transform: scale(0.97); }
.mark-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.mark-btn { --c: var(--muted); }
.m-check { --c: var(--ok); }
.m-x { --c: var(--bad); }
/* The check-in buttons are rings, like the logo: tapping one draws its ring closed */
.mark-ring { width: 58px; height: 58px; fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.mark-ring .trk { stroke: var(--ink-3); }
.mark-ring .arc { stroke: var(--c); stroke-dasharray: 170; stroke-dashoffset: 170; transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 0.55s cubic-bezier(0.22, 1, 0.36, 1); }
.mark-ring path { stroke: var(--c); stroke-width: 5; opacity: 0.55; transition: opacity 0.2s; }
.mark-btn.on .arc { stroke-dashoffset: 0; }
.mark-btn.on .mark-ring path { opacity: 1; }
.mark-btn:hover:not(:disabled) { border-color: var(--c); }
.m-check.on { border-color: var(--green); background: var(--green-soft); }
.done-head { display: flex; align-items: flex-start; gap: 12px; }
.done-head > div { min-width: 0; }
.day-ring.done-ring { width: 44px; height: 44px; margin: 0; flex: none; }
/* the day you just saved: its ring draws closed, then the mark pops in */
.day-ring.draw circle { stroke-dasharray: 88; animation: ring-draw 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; transform: rotate(-90deg); transform-origin: center; }
.day-ring.draw path { animation: mark-pop 0.35s 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; transform-origin: center; }
@keyframes ring-draw { from { stroke-dashoffset: 88; } to { stroke-dashoffset: 0; } }
@keyframes mark-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .mark-ring .arc, .mark-ring path { transition: none; }
  .day-ring.draw circle, .day-ring.draw path { animation: none; }
}
.m-x.on { border-color: var(--red); background: var(--red-soft); }
.m-no_entry.on { border-color: var(--blue); background: var(--blue-soft); }
.mark-detail { margin-top: 16px; }
.done-state { padding: 4px 0; }
.field-label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 8px; }
.field-label:first-child { margin-top: 0; }
.req { color: var(--red); font-size: 11px; font-weight: 700; text-transform: uppercase; margin-left: 6px; }
.hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.hint.warn { color: var(--amber); }
.warn-text { color: var(--amber); }
.proof-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 12px; background: var(--surface-2); }
.proof-box .field-label:first-child { margin-top: 0; }
.proof-box .form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.proof-thumb { max-width: 220px; border-radius: 8px; cursor: zoom-in; display: block; margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chip { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--bg); font-weight: 600; }
.pill { display: inline-block; padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.pill-check { background: var(--green-soft); color: var(--green); }
.pill-x { background: var(--red-soft); color: var(--red); }
.pill-no_entry { background: var(--blue-soft); color: var(--blue); }
.pill-blank { background: var(--surface-2); color: var(--muted); }
@media (max-width: 420px) {
  .mark-btn { min-height: 112px; font-size: 13px; }
}

/* ---------- challenge ---------- */
.challenge-card h3 { margin: 0; }
.challenge-card.compact { margin-top: 0; }
.rules-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }
.rules-row div { background: var(--surface-2); border-radius: 10px; padding: 10px; text-align: center; }
.rules-row b { display: block; font-size: 20px; }
.rules-row span { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .rules-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- calendar grid ---------- */
.month-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 14px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 20px; cursor: pointer; }
.icon-btn:hover { border-color: var(--brand); }
.grid-cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gc-head { font-size: 12px; color: var(--muted); text-align: center; font-weight: 600; padding-bottom: 2px; }
.gc-cell { position: relative; min-height: 62px; background: var(--surface-2); border-radius: 10px; padding: 6px 8px; border: 2px solid transparent; overflow: hidden; }
.gc-empty { background: transparent; }
.gc-day { font-size: 12px; color: var(--muted); font-weight: 600; }
.gc-mark { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 900; padding-top: 8px; }
.gc-check { background: var(--green-soft); }
.gc-check .gc-mark { color: var(--green); }
.gc-x { background: var(--red-soft); }
.gc-x .gc-mark { color: var(--red); }
.gc-no_entry { background: var(--blue-soft); }
.gc-no_entry .gc-mark { color: var(--blue); }
.gc-missed { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); }
.gc-notrade { border-color: rgba(239, 68, 68, 0.5); }
.gc-news { border-color: rgba(250, 204, 21, 0.5); }
.gc-off { opacity: 0.45; }
.gc-today { box-shadow: 0 0 0 2px var(--brand); }
.gc-notrade-fill { background: var(--red-soft); }
.gc-news-fill { background: var(--amber-soft); }
.gc-ok-fill { background: var(--green-soft); }
.gc-src { position: absolute; top: 5px; right: 6px; font-size: 9px; font-weight: 800; letter-spacing: 0.04em; color: var(--brand); background: var(--brand-soft); border-radius: 4px; padding: 1px 4px; }
.gc-src.static { position: static; }
.ff-bar { margin-bottom: 12px; }
.gc-nonews-fill { background: repeating-linear-gradient(135deg, rgba(239, 68, 68, 0.10), rgba(239, 68, 68, 0.10) 6px, transparent 6px, transparent 12px); }
.gc-nonews-fill .gc-label { color: var(--muted); }
.sw-ok-fill { background: var(--green-soft); border: 1px solid var(--green); }
.sw-nonews-fill { background: repeating-linear-gradient(135deg, rgba(239, 68, 68, 0.35), rgba(239, 68, 68, 0.35) 3px, transparent 3px, transparent 6px); border: 1px solid rgba(239, 68, 68, 0.5); }
.gc-label { display: block; font-size: 11px; line-height: 1.25; margin-top: 3px; color: var(--text); }
.clickable { cursor: pointer; }
.gc-cell.clickable:hover { border-color: var(--brand); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; background: var(--surface-2); }
.sw-check { background: var(--green); }
.sw-no_entry { background: var(--blue); }
.sw-x { background: var(--red); }
.sw-blank { background: repeating-linear-gradient(135deg, var(--surface-3), var(--surface-3) 3px, var(--surface) 3px, var(--surface) 6px); }
.sw-notrade { border: 2px solid var(--red); background: transparent; }
.sw-notrade-fill { background: var(--red-soft); border: 1px solid var(--red); }
.sw-news-fill { background: var(--amber-soft); border: 1px solid var(--amber); }
.sw-off { opacity: 0.45; }
@media (max-width: 560px) {
  .gc-cell { min-height: 50px; padding: 4px 5px; }
  .gc-mark { font-size: 18px; }
  .gc-label { font-size: 9.5px; }
}

/* ---------- ring moments: countdown, streak, challenge ---------- */
.countdown, .ch-top { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 18px; align-items: center; }
.countdown h3 { margin: 2px 0 6px; }
.countdown .score-ring span, .ch-top .score-ring span { letter-spacing: 0.08em; }
.ch-top .score-ring .val { stroke: var(--brand); }
.ch-hero.is-failed .score-ring .val { stroke: var(--bad); }
.ch-top .score-ring b small { font-size: 14px; color: var(--muted); }
.ch-msg p { margin: 8px 0 0; }
.ch-hero .rules-row { margin-top: 18px; }
.streak-burst { display: flex; align-items: center; gap: 16px; border-color: rgba(47, 191, 113, 0.5); background: radial-gradient(circle at 40px 50%, rgba(47, 191, 113, 0.22), transparent 140px), var(--surface); }
.streak-burst h3 { font-size: 20px; margin: 2px 0; }
.streak-burst p { margin: 0; }
.day-ring.burst-ring { width: 56px; height: 56px; margin: 0; flex: none; }
@media (prefers-reduced-motion: no-preference) {
  .streak-burst { animation: burst-in 0.5s 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
}
@keyframes burst-in { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@media (max-width: 420px) {
  .countdown, .ch-top, .score-card { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; }
  .countdown .score-ring, .ch-top .score-ring, .score-card .score-ring { width: 112px; height: 112px; }
  .score-ring b { font-size: 21px; }
}

/* ---------- My rules: each limit is a tile with a big number ---------- */
[data-month-form] .form-row label { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px 10px; font: 700 11px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
[data-month-form] .form-row label:focus-within { border-color: var(--brand); }
[data-month-form] .form-row .input { background: transparent; border: 0; padding: 2px 0 0; font: 800 26px var(--font-display); color: var(--text); box-shadow: none; text-transform: none; }
[data-month-form] .form-row .input::placeholder { color: rgba(162, 155, 147, 0.45); }
[data-month-form] .form-row .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
@media (max-width: 560px) { [data-month-form] .form-row { grid-template-columns: 1fr 1fr; } }
.rule-list { list-style: none; padding: 0; counter-reset: rule; display: grid; gap: 8px; }
.rule-list li { counter-increment: rule; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: center; padding: 0; }
.rule-list li::before { content: counter(rule); width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--brand); display: grid; place-items: center; font: 700 12px var(--font-display); color: var(--brand); }

/* ---------- ring calendar (student Progress, coach's student page) ---------- */
.ring-cal .grid-cal { gap: 10px 6px; }
.ring-cal .gc-cell { min-height: 0; width: 100%; max-width: 56px; aspect-ratio: 1; justify-self: center; padding: 0; border-radius: 50%; display: grid; place-items: center; overflow: visible; background: var(--ink-2); border: 3px solid transparent; }
.ring-cal .gc-cell.gc-empty { background: transparent; }
.ring-cal .gc-day { font: 700 14px var(--font-display); color: var(--text); }
.ring-cal .gc-mark { inset: auto -3px -3px auto; width: 20px; height: 20px; padding: 0; border-radius: 50%; background: var(--ink-1); font-size: 12px; }
.ring-cal .gc-cell.gc-notrade, .ring-cal .gc-cell.gc-news { border-color: transparent; }
.ring-cal .gc-notrade::after, .ring-cal .gc-news::after { content: ''; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--bad); }
.ring-cal .gc-news::after { background: var(--warn); }
.ring-cal .gc-cell.gc-check { background: var(--ok-soft); border-color: var(--ok); }
.ring-cal .gc-cell.gc-x { background: var(--bad-soft); border-color: var(--bad); }
.ring-cal .gc-cell.gc-no_entry { background: var(--none-soft); border-color: var(--none); }
.ring-cal .gc-cell.gc-missed { background: transparent; border: 2px dashed rgba(239, 68, 68, 0.55); }
.ring-cal .gc-cell.gc-today { box-shadow: 0 0 0 2px var(--ink-1), 0 0 0 4px var(--brand); }
.ring-cal .gc-coach { inset: -3px auto auto -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad); font-size: 0; }
.ring-cal .sw { border-radius: 50%; }
.ring-cal .sw-check { background: var(--ok-soft); border: 2px solid var(--ok); }
.ring-cal .sw-x { background: var(--bad-soft); border: 2px solid var(--bad); }
.ring-cal .sw-blank { background: transparent; border: 2px dashed rgba(239, 68, 68, 0.55); }
.ring-cal .sw-notrade { width: 8px; height: 8px; border: 0; background: var(--bad); }

/* ---------- slim trade rows (tap opens the full card) ---------- */
.trade-rows { display: grid; gap: 6px; margin-top: 8px; }
.trade-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; color: var(--text); font: inherit; cursor: pointer; }
.trade-row:hover { border-color: var(--brand); }
.trade-row .dir { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); font: 700 16px var(--font-display); }
.tr-main { min-width: 0; }
.tr-main b { display: block; font: 700 14px var(--font-display); }
.tr-main small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade-row .r { font: 800 15px var(--font-display); font-variant-numeric: tabular-nums; }
.trade-row .r.pos { color: var(--ok); }
.trade-row .r.neg { color: var(--bad); }

/* ---------- Ranks podium ---------- */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; margin: 4px 0 16px; }
.pod { --pod: var(--brand); display: grid; justify-items: center; gap: 5px; text-align: center; min-width: 0; }
.pod-2 { --pod: #cbd5e1; }
.pod-3 { --pod: #d39a6a; }
.pod .ini { width: 56px; height: 56px; font-size: 16px; box-shadow: 0 0 0 3px var(--ink-0), 0 0 0 6px var(--pod); margin-bottom: 6px; }
.pod-1 .ini { width: 72px; height: 72px; font-size: 20px; }
.pod.me .ini { background: var(--brand); color: var(--on-brand); }
.pod b { font: 700 13px var(--font-display); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod-pct { font: 800 16px var(--font-display); font-variant-numeric: tabular-nums; }
.pod-step { width: 100%; height: 38px; display: grid; place-items: center; border-radius: 12px 12px 0 0; background: linear-gradient(var(--ink-2), var(--ink-1)); border: 1px solid var(--line); border-bottom: 0; color: var(--pod); font: 800 18px var(--font-display); }
.pod-1 .pod-step { height: 70px; }
.pod-2 .pod-step { height: 52px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .name { font-weight: 600; }
.table tr.clickable:hover td { background: var(--surface-2); }
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--text); }
.lb .rank { font-weight: 800; color: var(--muted); width: 48px; text-align: center; }
/* top three get a ring, like the logo: orange, silver, bronze */
.lb tr.top1 .rank, .lb tr.top2 .rank, .lb tr.top3 .rank { color: var(--text); }
.lb tr.top1 .rank { background-image: radial-gradient(circle at center, transparent 12px, var(--brand) 12.5px, var(--brand) 14.5px, transparent 15px); }
.lb tr.top2 .rank { background-image: radial-gradient(circle at center, transparent 12px, #cbd5e1 12.5px, #cbd5e1 14.5px, transparent 15px); }
.lb tr.top3 .rank { background-image: radial-gradient(circle at center, transparent 12px, #d39a6a 12.5px, #d39a6a 14.5px, transparent 15px); }
.lb tr.me td { background: var(--brand-soft); }
.lb tr.me td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ini { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-3); color: var(--text); font: 700 12px var(--font-display); }
.lb tr.me .ini { background: var(--brand); color: var(--on-brand); }
.you { font: 700 10px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin-left: 4px; }
.my-rank { text-align: center; color: var(--muted); margin: -4px 0 12px; }
.my-rank b { font: 800 20px var(--font-display); color: var(--brand); }
.part { display: flex; flex-direction: column; min-width: 80px; font-size: 13px; }
.part .bar { margin: 4px 0 0; }
@media (max-width: 760px) {
  .table th, .table td { padding: 10px; }
  /* wide coach tables scroll sideways inside their card; the first column stays put */
  .table-wrap .table th:first-child, .table-wrap .table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); white-space: nowrap; }
  .review-card { padding: 14px; margin-bottom: 12px; }
}

/* ---------- lists ---------- */
.list-row { display: flex; padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.list-row:last-child { border-bottom: 0; }
a.list-row:hover { text-decoration: none; background: var(--surface-2); margin: 0 -8px; padding: 9px 8px; border-radius: 8px; }
.note-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.note-row:last-child { border-bottom: 0; }
.back { display: inline-block; margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }

/* ---------- forms & buttons ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.input { width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { resize: vertical; margin-top: 10px; }
.form textarea.input { margin-top: 0; }
.input.slim { width: auto; padding: 8px 10px; font-size: 14px; }
.input.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.input[type=file] { padding: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.input[type=file]::file-selector-button { font: 700 13px var(--font-display); color: var(--text); background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin-right: 10px; cursor: pointer; }
.input[type=file]:hover::file-selector-button { border-color: var(--brand); }
@media (max-width: 560px) {
  /* Library filters: one swipeable row instead of three stacked rows */
  .toolbar:has([data-f]) { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .toolbar:has([data-f]) > * { flex: none; }
}
label.check { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 500 !important; font-size: 14px; margin-top: 10px; }
label.check input { width: 18px; height: 18px; accent-color: var(--brand); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; min-height: 42px; text-decoration: none; }
.btn:hover { text-decoration: none; }
@media (max-width: 560px) { .btn { padding: 9px 14px; min-height: 40px; font-size: 13.5px; } }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: var(--bg); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.ghost:hover:not(:disabled) { border-color: var(--muted); }
.btn.danger { background: var(--red); color: #fff; }
.btn.ghost.danger { background: transparent; color: var(--red); border-color: rgba(239, 68, 68, 0.4); }
.btn.block { width: 100%; }
.btn.small { padding: 6px 12px; min-height: 32px; font-size: 13px; }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 4px; }
.link:hover { color: var(--brand); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.seg { scrollbar-width: none; display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 14px; max-width: 100%; overflow-x: auto; }
.seg.wrap { flex-wrap: wrap; }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; }
.seg button { background: transparent; border: 0; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface-3); color: var(--text); }
.seg a { display: inline-flex; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font: 600 14px var(--font-display); padding: 8px 14px; border-radius: 9px; white-space: nowrap; }
.seg.full a { flex: 1; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--surface-3); color: var(--text); }
.seg .lock { width: 12px; height: 12px; }

/* ---------- modal & toast ---------- */
.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(560px, calc(100vw - 24px)); width: 100%; }
.modal::backdrop { background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.modal-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); max-height: calc(100vh - 40px); overflow-y: auto; }
.modal-card h3 { padding-right: 30px; margin-bottom: 12px; }
/* a trade opened from a list shows big screenshots and the full thought process */
.modal .trade-card { grid-template-columns: 1fr; }
.modal .trade-thumbs { flex-direction: row; }
.modal .trade-thumbs figure { flex: 1; min-width: 0; }
.modal .trade-thumb, .modal .thumb-gone { width: 100%; height: 150px; }
.modal .thoughts { -webkit-line-clamp: unset; }
@media (max-width: 560px) {
  /* popups become bottom sheets on phones */
  .modal { margin: auto 0 0; max-width: 100vw; }
  .modal-card { border-radius: 20px 20px 0 0; border-bottom: 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); max-height: 88vh; }
  .modal[open] .modal-card { animation: sheet-up 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .modal[open] .modal-card { animation: none; } }
.modal-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); border: 0; color: var(--muted); font-size: 20px; cursor: pointer; }
.confirm-msg { font-size: 15px; margin: 8px 30px 0 0; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; transition: 0.25s; z-index: 100; background: var(--surface-3); color: var(--text); padding: 12px 18px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); border-left: 4px solid var(--green); }
.toast.toast-err { border-left-color: var(--red); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at top, rgba(255, 122, 0, 0.14), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: var(--shadow); }
.auth-card .seg { margin: 18px 0; }
.auth-tag { color: var(--text); font: 700 18px var(--font-display); margin: 22px 0 0; text-align: center; text-wrap: balance; }
.notice { background: var(--brand-soft); color: var(--brand); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; }
.demo-users { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-users .eyebrow { grid-column: 1 / -1; }
.demo-user { text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; color: var(--text); font: inherit; cursor: pointer; }
.demo-user:hover { border-color: var(--brand); }
.demo-user b { display: block; font-size: 13px; }
.demo-user span { font-size: 11px; color: var(--muted); }

/* ---------- trade posts & rules ---------- */
.trade-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.trade-card { display: grid; grid-template-columns: 112px 1fr; gap: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-top: 10px; }
.trade-list .trade-card { margin-top: 0; }
.trade-thumbs { display: flex; flex-direction: column; gap: 6px; }
.trade-thumbs figure { margin: 0; }
.thumb-gone { width: 112px; min-height: 70px; display: grid; place-items: center; text-align: center; padding: 6px; border: 1px dashed var(--border); border-radius: 8px; font-size: 10.5px; line-height: 1.3; color: var(--muted); }
.trade-thumbs figcaption { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }
.trade-thumb { width: 112px; height: 70px; object-fit: cover; border-radius: 8px; background: var(--surface-3); cursor: zoom-in; display: block; }
.trade-body { min-width: 0; }
.trade-body .r { font-weight: 800; font-variant-numeric: tabular-nums; }
.trade-body .r.pos { color: var(--green); }
.trade-body .r.neg { color: var(--red); }
.thoughts { font-size: 13.5px; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.trade-card:hover .thoughts { -webkit-line-clamp: unset; }
.trade-date { margin-top: 12px; }
.danger-text { color: var(--red); }
.preview { max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--border); object-fit: contain; align-self: flex-start; cursor: zoom-in; }
.full-img { display: block; max-width: 100%; border-radius: 10px; margin-top: 30px; }
.modal:has(.full-img) { max-width: min(1100px, calc(100vw - 24px)); }
.checklist { display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border-radius: 12px; padding: 4px 12px 10px; }
.checklist label.check { margin-top: 6px; }
.banner span + span { margin-top: 0; }
.flags { margin: 6px 0 0; padding-left: 18px; color: var(--red); font-size: 13px; }
.coach-flag { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
.coach-flag.bad { background: var(--red-soft); color: var(--red); }
.coach-flag.good { background: var(--green-soft); color: var(--green); }
.gc-coach { position: absolute; bottom: 3px; left: 0; right: 0; text-align: center; font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--red); }
.rules-cta { border-color: rgba(255, 122, 0, 0.5); background: var(--brand-soft); padding: 12px 16px; margin-bottom: 12px; }
.rules-cta h3 { font-size: 15px; margin: 2px 0 2px; }
.rules-cta h3::after { content: ' →'; color: var(--brand); }
.rules-cta p { margin: 0; }

/* ---------- challenge awards & prizes ---------- */
.prize-card { border-color: rgba(255, 122, 0, 0.6); background: linear-gradient(135deg, var(--brand-soft), var(--surface) 60%); }
.prize-card.done { border-color: rgba(34, 197, 94, 0.5); background: var(--green-soft); }
.winners-card { border-color: rgba(255, 122, 0, 0.4); }
.award-list { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: award; }
.award-list li { counter-increment: award; display: grid; grid-template-columns: 26px 1fr auto; column-gap: 8px; align-items: baseline; padding: 7px 8px; border-radius: 8px; }
.award-list li::before { content: counter(award); font-weight: 800; color: var(--muted); }
.award-list li:first-child::before { content: '🥇'; }
.award-list li > .muted.small { grid-column: 2 / 4; }
.award-list li.me { background: var(--brand-soft); }
.team-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr 48px; gap: 12px; align-items: center; padding: 6px 0; }
.team-row .bar { margin: 0; height: 12px; }
.team-row b:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.prize-tag { display: inline-block; margin: 2px 0 8px; padding: 4px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 13px; font-weight: 600; }
.prize-tag.inline { display: block; width: fit-content; margin: 4px 0 0; font-size: 12px; padding: 2px 8px; }
.prize-group { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.prize-group .form-row + .form-row { margin-top: 6px; }
.chip-check { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; margin-top: 0 !important; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }

/* ---------- how to win ---------- */
.how-to-win summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.how-to-win summary::-webkit-details-marker { display: none; }
.how-to-win summary h3 { margin: 0; }
.how-to-win h4 { margin: 18px 0 6px; font-size: 14px; color: var(--brand); }
.how-to-win ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.how-to-win a { color: var(--brand); }

/* ---------- sponsors ---------- */
.site-foot { max-width: 1080px; margin: 0 auto; padding: 8px 20px 110px; }
.sponsors { text-align: center; }
.sponsors-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; }
.sponsors-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sponsor { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 6px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; text-decoration: none; }
a.sponsor:hover { border-color: var(--brand); }
.sponsor img { height: 24px; width: auto; max-width: 150px; display: block; }
.sponsor:has(img) { width: 200px; min-height: 52px; flex-direction: column; gap: 8px; padding: 12px 16px; }
.sponsor-logo { display: flex; align-items: center; justify-content: center; height: 34px; }
.sponsor-codes { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sponsor-codes b { color: var(--brand); font-weight: 800; letter-spacing: 0.03em; }
.sponsor-card .sponsor { background: var(--surface-2); }
.sponsors.on-auth { margin-top: 18px; width: 100%; max-width: 420px; }
.auth:has(.on-auth) { align-content: center; }
/* Challenge shows the sponsors in the page, so the footer copy is skipped there */
body:has(#view .sponsors) .site-foot { display: none; }
body:has(#view .sponsors) #view { padding-bottom: 110px; }
@media (max-width: 560px) { .rules-cta p { display: none; } }
@media (max-width: 560px) {
  .site-foot .sponsors-row, .sponsor-card .sponsors-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .site-foot .sponsor, .sponsor-card .sponsor { width: auto; min-height: 0; padding: 10px 6px; gap: 6px; }
  .site-foot .sponsor img, .sponsor-card .sponsor img { width: auto; max-width: 100%; height: 18px !important; }
  .site-foot .sponsor-logo, .sponsor-card .sponsor-logo { height: 22px; }
  .site-foot .sponsor-codes, .sponsor-card .sponsor-codes { font-size: 10.5px; line-height: 1.3; text-align: center; }
}
.rule-list { margin: 14px 0 0; }

details.rb { margin-top: 12px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
details.rb summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
details.rb[open] summary { margin-bottom: 10px; }
.review-card .banner { margin: 10px 0 0; }
.review-actions { justify-content: flex-end; }
@media (max-width: 560px) {
  /* thumbnails stay in a slim left column so a month of trades doesn't run to thousands of pixels */
  .trade-card { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 8px; }
  .trade-thumb, .thumb-gone { width: 76px; height: 50px; min-height: 0; }
  .thumb-gone { font-size: 9px; }
  .thoughts { -webkit-line-clamp: 3; }
}

/* ---------- certificate ---------- */
.certificate { background: #ffffff; color: #1a1a1a; border-radius: 6px; padding: 18px; margin-top: 14px; }
.cert-inner { border: 3px double #ff7a00; padding: 40px 32px 48px; text-align: center; }
.cert-logo { width: 72px; height: 72px; border-radius: 16px; margin: 0 auto 10px; display: block; }
.cert-inner .eyebrow { color: #d96500; font-size: 14px; }
.cert-inner h2 { font-size: 34px; font-family: Georgia, serif; margin: 10px 0 20px; }
.cert-inner .muted { color: #666; }
.cert-name { font-family: Georgia, serif; font-size: 40px; font-style: italic; color: #c25600; margin: 10px 0 18px; border-bottom: 1px solid #ffc48f; display: inline-block; padding: 0 30px 6px; }
.cert-quote { margin-top: 28px; font-family: Georgia, serif; font-style: italic; color: #444; }
@media (max-width: 560px) { .cert-inner { padding: 28px 14px; } .cert-name { font-size: 28px; } .cert-inner h2 { font-size: 24px; } }
@media print {
  .topbar, .bottomnav, .demo-bar, .no-print { display: none !important; }
  body { background: #fff; }
  #view { padding: 0; max-width: none; }
  .certificate { margin: 0; }
}

/* ---------- spaces: Community | Dashboard switch in the top bar ---------- */
.spaces { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--ink-1); border: 1px solid var(--line); flex: none; }
.spaces a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font: 600 13px var(--font-display); }
.spaces a:hover { color: var(--text); text-decoration: none; }
.spaces a.on { background: var(--ink-3); color: var(--text); }
@media (max-width: 560px) {
  .topbar { gap: 10px; }
  .topbar .lockup { display: none; }
  .spaces a { padding: 6px 12px; }
}

/* ---------- Community space: full height, its own navigation ---------- */
body.space-community .topnav, body.space-community .bottomnav, body.space-community .site-foot, body.space-community .subnav { display: none !important; }
body.space-community #app { height: 100dvh; display: flex; flex-direction: column; }
body.space-community #view { flex: 1; min-height: 0; max-width: none; padding: 0; width: 100%; }
.cm { height: 100%; display: grid; grid-template-columns: 264px minmax(0, 1fr) 232px; }

.cm-side { background: var(--ink-1); border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 10px 24px; }
.cm-side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 12px; }
.cm-side-head b { font: 800 15px var(--font-display); letter-spacing: 0.02em; }
.cm-promo { margin: 0 4px 14px; padding: 12px; border-radius: var(--r-md); border: 1px solid rgba(255, 122, 0, 0.35); background: radial-gradient(circle at 0 0, rgba(255, 122, 0, 0.22), transparent 70%), var(--ink-2); }
.cm-promo p { font-size: 13px; margin: 4px 0 10px; }
.cm-cat { margin-top: 10px; }
.cm-cat-head { display: flex; align-items: center; gap: 4px; width: 100%; background: none; border: 0; padding: 6px; color: var(--muted); font: 700 11px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-align: left; }
.cm-cat-head:hover { color: var(--text); }
.cm-cat-head .chev { display: inline-block; transition: transform 0.15s; }
.cm-cat.shut .chev { transform: rotate(-90deg); }
.cm-cat.shut ul { display: none; }
.cm-cat ul { list-style: none; margin: 0; padding: 0; }
.cm-ch { display: flex; align-items: center; gap: 8px; padding: 6px 8px; margin: 1px 0; border-radius: var(--r-sm); color: var(--muted); font-size: 14.5px; }
.cm-ch:hover { background: var(--ink-2); color: var(--text); text-decoration: none; }
.cm-ch.on { background: var(--ink-3); color: var(--text); }
.cm-ch.unread { color: var(--text); font-weight: 700; }
.cm-ch-icon { width: 16px; text-align: center; opacity: 0.7; flex: none; }
.cm-ch-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text); flex: none; }
.cm-count { background: var(--bad); color: #fff; font: 700 11px var(--font-display); border-radius: 999px; padding: 1px 6px; flex: none; }
.cm-key { font-size: 11px; opacity: 0.6; flex: none; }

.cm-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cm-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.cm-title { flex: 1; min-width: 0; }
.cm-title h1 { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-title h1 span { color: var(--muted); font-weight: 600; }
.cm-title p { margin: 0; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 0 14px; overscroll-behavior: contain; }
.cm-start { padding: 28px 16px 10px; }
.cm-start-ring { width: 64px; height: 64px; border-radius: 50%; border: 4px solid var(--brand); display: grid; place-items: center; font-size: 26px; margin-bottom: 12px; }
.cm-start h2 { font-size: 22px; }
.cm-day { display: flex; align-items: center; gap: 10px; margin: 14px 16px 6px; color: var(--muted); font: 600 11.5px var(--font-display); }
.cm-day::before, .cm-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.cm-msg { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; padding: 8px 16px 4px; }
.cm-msg.grouped { padding-top: 1px; }
.cm-msg.grouped .cm-content { grid-column: 2; }
.cm-msg:hover { background: rgba(255, 255, 255, 0.02); }
.cm-msg.everyone { background: rgba(255, 122, 0, 0.06); box-shadow: inset 3px 0 0 var(--brand); }
.cm-replyref { grid-column: 1 / -1; justify-self: start; background: none; border: 0; padding: 0 0 4px 52px; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; text-align: left; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-replyref:hover { color: var(--text); }
.cm-replyref b { color: var(--text); font-weight: 600; }
.cm-av { width: 40px; height: 40px; border-radius: 50%; background: var(--ink-3); display: grid; place-items: center; font: 700 13px var(--font-display); color: var(--text); flex: none; }
.cm-av.coach { background: var(--brand); color: var(--on-brand); box-shadow: 0 0 0 2px var(--ink-0), 0 0 0 4px var(--brand); }
.cm-content { min-width: 0; }
.cm-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cm-meta b { font: 700 14.5px var(--font-display); }
.cm-meta time { color: var(--muted); font-size: 11.5px; }
.cm-badge { font: 700 10px var(--font-display); letter-spacing: 0.06em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: var(--ink-3); color: var(--muted); }
.cm-badge.coach { background: var(--brand-soft); color: var(--brand); }
.cm-pinned { font-size: 11px; }
.cm-text { font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-text a { text-decoration: underline; }
.cm-text.deleted { color: var(--muted); font-style: italic; }
.cm-edited { color: var(--muted); font-size: 11px; }
.cm-everyone { background: var(--brand-soft); color: var(--brand); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.cm-img, .cm-chart { display: block; max-width: min(420px, 100%); max-height: 320px; border-radius: 10px; margin-top: 6px; border: 1px solid var(--line); cursor: zoom-in; white-space: normal; }
.cm-reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cm-reacts:empty { display: none; }
.cm-react { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.cm-react span { font: 700 12px var(--font-display); color: var(--muted); }
.cm-react.mine { border-color: var(--brand); background: var(--brand-soft); }
.cm-react.mine span { color: var(--brand); }
.cm-react.big { font-size: 24px; padding: 8px 12px; }
.cm-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.cm-actions { position: absolute; top: -14px; right: 16px; display: none; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px; z-index: 2; box-shadow: var(--shadow); }
.cm-actions button { width: 32px; height: 30px; background: none; border: 0; border-radius: 6px; cursor: pointer; color: var(--text); font-size: 15px; }
.cm-actions button:hover { background: var(--ink-3); }
.cm-msg:hover .cm-actions, .cm-msg.show-actions .cm-actions, .cm-msg:focus-within .cm-actions { display: flex; }

.cm-composer { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ink-0); }
.cm-compose-row { display: flex; gap: 8px; align-items: flex-end; }
.cm-compose-row textarea.input { margin: 0; min-height: 44px; resize: none; line-height: 1.45; }
.cm-attach { width: 44px; height: 44px; display: grid; place-items: center; font-size: 22px; flex: none; cursor: pointer; }
.cm-send { min-height: 44px; flex: none; }
.cm-replying, .cm-picked { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cm-replying[hidden], .cm-picked[hidden] { display: none; }
.cm-picked img { height: 64px; border-radius: 8px; border: 1px solid var(--line); }
.cm-everyone-opt { font-size: 13px; margin-top: 8px !important; }
.cm-readonly { padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; text-align: center; }

.cm-members { border-left: 1px solid var(--line); background: var(--ink-1); overflow-y: auto; padding: 8px 12px 24px; }
.cm-mgroup-head { color: var(--muted); font: 700 11px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; margin: 14px 0 6px; }
.cm-member { display: flex; align-items: center; gap: 10px; padding: 4px 6px; font-size: 14px; border-radius: var(--r-sm); }
.cm-member .cm-av { width: 30px; height: 30px; font-size: 11px; }
.cm-member .cm-av.coach { box-shadow: 0 0 0 2px var(--ink-1), 0 0 0 3.5px var(--brand); }
.modal .cm-members-list { max-height: 60vh; overflow-y: auto; }
.cm-panel { margin: auto; text-align: center; padding: 40px 20px; max-width: 440px; display: grid; justify-items: center; gap: 10px; }
.cm-panel-icon { width: 76px; height: 76px; border-radius: 50%; border: 4px solid var(--brand); display: grid; place-items: center; font-size: 32px; }
.cm-page { margin: 20px; }
.cm-page-text { white-space: pre-wrap; line-height: 1.6; }
.cm-pin { border-bottom: 1px solid var(--line); padding: 10px 0; }
.cm-pin:last-child { border-bottom: 0; }
.cm-only-phone { display: none; }
.cm-scrim { display: none; }
.cm-members-btn { display: none; }

@media (max-width: 1199px) {
  .cm { grid-template-columns: 264px minmax(0, 1fr); }
  .cm-members { display: none; }
  .cm-members-btn { display: inline-block; }
}
@media (max-width: 900px) {
  .cm { grid-template-columns: minmax(0, 1fr); }
  .cm-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: min(300px, 86vw); padding-top: calc(14px + env(safe-area-inset-top)); transform: translateX(-102%); transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); box-shadow: var(--shadow); }
  .cm.side-open .cm-side { transform: none; }
  .cm.side-open .cm-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgba(0, 0, 0, 0.55); }
  .cm-only-phone { display: inline-grid; place-items: center; }
  .cm-msg { padding-inline: 12px; }
  .cm-actions { right: 10px; }
  .cm-composer { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) { .cm-side { transition: none; } }

/* ---------- Community phase 2: moderation, settings, firm cards ---------- */
.cm-team { margin: 0 0 6px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.cm-hidden { display: inline-block; margin: 2px 0 4px; padding: 2px 8px; border-radius: 6px; background: var(--warn-soft); color: var(--warn); font: 600 11.5px var(--font-display); }
.cm-msg.is-hidden .cm-text, .cm-msg.is-hidden .cm-img { opacity: 0.6; }
.cm-msg.is-hidden { box-shadow: inset 3px 0 0 var(--warn); }
.cm-admin { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: grid; gap: 14px; align-content: start; max-width: 920px; width: 100%; }
.cm-admin .seg { margin: 0; }
.cm-admin .card { margin: 0; }
.cm-flag blockquote { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-mod-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.cm-mod-group { display: inline-flex; gap: 4px; }
.cm-log { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: baseline; }
.cm-words .chip { cursor: default; display: inline-flex; align-items: center; gap: 2px; }
.cm-words .link { padding: 0 2px; font-size: 15px; line-height: 1; }
.cm-empty { text-align: center; display: grid; justify-items: center; gap: 6px; padding: 32px 18px; }
.cm-staff-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; max-height: 320px; overflow-y: auto; }
.cm-staff[hidden] { display: none !important; }
.cm-banned { margin: 24px; }
.cm-firm { margin: 14px 16px 6px; padding: 16px; border-radius: var(--r-lg); border: 1px solid rgba(255, 122, 0, 0.35); background: radial-gradient(circle at 100% 0, rgba(255, 122, 0, 0.18), transparent 60%), var(--ink-1); display: grid; gap: 12px; justify-items: start; }
.cm-firm-logo img { height: 30px; width: auto; max-width: 220px; display: block; }
.cm-firm-codes { display: flex; flex-wrap: wrap; gap: 8px; }
.cm-code { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-md); border: 1px dashed var(--brand); background: var(--brand-soft); color: var(--text); font: inherit; cursor: pointer; }
.cm-code b { font: 800 15px var(--font-display); color: var(--brand); letter-spacing: 0.04em; }
.cm-code span { font-size: 13px; color: var(--muted); }
.cm-code i { font-style: normal; color: var(--brand); }
.cm-code:hover { background: rgba(255, 122, 0, 0.22); }
@media (max-width: 560px) {
  .cm-log { grid-template-columns: 1fr; gap: 2px; }
  .cm-admin { padding: 12px; }
}
.cm.no-members { grid-template-columns: 264px minmax(0, 1fr); }
@media (max-width: 900px) { .cm.no-members { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Community phase 3: live card, files, tickets, homework ---------- */
.cm-next-live { display: flex; align-items: center; gap: 8px; margin: 0 4px 12px; padding: 9px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.cm-next-live b { color: var(--text); }
.cm-next-live:hover { border-color: var(--brand); text-decoration: none; }
.cm-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); flex: none; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
@media (prefers-reduced-motion: no-preference) { .cm-live-dot { animation: live-pulse 1.8s ease-out infinite; } }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } }
.cm-live { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 20px; align-items: center; border-color: rgba(255, 122, 0, 0.45);
  background: radial-gradient(circle at 58px 50%, rgba(255, 122, 0, 0.2), transparent 160px), var(--ink-1); }
.cm-live h2 { margin: 2px 0 4px; }
.cm-live-ring { width: 116px; height: 116px; border-radius: 50%; border: 6px solid var(--brand); display: grid; place-items: center; text-align: center; font: 800 20px/1.1 var(--font-display); }
.cm-live.off { border-color: var(--line); background: var(--ink-1); }
.cm-live.off .cm-live-ring { border-color: var(--ink-3); color: var(--muted); font-size: 34px; }
.cm-join { margin-top: 6px; gap: 10px; }
.cm-join .cm-live-dot { background: var(--on-brand); }
.cm-week { display: grid; }
.cm-week-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cm-week-row:last-child { border-bottom: 0; }
.cm-week-row.today { color: var(--brand); }
.cm-week-row.cancelled .cm-week-title { color: var(--muted); text-decoration: line-through; }
.cm-week-day { font: 700 13px var(--font-display); }
.cm-week-title small { display: block; text-decoration: none; font-size: 12px; color: var(--muted); }
.cm-week-time { font: 700 13px var(--font-display); font-variant-numeric: tabular-nums; }
.cm-files { display: grid; }
.cm-file { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cm-file:last-child { border-bottom: 0; }
.cm-file-icon { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--brand); display: grid; place-items: center; color: var(--brand); font-weight: 700; }
.cm-file-text b { font: 700 14.5px var(--font-display); }
.cm-file-text p { margin: 2px 0; font-size: 13.5px; color: var(--muted); }
.cm-file-text small { color: var(--muted); font-size: 12px; }
.cm-file-go { display: grid; justify-items: end; gap: 4px; }
.cm-ticket-intro { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cm-ticket-intro h3 { margin-bottom: 2px; }
.cm-ticket-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.cm-ticket-row:last-child { border-bottom: 0; }
.cm-ticket-row:hover { background: var(--ink-2); text-decoration: none; }
.cm-ticket-main { min-width: 0; }
.cm-ticket-main b { display: block; font: 700 14.5px var(--font-display); }
.cm-ticket-main small { color: var(--muted); font-size: 12.5px; }
.cm-ticket-head { padding: 12px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.cm-ticket-head h2 { margin: 0; font-size: 19px; }
.cm-ticket-head p { margin: 0; }
.cm-thread { display: grid; gap: 10px; padding: 14px 16px; }
.cm-tmsg { max-width: min(560px, 92%); padding: 10px 12px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); justify-self: start; }
.cm-tmsg.mine { justify-self: end; background: var(--ink-3); }
.cm-tmsg.team { border-color: rgba(255, 122, 0, 0.45); }
.cm-tmsg .cm-text { margin-top: 4px; }
.cm-label { display: inline-block; margin: 2px 0 2px; padding: 2px 8px; border-radius: 999px; background: var(--none-soft); color: var(--none); font: 600 11.5px var(--font-display); }
.cm-review { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--ok-soft); border: 1px solid rgba(47, 191, 113, 0.35); font-size: 13.5px; }
.cm-review b { color: var(--ok); font: 700 12.5px var(--font-display); }
.cm-review p { margin: 4px 0 0; white-space: pre-wrap; }
.cm-label-pick { flex: none; max-width: 130px; min-height: 44px; }
@media (max-width: 560px) {
  .cm-live { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  .cm-live-ring { width: 88px; height: 88px; border-width: 5px; font-size: 16px; }
  .cm-week-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .cm-week-row .link { grid-column: 2; justify-self: start; }
  .cm-file { grid-template-columns: 34px minmax(0, 1fr); }
  .cm-file-icon { width: 34px; height: 34px; }
  .cm-file-go { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: start; }
  .cm-label-pick { max-width: 92px; }
}

/* ---------- nicknames and profile cards (031) ---------- */
.cm-name { background: none; border: 0; padding: 0; color: var(--text); font: 700 14.5px var(--font-display); cursor: pointer; }
.cm-name:hover { text-decoration: underline; }
.cm-av[data-profile] { cursor: pointer; }
button.cm-member { width: 100%; background: none; border: 0; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
button.cm-member:hover { background: var(--ink-2); }
.cm-member-names { display: grid; min-width: 0; line-height: 1.25; }
.cm-member-names span, .cm-member-names small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-member-names small { color: var(--muted); font-size: 11.5px; }
.cm-profile { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 6px 0 4px; }
.cm-profile h3 { margin: 6px 0 0; font-size: 20px; padding: 0; }
.cm-av.big { width: 76px; height: 76px; font-size: 24px; }
.cm-profile dl { display: grid; grid-template-columns: auto auto; gap: 6px 14px; margin: 10px 0 6px; text-align: left; }
.cm-profile dt { color: var(--muted); font-size: 12px; font: 700 11px var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; align-self: center; }
.cm-profile dd { margin: 0; font-weight: 600; }
.cm-style { border: 0; padding: 0; margin: 0; display: grid; gap: 2px; }
.cm-style .field-label { margin-bottom: 2px; }
.cm-profile-preview { padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); font-size: 14px; }

/* ---------- phase 4: bell, bots, drafts, join ---------- */
.bell-slot { position: relative; margin-left: auto; display: inline-flex; }
.bell-slot + .avatar { margin-left: 8px; }
.bell { position: relative; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-1); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.bell:hover { border-color: var(--brand); }
.bell svg { width: 19px; height: 19px; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad); color: #fff; font: 700 10.5px/18px var(--font-display); text-align: center; border: 2px solid var(--ink-0); }
.bell-panel:not([hidden]) { position: absolute; top: calc(100% + 10px); right: 0; z-index: 30; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); display: grid; }
@media (max-width: 560px) { .bell-panel:not([hidden]) { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; } }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--ink-2); }
.bell-head b { font: 700 14px var(--font-display); }
.bell-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); }
.bell-item:last-child { border-bottom: 0; }
.bell-item:hover { background: var(--ink-3); text-decoration: none; }
.bell-item.unread { background: rgba(255, 122, 0, 0.07); }
.bell-item.unread .bell-text b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 6px; vertical-align: middle; }
.bell-icon { width: 28px; height: 28px; border-radius: 50%; background: var(--ink-3); display: grid; place-items: center; font-size: 13px; }
.bell-text { min-width: 0; display: grid; gap: 2px; }
.bell-text b { font-size: 13.5px; font-weight: 600; }
.bell-text small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bell-item time { color: var(--muted); font-size: 11.5px; }
.bell-empty { padding: 18px 14px; margin: 0; }
.cm-av.bot { background: var(--none-soft); color: var(--none); border-radius: 12px; }
.cm-badge.bot { background: var(--none-soft); color: var(--none); }
.cm-msg-btn { margin-top: 8px; }
.cm-level { align-items: flex-start !important; padding: 8px 0; }
.cm-level span { display: grid; }
.cm-draft textarea { margin-top: 0; }
.cm-perms td, .cm-perms th { padding: 6px 10px; }
.cm-perms input { width: 18px; height: 18px; accent-color: var(--brand); }
.cm-new-bot { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cm-token { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px; border-radius: var(--r-md); background: var(--ink-0); border: 1px dashed var(--brand); }
.cm-token code { flex: 1; min-width: 0; overflow-wrap: anywhere; background: none; font-size: 13px; user-select: all; }
.cm-admin-sub { display: grid; gap: 14px; }
.auth-join { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; text-align: center; }
.bell-push { margin: 10px 14px 4px; padding: 10px 12px; border-radius: var(--r-md); border: 1px dashed var(--brand); background: var(--brand-soft); color: var(--text); font: 600 13px var(--font-body); cursor: pointer; text-align: left; }
.bell-push:hover { background: rgba(255, 122, 0, 0.22); }
