/* ==========================================================================
   Trader Co-Pilot — "Ink & Marigold" theme
   Loaded after style.css. Palette: deep ink (trust, focus), marigold (action,
   XP), profit green / loss red reserved strictly for money.
   ========================================================================== */
:root {
  --ink: #0E0B14;
  --ink-2: #22163A;
  --ink-3: #6D28D9;
  --ink-tint: #F3EEFF;
  --ink-line: #E4D9FB;
  --purple: #7C3AED;
  --purple-deep: #6D28D9;
  --purple-soft: #A78BFA;
  --marigold: #FFC400;
  --marigold-deep: #E0A800;
  --marigold-tint: #FFF6D1;
  --paper: #F7F5FB;
  --surface: #FFFFFF;
  --line: #E8E3F0;
  --text: #140F1C;
  --muted: #655C76;
  --profit: #0B9A6A;
  --loss: #E0413F;

  /* re-point legacy tokens used throughout style.css */
  --indigo: var(--ink-2); --indigo-dark: var(--ink); --indigo-light: var(--ink-tint);
  --emerald: var(--profit); --rose: var(--loss);
  --slate-900: var(--text); --slate-500: var(--muted); --slate-200: var(--line); --slate-50: var(--paper);

  --font-ui: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;

  --r-lg: 18px; --r-md: 14px; --r-sm: 10px;
  --shadow-1: 0 1px 2px rgba(16,27,45,.05), 0 1px 1px rgba(16,27,45,.03);
  --shadow-2: 0 10px 30px -12px rgba(20,10,40,.25);
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --radius: var(--r-md);
}

/* ---------- Base type ---------- */
body { font-family: var(--font-ui); background: var(--paper); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
.mono, .dashboard-kpi strong, .positive, .negative, .risk-result-grid strong, .history-detail-result,
.recent-trade-result, .stat-pill { font-family: var(--font-ui); font-variant-numeric: tabular-nums; }
.section-title, .card-title, .auth-title, .brand-title, h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.01em; }
.section-title { font-size: .98rem; font-weight: 700; color: var(--text); }
.card-sub { color: var(--muted); line-height: 1.5; }
/* Labels: refined small caps instead of shouty all-caps */
.uppercase-label, .field label, .reality-label, .note-reading-label, .analysis-date-control label {
  text-transform: none; font-variant-caps: all-small-caps; letter-spacing: .05em; font-size: .78rem; font-weight: 600; color: var(--muted);
}
.positive { color: var(--profit) !important; }
.negative { color: var(--loss) !important; }
:focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }

/* ---------- Cards: one quiet surface, hierarchy by weight not decoration ---------- */
.card { border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: var(--shadow-1); }

/* ---------- Buttons ---------- */
.btn-primary { background: var(--ink); color: #fff; border-radius: var(--r-sm); font-weight: 600; letter-spacing: .01em;
  transition: background .18s, transform .12s var(--ease-out), box-shadow .18s; }
.btn-primary:hover { background: var(--ink-2); box-shadow: 0 6px 16px -8px rgba(20,10,40,.6); }
.btn-primary:active, .btn-secondary:active, .tab-btn:active, .mobile-tab-btn:active, .btn-cta:active { transform: scale(.97); }
.btn-secondary { border-radius: var(--r-sm); transition: background .18s, border-color .18s, transform .12s var(--ease-out); }
.btn-secondary:hover { border-color: var(--ink-3); }
.btn-cta { display: inline-flex; align-items: center; gap: .45rem; background: var(--marigold); color: var(--ink); border: 0; font-weight: 700;
  font-size: .85rem; padding: .85rem 1.25rem; border-radius: var(--r-sm); cursor: pointer; white-space: nowrap;
  box-shadow: 0 8px 20px -10px rgba(255,196,0,.9); transition: background .18s, transform .12s var(--ease-out), box-shadow .2s; }
.btn-cta:hover { background: #FFD23D; box-shadow: 0 12px 24px -10px rgba(255,196,0,.9); }

/* ---------- Inputs ---------- */
.field input, .field select, .field textarea, .risk-input-grid input, .risk-settings-grid input, .risk-settings-grid select,
.analysis-date-control input, .session-view-box textarea { border-radius: var(--r-sm); transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .risk-input-grid input:focus, .risk-settings-grid input:focus,
.session-view-box textarea:focus, .analysis-date-control input:focus { border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); outline: none; }

/* ---------- Header: the ink bar ---------- */
.app-header { background: var(--ink); border-bottom: 0; backdrop-filter: none; color: #fff; }
.brand-icon { background: var(--marigold); box-shadow: none; border-radius: 12px; }
.brand-title { color: #fff; font-size: 1.02rem; letter-spacing: .02em; }
.brand-badge { background: rgba(255,196,0,.16); color: #FFE07A; font-family: var(--font-ui); letter-spacing: .06em; }
.brand-sub { color: #AA9FC2; letter-spacing: .04em; }
.stat-pill { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #E8EEF6; border-radius: 999px; }
.user-block { border-left-color: rgba(255,255,255,.14); }
.user-name { color: #C9D5E6; }
.btn-logout { background: rgba(255,255,255,.08); color: #E8EEF6; border-radius: 999px; transition: background .15s; }
.btn-logout:hover { background: rgba(255,255,255,.16); }
.btn-install { background: var(--marigold); color: var(--ink); border-color: transparent; border-radius: 999px; }
.btn-install:hover { background: #FFD23D; }

/* ---------- Desktop tabs: segmented track with a sliding indicator ---------- */
.tab-nav { position: relative; border-bottom: 0; padding: 4px; gap: 2px; background: #E7ECF2; border-radius: 12px; margin-bottom: 1.5rem; scrollbar-width: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn { position: relative; z-index: 1; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: .76rem; transition: color .2s; }
.tab-btn:hover { background: transparent; color: var(--text); }
.tab-btn.active { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink); }
.tab-indicator { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 9px; background: #fff;
  box-shadow: 0 1px 3px rgba(16,27,45,.12), 0 1px 1px rgba(16,27,45,.04); transition: transform .32s var(--ease-out), width .32s var(--ease-out); pointer-events: none; }
.tab-indicator::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--marigold); }

/* ---------- Dashboard hero ---------- */
.dashboard-hero.dashboard-hero-ink { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr) auto;
  align-items: center; gap: 1.5rem; padding: 1.6rem 1.75rem; margin-bottom: 1rem; border-radius: var(--r-lg); border: 0; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #3B1F6E 0%, rgba(36,69,111,0) 55%), var(--ink); box-shadow: var(--shadow-2); }
.dashboard-hero-ink::before { /* faint chart-paper grid, the subject's own texture */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.dashboard-hero-ink > * { position: relative; }
.hero-greeting { display: block; font-size: .8rem; color: #FFE07A; font-weight: 600; margin-bottom: .35rem; }
.hero-title { font-family: var(--font-display); font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.1; font-weight: 700; margin: 0 0 .5rem; letter-spacing: -0.02em; }
.hero-copy p { margin: 0; color: #C7BCDD; font-size: .82rem; line-height: 1.5; max-width: 46ch; }
.hero-today { border-left: 1px solid rgba(255,255,255,.14); padding-left: 1.5rem; min-width: 0; }
.hero-today > span { display: block; font-size: .78rem; color: #AA9FC2; font-variant-caps: all-small-caps; letter-spacing: .06em; font-weight: 600; }
.hero-today strong { display: block; font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.1; font-weight: 700; margin: .1rem 0 .3rem; font-variant-numeric: tabular-nums; }
.hero-today strong.positive { color: #3DDC97 !important; }
.hero-today strong.negative { color: #FF7A78 !important; }
.hero-today small { display: block; color: #AA9FC2; font-size: .72rem; line-height: 1.45; }
.hero-budget { margin-top: .55rem; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.hero-budget i { display: block; height: 100%; border-radius: 4px; background: var(--marigold); transform-origin: left; }
.hero-budget i.hot { background: #FF7A78; }

/* ---------- KPIs ---------- */
.dashboard-kpi { border-radius: var(--r-md); padding: 1rem 1.05rem; }
.dashboard-kpi strong { font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.01em; color: var(--text); }
.dashboard-kpi small { color: var(--muted); }

/* ---------- Equity curve ---------- */
.equity-chart { background: linear-gradient(180deg, #FBFAFE, #F7F5FB); border-color: var(--line); border-radius: var(--r-sm); height: 210px; }
.equity-line { stroke: var(--ink-2); stroke-width: 3; }
.equity-area { fill: url(#equityFill); stroke: none; }
.equity-zero { stroke: #B8C4D4; }
.equity-dot { fill: var(--marigold); stroke: #fff; stroke-width: 3; }
.equity-dot-ring { fill: none; stroke: var(--marigold); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }

/* ---------- Mobile bottom nav ---------- */
@media (max-width: 700px) {
  body { background: var(--paper); }
  .app-header .header-inner { height: 3.6rem; }
  .mobile-tab-nav { background: rgba(255,255,255,.94); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -20px rgba(20,10,40,.5); }
  .mobile-tab-btn { position: relative; font-family: var(--font-ui); font-weight: 600; color: var(--muted); border-radius: 12px; transition: color .2s, background .2s; }
  .mobile-tab-btn.active { color: var(--ink); background: var(--ink-tint); }
  .mobile-tab-btn.active::before { content: ""; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--marigold); }
  .mobile-tab-btn.active .mobile-tab-icon { animation: tc-pop .35s var(--ease-spring); }
  .dashboard-hero.dashboard-hero-ink { grid-template-columns: 1fr; gap: 1rem; padding: 1.25rem; }
  .hero-today { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: .9rem; }
  .btn-cta { width: 100%; justify-content: center; }
  .card { border-radius: var(--r-md); }
}

/* ---------- Loading screen: three candles breathing ---------- */
.tc-loader { display: flex; flex-direction: column; align-items: center; gap: 1rem; color: var(--muted); font-size: .8rem; }
.tc-candles { display: flex; align-items: flex-end; gap: 7px; height: 44px; }
.tc-candles i { position: relative; display: block; width: 10px; border-radius: 2px; background: var(--ink-2); animation: tc-candle 1.1s var(--ease-out) infinite; }
.tc-candles i::before { content: ""; position: absolute; left: 4px; width: 2px; top: -8px; bottom: -8px; background: inherit; opacity: .55; }
.tc-candles i:nth-child(1) { height: 18px; animation-delay: 0s; background: var(--loss); }
.tc-candles i:nth-child(2) { height: 30px; animation-delay: .15s; background: var(--profit); }
.tc-candles i:nth-child(3) { height: 24px; animation-delay: .3s; background: var(--marigold); }

/* ---------- Auth ---------- */
#auth-screen { background: radial-gradient(90% 70% at 50% 0%, #3B1F6E 0%, rgba(36,69,111,0) 60%), var(--ink); }
.auth-card { border: 0; border-radius: var(--r-lg); box-shadow: 0 30px 60px -25px rgba(0,0,0,.6); padding: 2rem 1.75rem; }
.auth-logo { background: var(--marigold); box-shadow: none; border-radius: 14px; }
.auth-title { font-size: 1.35rem; letter-spacing: .01em; color: var(--ink); }
.auth-toggle button { color: var(--ink-2); }

/* ---------- Modals ---------- */
.modal-overlay { background: rgba(10,19,35,.72); }
.modal-card { border-radius: var(--r-lg); }
.modal-header { color: var(--ink); background: #fff; }

/* ---------- Risk ---------- */
.risk-progress i, .hero-budget i { transform-origin: left center; }
.risk-live { background: var(--marigold-tint) !important; color: var(--marigold-deep) !important; }

/* ==========================================================================
   Motion — only in answer to an action, plus one load moment on the dashboard
   ========================================================================== */
@keyframes tc-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tc-pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
@keyframes tc-modal { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes tc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tc-grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes tc-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes tc-ring { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
@keyframes tc-candle { 0%,100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@keyframes tc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* switching tabs: content settles in (user-triggered) */
#tab-content.tc-enter { animation: tc-enter .28s var(--ease-out); }
/* modals open with a short lift */
.modal-overlay[style*="flex"] { animation: tc-fade .2s ease-out; }
.modal-overlay[style*="flex"] .modal-card { animation: tc-modal .28s var(--ease-out); }
/* auth card arrives once */
#auth-screen[style*="flex"] .auth-card { animation: tc-rise .5s var(--ease-out); }
/* progress & budget bars fill from the left when their tab opens */
.risk-progress i, .hero-budget i { animation: tc-grow-x .7s var(--ease-out) both; }
/* dashboard load moment: curve draws, last point pings once */
.tc-intro .equity-line { stroke-dasharray: 1; animation: tc-draw 1.1s .15s var(--ease-out) both; }
.tc-intro .equity-area { animation: tc-fade .8s .7s ease-out both; }
.tc-intro .equity-dot { animation: tc-fade .3s 1.15s ease-out both; }
.tc-intro .equity-dot-ring { animation: tc-ring 1.2s 1.25s ease-out 2; }
/* save confirmation ticks in */
[data-note-save-status], .session-note-status { transition: opacity .2s; }
.tc-flash { animation: tc-pop .3s var(--ease-spring); display: inline-block; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}

/* ---------- Pass 2 refinements ---------- */
.stat-value, .journal-kpis strong { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.xp-badge { font-family: var(--font-ui); background: var(--marigold-tint); color: var(--marigold-deep); font-variant-numeric: tabular-nums; }
.btn-secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); font-weight: 600; box-shadow: var(--shadow-1); }
.btn-secondary:hover { background: var(--ink-tint); border-color: var(--ink-line); }
.dashboard-kpis { gap: .75rem; margin-bottom: 1rem; }
.dashboard-main-grid > .card, .grid-2 > .card { margin-bottom: 1rem; }

/* ---------- Trade history: notes, time, search ---------- */
.history-search { margin-bottom: .8rem; }
.history-search input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .75rem .9rem; font: inherit; font-size: .85rem; background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.history-search input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.history-quick-note { margin: .55rem 0 .2rem; padding: .55rem .7rem; border-left: 3px solid var(--marigold); background: var(--marigold-tint); border-radius: 0 8px 8px 0;
  font-size: .76rem; line-height: 1.45; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.history-quick-note span { display: block; font-size: .72rem; font-weight: 600; color: var(--marigold-deep); font-variant-caps: all-small-caps; letter-spacing: .05em; }
.history-list-note { display: block; margin-top: .2rem; font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32ch; }
.history-note { white-space: pre-line; }
.history-note em { color: var(--muted); }
.history-when { margin: .1rem 0 0 !important; font-size: .68rem !important; color: var(--muted) !important; font-variant-numeric: tabular-nums; }
.history-detail-result.open-trade { color: var(--marigold-deep); }
.journal-chip.chip-warn { background: #FFF1F1; color: #B42318; border-color: #FFD3D3; }
.edit-modal textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .7rem; font: inherit; font-size: .8rem; resize: vertical; }
/* history: real grid on wide screens + consistent filter controls */
.history-results.grid-view { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.history-results.gallery-view { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); align-items: start; }
@media (max-width: 700px) { .history-results.grid-view, .history-results.gallery-view { grid-template-columns: 1fr; } }
.history-grid-media { aspect-ratio: 16 / 9; height: auto; }
.history-grid-media img { width: 100%; height: 100%; object-fit: cover; }
.history-filter-grid select, .history-filter-grid input[type=date] { box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .7rem; background: #fff; font: inherit; font-size: .8rem; color: var(--text); min-height: 40px; }
.history-filter-grid select:focus, .history-filter-grid input[type=date]:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.history-date-actions .btn-secondary { min-height: 40px; width: 100%; }
.history-grid-card .history-mini-stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }

/* ---------- Dashboard: Setup Playbook ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.setup-playbook { padding: 1.25rem 1.35rem; margin-bottom: 1rem; }
.setup-playbook.pb-swap { animation: tc-enter .3s var(--ease-out); }
.playbook-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.playbook-head .section-title { font-size: 1.1rem; margin: 0; }
.playbook-select select { appearance: none; -webkit-appearance: none; min-width: 260px; max-width: 100%; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink);
  background: var(--ink-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2313233F' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right .9rem center;
  border: 1px solid var(--ink-line); border-radius: var(--r-sm); padding: .65rem 2.4rem .65rem .9rem; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.playbook-select select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }

.pb-stats { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); background: #FBFAFE; margin-bottom: 1rem; }
.pb-stats > div { padding: .7rem .85rem; min-width: 0; }
.pb-stats > div + div { border-left: 1px solid var(--line); }
.pb-stats span { display: block; font-size: .74rem; color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: .05em; font-weight: 600; }
.pb-stats strong { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-stats strong small { font-family: var(--font-ui); font-size: .68rem; font-weight: 600; color: var(--marigold-deep); }
.pb-stats > div > small { display: block; font-size: .68rem; font-weight: 600; }

.pb-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; border-top: 1px solid var(--line); }
.pb-col { padding: .9rem 1rem .9rem 0; min-width: 0; max-height: 330px; overflow: auto; scrollbar-width: thin; }
.pb-col + .pb-col { padding-left: 1rem; border-left: 1px solid var(--line); }
.pb-col h4, .pb-recent h4 { margin: 0 0 .6rem; font-family: var(--font-display); font-size: .9rem; font-weight: 700; color: var(--ink); }
.pb-col-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.pb-link { background: none; border: 0; padding: 0; font: inherit; font-size: .74rem; font-weight: 600; color: var(--ink-3); cursor: pointer; }
.pb-link:hover { color: var(--ink); text-decoration: underline; }
.pb-empty { margin: 0; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.pb-criteria { margin-bottom: .65rem; }
.pb-criteria span { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: .05em; }
.pb-criteria p { margin: .1rem 0 0; font-size: .8rem; line-height: 1.5; color: var(--text); white-space: pre-line; }
.pb-criteria em, .pb-empty em { color: var(--muted); }
.pb-rule-list { list-style: none; margin: .2rem 0 0; padding: 0; display: grid; gap: .35rem; }
.pb-rule-list li { position: relative; padding-left: 1.4rem; font-size: .79rem; line-height: 1.45; }
.pb-rule-list li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 1rem; height: 1rem; border-radius: 4px; background: var(--ink-tint); color: var(--ink-2); font-size: .66rem; font-weight: 700; display: grid; place-items: center; }

.pb-mistake-list { list-style: none; margin: 0; padding: 0; }
.pb-mistake-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .8rem; }
.pb-mistake-list li small { color: var(--muted); font-weight: 600; }
.pb-mistake-list strong { font-variant-numeric: tabular-nums; font-size: .82rem; }
.pb-split { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .75rem; }
.pb-split > div { background: #FBFAFE; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .65rem; }
.pb-split span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; }
.pb-split strong { display: block; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pb-split small { font-size: .68rem; color: var(--muted); }

.pb-note-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.pb-note-list button { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--ink-3); border-radius: 8px; padding: .5rem .65rem; cursor: pointer; font: inherit; transition: border-color .15s, background .15s; }
.pb-note-list button:hover { background: var(--ink-tint); border-color: var(--ink-line); border-left-color: var(--ink-3); }
.pb-note-list strong { display: block; font-size: .8rem; color: var(--text); }
.pb-note-list span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .74rem; color: var(--muted); line-height: 1.4; margin-top: .1rem; }
.pb-trade-notes { margin-top: .75rem; }
.pb-trade-notes > span { display: block; font-size: .72rem; font-weight: 600; color: var(--marigold-deep); font-variant-caps: all-small-caps; letter-spacing: .05em; margin-bottom: .3rem; }
.pb-trade-notes p { margin: 0 0 .45rem; padding-left: .6rem; border-left: 3px solid var(--marigold); font-size: .76rem; line-height: 1.45; }
.pb-trade-notes small { color: var(--muted); }

.pb-edit-label { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); margin-bottom: .55rem; }
.pb-edit-label small { font-weight: 500; }
.pb-edit-label textarea { display: block; width: 100%; box-sizing: border-box; margin-top: .25rem; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .6rem; font: inherit; font-size: .8rem; line-height: 1.45; color: var(--text); resize: vertical; }
.pb-edit-label textarea:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.pb-edit-actions { display: flex; gap: .5rem; justify-content: flex-end; }

.pb-recent { border-top: 1px solid var(--line); padding-top: .85rem; }
.pb-recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
.pb-trade { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .65rem; background: #fff; }
.pb-trade > div { min-width: 0; }
.pb-trade strong { font-size: .82rem; }
.pb-trade small { display: block; font-size: .68rem; color: var(--muted); }
.pb-trade b { font-size: .84rem; font-variant-numeric: tabular-nums; }
.pb-trade .journal-chip { display: inline-block; margin-top: .3rem; font-size: .62rem; padding: .15rem .45rem; }
.pb-dir { font-size: .6rem; font-weight: 700; padding: .1rem .35rem; border-radius: 4px; vertical-align: 1px; }
.pb-dir.long { background: #E6F6EF; color: #08734F; }
.pb-dir.short { background: #FDECEC; color: #B42318; }

@media (max-width: 980px) {
  .pb-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .pb-stats > div:nth-child(4) { border-left: 0; }
  .pb-stats > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .pb-grid { grid-template-columns: 1fr 1fr; }
  .pb-notes { grid-column: 1 / -1; border-left: 0 !important; padding-left: 0 !important; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .setup-playbook { padding: 1rem; }
  .playbook-select, .playbook-select select { width: 100%; min-width: 0; }
  .pb-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .pb-stats > div { border-left: 0 !important; border-top: 1px solid var(--line); }
  .pb-stats > div:nth-child(even) { border-left: 1px solid var(--line) !important; }
  .pb-stats > div:nth-child(-n+2) { border-top: 0; }
  .pb-grid { grid-template-columns: 1fr; }
  .pb-col, .pb-col + .pb-col { padding: .85rem 0; border-left: 0; max-height: none; }
  .pb-col + .pb-col { border-top: 1px solid var(--line); }
}

/* ---------- Strategy manager ---------- */
.playbook-controls { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sm-overlay { animation: tc-fade .2s ease-out; background: rgba(10,19,35,.55); }
.sm-modal { width: min(720px, 100%); border-radius: var(--r-lg); animation: tc-modal .28s var(--ease-out); }
.sm-form { border: 1px solid var(--ink-line); background: #FBFAFE; border-radius: var(--r-md); padding: 1rem; margin-bottom: 1rem; }
.sm-form h3 { margin: 0 0 .75rem; font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.sm-form .field input, .sm-form .field textarea { background: #fff; }
.sm-error { margin: 0; min-height: 1rem; font-size: .76rem; color: var(--loss); font-weight: 600; }
.sm-form-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.sm-list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; font-size: .85rem; }
.sm-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.sm-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .7rem .85rem; background: #fff; }
.sm-list li + li { border-top: 1px solid var(--line); }
.sm-list li.is-editing { background: var(--ink-tint); }
.sm-list strong { display: block; font-size: .88rem; }
.sm-list small { display: block; font-size: .72rem; color: var(--muted); margin-top: .1rem; }
.sm-row-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.btn-danger.btn-small { font-size: .65rem; padding: .4rem .65rem; }
.log-strategy-label { display: flex !important; justify-content: space-between; align-items: center; }
.pb-link-note select { width: 100%; margin-bottom: .55rem; font: inherit; font-size: .74rem; color: var(--muted); border: 1px dashed var(--ink-line); border-radius: 8px; padding: .45rem .55rem; background: #fff; cursor: pointer; }
.pb-link-note select:focus { outline: none; border-color: var(--ink-3); }
.samsung-note-strategy select { border: 0; background: #f8fafc; border-radius: .55rem; padding: .45rem .55rem; color: var(--slate-700); font: inherit; font-size: .68rem; outline: none; flex: 1; min-width: 10rem; }
@media (max-width: 700px) {
  .playbook-controls { width: 100%; }
  .playbook-controls .btn-secondary { width: 100%; }
  .sm-list li { flex-direction: column; align-items: stretch; }
  .sm-row-actions .btn-small { flex: 1; }
}
.sm-row-actions .btn-danger { background: #fff; color: var(--loss); border: 1px solid #F3C2C1; border-radius: var(--r-sm); font-weight: 600; cursor: pointer; transition: background .15s; }
.sm-row-actions .btn-danger:hover { background: #FFF1F1; }
/* note editor: strategy picker is easy to spot and tap */
.samsung-note-strategy select { font-size: .8rem; font-weight: 600; color: var(--ink); background: var(--ink-tint); border: 1px solid var(--ink-line); padding: .5rem 2rem .5rem .65rem; min-height: 36px; cursor: pointer; min-width: 13rem; }
.samsung-note-strategy select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }

/* broken image explainer */
.img-broken { display: flex; flex-direction: column; gap: .35rem; justify-content: center; min-height: 120px; padding: .85rem; border: 1px dashed #F3C2C1; border-radius: 10px; background: #FFF7F7; color: var(--text); font-size: .74rem; line-height: 1.45; text-align: left; }
.img-broken strong { font-size: .8rem; color: #B42318; }
.img-broken-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .2rem; }
.img-broken-actions button { font: inherit; font-size: .7rem; font-weight: 600; padding: .35rem .6rem; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.history-grid-media .img-broken { height: 100%; border-radius: 0; border-width: 0 0 1px; }
.img-broken .img-broken-msg { margin: 0; position: static; font-size: .74rem; }
.img-broken button { position: relative; z-index: 1; }
.history-image .img-broken, .history-gallery-card .img-broken { height: auto; min-height: 140px; }

/* ---------- Image viewer / annotator: full screen, link rows ---------- */
.annotator-head-actions { display: flex; align-items: center; gap: .4rem; }
.annotator-fs-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: .4rem .75rem; font: inherit; font-size: .72rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s; }
.annotator-fs-btn:hover { background: var(--ink-tint); }
.annotator-card.view-only .annotator-toolbar { display: none; }
.annotator-card:fullscreen, .annotator-card.is-fullscreen { width: 100vw !important; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; margin: 0; background: #0B1220; }
.annotator-card.is-fullscreen { position: fixed; inset: 0; z-index: 9999; }
.annotator-card:fullscreen .modal-header, .annotator-card.is-fullscreen .modal-header { padding-top: max(.6rem, env(safe-area-inset-top, 0px)); }
.annotator-card:fullscreen .annotator-stage, .annotator-card.is-fullscreen .annotator-stage { flex: 1; padding: .5rem !important; }
.annotator-card:fullscreen #modal-image, .annotator-card.is-fullscreen #modal-image { max-width: 100%; max-height: calc(100dvh - 9.5rem); width: auto; height: auto; object-fit: contain; }
.annotator-card.view-only:fullscreen #modal-image, .annotator-card.view-only.is-fullscreen #modal-image { max-height: calc(100dvh - 4.5rem); }
.note-link-row { display: flex; gap: .4rem; width: 100%; margin-top: .5rem; }
.note-link-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: .5rem .65rem; font: inherit; font-size: .8rem; }
.note-link-row input:focus, .image-url-add-row input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.note-plus-menu { flex-wrap: wrap; }
button[disabled] { opacity: .65; cursor: progress; }
.modal-header .annotator-fs-btn { width: auto; height: auto; min-height: 1.8rem; padding: .35rem .75rem; background: #fff; border: 1px solid var(--line); }
.modal-header .annotator-head-actions { flex-shrink: 0; }
@media (max-width: 700px) { .modal-header .annotator-fs-btn { padding: .35rem .55rem; font-size: .68rem; } .annotator-hint { max-width: 22ch; } }

/* ---------- Weekly report ---------- */
.hero-actions { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.btn-hero-ghost { background: rgba(255,255,255,.08); color: #E8EEF6; border: 1px solid rgba(255,255,255,.18); border-radius: var(--r-sm); padding: .6rem 1rem; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, transform .12s var(--ease-out); }
.btn-hero-ghost:hover { background: rgba(255,255,255,.16); }
.btn-hero-ghost:active { transform: scale(.97); }
.history-toolbar { flex-wrap: wrap; }
.history-report-btn { order: 3; }
.report-modal { width: min(560px, 100%); }
.report-week-nav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; padding: .75rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #FBFAFE; margin-bottom: .9rem; text-align: center; }
.report-week-nav strong { display: block; font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.report-week-nav small { color: var(--muted); font-size: .72rem; }
.report-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin-bottom: .75rem; }
.report-summary > div { padding: .6rem .75rem; border-top: 1px solid var(--line); }
.report-summary > div:nth-child(-n+3) { border-top: 0; }
.report-summary > div:not(:nth-child(3n+1)) { border-left: 1px solid var(--line); }
.report-summary span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; font-variant-caps: all-small-caps; letter-spacing: .05em; }
.report-summary strong { display: block; font-family: var(--font-display); font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.report-summary strong small { font-family: var(--font-ui); font-size: .66rem; color: var(--marigold-deep); }
.report-includes { margin: 0 0 .6rem; font-size: .76rem; color: var(--muted); line-height: 1.5; }
.report-check { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .82rem; font-weight: 600; color: var(--text); cursor: pointer; margin-bottom: .4rem; }
.report-check small { font-weight: 500; color: var(--muted); }
.report-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--ink-2); }
.report-empty { padding: 1.4rem; text-align: center; border: 1px dashed var(--ink-line); border-radius: var(--r-md); color: var(--muted); font-size: .82rem; margin-bottom: .75rem; }
@media (max-width: 700px) { .report-summary { grid-template-columns: repeat(2, minmax(0,1fr)); } .report-summary > div { border-left: 0 !important; border-top: 1px solid var(--line) !important; } .report-summary > div:nth-child(even) { border-left: 1px solid var(--line) !important; } .report-summary > div:nth-child(-n+2) { border-top: 0 !important; } .hero-actions { width: 100%; } }

/* ---------- Annotator: fit, zoom, pan, compact mobile toolbar ---------- */
.annotator-modal .annotator-card { height: min(94vh, 940px); height: min(94dvh, 940px); }
.annotator-stage { position: relative; flex: 1; min-height: 0; overflow: hidden !important; touch-action: none; user-select: none; -webkit-user-select: none; }
.annotator-canvas-wrap { will-change: transform; }
.annotator-canvas-wrap img { max-width: none; max-height: none; -webkit-user-drag: none; user-select: none; pointer-events: none; }
.annotator-card.mode-move #annotator-canvas, .annotator-card.view-only #annotator-canvas { cursor: grab; }
.annotator-zoom { position: absolute; right: .75rem; bottom: .75rem; z-index: 3; display: flex; align-items: center; background: rgba(15,27,45,.82); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: .2rem; backdrop-filter: blur(6px); }
.annotator-zoom button { border: 0; background: transparent; color: #fff; font: inherit; font-size: 1rem; font-weight: 700; min-width: 2.3rem; height: 2.1rem; border-radius: 999px; cursor: pointer; }
.annotator-zoom button:hover { background: rgba(255,255,255,.12); }
.annotator-zoom #annotator-zoom-fit { font-size: .72rem; min-width: 3.4rem; font-variant-numeric: tabular-nums; }
.annotator-card:fullscreen .annotator-stage, .annotator-card.is-fullscreen .annotator-stage { padding: .25rem !important; }
.annotator-card:fullscreen #modal-image, .annotator-card.is-fullscreen #modal-image { max-height: none; }
@media (max-width: 700px) {
  .annotator-modal .annotator-card { width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .annotator-modal { padding: 0 !important; }
  .annotator-toolbar { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; gap: .3rem !important; padding: .4rem .5rem !important; }
  .annotator-toolbar::-webkit-scrollbar { display: none; }
  .annotator-toolbar > * { flex-shrink: 0; }
  .annotator-save { width: auto !important; margin-left: 0 !important; order: -1; }
  .annotator-size-wrap { order: 0 !important; }
  .annotator-stage { padding: .25rem !important; }
  .annotator-hint { display: none; }
}
.annotator-modal .annotator-card:fullscreen, .annotator-modal .annotator-card.is-fullscreen { height: 100vh; height: 100dvh; max-height: none; width: 100vw; }

/* ---------- Voice typing ---------- */
.voice-btn.is-listening { background: #FDECEC !important; border-color: #F3C2C1 !important; color: var(--loss) !important; animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-btn-inline { margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; width: 2rem; height: 2rem; font-size: .95rem; cursor: pointer; line-height: 1; }
.voice-label { display: flex !important; align-items: center; gap: .35rem; }
@keyframes voice-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(224,65,63,.35); } 50% { box-shadow: 0 0 0 6px rgba(224,65,63,0); } }
.voice-bubble { position: fixed; left: 50%; bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 10000; display: flex; align-items: center; gap: .6rem;
  width: min(560px, calc(100vw - 1.5rem)); padding: .6rem .6rem .6rem .9rem; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 16px 40px -12px rgba(0,0,0,.5); animation: tc-enter .25s var(--ease-out); }
.voice-bubble[hidden] { display: none; }
.voice-dot { width: .7rem; height: .7rem; border-radius: 50%; background: #FF5A57; flex-shrink: 0; animation: voice-pulse 1.2s ease-in-out infinite; }
.voice-bubble[data-state="error"] .voice-dot { background: var(--marigold); animation: none; }
.voice-text { flex: 1; min-width: 0; font-size: .82rem; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #E8EEF6; }
.voice-bubble[data-state="error"] .voice-text { white-space: normal; }
.voice-lang, .voice-stop { flex-shrink: 0; border: 0; border-radius: 999px; font: inherit; font-size: .72rem; font-weight: 700; padding: .45rem .7rem; cursor: pointer; }
.voice-lang { background: rgba(255,255,255,.12); color: #FFE07A; }
.voice-stop { background: #fff; color: var(--ink); }
@media (min-width: 701px) { .voice-bubble { bottom: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .voice-btn.is-listening, .voice-dot { animation: none; } }

/* ---------- Blog ---------- */
.tab-dot { display: inline-grid; place-items: center; min-width: 1.1rem; height: 1.1rem; padding: 0 .3rem; margin-left: .35rem; border-radius: 999px; background: var(--loss); color: #fff; font-size: .62rem; font-weight: 700; vertical-align: 1px; }
.tab-dot-mini { position: absolute; top: -2px; right: -6px; width: .55rem; height: .55rem; border-radius: 50%; background: var(--loss); border: 2px solid #fff; }
.mobile-tab-icon { position: relative; display: inline-block; }
@media (max-width: 700px) {
  .mobile-tab-nav { grid-template-columns: repeat(7, 1fr); padding-left: .15rem !important; padding-right: .15rem !important; }
  .mobile-tab-btn { font-size: .56rem !important; padding-left: 0 !important; padding-right: 0 !important; min-width: 0; }
}
.blog-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.blog-head .section-title { font-size: 1.25rem; margin: 0 0 .2rem; }
.blog-filters { display: grid; gap: .6rem; margin: 0 0 1rem; }
.blog-filters input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .75rem .9rem; font: inherit; font-size: .85rem; background: #fff; }
.blog-filters input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.blog-tag-row { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.blog-tag-row button { flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: .35rem .75rem; font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; }
.blog-tag-row button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.blog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; cursor: pointer; box-shadow: var(--shadow-1); transition: transform .2s var(--ease-out), box-shadow .2s; display: flex; flex-direction: column; }
.blog-card:hover, .blog-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.blog-card.is-draft { border-style: dashed; }
.blog-card-cover { aspect-ratio: 16 / 9; background: var(--ink-tint); overflow: hidden; }
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-cover-empty { display: grid; place-items: center; font-size: 2rem; background: linear-gradient(135deg, var(--ink), #3B1F6E); }
.blog-card-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; }
.blog-card-meta { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .7rem; color: var(--muted); }
.blog-card h3 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.3; color: var(--text); }
.blog-card p { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-badge { font-size: .62rem; font-weight: 700; padding: .12rem .45rem; border-radius: 4px; letter-spacing: .02em; }
.blog-badge.new { background: var(--marigold-tint); color: var(--marigold-deep); }
.blog-badge.draft { background: #EEF0F3; color: var(--muted); }
.blog-badge.live { background: #E6F6EF; color: #08734F; }
.blog-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.blog-tags span { font-size: .68rem; color: var(--ink-3); background: var(--ink-tint); padding: .15rem .45rem; border-radius: 4px; font-weight: 600; }
.blog-empty { text-align: center; color: var(--muted); font-size: .85rem; padding: 2rem 1rem; }
.blog-post { max-width: 760px; margin: 0 auto; padding: 1.25rem 1.5rem 2rem; }
.blog-post-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.blog-admin-actions { display: flex; align-items: center; gap: .5rem; }
.blog-views { font-size: .74rem; color: var(--muted); }
.blog-post-cover { width: 100%; border-radius: var(--r-md); margin-bottom: 1rem; cursor: zoom-in; display: block; }
.blog-post h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5rem; color: var(--ink); }
.blog-post-meta { margin: 0 0 .6rem; font-size: .78rem; color: var(--muted); }
.blog-body { margin-top: 1.25rem; font-size: 1.02rem; line-height: 1.75; color: #1D2939; }
.blog-body p { margin: 0 0 1.1rem; }
.blog-body h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 1.8rem 0 .6rem; color: var(--ink); line-height: 1.25; }
.blog-body h3 { font-family: var(--font-display); font-size: 1.12rem; margin: 1.4rem 0 .5rem; color: var(--ink); }
.blog-body ul { margin: 0 0 1.1rem; padding-left: 1.3rem; }
.blog-body li { margin-bottom: .35rem; }
.blog-body blockquote { margin: 1.2rem 0; padding: .4rem 0 .4rem 1rem; border-left: 4px solid var(--marigold); color: #344054; font-style: italic; font-size: 1.08rem; }
.blog-body hr { border: 0; border-top: 1px solid var(--line); margin: 1.8rem 0; }
.blog-body figure { margin: 1.3rem 0; }
.blog-body figure img { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: zoom-in; display: block; }
.blog-body figcaption { font-size: .78rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.blog-body a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.blog-callout { display: flex; gap: .7rem; padding: .85rem 1rem; margin: 1.2rem 0; background: var(--marigold-tint); border: 1px solid #F6D58A; border-radius: var(--r-sm); font-size: .95rem; line-height: 1.6; }
.blog-post-end { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.blog-editor { max-width: 820px; margin: 0 auto; }
.be-title { width: 100%; box-sizing: border-box; border: 0; border-bottom: 2px solid var(--line); padding: .5rem 0; font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--ink); background: transparent; margin-bottom: .9rem; }
.be-title:focus { outline: none; border-bottom-color: var(--marigold); }
.be-row { margin-bottom: .8rem; }
.be-row label, .be-cover > span { display: block; font-size: .76rem; font-weight: 600; color: var(--muted); }
.be-row label small { font-weight: 500; }
.be-row textarea, .be-row input, .be-block textarea, .be-caption, .be-img-actions input { display: block; width: 100%; box-sizing: border-box; margin-top: .3rem; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; font: inherit; font-size: .88rem; line-height: 1.55; color: var(--text); background: #fff; resize: vertical; }
.be-row textarea:focus, .be-row input:focus, .be-block textarea:focus, .be-caption:focus, .be-img-actions input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.be-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.be-cover img { width: 100%; max-height: 140px; object-fit: cover; border-radius: 8px; margin: .3rem 0; display: block; }
.be-img-actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; }
.be-img-actions input { flex: 1; min-width: 150px; margin-top: 0; }
.be-blocks { display: grid; gap: .6rem; margin: 1rem 0 .7rem; }
.be-block { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .65rem; background: #FBFAFE; }
.be-head { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 700; color: var(--muted); margin-bottom: .2rem; }
.be-head button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .85rem; padding: .15rem .4rem; border-radius: 6px; cursor: pointer; }
.be-head button:hover:not(:disabled) { background: var(--ink-tint); color: var(--ink); }
.be-head button:disabled { opacity: .3; cursor: default; }
.be-h2 textarea { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.be-h3 textarea { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; }
.be-quote textarea { font-style: italic; border-left: 4px solid var(--marigold); }
.be-callout textarea { background: var(--marigold-tint); }
.be-img { max-width: 100%; max-height: 260px; border-radius: 8px; display: block; margin: .3rem 0; }
.be-add { display: flex; flex-wrap: wrap; gap: .35rem; padding: .7rem; border: 1px dashed var(--ink-line); border-radius: var(--r-sm); }
.be-actions { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); flex-wrap: wrap; }
.be-actions > div { display: flex; gap: .5rem; }
.blog-preview { padding: 0; }
@media (max-width: 700px) { .be-row-2 { grid-template-columns: 1fr; } .blog-post { padding: 1rem; } .blog-body { font-size: .98rem; } .be-actions > div { width: 100%; } .be-actions > div .btn-primary, .be-actions > div .btn-secondary { flex: 1; } }
.be-import { border: 1px dashed var(--ink-line); border-radius: var(--r-sm); padding: .6rem .75rem; margin-bottom: 1rem; background: #FBFAFE; }
.be-import summary { cursor: pointer; font-weight: 700; font-size: .85rem; color: var(--ink); }
.be-import-help { font-size: .74rem; color: var(--muted); line-height: 1.55; margin: .5rem 0; }
.be-import-help code { background: var(--ink-tint); padding: 0 .25rem; border-radius: 3px; font-size: .7rem; }
.be-import textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; font: inherit; font-size: .82rem; resize: vertical; }
.be-import-file { cursor: pointer; display: inline-flex; align-items: center; }

/* ---------- Admin dashboard ---------- */
.adm-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.adm-head .section-title { font-size: 1.2rem; margin: 0 0 .2rem; }
.adm-head-actions { display: flex; gap: .4rem; }
.adm-kpis { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: .6rem; margin-bottom: 1rem; }
.adm-kpis > div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .75rem .85rem; box-shadow: var(--shadow-1); }
.adm-kpis > div.warn { border-color: #F6D58A; background: var(--marigold-tint); }
.adm-kpis span { display: block; font-size: .72rem; color: var(--muted); font-weight: 600; font-variant-caps: all-small-caps; letter-spacing: .05em; }
.adm-kpis strong { display: block; font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.adm-tools { display: flex; gap: .5rem; margin-bottom: .6rem; flex-wrap: wrap; }
.adm-tools input { flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .8rem; font: inherit; font-size: .85rem; }
.adm-sort select { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .8rem; font: inherit; font-size: .82rem; background: #fff; height: 100%; }
.adm-tools input:focus, .adm-sort select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.adm-filters { margin-bottom: .5rem; }
.adm-count { font-size: .74rem; color: var(--muted); margin: .2rem 0 .5rem; }
.adm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.adm-table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 820px; }
.adm-table th { text-align: left; font-size: .7rem; font-weight: 700; color: var(--muted); background: #FBFAFE; padding: .55rem .7rem; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
.adm-table td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table td small { display: block; font-size: .68rem; color: var(--muted); margin-top: .1rem; }
.adm-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-table tbody tr { cursor: pointer; transition: background .12s; }
.adm-table tbody tr:hover, .adm-table tbody tr:focus-visible { background: var(--ink-tint); outline: none; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-stale { color: #B42318; }
.adm-trend { font-weight: 700; }
.adm-trend.up { color: var(--profit); } .adm-trend.down { color: var(--loss); } .adm-trend.flat { color: var(--muted); }
.adm-readonly { font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--ink-tint); padding: .3rem .6rem; border-radius: 999px; }
.adm-user-head { display: flex; gap: .9rem; align-items: center; margin-bottom: 1rem; }
.adm-avatar { width: 3rem; height: 3rem; border-radius: 50%; background: var(--ink); color: #FFE07A; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; flex-shrink: 0; }
.adm-user-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.adm-user-head p { margin: .15rem 0 0; font-size: .76rem; color: var(--muted); }
.adm-stats { margin-bottom: 1rem; }
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.adm-grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.adm-grid > div { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .75rem; min-width: 0; }
.adm-grid h4 { margin: 0 0 .5rem; font-family: var(--font-display); font-size: .88rem; color: var(--ink); }
.adm-curve { width: 100%; height: 140px; display: block; }
.adm-heat { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(7, 1fr); gap: 3px; width: 100%; aspect-ratio: 12 / 7; max-height: 220px; }
.adm-heat i, .adm-heat-legend i { display: block; border-radius: 3px; background: #F1EEF6; }
.adm-heat i.lv1, .adm-heat-legend i.lv1 { background: #D9CFEA; } .adm-heat i.lv2, .adm-heat-legend i.lv2 { background: #8EA7C9; }
.adm-heat i.lv3, .adm-heat-legend i.lv3 { background: #6D28D9; } .adm-heat i.lv4, .adm-heat-legend i.lv4 { background: var(--ink); }
.adm-heat i.lvx { background: transparent; }
.adm-heat-legend { display: flex; align-items: center; gap: 3px; justify-content: flex-end; font-size: .66rem; color: var(--muted); margin-top: .4rem; }
.adm-heat-legend i { width: 10px; height: 10px; }
.adm-mini { width: 100%; border-collapse: collapse; font-size: .76rem; }
.adm-mini td { padding: .35rem .2rem; border-bottom: 1px dashed var(--line); }
.adm-mini td:nth-child(2) { color: var(--muted); white-space: nowrap; }
.adm-mini td:last-child { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin: 1rem 0 .8rem; overflow-x: auto; }
.adm-tabs button { border: 0; background: none; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); padding: .55rem .8rem; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.adm-tabs button.active { color: var(--ink); border-bottom-color: var(--marigold); }
.adm-trades { display: grid; gap: .5rem; }
.adm-trade { display: flex; justify-content: space-between; gap: .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; }
.adm-trade-main { min-width: 0; flex: 1; }
.adm-trade-main small { display: block; font-size: .7rem; color: var(--muted); margin: .1rem 0 .3rem; }
.adm-trade > b { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.adm-trade > b small { display: block; font-size: .68rem; color: var(--muted); font-weight: 500; }
.adm-thumbs { display: flex; gap: .4rem; margin-top: .4rem; flex-wrap: wrap; }
.adm-thumbs img { width: 96px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }
.adm-more { margin-top: .6rem; }
.adm-notes { display: grid; gap: .5rem; }
.adm-note { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.adm-note > button { display: block; width: 100%; text-align: left; border: 0; background: #FBFAFE; padding: .6rem .75rem; font: inherit; cursor: pointer; }
.adm-note > button small { display: block; font-size: .7rem; color: var(--muted); }
.adm-note-body { padding: .75rem; font-size: .85rem; line-height: 1.6; }
.adm-note-body img { max-width: 100%; border-radius: 6px; margin: .4rem 0; cursor: zoom-in; display: block; }
.adm-note-text { margin-bottom: .5rem; }
.auth-privacy { font-size: .72rem; color: var(--muted); line-height: 1.5; margin: .6rem 0 0; text-align: center; }
.privacy-notice { position: fixed; z-index: 9000; left: 50%; transform: translateX(-50%); bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); width: min(520px, calc(100vw - 1.5rem)); background: #fff; border: 1px solid var(--ink-line); border-left: 4px solid var(--marigold); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: .9rem 1rem; animation: tc-enter .3s var(--ease-out); }
.privacy-notice strong { display: block; color: var(--ink); font-size: .9rem; }
.privacy-notice p { margin: .3rem 0 .6rem; font-size: .8rem; color: #344054; line-height: 1.5; }
@media (min-width: 701px) { .privacy-notice { bottom: 1.5rem; } }
@media (max-width: 980px) { .adm-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); } .adm-grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .adm-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } .adm-grid { grid-template-columns: 1fr; } .adm-trade { flex-direction: column; } .adm-trade > b { text-align: left; } }

/* ---------- Admin: polish, selection, delete ---------- */
.adm-head { background: radial-gradient(120% 160% at 100% 0%, #3B1F6E 0%, rgba(36,69,111,0) 55%), var(--ink); color: #fff; border: 0; position: relative; overflow: hidden; }
.adm-head .section-title { color: #fff; }
.adm-head .card-sub { color: #C7BCDD; }
.adm-head .btn-secondary { background: rgba(255,255,255,.1); color: #E8EEF6; border-color: rgba(255,255,255,.18); box-shadow: none; }
.adm-head .btn-secondary:hover { background: rgba(255,255,255,.18); }
.adm-toast { position: absolute; top: .6rem; left: 50%; transform: translateX(-50%); background: #E6F6EF; color: #08734F; font-size: .78rem; font-weight: 700; padding: .4rem .8rem; border-radius: 999px; animation: tc-enter .25s var(--ease-out); white-space: nowrap; }
.adm-kpis > div { transition: transform .2s var(--ease-out), box-shadow .2s; }
.adm-kpis > div:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.adm-kpis strong { font-size: 1.7rem; }
.adm-table td.adm-check, .adm-table th.adm-check { width: 2.2rem; padding-right: 0; text-align: center; vertical-align: middle; }
.adm-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--loss); cursor: pointer; }
.adm-table tbody tr.is-selected { background: #FFF5F5; }
.adm-table tbody tr.is-selected:hover { background: #FDECEC; }
.adm-who { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.adm-who strong { display: block; white-space: nowrap; }
.adm-ava { width: 2.1rem; height: 2.1rem; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: var(--ink); background: linear-gradient(135deg, #FFE7A8, #FFD23D); }
.adm-pill { display: inline-block; font-size: .66rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.adm-pill.live { background: #E6F6EF; color: #08734F; } .adm-pill.ok { background: var(--ink-tint); color: var(--ink-2); }
.adm-pill.away { background: var(--marigold-tint); color: var(--marigold-deep); } .adm-pill.gone { background: #FDECEC; color: #B42318; }
.adm-pill.new { background: #EEF0FF; color: #3E47B8; } .adm-pill.admin { background: var(--ink); color: #FFE07A; }
.adm-bar { display: inline-block; width: 42px; height: 5px; border-radius: 3px; background: #F1EEF6; overflow: hidden; vertical-align: middle; margin-right: .35rem; }
.adm-bar i { display: block; height: 100%; width: var(--v); background: linear-gradient(90deg, var(--loss), var(--marigold) 50%, var(--profit)); background-size: 42px 100%; }
.adm-cleanup { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; background: var(--marigold-tint); border: 1px solid #F6D58A; border-radius: var(--r-sm); padding: .55rem .75rem; margin-bottom: .6rem; font-size: .8rem; }
.adm-bulkbar { position: sticky; bottom: calc(4.8rem + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: center; gap: .6rem; width: fit-content; max-width: calc(100% - 1rem); margin: .8rem auto 0; padding: .5rem .6rem .5rem 1rem; background: var(--ink); color: #fff; border-radius: 999px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.55); animation: tc-enter .25s var(--ease-out); }
.adm-bulkbar .btn-secondary { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; box-shadow: none; }
.adm-bulkbar .btn-danger { border-radius: 999px; padding: .5rem .9rem; }
@media (min-width: 701px) { .adm-bulkbar { bottom: 1.2rem; } }
.btn-danger { background: var(--loss); color: #fff; border: 0; border-radius: var(--r-sm); font: inherit; font-weight: 700; cursor: pointer; padding: .6rem 1rem; transition: background .15s, transform .12s var(--ease-out); }
.btn-danger:hover:not(:disabled) { background: #C8302E; }
.btn-danger:active:not(:disabled) { transform: scale(.97); }
.btn-danger:disabled { opacity: .45; cursor: not-allowed; }
.adm-confirm { width: min(460px, 100%); text-align: center; }
.adm-confirm-icon { width: 3.2rem; height: 3.2rem; margin: 0 auto .6rem; border-radius: 50%; background: #FDECEC; display: grid; place-items: center; font-size: 1.4rem; }
.adm-confirm h2 { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); margin: 0 0 .35rem; }
.adm-confirm-list { list-style: none; margin: .9rem 0; padding: 0; text-align: left; border: 1px solid var(--line); border-radius: var(--r-sm); max-height: 220px; overflow: auto; }
.adm-confirm-list li { display: flex; gap: .6rem; align-items: center; padding: .5rem .7rem; }
.adm-confirm-list li + li { border-top: 1px solid var(--line); }
.adm-confirm-list li small { display: block; font-size: .7rem; color: var(--muted); }
.adm-confirm-list li.more { justify-content: center; font-size: .76rem; color: var(--muted); font-weight: 600; }
.adm-confirm-warn { background: #FFF5F5; border: 1px solid #F3C2C1; color: #912018; border-radius: var(--r-sm); padding: .55rem .7rem; font-size: .78rem; margin-bottom: .7rem; text-align: left; }
.adm-confirm-type { display: block; text-align: left; font-size: .78rem; color: var(--muted); margin-bottom: .4rem; }
.adm-confirm-type input { display: block; width: 100%; box-sizing: border-box; margin-top: .3rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; font: inherit; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.adm-confirm-type input:focus { outline: none; border-color: var(--loss); box-shadow: 0 0 0 3px rgba(224,65,63,.15); }
.adm-confirm .sm-form-actions { justify-content: center; }
.adm-confirm .sm-form-actions button { flex: 1; }
@media (max-width: 700px) {
  .adm-table { min-width: 0; }
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; box-sizing: border-box; }
  .adm-table tr { position: relative; display: grid; grid-template-columns: 2rem 1fr auto; gap: .15rem .5rem; padding: .7rem .6rem; border-bottom: 1px solid var(--line); }
  .adm-table td { border: 0; padding: 0; }
  .adm-table td.adm-check { grid-row: 1 / span 2; width: auto; padding-top: .45rem; }
  .adm-table td:nth-child(2) { grid-column: 2; }
  .adm-table td:nth-child(3) { grid-column: 3; text-align: right; }
  .adm-table td:nth-child(n+4) { grid-column: 2 / span 2; display: inline; }
  .adm-table td:nth-child(4), .adm-table td:nth-child(5) { display: inline-block; width: auto; text-align: left; margin-right: .8rem; }
  .adm-table td:nth-child(6), .adm-table td:nth-child(9) { display: none; }
  .adm-table td:nth-child(7), .adm-table td:nth-child(8) { display: inline-block; width: auto; text-align: left; }
  .adm-table td small { display: inline; margin-left: .3rem; }
}

/* ---------- Quote of the Day ---------- */
.qotd { position: relative; margin: 0 0 1rem; padding: 1.15rem 1.35rem 1rem 1.35rem; border-radius: var(--r-md); background: linear-gradient(135deg, #FFF8E6 0%, #FFFDF7 60%); border: 1px solid #F6D58A; box-shadow: var(--shadow-1); overflow: hidden; animation: tc-enter .35s var(--ease-out); }
.qotd::before { content: "“"; position: absolute; right: .6rem; top: -1.6rem; font-family: Georgia, serif; font-size: 9rem; line-height: 1; color: rgba(255,196,0,.18); pointer-events: none; }
.qotd-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.qotd-label { font-size: .74rem; font-weight: 700; color: var(--marigold-deep); font-variant-caps: all-small-caps; letter-spacing: .06em; display: inline-flex; gap: .4rem; align-items: center; }
.qotd-date { font-size: .72rem; color: var(--muted); }
.qotd-text { position: relative; margin: 0; font-family: var(--font-display); font-size: clamp(1.08rem, 2.2vw, 1.35rem); line-height: 1.4; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.qotd-author { margin: .35rem 0 0; font-size: .82rem; color: #6B5A2E; font-style: italic; }
.qotd-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; align-items: center; }
.qotd-link { border: 1px solid #F0D49A; background: rgba(255,255,255,.7); color: var(--ink-2); font: inherit; font-size: .74rem; font-weight: 600; padding: .35rem .7rem; border-radius: 999px; cursor: pointer; text-decoration: none; transition: background .15s; }
.qotd-link:hover { background: #fff; }
.qotd-bell { margin-left: auto; border: 0; background: var(--ink); color: #fff; font: inherit; font-size: .76rem; font-weight: 700; padding: .45rem .85rem; border-radius: 999px; cursor: pointer; box-shadow: 0 6px 14px -8px rgba(20,10,40,.7); }
.qotd-bell:hover:not(:disabled) { background: var(--ink-2); }
.adm-quote { border-left: 4px solid var(--marigold); }
.adm-quote-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.adm-quote-head .section-title { margin: 0; font-size: 1rem; }
.adm-quote textarea, .adm-quote-row input:not([type=checkbox]) { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; font: inherit; font-size: .9rem; resize: vertical; }
.adm-quote textarea { font-family: var(--font-display); font-size: 1rem; }
.adm-quote textarea:focus, .adm-quote-row input:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.adm-quote-row { display: grid; grid-template-columns: 1fr auto auto; gap: .6rem; align-items: center; margin-top: .5rem; }
.adm-quote-row .report-check { margin: 0; white-space: nowrap; }
.adm-quote-progress { margin: .6rem 0 0; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.adm-quote-history { margin-top: .7rem; font-size: .8rem; }
.adm-quote-history summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.adm-quote-history ul { list-style: none; padding: 0; margin: .5rem 0 0; }
.adm-quote-history li { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-top: 1px dashed var(--line); }
.adm-quote-history q { font-weight: 600; color: var(--ink); }
.adm-quote-history small { display: block; color: var(--muted); font-size: .7rem; }
.be-del { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .9rem; padding: .2rem .45rem; border-radius: 6px; }
.be-del:hover { background: #FDECEC; color: var(--loss); }
@media (max-width: 700px) { .adm-quote-row { grid-template-columns: 1fr; } .qotd-bell { margin-left: 0; } }

/* ---------- New logo (pilot wings + candlestick) ---------- */
.brand-icon, .auth-logo, .install-icon { padding: 0 !important; background: none !important; box-shadow: none !important; border-radius: 0 !important; display: inline-flex; line-height: 0; }
.brand-icon img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 14px -6px rgba(0,0,0,.6); }
.auth-logo img { width: 64px; height: 64px; border-radius: 17px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); }
.install-icon { width: auto !important; height: auto !important; }
.install-icon img { width: 56px; height: 56px; border-radius: 15px; }
@media (max-width: 700px) { .brand-icon img { width: 34px; height: 34px; border-radius: 9px; } }

/* ---------- Announcements + feature switches ---------- */
.dash-msgs { margin-bottom: 1rem; }
.dash-msgs.two { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 1rem; align-items: stretch; }
.dash-msgs .qotd { margin: 0; height: 100%; box-sizing: border-box; }
.dash-msgs:not(.two) .ann-wrap { margin-top: 0; }
.dash-msgs:not(.two) > .qotd + .ann-wrap, .dash-msgs:not(.two) .ann + .ann { margin-top: .8rem; }
.ann-wrap { display: grid; gap: .8rem; align-content: start; }
.ann { position: relative; border-radius: var(--r-md); padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-1); border-left: 5px solid var(--ink-3); animation: tc-enter .35s var(--ease-out); }
.ann-important { background: linear-gradient(135deg, #0E0B14, #22163A); color: #fff; border: 0; border-left: 5px solid var(--marigold); }
.ann-celebrate { background: linear-gradient(135deg, #E6F6EF, #fff); border-left-color: var(--profit); }
.ann-top { display: flex; align-items: center; gap: .45rem; margin-bottom: .35rem; }
.ann-icon { font-size: 1.05rem; }
.ann-label { font-size: .7rem; font-weight: 700; letter-spacing: .05em; font-variant-caps: all-small-caps; color: var(--muted); flex: 1; }
.ann-important .ann-label { color: #FFE07A; }
.ann-x { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: inherit; opacity: .55; cursor: pointer; padding: .1rem .35rem; border-radius: 6px; }
.ann-x:hover { opacity: 1; background: rgba(127,127,127,.15); }
.ann h3 { margin: 0; font-family: var(--font-display); font-size: 1.12rem; line-height: 1.3; color: inherit; }
.ann p { margin: .35rem 0 0; font-size: .86rem; line-height: 1.5; opacity: .9; }
.ann-cta { margin-top: .75rem; border: 0; border-radius: 999px; padding: .55rem 1rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; background: var(--ink); color: #fff; transition: transform .12s var(--ease-out), background .15s; }
.ann-important .ann-cta { background: var(--marigold); color: var(--ink); }
.ann-cta:active { transform: scale(.97); }
.adm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.adm-two > .card { margin-bottom: 1rem; }
.adm-ann input, .adm-ann textarea, .adm-ann select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .7rem; font: inherit; font-size: .86rem; background: #fff; }
.adm-ann input, .adm-ann textarea { margin-bottom: .5rem; }
.adm-ann input:focus, .adm-ann textarea:focus, .adm-ann select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.adm-ann-templates { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.adm-ann-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .5rem; }
.adm-ann-row label { font-size: .72rem; font-weight: 600; color: var(--muted); display: grid; gap: .25rem; }
.adm-ann-send { grid-template-columns: 1fr auto; align-items: center; margin-top: .6rem; }
.adm-feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.adm-switch { display: flex; align-items: center; gap: .65rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; background: #FBFAFE; transition: background .15s, border-color .15s; }
.adm-switch.on { background: #fff; border-color: var(--ink-line); }
.adm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.adm-switch-ui { flex-shrink: 0; width: 38px; height: 22px; border-radius: 999px; background: #CBD5E1; position: relative; transition: background .2s; }
.adm-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .2s var(--ease-out); }
.adm-switch.on .adm-switch-ui { background: var(--profit); }
.adm-switch.on .adm-switch-ui::after { transform: translateX(16px); }
.adm-switch input:focus-visible + .adm-switch-ui { outline: 2px solid var(--marigold); outline-offset: 2px; }
.adm-switch b { display: block; font-size: .82rem; }
.adm-switch small { display: block; font-size: .7rem; color: var(--muted); }
.tab-off { margin-left: .35rem; font-size: .58rem; font-weight: 800; letter-spacing: .05em; padding: .1rem .35rem; border-radius: 4px; background: #FDECEC; color: #B42318; vertical-align: 1px; }
/* switched-off features (traders only) */
.feat-off-voice .voice-btn, .feat-off-report [data-action="open-weekly-report"], .feat-off-playbook #setup-playbook, .feat-off-quote #quote-card, .feat-off-announcements .ann-wrap, .feat-off-risk .hero-budget { display: none !important; }
@media (max-width: 900px) { .dash-msgs.two, .adm-two { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .adm-ann-row { grid-template-columns: 1fr; } }
.adm-ann-send label.report-check { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--text); }

/* ---------- Log Trade: quick note on its own full-width row ---------- */
.quick-note-field { margin-top: .2rem; }
.quick-note-box { position: relative; }
.quick-note-box textarea { display: block; width: 100%; box-sizing: border-box; min-height: 84px; max-height: 260px; resize: vertical; padding: .75rem 3.4rem .75rem .9rem; line-height: 1.5; font: inherit; font-size: .9rem; border-radius: var(--r-sm); }
.quick-note-mic { position: absolute; right: .5rem; bottom: .55rem; width: 2.3rem; height: 2.3rem; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-1); transition: background .15s, transform .12s var(--ease-out); }
.quick-note-mic:hover { background: var(--ink-tint); }
.quick-note-mic:active { transform: scale(.94); }
.quick-note-hint { display: block; margin-top: .3rem; font-size: .7rem; color: var(--muted); }
.feat-off-voice .quick-note-hint { display: none; }
@media (max-width: 700px) { .fast-journal-time-fields { grid-template-columns: 1fr !important; } }
.fast-journal-time-fields { grid-template-columns: 1fr 1fr; }
/* system check */
.adm-health-sum { font-weight: 700; padding: .6rem .8rem; border-radius: var(--r-sm); margin: .6rem 0; }
.adm-health-sum.good { background: #E6F6EF; color: #08734F; } .adm-health-sum.bad { background: #FFF5F5; color: #B42318; }
.adm-health-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .4rem; }
.adm-health-list li { display: flex; gap: .5rem; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; font-size: .8rem; }
.adm-health-list li.bad { border-color: #F3C2C1; background: #FFF8F8; }
.adm-health-list small { display: block; color: var(--muted); font-size: .72rem; }

/* ---------- Admin: single "Broadcast" card (quote / announcement) ---------- */
.adm-broadcast { border-left: 4px solid var(--marigold); }
.adm-bc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; margin-bottom: .8rem; }
.adm-bc-head .section-title { margin: 0 0 .15rem; font-size: 1.05rem; }
.adm-bc-head .card-sub { margin: 0; font-size: .78rem; }
.adm-seg { display: inline-flex; gap: 4px; padding: 4px; background: #E7ECF2; border-radius: 12px; margin-bottom: 1rem; max-width: 100%; }
.adm-seg button { border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 700; color: var(--muted); padding: .55rem 1rem; border-radius: 9px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.adm-seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,27,45,.12); }
.adm-seg-count { display: inline-block; margin-left: .3rem; font-size: .66rem; padding: .1rem .4rem; border-radius: 999px; background: #E6F6EF; color: #08734F; }
.adm-bc-body { display: grid; gap: .75rem; max-width: 760px; animation: tc-enter .22s var(--ease-out); }
.adm-field, .adm-field-label { display: grid; gap: .3rem; font-size: .76rem; font-weight: 700; color: var(--muted); }
.adm-field small { font-weight: 500; }
.adm-field input, .adm-field textarea, .adm-ann-row select { width: 100%; box-sizing: border-box; margin: 0 !important; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .8rem; font: inherit; font-size: .9rem; font-weight: 500; color: var(--text); background: #fff; }
.adm-field textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
#aq-text { font-family: var(--font-display); font-size: 1.02rem; font-weight: 600; }
.adm-field input:focus, .adm-field textarea:focus, .adm-ann-row select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.adm-ann-templates { margin-bottom: 0; }
.adm-ann-row { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; }
.adm-ann-row label { display: grid; gap: .3rem; font-size: .76rem; font-weight: 700; color: var(--muted); }
.adm-send-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; padding-top: .75rem; border-top: 1px dashed var(--line); }
.adm-notify { display: inline-flex; align-items: center; gap: .55rem; font-size: .86rem; font-weight: 600; color: var(--text); cursor: pointer; }
.adm-notify input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--ink-2); }
.adm-send-row .btn-primary { padding: .7rem 1.2rem; }
.adm-bc-body .adm-quote-progress { margin: 0; }
.adm-bc-body .adm-quote-history { margin-top: 0; }
@media (max-width: 700px) {
  .adm-seg { display: flex; width: 100%; } .adm-seg button { flex: 1; padding: .55rem .4rem; font-size: .78rem; }
  .adm-ann-row { grid-template-columns: 1fr; }
  .adm-send-row .btn-primary { width: 100%; }
}

/* ---------- Desktop sidebar navigation (≥ 1024px) ---------- */
.side-nav { display: none; }
@media (min-width: 1024px) {
  .header-inner { max-width: none; padding-left: 1.5rem; padding-right: 1.5rem; }
  .app-main { max-width: none; display: grid; grid-template-columns: 236px minmax(0, 1fr); column-gap: 2rem; align-items: start; padding: 1.5rem 2rem 2rem 1.5rem; }
  body.side-collapsed .app-main { grid-template-columns: 72px minmax(0, 1fr); }
  .app-main > .tab-nav { display: none; }
  #tab-content { grid-column: 2; min-width: 0; width: 100%; max-width: 1600px; justify-self: start; }
  .side-nav { display: flex; flex-direction: column; gap: .9rem; grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 1rem; max-height: calc(100vh - 6rem); overflow-y: auto; scrollbar-width: none;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: .9rem .6rem; box-shadow: var(--shadow-1); }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-group { display: grid; gap: 2px; }
  .side-group-label { font-size: .7rem; font-weight: 700; color: var(--muted); font-variant-caps: all-small-caps; letter-spacing: .08em; padding: 0 .7rem .25rem; }
  .side-item { position: relative; display: flex; align-items: center; gap: .7rem; width: 100%; border: 0; background: transparent; color: #344054; font: inherit; font-size: .88rem; font-weight: 600;
    padding: .62rem .7rem; border-radius: 10px; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
  .side-item:hover { background: var(--ink-tint); color: var(--ink); }
  .side-item.active { background: var(--ink); color: #fff; box-shadow: 0 8px 18px -12px rgba(20,10,40,.8); }
  .side-item.active::before { content: ""; position: absolute; left: -.6rem; top: 22%; bottom: 22%; width: 4px; border-radius: 0 4px 4px 0; background: var(--marigold); }
  .side-icon { width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font-size: 1.02rem; flex-shrink: 0; }
  .side-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .side-item .tab-off { margin-left: 0; }
  .side-badge { min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem; border-radius: 999px; background: var(--loss); color: #fff; font-size: .64rem; font-weight: 700; display: grid; place-items: center; }
  .side-collapse { display: flex; align-items: center; gap: .7rem; margin-top: auto; border: 0; border-top: 1px solid var(--line); background: none; padding: .7rem .7rem .2rem; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
  .side-collapse > span:first-child { width: 1.6rem; text-align: center; font-size: 1rem; }
  .side-collapse:hover { color: var(--ink); }
  body.side-collapsed .side-label, body.side-collapsed .side-group-label, body.side-collapsed .side-item .tab-off { display: none; }
  body.side-collapsed .side-item { justify-content: center; padding: .62rem 0; }
  body.side-collapsed .side-badge { position: absolute; top: 2px; right: 4px; }
  body.side-collapsed .side-collapse { justify-content: center; padding-left: 0; padding-right: 0; }
  /* use the space: forms and editors get wider */
  .log-trade-card { max-width: 1280px; margin-left: 0; margin-right: auto; }
}

/* ================= 🏆 Competition ================= */
.comp-picker select { margin-bottom: .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .8rem; font: inherit; font-weight: 600; background: #fff; }
.comp-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 1.4rem; padding: 1.6rem 1.75rem; border-radius: var(--r-lg); color: #fff; margin-bottom: 1rem;
  background: radial-gradient(70% 90% at 100% 0%, rgba(255,196,0,.35), rgba(255,196,0,0) 60%), radial-gradient(60% 80% at 0% 100%, #3B1F6E, rgba(36,69,111,0) 70%), #0E1A30; box-shadow: var(--shadow-2); }
.comp-hero-glow { position: absolute; right: -40px; top: -60px; width: 260px; height: 260px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ctext y='.9em' font-size='90'%3E🏆%3C/text%3E%3C/svg%3E") no-repeat center/contain; opacity: .12; transform: rotate(12deg); pointer-events: none; }
.comp-hero-main { position: relative; }
.comp-hero-top { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.comp-pill { display: inline-flex; align-items: center; gap: .4rem; font-size: .7rem; font-weight: 800; letter-spacing: .08em; padding: .3rem .65rem; border-radius: 999px; }
.comp-pill.live { background: rgba(255,90,87,.18); color: #FF8E8C; } .comp-pill.live i { width: 8px; height: 8px; border-radius: 50%; background: #FF5A57; animation: voice-pulse 1.4s infinite; }
.comp-pill.soon { background: rgba(255,210,122,.18); color: #FFE07A; } .comp-pill.ended { background: rgba(255,255,255,.12); color: #D9CFEA; } .comp-pill.done { background: rgba(61,220,151,.18); color: #3DDC97; }
.comp-dates { font-size: .78rem; color: #C7BCDD; }
.comp-hero h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.1; margin: .55rem 0 .4rem; letter-spacing: -0.02em; }
.comp-strategy { margin: 0; color: #D9CFEA; font-size: .92rem; } .comp-strategy b { color: #FFE07A; }
.comp-countdown { margin: .7rem 0 0; display: inline-block; font-weight: 700; font-size: .85rem; padding: .35rem .7rem; border-radius: 8px; background: rgba(255,255,255,.08); font-variant-numeric: tabular-nums; }
.comp-submit-btn { margin-top: 1rem; display: inline-flex; }
.comp-hero-stats { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-content: center; }
.comp-hero-stats > div { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: var(--r-sm); padding: .65rem .8rem; min-width: 0; }
.comp-hero-stats > div.me { background: rgba(255,196,0,.12); border-color: rgba(255,196,0,.3); }
.comp-hero-stats span { display: block; font-size: .68rem; color: #AA9FC2; font-weight: 600; letter-spacing: .04em; }
.comp-hero-stats strong { display: block; font-family: var(--font-display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.comp-hero-stats strong.comp-alias { font-size: 1rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp-hero-stats small { color: #FFE07A; font-size: .72rem; }
.comp-admin { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .75rem 1rem; border-left: 4px solid var(--ink-3); margin-bottom: 1rem; }
.comp-admin small { display: block; color: var(--muted); font-size: .72rem; }
.comp-admin-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.comp-tabs { display: flex; gap: 4px; padding: 4px; background: #E7ECF2; border-radius: 12px; margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.comp-tabs button { flex: 1; border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 700; color: var(--muted); padding: .6rem .8rem; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.comp-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,27,45,.12); }
.comp-tabs button span { font-size: .68rem; background: var(--ink-tint); color: var(--ink-2); padding: .05rem .4rem; border-radius: 999px; margin-left: .2rem; }
.comp-body { animation: tc-enter .25s var(--ease-out); }
.comp-feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: .9rem; align-items: start; }
.comp-entry { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem 1rem; box-shadow: var(--shadow-1); transition: transform .2s var(--ease-out), box-shadow .2s; }
.comp-entry:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.comp-entry.mine { border-color: #F6D58A; background: linear-gradient(180deg, #FFFCF2, #fff 40%); }
.comp-entry header { display: flex; align-items: center; gap: .6rem; }
.comp-entry header > div { flex: 1; min-width: 0; }
.comp-entry header b { font-size: .9rem; }
.comp-entry header small { display: block; font-size: .7rem; color: var(--muted); }
.comp-ava { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; background: var(--ink-tint); flex-shrink: 0; }
.comp-you { font-size: .62rem; font-weight: 800; padding: .1rem .4rem; border-radius: 4px; background: var(--marigold); color: var(--ink); vertical-align: 1px; }
.comp-real { color: var(--ink-3); font-weight: 600; }
.comp-score { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%; flex-shrink: 0; line-height: 1; border: 3px solid currentColor; }
.comp-score b { font-family: var(--font-display); font-size: 1.05rem; } .comp-score small { font-size: .55rem; opacity: .7; }
.comp-score.great { color: #0B9A6A; background: #E6F6EF; } .comp-score.good { color: #6D28D9; background: var(--ink-tint); } .comp-score.ok { color: #E0A800; background: var(--marigold-tint); } .comp-score.low { color: #E0413F; background: #FDECEC; }
.comp-score.big { width: 4.2rem; height: 4.2rem; } .comp-score.big b { font-size: 1.45rem; }
.comp-trade { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin: .7rem 0 .5rem; }
.comp-trade > b { font-size: 1rem; }
.comp-r { font-size: .74rem; font-weight: 800; padding: .15rem .45rem; border-radius: 6px; font-variant-numeric: tabular-nums; }
.comp-r.win { background: #E6F6EF; color: #08734F; } .comp-r.loss { background: #FDECEC; color: #B42318; } .comp-r.open { background: var(--marigold-tint); color: var(--marigold-deep); }
.comp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.comp-checks li { font-size: .68rem; font-weight: 600; padding: .2rem .45rem; border-radius: 6px; border: 1px solid var(--line); }
.comp-checks li.yes { background: #F0FAF5; color: #08734F; border-color: #CDEFDD; } .comp-checks li.half { background: var(--marigold-tint); color: var(--marigold-deep); border-color: #F6D58A; } .comp-checks li.no { background: #FFF5F5; color: #B42318; border-color: #F3C2C1; }
.comp-note-text { margin: .6rem 0 0; font-size: .82rem; color: #344054; font-style: italic; line-height: 1.5; }
.comp-img { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-top: .6rem; border: 1px solid var(--line); cursor: zoom-in; }
.comp-entry footer { display: flex; justify-content: space-between; align-items: center; margin-top: .6rem; }
.comp-clap { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .3rem .75rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; transition: transform .12s var(--ease-spring), background .15s; }
.comp-clap:hover:not(:disabled) { background: var(--marigold-tint); }
.comp-clap.on { background: var(--marigold); border-color: var(--marigold); color: var(--ink); animation: tc-pop .35s var(--ease-spring); }
.comp-clap:disabled { opacity: .55; cursor: default; }
.comp-empty, .comp-empty-feed { text-align: center; padding: 2.5rem 1rem; }
.comp-empty-trophy { font-size: 3.5rem; animation: tc-pop .6s var(--ease-spring); }
.comp-empty h2 { font-family: var(--font-display); margin: .3rem 0; } .comp-empty p, .comp-empty-feed p { color: var(--muted); max-width: 46ch; margin: .3rem auto 1rem; }
.comp-empty-feed > div { font-size: 2.6rem; }
.comp-pad { padding: 1rem; }
/* leaderboard */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: .8rem; margin: 1rem 0 1.4rem; }
.podium-col { text-align: center; width: min(170px, 30%); }
.podium-medal { font-size: 2.2rem; animation: tc-pop .5s var(--ease-spring) both; }
.podium-col.p1 .podium-medal { font-size: 2.8rem; }
.podium-name { font-weight: 700; font-size: .86rem; margin: .2rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-col small { display: block; font-size: .68rem; color: var(--muted); }
.podium-block { margin-top: .4rem; border-radius: 12px 12px 4px 4px; color: #fff; display: grid; align-content: center; transform-origin: bottom; animation: tc-grow-y .7s var(--ease-out) both; }
.podium-block b { font-family: var(--font-display); font-size: 1.5rem; } .podium-block span { font-size: .68rem; opacity: .85; }
.p1 .podium-block { height: 120px; background: linear-gradient(180deg, #FFD23D, #E0A800); color: var(--ink); }
.p2 .podium-block { height: 90px; background: linear-gradient(180deg, #B9A6E0, #6C8AB5); animation-delay: .1s; }
.p3 .podium-block { height: 70px; background: linear-gradient(180deg, #D79A6B, #A86A3D); animation-delay: .2s; }
.podium.mini .p1 .podium-block { height: 90px; } .podium.mini .p2 .podium-block { height: 68px; } .podium.mini .p3 .podium-block { height: 52px; }
@keyframes tc-grow-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.comp-board-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; margin-bottom: .8rem; }
.comp-board { width: 100%; border-collapse: collapse; font-size: .84rem; }
.comp-board th { text-align: left; font-size: .7rem; color: var(--muted); padding: .55rem .7rem; background: #FBFAFE; border-bottom: 1px solid var(--line); }
.comp-board td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.comp-board td small { display: block; font-size: .7rem; color: var(--ink-3); }
.comp-board .num { text-align: right; font-variant-numeric: tabular-nums; }
.comp-board .rank { font-weight: 800; font-size: 1rem; width: 3rem; }
.comp-board tr.mine { background: #FFFCF2; }
.comp-board.dim { opacity: .7; }
.score-cell { display: flex; align-items: center; gap: .5rem; } .score-cell b { font-variant-numeric: tabular-nums; min-width: 2.6rem; }
.scorebar { flex: 1; height: 8px; border-radius: 5px; background: #F1EEF6; overflow: hidden; min-width: 60px; }
.scorebar i { display: block; height: 100%; width: var(--v); border-radius: 5px; background: var(--ink-3); transform-origin: left; animation: tc-grow-x .8s var(--ease-out) both; }
.scorebar.great i { background: var(--profit); } .scorebar.ok i { background: var(--marigold); } .scorebar.low i { background: var(--loss); }
/* rules & scoring */
.comp-rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.comp-desc { color: #344054; line-height: 1.55; }
.comp-rule-list { margin: .3rem 0 0; padding-left: 1.3rem; } .comp-rule-list li { margin-bottom: .35rem; font-size: .88rem; }
.comp-weights { list-style: none; padding: 0; margin: .6rem 0; display: grid; gap: .5rem; }
.comp-weights li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; font-size: .84rem; }
.comp-weights b { font-variant-numeric: tabular-nums; }
.comp-weights i { grid-column: 1 / -1; height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--marigold) var(--v), #F1EEF6 var(--v)); }
.comp-note { font-size: .8rem; color: var(--muted); line-height: 1.5; margin: .5rem 0 0; }
/* results */
.comp-results { position: relative; overflow: hidden; text-align: center; background: linear-gradient(180deg, #FFF8E6, #fff); border: 1px solid #F6D58A; border-radius: var(--r-lg); padding: 1.3rem 1rem .4rem; margin-bottom: 1rem; }
.comp-results h3 { font-family: var(--font-display); font-size: 1.35rem; margin: 0; color: var(--ink); }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.confetti i { position: absolute; top: -12px; left: var(--x); width: 8px; height: 14px; background: var(--c); border-radius: 2px; animation: confetti-fall 2.6s var(--d) ease-in forwards; }
@keyframes confetti-fall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
/* submit + form modals */
.comp-submit, .comp-form { width: min(640px, 100%); }
.comp-pick { display: grid; gap: .35rem; max-height: 240px; overflow-y: auto; margin: .3rem 0 .8rem; }
.comp-pick-row { display: grid; grid-template-columns: auto auto auto 1fr auto; align-items: center; gap: .45rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .84rem; }
.comp-pick-row.on { border-color: var(--ink-3); background: var(--ink-tint); }
.comp-pick-row small { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-rule-checks { display: grid; gap: .45rem; margin: .4rem 0 .8rem; }
.comp-rule-checks .adm-notify { align-items: flex-start; font-weight: 500; }
.comp-preview { display: flex; align-items: center; gap: .8rem; padding: .7rem; border-radius: var(--r-sm); background: #FBFAFE; border: 1px dashed var(--ink-line); }
.comp-weight-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.comp-weight-edit label { display: grid; grid-template-columns: 1fr 64px 38px; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: 8px; }
.comp-weight-edit input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .4rem; font: inherit; }
.comp-weight-edit small { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.comp-prompt { border-left-color: var(--marigold); }
.comp-prompt-actions { display: flex; gap: .4rem; }
/* phone "More" sheet */
.mobile-more { position: fixed; inset: 0; z-index: 60; }
.mobile-more-backdrop { position: absolute; inset: 0; background: rgba(10,19,35,.45); animation: tc-fade .2s ease-out; }
.mobile-more-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; padding: .6rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; animation: sheet-up .28s var(--ease-out); box-shadow: 0 -20px 40px -20px rgba(0,0,0,.4); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.mobile-more-handle { grid-column: 1 / -1; justify-self: center; width: 42px; height: 5px; border-radius: 3px; background: #D0D7E2; margin-bottom: .4rem; }
.mobile-more-item { position: relative; display: flex; align-items: center; gap: .6rem; padding: .85rem .9rem; border: 1px solid var(--line); border-radius: 14px; background: #FBFAFE; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.mobile-more-item span { font-size: 1.2rem; }
.mobile-more-item.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.mobile-more-item .side-badge { position: absolute; top: .4rem; right: .5rem; }
@media (max-width: 900px) { .comp-hero { grid-template-columns: 1fr; } .comp-rules-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .comp-hero { padding: 1.2rem; } .comp-feed { grid-template-columns: 1fr; }
  .comp-tabs button { flex: 0 0 auto; }
  .comp-board th:nth-child(4), .comp-board td:nth-child(4) { display: none; }
  .podium-name { font-size: .74rem; }
}

/* ----- 🏆 Competition v2: auto-entry from Log Trade, weekly + month-end winners, prizes ----- */
.log-comp-hint { margin: .6rem 0 0; font-size: .82rem; line-height: 1.5; color: #5A4300; background: var(--marigold-tint); border: 1px solid #F6D58A; border-radius: var(--r-sm); padding: .6rem .8rem; }
.log-comp { margin-top: .7rem; border: 1px solid #F6D58A; border-left: 4px solid var(--marigold); border-radius: var(--r-sm); background: linear-gradient(180deg, #FFFCF2, #fff 70%); padding: .8rem .95rem; animation: tc-enter .25s var(--ease-out); }
.log-comp-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .92rem; }
.log-comp .comp-pill.live { background: #FDECEC; color: #B42318; } .log-comp .comp-pill.ended { background: #F1EEF6; color: var(--muted); }
.log-comp-sub { margin: .35rem 0 .5rem; font-size: .82rem; color: #344054; line-height: 1.5; }
.log-comp-crit { margin: .2rem 0 .6rem; font-size: .84rem; } .log-comp-crit summary { cursor: pointer; font-weight: 700; color: var(--ink-2); padding: .25rem 0; }
.log-comp .adm-field-label b { color: var(--marigold-deep); font-variant-numeric: tabular-nums; margin-left: .3rem; }
.log-comp .comp-rule-checks { margin-bottom: .5rem; }
#edit-comp-panel .log-comp { margin: 0 0 .9rem; }
button.journal-chip.chip-comp { border: 1px solid #F6D58A; background: var(--marigold-tint); color: #5A4300; font: inherit; font-size: inherit; font-weight: 700; cursor: pointer; }
.comp-toast { padding-right: 2.4rem; } .comp-toast-x { position: absolute; top: .35rem; right: .4rem; }
.comp-dash { display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; margin: 0 0 1rem; padding: .75rem 1rem; border: 1px solid rgba(255,196,0,.45); border-radius: var(--r-md); cursor: pointer; font: inherit; color: #fff;
  background: radial-gradient(60% 140% at 100% 0%, rgba(255,196,0,.32), rgba(255,196,0,0) 60%), #0E1A30; box-shadow: var(--shadow-1); transition: transform .2s var(--ease-out), box-shadow .2s; }
.comp-dash:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.comp-dash-ico { font-size: 1.6rem; } .comp-dash-text { flex: 1; min-width: 0; } .comp-dash-text b { display: block; font-family: var(--font-display); font-size: 1rem; }
.comp-dash-text small { display: block; color: #C7BCDD; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .comp-dash-go { font-size: 1.2rem; color: #FFE07A; }
.comp-prizes { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 0; }
.comp-prizes span { display: grid; padding: .45rem .75rem; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.comp-prizes span.final { background: rgba(255,196,0,.16); border-color: rgba(255,196,0,.45); }
.comp-prizes i { font-style: normal; font-size: .66rem; letter-spacing: .04em; color: #C7BCDD; font-weight: 600; } .comp-prizes b { font-size: .95rem; color: #FFE07A; }
.comp-hero-cta { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.comp-ghost { background: none; border: 0; color: #D9CFEA; font: inherit; font-size: .82rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: .4rem 0; }
.comp-ghost:hover { color: #fff; }
.comp-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-bottom: 1rem; }
.comp-how > div { display: flex; gap: .7rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem .9rem; }
.comp-how > div > b { flex: 0 0 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #FFE07A; font-family: var(--font-display); }
.comp-how p { margin: 0; font-size: .8rem; color: #344054; line-height: 1.45; } .comp-how strong { display: block; color: var(--ink); font-size: .88rem; } .comp-how em { font-style: normal; font-weight: 700; color: var(--marigold-deep); }
.comp-weekwins { background: #fff; border: 1px solid #F6D58A; border-radius: var(--r-md); padding: .8rem 1rem; margin-bottom: 1rem; }
.comp-weekwins h3 { margin: 0 0 .6rem; font-family: var(--font-display); font-size: 1rem; }
.comp-weekwins-row { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .2rem; }
.comp-weekwin { flex: 0 0 auto; min-width: 190px; display: grid; gap: .1rem; padding: .6rem .8rem; border-radius: 10px; background: var(--marigold-tint); border: 1px solid #F6D58A; }
.comp-weekwin.is-me { background: #E6F6EF; border-color: #9FDDC0; }
.comp-weekwin span { font-size: .68rem; font-weight: 700; color: var(--muted); letter-spacing: .03em; } .comp-weekwin b { font-size: .9rem; } .comp-weekwin small { font-size: .72rem; color: #475467; }
.comp-weekwin i { font-style: normal; font-size: .74rem; font-weight: 700; color: var(--marigold-deep); margin-top: .15rem; } .comp-weekwin i.won { color: #08734F; }
.comp-won { display: inline-block; margin: .5rem auto 0; padding: .45rem .9rem; border-radius: 999px; background: #E6F6EF; color: #08734F; font-weight: 700; font-size: .88rem; }
.comp-admin-line { font-size: .76rem; color: var(--ink-3); margin: 0 0 .8rem; }
.comp-warn { color: #B42318; } .comp-warn-box { margin: .5rem 0; padding: .55rem .75rem; border-radius: 8px; background: #FFF4E5; border: 1px solid #F6D58A; font-size: .82rem; color: #5A4300; }
.podium-col.is-me .podium-name { color: var(--marigold-deep); } .podium-col .comp-you { display: inline-block; margin-top: .15rem; }
.comp-periods { display: flex; gap: .4rem; overflow-x: auto; margin-bottom: .7rem; padding-bottom: .15rem; scrollbar-width: thin; }
.comp-periods button { flex: 0 0 auto; display: grid; text-align: left; gap: .05rem; padding: .45rem .8rem; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.comp-periods button b { font-size: .82rem; } .comp-periods button small { font-size: .68rem; color: var(--muted); }
.comp-periods button.active { background: var(--ink); border-color: var(--ink); color: #fff; } .comp-periods button.active small { color: #C7BCDD; }
.comp-periods button.live:not(.active) { border-color: #F3C2C1; } .comp-periods button:disabled { opacity: .45; cursor: not-allowed; }
.comp-board-head { margin: 0 0 .6rem; font-size: .84rem; color: #344054; }
.comp-board td.num small { display: inline; color: var(--muted); }
.comp-board .positive { color: #08734F; } .comp-board .negative { color: #B42318; }
.comp-px { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin: 0 0 .55rem; }
.comp-px > div { background: #FBFAFE; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .45rem; min-width: 0; }
.comp-px dt { font-size: .62rem; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; } .comp-px dd { margin: 0; font-size: .84rem; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; }
.comp-missed { margin: .5rem 0 0; font-size: .74rem; color: #B42318; line-height: 1.45; }
.comp-entry.removed { opacity: .72; border-style: dashed; } .comp-removed { margin: .6rem 0 0; padding: .45rem .6rem; border-radius: 8px; background: #FDECEC; color: #B42318; font-size: .78rem; line-height: 1.45; }
.comp-entry-actions { display: flex; gap: .7rem; align-items: center; } .comp-entry-actions .pb-link { font-size: .74rem; } .pb-link.danger { color: #B42318; }
.comp-more { text-align: center; margin-top: 1rem; }
.comp-win-rules { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .4rem; font-size: .84rem; color: #344054; line-height: 1.5; }
.comp-num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; margin-top: .7rem; }
.comp-dec-list { margin: .3rem 0 .6rem; padding-left: 1.3rem; display: grid; gap: .45rem; } .comp-dec-list li { font-size: .88rem; } .comp-dec-list small { color: var(--ink-3); } .comp-dec-list span { display: block; font-size: .76rem; color: var(--muted); }
.comp-submit .adm-notify { margin-top: .5rem; } .comp-submit .adm-notify small { color: var(--muted); font-weight: 400; }
@media (max-width: 900px) { .comp-how { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .comp-board th.c-rules, .comp-board td.c-rules, .comp-board th.c-r, .comp-board td.c-r { display: none; }
  .comp-board th:nth-child(4), .comp-board td:nth-child(4) { display: none; }
  .comp-hero-cta .btn-cta { width: 100%; justify-content: center; }
  .comp-dash-text small { white-space: normal; }
}
.log-comp .adm-field-label { display: block; } .log-comp .adm-field-label b { display: inline; }
@media (max-width: 700px) { .comp-hero-stats strong.comp-alias { white-space: normal; font-size: .95rem; } }
.comp-submit .adm-field { margin-bottom: .8rem; }
.comp-submit .adm-field select, .comp-form .adm-field select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .8rem; font: inherit; font-size: .9rem; font-weight: 500; background: #fff; color: var(--ink); }
.comp-form .adm-field-label { display: block; } .comp-form .adm-field-label b { display: inline; }

/* ================= 💯 100 Trades Challenge ================= */
.chal-dash { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; margin: 0 0 1rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow-1); transition: transform .2s var(--ease-out), box-shadow .2s; }
.chal-dash:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.chal-dash.due { border-color: #F6D58A; background: #FFFCF2; }
.chal-dash-num { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; color: var(--ink); min-width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.chal-dash.cta .chal-dash-num { color: var(--marigold-deep); }
.chal-dash-text { flex: 1; min-width: 0; display: grid; gap: .15rem; } .chal-dash-text b { font-size: .95rem; } .chal-dash-text small { color: var(--muted); font-size: .76rem; }
.chal-dash-of { color: var(--muted); font-weight: 700; }
.chal-bar { display: block; height: 6px; border-radius: 4px; background: #F1EEF6; overflow: hidden; margin-top: .2rem; }
.chal-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--ink-3), var(--marigold)); transition: width .6s var(--ease-out); }
.chal-bar.big { height: 10px; background: rgba(255,255,255,.12); margin: .6rem 0 0; }
.chal-hero { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 1.6rem; padding: 1.6rem 1.75rem; border-radius: var(--r-lg); margin-bottom: 1rem; background: #0E0B14; color: #F4F1EA; box-shadow: var(--shadow-2); align-items: center; }
.chal-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #FFC400; }
.chal-hero h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.08; margin: .45rem 0 .6rem; color: #fff; letter-spacing: -0.02em; }
.chal-hero h2 em { font-style: normal; color: #FFC400; }
.chal-hero p { color: #D9CFEA; line-height: 1.55; margin: 0 0 .6rem; } .chal-hero p b { color: #fff; }
.chal-rules { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .45rem; color: #D9CFEA; font-size: .88rem; line-height: 1.45; } .chal-rules b { color: #fff; }
.chal-start { color: var(--ink); align-self: stretch; display: flex; flex-direction: column; gap: .6rem; justify-content: center; }
.chal-start select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .8rem; font: inherit; background: #fff; }
.chal-start .btn-cta { justify-content: center; }
.chal-stages-intro { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .7rem; margin-bottom: 1rem; }
.chal-stages-intro > div { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem .9rem; }
.chal-stages-intro span { font-size: .7rem; font-weight: 700; color: var(--marigold-deep); letter-spacing: .04em; } .chal-stages-intro b { display: block; margin: .2rem 0; font-size: .92rem; } .chal-stages-intro p { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.chal-meta { font-size: .86rem; }
.chal-count { display: flex; align-items: baseline; gap: .4rem; margin-top: .4rem; } .chal-count strong { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; } .chal-count span { color: #AA9FC2; font-weight: 600; }
.chal-waiting { margin: .6rem 0 0 !important; color: #FFE07A !important; font-weight: 600; font-size: .85rem; }
.chal-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem; margin-top: 1rem; }
.chal-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; max-width: 420px; justify-self: end; width: 100%; }
.chal-block { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.chal-block.current { border-color: rgba(255,196,0,.6); background: rgba(255,196,0,.08); }
.chal-cell { aspect-ratio: 1 / 1; border-radius: 5px; background: rgba(255,255,255,.09); }
.chal-cell.clean { background: #3DDC97; } .chal-cell.broke { background: #F5A524; } .chal-cell.mistake { background: #FF6B68; } .chal-cell.open { background: #B9A6E0; }
.chal-cell.waiting { background: repeating-linear-gradient(45deg, rgba(255,196,0,.55) 0 3px, rgba(255,196,0,.15) 3px 6px); }
.chal-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .76rem; color: var(--muted); margin: -.3rem 0 1rem; }
.chal-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.chal-legend i.clean { background: #0B9A6A; } .chal-legend i.broke { background: #E08A00; } .chal-legend i.mistake { background: #E0413F; } .chal-legend i.open { background: #B9A6E0; } .chal-legend i.waiting { background: repeating-linear-gradient(45deg, #FFC400 0 3px, #FBE7B5 3px 6px); }
.chal-due { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.1rem; border-radius: var(--r-md); background: #FFF4E5; border: 1px solid #F6D58A; margin-bottom: 1rem; }
.chal-due b { font-size: .98rem; } .chal-due p { margin: .2rem 0 0; font-size: .82rem; color: #5A4300; }
.chal-focus-card { display: grid; gap: .15rem; padding: .8rem 1rem; border-radius: var(--r-md); background: #E6F6EF; border: 1px solid #9FDDC0; margin-bottom: 1rem; }
.chal-focus-card span { font-size: .7rem; font-weight: 700; color: #08734F; letter-spacing: .04em; text-transform: uppercase; } .chal-focus-card p { margin: 0; font-size: .86rem; color: #1F4D3A; }
.chal-outside { font-size: .82rem; color: #5A4300; background: var(--marigold-tint); border-radius: 8px; padding: .55rem .8rem; margin: 0 0 1rem; }
.chal-track { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .7rem; margin-bottom: 1rem; }
.chal-step { display: flex; gap: .6rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem .85rem; opacity: .7; }
.chal-step.now { opacity: 1; border-color: var(--marigold); box-shadow: 0 0 0 3px rgba(255,196,0,.15); } .chal-step.done { opacity: 1; }
.chal-step-dot { flex: 0 0 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .8rem; background: #F1EEF6; color: var(--ink-2); }
.chal-step.now .chal-step-dot { background: var(--marigold); color: var(--ink); } .chal-step.done .chal-step-dot { background: #0B9A6A; color: #fff; }
.chal-step small { font-size: .68rem; color: var(--muted); font-weight: 700; } .chal-step b { display: block; font-size: .86rem; margin: .1rem 0; } .chal-step p { margin: 0; font-size: .74rem; color: var(--muted); line-height: 1.4; }
.chal-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.chal-stats-grid .section-title small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.chal-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .5rem; margin-top: .6rem; }
.chal-stats > div { background: #FBFAFE; border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; min-width: 0; }
.chal-stats span { display: block; font-size: .68rem; color: var(--muted); font-weight: 600; } .chal-stats strong { display: block; font-family: var(--font-display); font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .chal-stats small { font-size: .68rem; color: var(--muted); }
.chal-note { margin-top: .7rem; padding: .65rem .85rem; border-radius: var(--r-sm); font-size: .84rem; line-height: 1.5; }
.chal-note.on { display: flex; gap: .7rem; align-items: flex-start; background: #EEF3FA; border: 1px solid #D9CFEA; }
.chal-note.off { background: #FFF4E5; border: 1px solid #F6D58A; color: #5A4300; }
.chal-note-num { font-family: var(--font-display); font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.chal-warn { color: #B42318; font-weight: 600; } .chal-focus { color: #08734F; font-weight: 600; }
.chal-history ul { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .5rem; }
.chal-history li { display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: center; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; } .chal-history li small { flex-basis: 100%; color: var(--muted); font-size: .76rem; }
.chal-tag { font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; background: #F1EEF6; color: var(--ink-2); white-space: nowrap; }
.chal-tag.completed { background: #E6F6EF; color: #08734F; } .chal-tag.restarted { background: #FFF4E5; color: #8A5A00; } .chal-tag.stopped { background: #FDECEC; color: #B42318; } .chal-tag.due { background: #FFF4E5; color: #8A5A00; }
.chal-report { background: #fff; border: 1px solid #F6D58A; border-radius: var(--r-lg); padding: 1.2rem 1.3rem; margin-bottom: 1rem; }
.chal-modal .chal-report { border: 0; padding: 0; margin: .4rem 0 .8rem; }
.chal-report-head h2 { font-family: var(--font-display); margin: .3rem 0 .1rem; } .chal-report-head p { margin: 0 0 .8rem; color: var(--muted); font-size: .84rem; }
.chal-report-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: 1rem; align-items: start; }
.chal-report .positive { color: #08734F; font-weight: 700; } .chal-report .negative { color: #B42318; font-weight: 700; }
.chal-next { margin: .8rem 0 0; font-size: .88rem; color: #344054; }
.chal-modal { width: min(720px, 100%); } .chal-modal .chal-stats { margin-bottom: .9rem; }
.chal-modal textarea, .chal-modal input, .chal-modal select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; font: inherit; }
.chal-modal .adm-field { margin-bottom: .7rem; display: grid; gap: .3rem; } .chal-modal .adm-field > span { font-weight: 600; font-size: .86rem; }
.chal-ans { margin: 0; padding: .55rem .7rem; background: #FBFAFE; border-radius: 8px; border: 1px solid var(--line); font-size: .88rem; }
.chal-focus-pick { border: 1px dashed var(--ink-line); border-radius: var(--r-sm); padding: .7rem .8rem; margin-bottom: .8rem; }
.chal-admin .adm-quote-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.chal-admin-table td small { display: block; font-size: .72rem; color: var(--muted); }
.chal-adm-rv summary { cursor: pointer; font-size: .74rem; color: var(--ink-3); font-weight: 600; } .chal-adm-rv p { margin: .25rem 0; font-size: .74rem; color: #344054; max-width: 34ch; }
@media (max-width: 1000px) { .chal-stages-intro, .chal-track { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 900px) { .chal-hero { grid-template-columns: 1fr; } .chal-grid { justify-self: stretch; max-width: none; } .chal-stats-grid, .chal-report-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .chal-stages-intro, .chal-track { grid-template-columns: 1fr; } .chal-stats { grid-template-columns: repeat(2, minmax(0,1fr)); } .chal-hero { padding: 1.2rem; } .chal-hero-actions .btn-cta { width: 100%; justify-content: center; } }
.chal-start .comp-note { color: #475467; }

/* ================= ⏰ Auto reminders ================= */
.rem-strip { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; padding: .6rem .9rem; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }
.rem-strip.cta { border-color: #D9CFEA; background: #EEF3FA; padding: .8rem 1rem; }
.rem-strip.off { opacity: .8; }
.rem-strip p { flex: 1; margin: 0; min-width: 0; } .rem-strip b { display: block; font-size: .9rem; } .rem-strip small { display: block; font-size: .76rem; color: var(--muted); }
.rem-ico { font-size: 1.3rem; }
.adm-rem .adm-quote-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.adm-switch.big { padding: .55rem .8rem; font-weight: 700; position: relative; }
.rem-status { margin: .6rem 0 1rem; padding: .6rem .8rem; border-radius: 8px; font-size: .84rem; line-height: 1.5; }
.rem-status.ok { background: #E6F6EF; color: #08734F; } .rem-status.warn { background: #FFF4E5; color: #8A5A00; } .rem-status small { color: #475467; }
.rem-slots { display: grid; gap: .8rem; }
.rem-slot { border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem .9rem; background: #FBFAFE; display: grid; gap: .55rem; }
.rem-slot.is-off { opacity: .6; }
.rem-slot .adm-switch { padding: .2rem; border: 0; background: none; position: relative; }
.rem-slot-top { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.rem-time input { border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; font: inherit; font-weight: 700; font-size: 1rem; background: #fff; }
.rem-days { display: flex; gap: 4px; }
.rem-days button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font: inherit; font-size: .76rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.rem-days button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.rem-sent { margin-left: auto; font-size: .74rem; font-weight: 700; color: #08734F; }
.rem-slot .adm-field { display: grid; gap: .25rem; } .rem-slot .adm-field > span { font-size: .78rem; font-weight: 600; color: #344054; } .rem-slot .adm-field small { font-weight: 400; color: var(--muted); }
.rem-slot code, .rem-setup code { background: #F1EEF6; padding: .05rem .3rem; border-radius: 4px; font-size: .78rem; }
.rem-slot select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .7rem; font: inherit; font-size: .86rem; background: #fff; }
.rem-slot-row { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr) auto; gap: .6rem; align-items: end; }
.rem-slot-actions { display: flex; gap: .4rem; align-items: center; }
.rem-foot { display: flex; align-items: center; gap: .8rem; margin-top: .9rem; } .rem-msg { flex: 1; font-size: .82rem; color: var(--muted); }
.rem-setup { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.rem-setup summary { cursor: pointer; font-weight: 700; color: var(--ink-2); }
.rem-setup ol { margin: .7rem 0 0; padding-left: 1.2rem; display: grid; gap: .7rem; font-size: .86rem; line-height: 1.55; color: #344054; }
.rem-secret { word-break: break-all; }
.rem-code { margin: .5rem 0 0; padding: .7rem .8rem; background: #0E1A30; color: #E6EDF7; border-radius: 8px; font-size: .74rem; line-height: 1.5; overflow-x: auto; white-space: pre; }
@media (max-width: 700px) { .rem-slot-row { grid-template-columns: 1fr; } .rem-sent { margin-left: 0; } .rem-strip { flex-wrap: wrap; } .adm-rem .adm-quote-head { flex-direction: column; } }

/* ----- in-app confirm dialog + Undo toast ----- */
.tc-confirm-overlay { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 1rem; background: rgba(10,19,35,.5); animation: tc-fade .15s ease-out; }
.tc-confirm { width: min(420px, 100%); background: #fff; border-radius: var(--r-lg); padding: 1.3rem 1.3rem 1.1rem; box-shadow: 0 24px 60px -20px rgba(10,19,35,.5); animation: tc-enter .2s var(--ease-out); }
.tc-confirm h2 { margin: 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.tc-confirm p { margin: .5rem 0 0; font-size: .9rem; color: #344054; line-height: 1.5; }
.tc-confirm-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.1rem; }
.tc-confirm-actions button { min-height: 44px; padding-inline: 1.1rem; }
.tc-undo { position: fixed; z-index: 10040; left: 50%; transform: translateX(-50%); bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 1rem; padding: .7rem .8rem .7rem 1.1rem; border-radius: 12px; background: var(--ink); color: #fff; font-size: .9rem; box-shadow: var(--shadow-2); animation: tc-enter .25s var(--ease-out); max-width: calc(100vw - 2rem); }
.tc-undo button { border: 0; background: var(--marigold); color: var(--ink); font: inherit; font-weight: 700; padding: .45rem .8rem; border-radius: 8px; cursor: pointer; min-height: 36px; }
@media (min-width: 701px) { .tc-undo { bottom: 1.5rem; } }
.tc-undo { width: min(380px, calc(100vw - 2rem)); box-sizing: border-box; justify-content: space-between; }
.tc-undo button { white-space: nowrap; }

/* ----- 💯 Challenge v2 ----- */
.chal-note-body { flex: 1; min-width: 0; }
.chal-risk { display: block; margin-top: .35rem; font-size: .8rem; font-weight: 600; }
.chal-risk.ok { color: #08734F; } .chal-risk.bad { color: #B42318; } .chal-risk.wait { color: #475467; font-weight: 500; }
.chal-rule-checks { margin: .35rem 0 .2rem; }
.chal-note .adm-field-label { display: block; margin-top: .55rem; } .chal-note .adm-field-label b { display: inline; color: var(--ink-2); }
.chal-sub { display: block; margin-top: .4rem; color: var(--muted); font-size: .76rem; }
.chal-streak { margin-left: auto; align-self: center; font-weight: 800; color: #FFE07A; font-size: .95rem; } .chal-streak small { color: #AA9FC2; font-weight: 600; margin-left: .2rem; }
.chal-limits { font-size: .8rem !important; margin-top: .5rem !important; } .chal-limits .comp-ghost { padding: 0 .3rem; font-size: .78rem; }
.chal-cell.risk { background: #B48CFF; } .chal-legend i.risk { background: #8A5CF6; }
.chal-due.checkin { background: #EEF3FA; border-color: #D9CFEA; } .chal-due.checkin p { color: #344054; }
.chal-due-actions { display: flex; gap: .4rem; align-items: center; }
.comp-ghost.dark { color: var(--ink-3); }
.chal-step-fb { margin: .35rem 0 0 !important; padding: .35rem .5rem; border-radius: 6px; background: #E6F6EF; color: #1F4D3A !important; font-size: .74rem !important; }
.chal-step-links { display: flex; flex-wrap: wrap; gap: .3rem .7rem; margin-top: .3rem; }
.chal-curve { width: 100%; height: auto; display: block; margin-top: .5rem; }
.chal-curve path { fill: none; stroke-width: 2.5; stroke-linejoin: round; } .chal-curve path.up { stroke: #0B9A6A; } .chal-curve path.down { stroke: #E0413F; }
.chal-curve circle.up { fill: #0B9A6A; } .chal-curve circle.down { fill: #E0413F; }
.chal-curve line.stage { stroke: #D9CFEA; stroke-dasharray: 4 4; } .chal-curve line.zero { stroke: #98A2B3; } .chal-curve text.lbl { font-size: 11px; fill: #667085; }
.chal-curve-cap { margin: .3rem 0 0; font-size: .82rem; color: var(--muted); } .chal-curve-cap .positive { color: #08734F; } .chal-curve-cap .negative { color: #B42318; }
.chal-missed-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; } .chal-missed-btns b { margin-left: .3rem; background: var(--ink-tint); padding: 0 .4rem; border-radius: 999px; }
.chal-missed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .8rem; color: #344054; } .chal-missed-list small { color: var(--muted); margin: 0 .3rem; }
.chal-verdict { padding: .8rem 1rem; border-radius: var(--r-md); margin-bottom: .9rem; }
.chal-verdict b { font-size: 1rem; } .chal-verdict p { margin: .25rem 0 0; font-size: .86rem; line-height: 1.5; }
.chal-verdict.good { background: #E6F6EF; color: #08734F; } .chal-verdict.warn { background: #FFF4E5; color: #8A5A00; } .chal-verdict.bad { background: #FDECEC; color: #B42318; } .chal-verdict p { color: #344054; }
.chal-fb, .chal-fb-new { padding: .7rem .9rem; border-radius: var(--r-md); background: #E6F6EF; border: 1px solid #9FDDC0; margin: .6rem 0; }
.chal-fb span { font-size: .72rem; font-weight: 700; color: #08734F; text-transform: uppercase; letter-spacing: .04em; } .chal-fb p, .chal-fb-new p { margin: .25rem 0 0; color: #1F4D3A; font-size: .88rem; line-height: 1.5; }
.chal-fb-new { margin: 0 0 1rem; } .chal-fb-new b { color: #08734F; }
.chal-start-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.chal-start input, .chal-start-row input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; font: inherit; background: #fff; }
.chal-start-row select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .75rem; font: inherit; background: #fff; }
.chal-cert-wrap { display: grid; place-items: center; margin: .3rem 0 .8rem; } .chal-cert-img { width: min(360px, 100%); border-radius: 12px; box-shadow: var(--shadow-2); }
.chal-adm-item { border-top: 1px solid var(--line); padding: .4rem 0; } .chal-adm-fb { display: flex; gap: .4rem; align-items: flex-start; }
.chal-adm-fb textarea { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 6px; padding: .35rem .5rem; font: inherit; font-size: .78rem; }
.rem-nudge { background: #EEF3FA; } .rem-nudge b { font-size: .9rem; } .rem-nudge .card-sub { margin: 0; font-size: .78rem; }
@media (max-width: 560px) { .chal-start-row { grid-template-columns: 1fr; } .chal-streak { margin-left: 0; flex-basis: 100%; } .chal-count { flex-wrap: wrap; } }
.chal-stats strong { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.2; }

/* ----- 💯 challenge: every trade, one by one ----- */
.chal-trades-modal { width: min(980px, 100%); }
.chal-adm-open { display: inline-flex; margin-top: .35rem; }
.chal-tm-top { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 1rem; align-items: start; margin-bottom: .8rem; }
.chal-tm-grid { display: grid; grid-template-columns: repeat(10, minmax(0,1fr)); gap: 4px; padding: 8px; border-radius: 12px; background: #0E0B14; }
.chal-tm-grid .chal-cell { border: 0; padding: 0; cursor: pointer; } .chal-tm-grid .chal-cell.empty { cursor: default; background: rgba(255,255,255,.08); }
.chal-tm-grid button.chal-cell:focus-visible { outline: 2px solid #FFC400; outline-offset: 1px; }
.chal-tm-filters { margin: .3rem 0 .8rem; } .chal-tm-filters button span { opacity: .7; margin-left: .2rem; }
.chal-tm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .7rem; }
.chal-tc { border: 1px solid var(--line); border-left: 4px solid #0B9A6A; border-radius: var(--r-sm); padding: .7rem .8rem; background: #fff; display: grid; gap: .45rem; transition: box-shadow .3s; }
.chal-tc.broke { border-left-color: #E08A00; } .chal-tc.risk { border-left-color: #8A5CF6; } .chal-tc.mistake { border-left-color: #E0413F; } .chal-tc.waiting, .chal-tc.over { border-left-color: #FFC400; } .chal-tc.outside { border-left-color: #98A2B3; opacity: .85; }
.chal-tc.flash { box-shadow: 0 0 0 3px rgba(255,196,0,.6); }
.chal-tc header { display: flex; align-items: center; gap: .55rem; } .chal-tc header > div { flex: 1; min-width: 0; } .chal-tc header small { display: block; font-size: .72rem; color: var(--muted); }
.chal-tc-n { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--ink-2); min-width: 2.2rem; }
.chal-tc-r { font-weight: 800; font-size: .8rem; padding: .15rem .45rem; border-radius: 6px; background: #F1EEF6; } .chal-tc-r.win { background: #E6F6EF; color: #08734F; } .chal-tc-r.loss { background: #FDECEC; color: #B42318; } .chal-tc-r.open { background: var(--marigold-tint); color: var(--marigold-deep); }
.chal-tc .chal-tag { justify-self: start; } .chal-tag.ok { background: #E6F6EF; color: #08734F; } .chal-tag.warn { background: #FFF4E5; color: #8A5A00; } .chal-tag.risk { background: #F1EBFF; color: #6B3FD6; } .chal-tag.bad { background: #FDECEC; color: #B42318; } .chal-tag.wait { background: var(--marigold-tint); color: #8A5A00; } .chal-tag.out { background: #F1EEF6; color: #475467; }
.chal-tc .comp-px { margin: 0; }
.chal-tc-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
.chal-tc-checks li { font-size: .7rem; font-weight: 600; padding: .18rem .45rem; border-radius: 6px; border: 1px solid var(--line); background: #FBFAFE; }
.chal-tc-checks li.yes { background: #F0FAF5; color: #08734F; border-color: #CDEFDD; } .chal-tc-checks li.no { background: #FFF5F5; color: #B42318; border-color: #F3C2C1; }
.chal-tc .comp-missed, .chal-tc .comp-note-text { margin: 0; } .chal-tc-exit { margin: 0; font-size: .78rem; color: #475467; }
.chal-tc-imgs { display: flex; gap: .4rem; } .chal-tc-imgs img { width: 84px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }
@media (max-width: 700px) { .chal-tm-top { grid-template-columns: 1fr; } .chal-tm-list { grid-template-columns: 1fr; } }

/* ===== Admin sections (Update 35): Competition and 100 Trades Challenge kept apart ===== */
.adm-secnav { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin: 0 0 1rem; padding: .3rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; position: sticky; top: .5rem; z-index: 5; box-shadow: var(--shadow-1); }
.adm-secnav::-webkit-scrollbar { display: none; }
.adm-secnav button { flex-shrink: 0; border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: .5rem .95rem; font: inherit; font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.adm-secnav button:hover { color: var(--ink); background: var(--ink-tint); }
.adm-secnav button.active { background: var(--ink); color: #fff; }
.adm-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.adm-sec-head .section-title { font-size: 1.15rem; margin: 0 0 .25rem; }
.adm-sec-head .card-sub { max-width: 62ch; margin: 0; }
.adm-comp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.adm-comp-item { margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.adm-comp-top { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.adm-comp-top b { font-size: 1rem; color: var(--ink); }
.adm-comp-meta { margin: 0; font-size: .8rem; color: var(--muted); }
.adm-comp-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: auto; padding-top: .5rem; }
.chal-cfg-item { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.chal-cfg-item:first-of-type { border-top: 0; }
.chal-cfg-item.off .chal-cfg-main b { color: var(--muted); }
.chal-cfg-main { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.chal-cfg-main b { color: var(--ink); }
.chal-cfg-main small { color: var(--muted); font-size: .76rem; }
.chal-cfg-main p { margin: .2rem 0 0; font-size: .82rem; color: var(--text); }
.chal-cfg-main .chal-tag { align-self: flex-start; }
.chal-cfg-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.chal-cfg-actions .danger { color: var(--loss); }
.chal-cfg-form { border: 1px solid var(--marigold); background: var(--marigold-tint); border-radius: var(--r-md); padding: 1rem; margin: .8rem 0; }
.chal-cfg-form h4 { margin: 0 0 .6rem; font-family: var(--font-display); color: var(--ink); }
.chal-cfg-form small { color: var(--muted); }
.chal-cfg-own { margin-top: 1rem; padding-top: .8rem; border-top: 1px dashed var(--line); }
.chal-cfg-own small { display: block; color: var(--muted); font-size: .76rem; font-weight: 400; }
.chal-strat-info { margin: .4rem 0 .6rem; font-size: .84rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; padding: .45rem .7rem; color: var(--text); }
.chal-hero-text .chal-strat-info { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: inherit; }
.chal-strat-info summary { cursor: pointer; font-weight: 600; }
.chal-strat-info p { margin: .4rem 0; }
.chal-strat-info ol { margin: .4rem 0 .2rem; padding-left: 1.2rem; }
.chal-strat-info li { margin: .15rem 0; }
.chal-strat-list { margin: -.2rem 0 .6rem; }
.chal-admin-link { margin: 0 0 .8rem; font-size: .84rem; color: var(--muted); background: var(--ink-tint); border-radius: var(--r-sm); padding: .55rem .8rem; }
@media (max-width: 600px) {
  .chal-cfg-item { flex-direction: column; }
  .chal-cfg-actions { justify-content: flex-start; }
  .adm-secnav { border-radius: var(--r-md); }
}
/* Update 37: new challenge strategy notice for traders already in a challenge */
.chal-newstrat { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; background: var(--marigold-tint); border: 1px solid var(--marigold); border-radius: var(--r-md); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.chal-newstrat-text { flex: 1 1 320px; min-width: 0; }
.chal-newstrat-text b { color: var(--ink); }
.chal-newstrat-text p { margin: .3rem 0 .4rem; font-size: .86rem; color: var(--text); }
.chal-newstrat-actions { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; }
.chal-newstrat .comp-ghost.dark { color: var(--muted); border-color: var(--line); background: transparent; }
@media (max-width: 600px) { .chal-newstrat-actions { width: 100%; } }

/* ===== Update 38: 💬 trader-wise messages ===== */
.msg-card { background: #fff; border: 1px solid var(--marigold); border-left: 5px solid var(--marigold); border-radius: var(--r-md); padding: 1rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow-1); }
.msg-card-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .4rem; }
.msg-card-head h3 { margin: 0; font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); }
.msg-card-head small { color: var(--muted); font-size: .74rem; }
.msg-card-head .comp-ghost { margin-left: auto; }
.msg-card-ico { width: 2.3rem; height: 2.3rem; border-radius: 50%; display: grid; place-items: center; background: var(--marigold-tint); font-size: 1.15rem; flex-shrink: 0; }
.msg-count { display: inline-grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; border-radius: 999px; background: var(--marigold); color: var(--ink); font-size: .72rem; vertical-align: middle; }
.msg-item { display: flex; justify-content: space-between; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--line); }
.msg-item-text { min-width: 0; }
.msg-item-text b { color: var(--ink); }
.msg-item-text p { margin: .25rem 0; font-size: .88rem; color: var(--text); white-space: pre-line; }
.msg-item-text small { color: var(--muted); font-size: .72rem; }
.msg-item-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.msg-more { margin: .3rem 0 0; font-size: .78rem; color: var(--muted); }
.msg-old-wrap { margin-bottom: 1rem; }
.msg-old { background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .8rem; font-size: .85rem; }
.msg-old summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.dm-card .card-sub { margin: .2rem 0 0; }
.dm-result { display: flex; align-items: flex-start; gap: .6rem; margin: .9rem 0 0; padding: .7rem .9rem; background: #E6F6EF; color: #08734F; border: 1px solid #B7E4CF; border-radius: var(--r-sm); font-size: .84rem; font-weight: 600; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
.dm-result span { flex: 1; min-width: 0; }
.dm-result-x { border: 0; background: transparent; color: #08734F; font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 0 .1rem; }
.dm-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 1.2rem; margin-top: 1rem; }
.dm-pick input[type=search] { width: 100%; box-sizing: border-box; }
.dm-filters { margin: .6rem 0; }
.dm-pick-bar { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-bottom: .4rem; }
.dm-list { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.dm-row { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-top: 1px solid var(--line); cursor: pointer; }
.dm-row:first-child { border-top: 0; }
.dm-row:hover { background: var(--ink-tint); }
.dm-row.on { background: var(--marigold-tint); }
.dm-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dm-who b { font-size: .88rem; color: var(--ink); }
.dm-who small { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-push { font-size: .9rem; opacity: .5; }
.dm-push.on { opacity: 1; }
.dm-compose { display: flex; flex-direction: column; gap: .2rem; }
.dm-to { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .82rem; min-height: 2rem; margin-bottom: .4rem; }
.dm-to-empty { color: var(--muted); }
.dm-chip { display: inline-flex; align-items: center; gap: .25rem; background: var(--ink); color: #fff; border-radius: 999px; padding: .2rem .3rem .2rem .65rem; font-size: .76rem; }
.dm-chip.more { padding-right: .65rem; background: var(--ink-3); }
.dm-chip button { border: 0; background: rgba(255,255,255,.18); color: #fff; width: 1.15rem; height: 1.15rem; border-radius: 50%; cursor: pointer; line-height: 1; padding: 0; }
.dm-templates { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .5rem; }
.dm-tpl { border: 1px dashed var(--ink-3); background: transparent; color: var(--ink); border-radius: 999px; padding: .3rem .7rem; font: inherit; font-size: .76rem; cursor: pointer; }
.dm-tpl:hover { background: var(--ink-tint); border-style: solid; }
.dm-compose .adm-field small { color: var(--muted); font-size: .74rem; }
.dm-preview { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--ink-tint); padding: .6rem .75rem; margin: .3rem 0 .5rem; font-size: .85rem; }
.dm-preview span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem; }
.dm-preview p { margin: .2rem 0 0; color: var(--text); white-space: pre-line; }
.dm-send { align-self: flex-start; margin-top: .3rem; }
.dm-send:disabled { opacity: .5; cursor: not-allowed; }
.dm-history { margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.dm-history summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.dm-hist-list { max-height: 320px; overflow-y: auto; margin-top: .5rem; }
.dm-hist { display: flex; justify-content: space-between; gap: .8rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .84rem; }
.dm-hist p { margin: .1rem 0 0; color: var(--text); }
.dm-hist small { color: var(--muted); }
.dm-status { flex-shrink: 0; color: var(--muted); font-size: .76rem; text-align: right; }
.dm-status.read { color: var(--profit); font-weight: 600; }
@media (max-width: 760px) { .dm-grid { grid-template-columns: minmax(0,1fr); } .msg-item { flex-direction: column; } .msg-item-actions { justify-content: flex-start; } }
.rem-setup li, .rem-setup code { overflow-wrap: anywhere; word-break: break-word; }
.rem-setup ol { min-width: 0; grid-template-columns: minmax(0,1fr); }
#dm-search, .dm-compose select, .chal-cfg select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .65rem .8rem; font: inherit; font-size: .88rem; color: var(--text); background: #fff; }
#dm-search:focus, .dm-compose select:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px rgba(124,58,237,.14); }
.rem-setup.done summary { color: #08734F; font-weight: 600; }

/* ===== Update 41: Notes — floating ＋ that adds right where you are ===== */
.note-fab { position: fixed; right: max(1.2rem, env(safe-area-inset-right, 0px)); bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: .6rem; pointer-events: none; }
.note-fab > * { pointer-events: auto; }
.note-fab-btn { width: 3.4rem; height: 3.4rem; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; box-shadow: 0 10px 28px -8px rgba(20,10,40,.55); transition: transform .2s var(--ease-out), background .2s; display: grid; place-items: center; }
.note-fab-btn:hover { background: #241838; }
.note-fab.open .note-fab-btn { transform: rotate(45deg); background: var(--marigold); color: var(--ink); }
.note-fab-menu.note-plus-menu { flex-direction: column; align-items: stretch; gap: .5rem; width: min(330px, calc(100vw - 2.4rem)); margin: 0; padding: .85rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); animation: tc-modal .18s var(--ease-out); }
.note-fab-hint { margin: 0; font-size: .76rem; color: var(--muted); }
.note-fab-row { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.note-fab-row .btn-secondary { width: 100%; justify-content: center; }
.note-fab-menu .note-link-row { display: flex; gap: .4rem; }
.note-fab-menu .note-link-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .6rem; font: inherit; font-size: .82rem; }
.note-live-block.note-insert-target { box-shadow: 0 3px 0 0 var(--marigold); border-radius: 6px; }
.note-live-block.note-just-added { animation: note-flash 1.6s var(--ease-out); border-radius: 6px; }
@keyframes note-flash { 0% { background: var(--marigold-tint); } 100% { background: transparent; } }
@media (max-width: 700px) {
  .note-fab { right: .9rem; bottom: calc(5.3rem + env(safe-area-inset-bottom, 0px)); }
  .note-fab-btn { width: 3.1rem; height: 3.1rem; }
}
.note-fab-row .btn-secondary { padding: .6rem .5rem; font-size: .86rem; font-weight: 600; min-height: 2.6rem; display: flex; align-items: center; }
.note-fab-menu .note-link-row .btn-primary { flex: 0 0 auto; width: auto; padding: .5rem .9rem; }

/* ===================== Update 42 — polish + motion ===================== */
/* Labels: the synthesized small caps rendered as "rEALITY ChECK" in some fonts — use clean tracked caps instead */
.uppercase-label, .field label, .reality-label, .note-reading-label, .analysis-date-control label,
.hero-today > span, .history-quick-note span, .pb-stats span, .pb-criteria span, .pb-trade-notes > span,
.report-summary span, .adm-kpis span, .qotd-label, .ann-label, .side-group-label {
  font-variant-caps: normal; text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; font-weight: 700;
}

/* Hero: last 14 days, one bar per day — grows in on the dashboard intro */
.hero-days { margin-top: .75rem; }
.hero-days-bars { display: grid; grid-template-columns: repeat(14, minmax(0,1fr)); gap: 3px; height: 38px; align-items: center; position: relative; }
.hero-days-bars::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(255,255,255,.16); }
.hd { position: relative; height: 100%; display: block; }
.hd i { position: absolute; left: 12%; right: 12%; border-radius: 2px; height: calc(var(--h) / 2); background: rgba(255,255,255,.18); transform-origin: bottom; }
.hd.up i { bottom: 50%; background: #3DDC97; transform-origin: bottom; }
.hd.down i { top: 50%; background: #FF7A78; transform-origin: top; }
.hd.flat i { height: 2px; top: calc(50% - 1px); background: rgba(255,255,255,.22); }
.hd.today::after { content: ""; position: absolute; inset: -3px -1px; border: 1px solid rgba(255,196,0,.85); border-radius: 4px; }
.hero-days small { display: block; margin-top: .35rem; font-size: .68rem; color: #AA9FC2; }
.hero-days small b { font-weight: 600; }
.hero-days small b.up { color: #3DDC97; } .hero-days small b.down { color: #FF7A78; }
.tc-intro .hd i { animation: tc-bar-grow .55s calc(.45s + var(--i) * 45ms) var(--ease-out) both; }
@keyframes tc-bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Login: a quiet candlestick chart rises behind the card, once */
#auth-screen { position: relative; overflow: hidden; }
#auth-screen > .auth-card { position: relative; z-index: 1; }
.auth-candles { position: absolute; left: 0; right: 0; bottom: 0; height: 58vh; display: flex; align-items: stretch; gap: .5vw; padding: 0 2vw; pointer-events: none; opacity: .28; mask-image: linear-gradient(to top, transparent 0%, #000 25%, #000 75%, transparent 100%); -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 25%, #000 75%, transparent 100%); }
.ac { position: relative; flex: 1; }
.ac .wick { position: absolute; left: 50%; width: 2px; margin-left: -1px; bottom: var(--lo); height: calc(var(--hi) - var(--lo)); background: currentColor; opacity: .7; }
.ac .body { position: absolute; left: 18%; right: 18%; bottom: var(--b); height: max(3px, calc(var(--t) - var(--b))); background: currentColor; border-radius: 2px; }
.ac.up { color: #3DDC97; } .ac.down { color: #FF7A78; }
.ac { animation: tc-candle-rise .5s calc(.15s + var(--i) * 38ms) var(--ease-out) both; transform-origin: 50% 70%; }
@keyframes tc-candle-rise { from { opacity: 0; transform: scaleY(.2); } to { opacity: 1; transform: none; } }
.auth-card { backdrop-filter: blur(6px); }

/* Sidebar: the dark highlight slides to the item you pick */
@media (min-width: 701px) {
  .side-nav { position: sticky; }
  .side-item { z-index: 1; transition: color .25s ease; }
  .side-item.active { background: transparent; box-shadow: none; }
  .side-pill { position: absolute; top: 0; left: 0; z-index: 0; border-radius: 12px; background: var(--ink); box-shadow: 0 8px 18px -12px rgba(20,10,40,.8); pointer-events: none; opacity: 0; transition: transform .32s var(--ease-spring, cubic-bezier(.34,1.56,.64,1)), height .2s ease, width .2s ease; }
}
.side-pill { display: none; }
@media (min-width: 701px) { .side-pill { display: block; } }

/* Progress bars fill up when a tab opens */
.tc-enter :is(.chal-bar i, .scorebar i, .adm-bar i, .hero-budget i), .tc-intro :is(.chal-bar i, .scorebar i, .adm-bar i, .hero-budget i) { animation: tc-fill .8s .15s var(--ease-out) both; transform-origin: left; }
@keyframes tc-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Main call-to-action: a light sweep on hover, so it reads as the button to press */
.btn-cta { position: relative; overflow: hidden; }
.btn-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); pointer-events: none; opacity: 0; }
@media (hover: hover) { .btn-cta:hover::after { opacity: 1; animation: tc-sweep .7s var(--ease-out); } }
@keyframes tc-sweep { from { left: -60%; } to { left: 120%; } }

/* Keyboard focus: one clear ring everywhere */
:is(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--marigold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .ac, .tc-intro .hd i, .tc-enter :is(.chal-bar i, .scorebar i, .adm-bar i, .hero-budget i), .btn-cta:hover::after { animation: none !important; }
  .side-pill { transition: none !important; }
}
@media (min-width: 701px) { .side-item.active:hover { background: transparent; color: #fff; } .side-pill { border-radius: 10px; } }
@media (max-width: 700px) { .auth-candles { height: 30vh; opacity: .35; } }

/* ===== Update 42 (part 2) — tab sections arrive one after another, cards answer the pointer ===== */
/* switching tabs: each top-level block rises in, 45 ms apart (first 8 only, so long pages are not slow) */
#tab-content.tc-enter > * { animation: tc-rise .42s var(--ease-out) both; }
#tab-content.tc-enter > *:nth-child(2) { animation-delay: .045s; }
#tab-content.tc-enter > *:nth-child(3) { animation-delay: .09s; }
#tab-content.tc-enter > *:nth-child(4) { animation-delay: .135s; }
#tab-content.tc-enter > *:nth-child(5) { animation-delay: .18s; }
#tab-content.tc-enter > *:nth-child(6) { animation-delay: .225s; }
#tab-content.tc-enter > *:nth-child(7) { animation-delay: .27s; }
#tab-content.tc-enter > *:nth-child(n+8) { animation-delay: .3s; }
#tab-content.tc-enter { animation: none; }
/* blocks holding something fixed to the screen (notes ＋ button, pop-ups) only fade — a moving parent would drag them along */
#tab-content.tc-enter > *:has(.note-fab, .edit-overlay, .sm-overlay, .modal-overlay, .chal-modal, .chal-trades-modal) { animation-name: tc-fade; }
/* the dashboard hero: a slow light drifting across the ink (paused when not visible on screen by the browser) */
.dashboard-hero-ink { position: relative; isolation: isolate; overflow: hidden; }
.dashboard-hero-ink::after { content: ""; position: absolute; top: -30%; left: -30%; z-index: -1; pointer-events: none; background: radial-gradient(closest-side, rgba(255,196,0,.16), transparent 70%); width: 60%; height: 160%; animation: tc-drift 16s ease-in-out infinite alternate; }
@keyframes tc-drift { from { transform: translate(-10%, -5%); } to { transform: translate(110%, 25%); } }
/* cards you can tap lift a little; plain cards only deepen their shadow */
@media (hover: hover) and (pointer: fine) {
  .card { transition: box-shadow .25s ease, border-color .25s ease; }
  .card:hover { box-shadow: var(--shadow-2); }
  :is(.comp-dash, .chal-dash, .note-list-item, .dashboard-kpi, .adm-comp-item, .chal-cfg-item, .dm-row, .msg-item, .blog-card, .pb-card) { transition: transform .22s var(--ease-out), box-shadow .22s ease; }
  :is(.comp-dash, .chal-dash, .dashboard-kpi, .adm-comp-item, .blog-card, .pb-card):hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(20,10,40,.45); }
  .note-list-item:hover { transform: translateX(3px); }
}
/* the "Sir ka message" card and new-strategy banner nudge once when they appear */
.msg-card, .chal-newstrat { animation: tc-rise .5s .2s var(--ease-out) both; }
.msg-card .msg-card-ico { animation: tc-wiggle 1.2s .8s ease-in-out 2; }
@keyframes tc-wiggle { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
/* toasts and small status lines slide in instead of popping */
:is(.adm-toast, .dm-result) { animation: tc-rise .35s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  #tab-content.tc-enter > *, .dashboard-hero-ink::after, .msg-card, .chal-newstrat, .msg-card .msg-card-ico, :is(.adm-toast, .dm-result) { animation: none !important; }
  :is(.comp-dash, .chal-dash, .dashboard-kpi, .adm-comp-item, .blog-card, .pb-card, .note-list-item):hover { transform: none !important; }
}

/* ===================== Update 43 — Yellow · Black · Purple theme ===================== */
/* pages and cards stay white; the frame (header, sidebar, dashboard hero) is black with purple light; the main buttons are yellow */
.app-header { background: linear-gradient(90deg, #0E0B14 0%, #160F24 55%, #24133F 100%); box-shadow: inset 0 -1px 0 rgba(124,58,237,.45); }
/* buttons: yellow = the main action, purple = everything primary, white = secondary */
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-deep); box-shadow: 0 8px 18px -8px rgba(124,58,237,.65); }
.btn-cta { background: var(--marigold); color: #0E0B14; }
.btn-secondary { color: #22163A; }
.btn-secondary:hover { background: #F3EEFF; border-color: #D9CCF7; color: var(--purple-deep); }
.pb-link, .qotd-link { color: var(--purple-deep); }
/* dashboard hero: black with a purple glow, the drifting light turns yellow-gold */
.dashboard-hero.dashboard-hero-ink { background: radial-gradient(120% 140% at 100% 0%, rgba(124,58,237,.55) 0%, rgba(124,58,237,0) 55%), radial-gradient(80% 120% at 0% 100%, rgba(124,58,237,.22) 0%, rgba(124,58,237,0) 60%), #0E0B14; }
.dashboard-hero-ink::after { background: radial-gradient(closest-side, rgba(255,196,0,.14), transparent 70%); }
.adm-head { background: radial-gradient(120% 160% at 100% 0%, #3B1F6E 0%, rgba(59,31,110,0) 55%), #0E0B14; }
/* sidebar (computer): black panel, yellow pill on the open tab */
@media (min-width: 701px) {
  .side-nav { background: linear-gradient(180deg, #0E0B14 0%, #170F27 100%); border: 1px solid #241838; box-shadow: 0 14px 34px -18px rgba(20,10,40,.7); }
  .side-group-label { color: #8C7FAA; }
  .side-item { color: #D6CDEA; }
  .side-item:hover { background: rgba(167,139,250,.12); color: #fff; }
  .side-item.active, .side-item.active:hover { color: #0E0B14; }
  .side-item.active::before { background: var(--purple-soft); }
  .side-pill { background: var(--marigold); box-shadow: 0 8px 22px -10px rgba(255,196,0,.75); }
  .side-collapse { color: #8C7FAA; border-top-color: #2A1D42; }
  .side-collapse:hover { color: #fff; }
  .side-item .tab-off { background: rgba(255,122,120,.16); color: #FF9C9A; }
}
/* phone bottom menu: purple tint on the open tab, yellow bar on top */
.mobile-tab-btn.active { color: var(--purple-deep); background: #F3EEFF; }
/* admin section tabs, filter chips and the open concept tab: black → purple accents */
.adm-secnav button.active, .blog-tag-row button.active { background: #0E0B14; color: var(--marigold); border-color: #0E0B14; }
.note-concept-tab.active { background: #0E0B14; color: var(--marigold); }
/* small accents */
::selection { background: rgba(124,58,237,.22); }
.section-title { color: #140F1C; }
:is(button, a, input, select, textarea, [tabindex]):focus-visible { outline-color: var(--purple); }
.note-fab-btn { background: #0E0B14; box-shadow: 0 10px 28px -8px rgba(124,58,237,.7); }
.note-fab-btn:hover { background: var(--purple-deep); }
/* challenge start card sits on the black hero: keep its small text readable */
.chal-start .card-sub, .chal-start .comp-note, .chal-start small { color: var(--muted); }
.chal-hero { background: radial-gradient(110% 140% at 100% 0%, rgba(124,58,237,.45) 0%, rgba(124,58,237,0) 55%), #0E0B14; }
