/* Card styles copied from agent/templates/dashboard.html on 2026-05-01.
   Linked by /data/dividend-checker so its rendered cards match the
   dashboard. Dashboard still uses its inline copy — DRY cleanup is a
   future PR. */

/* ── Reset + Tokens ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg:        #111118;
  --surface:   #1c1c2a;
  --surface-2: #262636;
  --border:    rgba(255,255,255,0.12);
  --border-2:  rgba(255,255,255,0.09);
  --text:      #f0f0f8;
  --text-2:    rgba(210,210,230,0.88);
  --text-3:    rgba(210,210,230,0.75);
  --red:       #f84960;
  --amber:     #f7a600;
  --green:     #02c076;
  --blue:      #2e86de;
  --r4: 4px; --r8: 8px; --r12: 12px;
}

/* ── Base ── */
body {
  font-family: "DM Sans", -apple-system, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeUp 0.32s ease both; }
.card:nth-child(1) { animation-delay: 0.04s; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.13s; }
.card:nth-child(4) { animation-delay: 0.18s; }
.card:nth-child(5) { animation-delay: 0.22s; }
.card:nth-child(n+6){ animation-delay: 0.26s; }
/* Suppress fadeUp on re-renders (SWR cache repaint, fresh fetch, filter
   change) so cards don't replay the staggered entrance animation every
   time. The first paint still animates. Toggled by render() via dataset. */
#cards-container.no-anim .card { animation: none !important; }

/* ── Page header ── */
.page-eyebrow {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px; gap: 12px;
}
.eyebrow-label {
  font-family: "DM Mono", monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber);
  display: flex; align-items: center; gap: 6px;
  min-width: 0;
}
.eyebrow-meta { font-family: "DM Mono", monospace; font-size: 11px; color: var(--text-3); white-space: nowrap; flex-shrink: 0; }

/* Title row: H1 + manage-rules CTA on one line */
.page-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.page-title {
  font-family: "DM Sans", "Noto Sans SC", -apple-system, sans-serif;
  font-style: normal;
  font-size: clamp(22px, 5.5vw, 32px);
  font-weight: 600; letter-spacing: -0.02em;
  color: var(--text); line-height: 1.15; margin: 0;
}
.manage-rules-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: rgba(247, 166, 0, 0.12);
  border: 1px solid rgba(247, 166, 0, 0.45);
  border-radius: 8px;
  color: var(--amber);
  font-family: "DM Sans", "Noto Sans SC", -apple-system, sans-serif;
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
.manage-rules-btn:hover { background: rgba(247, 166, 0, 0.2); border-color: var(--amber); }
.manage-rules-btn .icon { font-size: 14px; line-height: 1; }

@media (max-width: 480px) {
  .page-eyebrow { font-size: 10px; }
  .manage-rules-btn { padding: 8px 12px; font-size: 12px; }
}

/* ── Main content padding (bottom handled by _nav.html) ── */
.main-content {
  padding-top: 28px;
  padding-left: 16px;
  padding-right: 16px;
}

/* ── Mobile time row ── */
.mobile-time-row {
  display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px;
}

/* ── Shared button base ── */
.range-btn, .cat-btn, .chip-btn {
  padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: var(--surface); font-size: 13px; font-family: "DM Sans", sans-serif;
  color: var(--text-3); cursor: pointer;
  -webkit-tap-highlight-color: transparent; outline: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.range-btn.active, .cat-btn.active, .chip-btn.active {
  background: rgba(247, 166, 0, 0.18);
  color: var(--text);
  border-color: var(--amber);
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(247, 166, 0, 0.12);
}
.chip-btn.chip-risk {
  border-color: var(--red);
  color: var(--red);
}
.chip-btn.chip-risk.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ─── Filter bar: market + time dropdowns + clear (post-login IA redesign) ── */
.filter-bar {
  display: flex; gap: 10px; align-items: center;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.dropdown-wrap { position: relative; }
.dropdown-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px; padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer; font-weight: 500;
  font-family: inherit;
}
.dropdown-btn .dim { color: var(--text-3); font-weight: 400; margin-right: 2px; font-size: 11px; }
.dropdown-btn .caret { font-size: 9px; opacity: .6; margin-left: 2px; }
.dropdown-btn:hover { background: var(--border); }
.dropdown-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  min-width: 140px; padding: 4px 0;
  z-index: 100;
  display: none;
}
.dropdown-menu.open { display: block; }
.dropdown-menu a {
  display: block; padding: 8px 14px;
  font-size: 12px; color: var(--text-2);
  text-decoration: none;
}
.dropdown-menu a:hover { background: var(--surface-2); color: var(--text); }
.dropdown-menu a.active { color: var(--text); font-weight: 600; background: var(--surface-2); }
.filter-clear {
  margin-left: auto;
  font-size: 11px; color: var(--text-3);
  background: none; border: none;
  cursor: pointer; padding: 4px 8px;
  font-family: inherit;
}
.filter-clear:hover { color: var(--text); }

.tab-count {
  display: inline-block; background: var(--surface-2); color: var(--text-3);
  border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 4px;
  font-family: "DM Mono", monospace;
}
.cat-btn.active .tab-count, .chip-btn.active .tab-count {
  background: rgba(255,255,255,0.10); color: var(--text-2);
}

/* ── Mobile chip rows ── */
.chip-row {
  display: flex; flex-wrap: nowrap; gap: 6px;
  overflow-x: auto; margin-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

@media (max-width: 480px) {
  .range-btn, .cat-btn, .chip-btn { font-size: 11px; padding: 5px 10px; white-space: nowrap; }
}

/* ── Desktop overrides ── */
@media (min-width: 1024px) {
  /* Mobile-only elements hidden on desktop */
  .mobile-time-row { display: none; }
  .page-eyebrow { display: none; }

  .main-content { padding-top: 40px; padding-left: 40px; padding-right: 40px; max-width: 960px; }
}

/* /today page: show chip filters in main content on desktop too (not just sidebar drill-down) */
body[data-active-page="today"] #mobile-chips-container { display: block !important; }

@media (min-width: 480px) and (max-width: 1023px) {
  .main-content {
    padding-top: 40px;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ── Section divider ── */
.section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}
.section-rule { flex: 1; height: 1px; background: var(--border-2); }

/* ── Card shell ── */
.card-grid { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1024px) {
  .card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r12); overflow: hidden;
  transition: border-color 0.18s;
}
.card:hover { border-color: rgba(255,255,255,0.15); }

/* Left accent strip — removed 2026-04-21 per product feedback; the
   card-kpi color + type-badge already carry the signal-type cue, and
   the inset bar was visually noisy. Classes stay (JS may query them)
   but no longer paint anything. */

/* ── Card head ── */
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px; gap: 12px;
  border-bottom: 1px solid var(--border-2);
}
.card-head-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex-wrap: wrap; }
.card-ticker {
  font-family: "DM Mono", monospace; font-size: 17px; font-weight: 700;
  letter-spacing: 0.01em; color: var(--text); flex-shrink: 0;
}
a.card-ticker {
  text-decoration: none;
  border-bottom: 1px dotted var(--text-3);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, border-bottom-style 0.12s;
}
a.card-ticker:hover,
a.card-ticker:focus-visible {
  color: var(--amber);
  border-bottom-color: var(--amber);
  border-bottom-style: solid;
  outline: none;
}
.card-name {
  font-size: 11px; font-family: "DM Mono", monospace;
  color: var(--text-4); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: 160px; line-height: 1.2; margin-top: 1px;
}
.type-badge {
  font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: 0.05em; border: 1px solid;
  white-space: nowrap; flex-shrink: 0;
}
.badge-opportunity { color: var(--green); background: rgba(52,199,89,0.12);  border-color: rgba(52,199,89,0.28); }
.badge-risk        { color: var(--red);   background: rgba(255,69,58,0.12);  border-color: rgba(255,69,58,0.28); }
.badge-leaps       { color: var(--blue);  background: rgba(10,132,255,0.12); border-color: rgba(10,132,255,0.28); }
.badge-dividend    { color: var(--amber); background: rgba(255,179,64,0.12); border-color: rgba(255,179,64,0.28); }
.badge-warn        { color: var(--amber); background: rgba(255,179,64,0.09); border-color: rgba(255,179,64,0.20); }

/* Key metric — header right, hero style */
.card-kpi {
  font-family: "DM Mono", monospace; font-size: 26px; font-weight: 700;
  letter-spacing: -0.02em; flex-shrink: 0; line-height: 1; text-align: right;
}
.card-kpi small {
  display: block; font-size: 10px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-4); margin-top: 4px;
}
.kpi-green { color: var(--green); }
.kpi-red   { color: var(--red);   }
.kpi-blue  { color: var(--blue);  }
.kpi-amber { color: var(--amber); }

/* ── Card body rows ── */
.card-body { padding: 2px 16px 10px; }
.card-row {
  display: flex; align-items: flex-start;
  padding: 6px 0; min-height: 28px; gap: 12px;
}
.row-label { color: var(--text-3); font-size: 12.5px; font-weight: 500; width: 110px; flex-shrink: 0; padding-top: 2px; letter-spacing: 0.01em; }
.row-value {
  font-family: "DM Mono", monospace; font-size: 13.5px; font-weight: 500;
  color: var(--text); text-align: left; line-height: 1.5;
}
.card-warn { font-size: 12px; color: var(--red); padding: 6px 0; }
/* ── Card foot with menu trigger ── */
.card-foot {
  font-family: "DM Mono", monospace; font-size: 11px; color: var(--text-3);
  padding: 7px 16px 9px; border-top: 1px solid var(--border-2);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-foot-time { flex: 1 1 auto; }
.card-menu-trigger {
  flex: 0 0 auto;
  background: transparent; border: none; color: var(--text-3); cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px;
  transition: background 120ms ease, color 120ms ease;
}
.card-menu-trigger:hover, .card-menu-trigger[aria-expanded="true"] {
  background: var(--surface-2); color: var(--text);
}
.card-menu-trigger:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 1px;
}
.card-menu-trigger[disabled] { opacity: 0.5; cursor: progress; }

/* ── Card menu dropdown ── */
.card-menu-dropdown {
  position: fixed; z-index: 9000;
  min-width: 160px; padding: 6px;
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  font-family: "DM Sans", sans-serif; font-size: 13px;
}
.card-menu-dropdown[hidden] { display: none; }
.card-menu-item {
  display: block; width: 100%; padding: 8px 10px;
  background: transparent; border: none; border-radius: 6px;
  color: var(--text); text-align: left; cursor: pointer;
  font-family: inherit; font-size: inherit;
}
.card-menu-item:hover, .card-menu-item:focus-visible {
  background: rgba(255,255,255,0.06); outline: none;
}

/* ── Card download preview modal ── */
.card-download-modal-backdrop {
  position: fixed; inset: 0; z-index: 9100;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.card-download-modal-backdrop[hidden] { display: none; }
.card-download-modal-body {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 14px; padding: 16px;
  width: min(560px, 92vw); max-height: 92vh;
  display: flex; flex-direction: column; gap: 12px;
  font-family: "DM Sans", sans-serif;
}
.card-download-modal-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; color: var(--text-3); font-size: 13px;
}
.card-download-modal-spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(255,255,255,0.10);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: cardDownloadSpin 0.8s linear infinite;
}
@keyframes cardDownloadSpin { to { transform: rotate(360deg); } }
.card-download-modal-title {
  font-size: 14px; font-weight: 600; color: var(--text); margin: 0;
}
.card-download-modal-img-wrap {
  flex: 1 1 auto; overflow: auto; display: flex; align-items: center;
  justify-content: center; background: var(--surface-2); border-radius: 10px;
  min-height: 360px;
}
.card-download-modal-img {
  max-width: 100%; height: auto; display: block; border-radius: 6px;
}
.card-download-modal-error {
  color: var(--red, #ff453a); font-size: 13px; padding: 24px; text-align: center;
}
.card-download-modal-actions {
  display: flex; justify-content: flex-end; gap: 8px;
}
.card-download-btn {
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text);
}
.card-download-btn-primary {
  background: var(--blue); border-color: var(--blue);
  color: var(--bg);
}
.card-download-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Chips ── */
.pct-chip {
  font-family: "DM Mono", monospace; font-size: 11px; font-weight: 500;
  padding: 2px 7px; border-radius: 20px; border: 1px solid; flex-shrink: 0;
}
.pct-high { color: var(--green); background: rgba(52,199,89,0.10);  border-color: rgba(52,199,89,0.22); }
.pct-mid  { color: var(--amber); background: rgba(255,179,64,0.10); border-color: rgba(255,179,64,0.22); }
.pct-low  { color: var(--red);   background: rgba(255,69,58,0.10);  border-color: rgba(255,69,58,0.22); }
.pct-acc  { color: var(--text-3); background: var(--surface-2); border-color: var(--border); }

/* ── Entry banner (yield percentile between card-head and card-body) ── */
.entry-banner {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 16px; border-top: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
  font-size: 12px;
}
.entry-banner-label { color: var(--text-2); flex-shrink: 0; font-weight: 500; }
.entry-banner-bar   { display: inline-flex; align-items: center; }
.pctile-bar-viz {
  display: inline-block; position: relative;
  width: 88px; height: 5px;
  background: var(--surface-2);
  border-radius: 3px; overflow: hidden;
  vertical-align: middle;
}
.pctile-bar-fill {
  display: block; height: 100%;
  background: currentColor; opacity: 0.85;
  border-radius: 3px;
  transition: width 0.3s ease;
}
.entry-banner-pct   { font-family: "DM Mono", monospace; font-size: 13px; font-weight: 600; }
.entry-banner-range { color: var(--text-4); opacity: 0.85; font-size: 11px; font-family: "DM Mono", monospace; }
/* Keep pct + range + ℹ glued on narrow screens so the icon can't orphan */
.entry-banner-nowrap {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; flex-shrink: 0;
}
.entry-banner-info {
  display: inline-block; opacity: 0.55;
  cursor: pointer; position: relative;
  font-size: 11px;
}
.entry-banner-info:hover { opacity: 0.9; }

/* ── Price-band visualization (additive, never replaces existing rows) ── */
.price-band {
  position: relative; margin: 12px 16px 22px;
  height: 56px;                   /* room for breathing space between labels and dots */
}
.price-band-track {
  position: absolute; left: 0; right: 0; top: 30px; height: 3px;
  background: linear-gradient(to right, rgba(248,73,96,0.65), rgba(247,166,0,0.65), rgba(2,192,118,0.5));
  border-radius: 2px;
}
.price-band-pt {
  position: absolute; top: 23px; width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, 0);
  border: 3px solid var(--surface);
}
.price-band-pt.now    { background: var(--text); box-shadow: 0 0 0 1px var(--border); }
.price-band-pt.golden { background: var(--amber); }
.price-band-pt.strike { background: var(--amber); }
.price-band-pt.floor  { background: var(--red); }
.price-band-lab {
  position: absolute; font-family: "DM Mono", monospace;
  font-size: 10.5px; line-height: 1.3;
  transform: translate(-50%, 0); white-space: nowrap;
  top: 0; color: var(--text-2);
}
.price-band-lab b { color: var(--text); font-weight: 600; }
.price-band-lab.below {
  top: auto; bottom: 0;
  font-family: "DM Sans", "Noto Sans SC", sans-serif; font-size: 10.5px;
}

/* Earnings-risk banner — plain inline warning, no left color bar
   (dropped 2026-04-21 per product feedback alongside .card--* strips). */

/* ── Dividend card groups (labeled sections) ── */
.card-body:has(.dc-group) {
  padding: 0;
  display: flex; flex-direction: column;
}

.dc-group {
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--border-2);
}
.dc-group:last-child { border-bottom: none; }

/* Group title — de-emphasized section label */
.dc-group-title {
  font-size: 10px; font-weight: 600; color: var(--text-4);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 8px;
}

/* Analysis collapse */
.analysis-toggle {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 5px 6px; margin: 0;
  border-radius: var(--r8); user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}
.analysis-toggle:hover { background: var(--surface-2); }

.biz-label {
  font-size: 12px; font-weight: 600; color: var(--blue);
  background: rgba(10,132,255,0.08); border: 1px solid rgba(10,132,255,0.18);
  padding: 1px 8px; border-radius: 20px; display: inline-block; margin-right: 6px;
}
.biz-hint { font-size: 12px; color: var(--text-3); }

/* Arrow */
.toggle-arrow {
  font-size: 11px; color: var(--text-3);
  padding: 1px 7px;
  border: 1px solid var(--border); border-radius: var(--r4);
  background: var(--surface-2);
  display: inline-block; line-height: 1.6;
  transition: transform 0.22s ease, color 0.15s, border-color 0.15s;
}
.analysis-toggle:hover .toggle-arrow { color: var(--text); border-color: rgba(255,255,255,0.22); }

.analysis-body {
  font-size: 13px; color: var(--text); line-height: 1.7;
  white-space: pre-line; overflow: hidden;
  max-height: 0; transition: max-height 0.28s ease, padding 0.2s ease;
}
.analysis-body.open { max-height: 600px; padding-top: 8px; }

/* Quality breakdown */
.stab-info-btn {
  cursor: pointer; font-size: 11px; color: var(--text-3);
  margin-left: 6px; padding: 1px 7px;
  border: 1px solid var(--border); border-radius: var(--r4);
  background: var(--surface-2);
  display: inline-block; line-height: 1.6;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.stab-info-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.22); }
.stability-detail {
  margin-top: 6px; padding: 10px; background: var(--surface-2);
  border-radius: var(--r8); border: 1px solid var(--border);
}
.earnings-reactions-detail {
  margin-top: 6px; padding: 8px; background: var(--surface-2);
  border-radius: var(--r8); border: 1px solid var(--border);
}
.earnings-reactions-table {
  width: 100%; border-collapse: collapse;
  font-family: "DM Mono", monospace; font-size: 11px;
}
.earnings-reactions-table th, .earnings-reactions-table td {
  padding: 5px 4px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--border-2);
}
.earnings-reactions-table th:first-child, .earnings-reactions-table td:first-child { text-align: left; }
.earnings-reactions-table th {
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600;
}
.earnings-reactions-table tbody tr:last-child td { border-bottom: none; }
.earnings-reactions-table .pct-up { color: var(--green); }
.earnings-reactions-table .pct-down { color: var(--red); }
.earnings-reactions-table .pct-zero { color: var(--text-3); }
.er-badge { display: inline-block; padding: 1px 5px; border-radius: 3px; font-size: 8px; font-weight: 600; letter-spacing: 0.08em; }
.er-bmo { background: rgba(46,134,222,0.18); color: var(--blue); }
.er-amc { background: rgba(247,166,0,0.18); color: var(--amber); }
.er-unk { background: rgba(210,210,230,0.10); color: var(--text-3); }
.breakdown-row { display: flex; align-items: center; gap: 8px; margin: 5px 0; }
.bd-label  { width: 78px; color: var(--text-3); flex-shrink: 0; font-size: 11px; }
.bd-bar-wrap { flex: 1; background: var(--border); border-radius: 2px; height: 3px; min-width: 40px; }
.bd-bar    { height: 3px; background: var(--blue); border-radius: 2px; }
.bd-score  {
  min-width: 52px;         /* fits "12.4/20" (~45px) + a little padding */
  text-align: right;
  color: var(--text-2); flex-shrink: 0;
  font-family: "DM Mono", monospace; font-size: 11px;
  white-space: nowrap;
}

.dc-combined {
  font-family: "DM Mono", monospace; font-size: 15px; font-weight: 500;
  color: var(--amber); padding: 4px 0;
}
.floor-warn     { font-size: 12px; color: var(--amber); padding: 4px 0; }
.freshness-warn { font-size: 12px; color: var(--amber); padding: 4px 0; }
.freshness-old  { font-size: 12px; color: var(--text-3); padding: 4px 0; }

/* ── Watch section ── */
.watch-section { padding: 4px 0 6px; }
.watch-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; font-family: "DM Sans", sans-serif;
  font-size: 13px; color: var(--text-2);
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
  margin-bottom: 10px; outline: none;
}
.watch-btn:hover { border-color: rgba(255,255,255,0.18); color: var(--text); }
.watch-btn.watched {
  border-color: rgba(52,199,89,0.32); color: var(--green);
  background: rgba(52,199,89,0.08);
}
.watch-star { font-size: 15px; line-height: 1; }
.watch-items { padding: 0 2px; }
.watch-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-3); padding: 4px 0;
  line-height: 1.4;
}
.watch-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green); flex-shrink: 0; opacity: 0.65;
}

/* ── Empty / Loading ── */
.empty-state { text-align: center; color: var(--text-3); font-size: 14px; padding: 72px 0; }
.loading { text-align: center; padding: 72px 0; color: var(--text-3); font-family: "DM Mono", monospace; font-size: 13px; }

/* ── Strategy Tabs ──────────────────────────────── */
.strategy-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.strategy-tab {
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); cursor: pointer; transition: all 0.15s; user-select: none;
  position: relative;
}
.strategy-tab.active { background: rgba(10,132,255,0.15); border-color: rgba(10,132,255,0.4); color: var(--blue); font-weight: 600; }
.strategy-tab.active-green { background: rgba(52,199,89,0.22); border-color: rgba(52,199,89,0.6); color: var(--green); font-weight: 600; }
.strategy-tab.viable { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); color: var(--text-2); font-weight: 500; }
.strategy-tab.disabled { opacity: 0.38; cursor: default; pointer-events: none; }
.strategy-tab.disabled-reason { opacity: 0.45; cursor: pointer; }
.strategy-panel { display: none; }
.strategy-panel.visible { display: block; }
.strategy-row { display: flex; align-items: baseline; padding: 6px 0; gap: 12px; }
.strategy-row-label { font-size: 14px; font-weight: 500; color: var(--text-2); width: 120px; flex-shrink: 0; }
.strategy-row-value { font-family: 'DM Mono', monospace; font-size: 15px; color: var(--text); }
.strategy-row-value.highlight { color: var(--amber); font-size: 15px; font-weight: 500; }
.strategy-ai-reason { font-size: 12px; color: var(--text-2); line-height: 1.6; padding: 8px 0 10px; border-bottom: 1px solid var(--border-2); margin-bottom: 8px; }
.strategy-ai-label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 2px; }
/* Sell-put ladder grid (inside the Sell Put strategy tab) */
.sp-ladder { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; border: 1px solid var(--border-2); border-radius: 6px; overflow: hidden; }
.sp-ladder-row { display: grid; grid-template-columns: 1.4fr 0.7fr 1fr 0.9fr 0.9fr; gap: 8px; padding: 6px 10px; font-family: 'DM Mono', monospace; font-size: 13px; color: var(--text); }
.sp-ladder-row > span { display: flex; align-items: center; gap: 4px; }
.sp-ladder-head { background: rgba(255,255,255,0.03); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-family: "DM Sans", sans-serif; padding-top: 5px; padding-bottom: 5px; }
.sp-ladder-row.sp-ladder-top { background: rgba(255,179,64,0.06); }
.sp-ladder-row.sp-ladder-top > span:first-child { color: var(--amber); font-weight: 500; }
.sp-ladder-row + .sp-ladder-row { border-top: 1px solid var(--border-2); }
.tab-tooltip { position: fixed; background: var(--surface-2); border: 1px solid var(--border); padding: 8px 12px; border-radius: 8px; font-size: 12px; white-space: normal; line-height: 1.5; max-width: min(320px, 90vw); z-index: 200; color: var(--text-2); pointer-events: none; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }

/* ── Analysis dims ──────────────────────────────── */
.analysis-dim { padding: 8px 0; border-bottom: 1px solid var(--border-2); }
.analysis-dim:last-child { border-bottom: none; }
.analysis-dim-label { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); margin-bottom: 3px; }
.analysis-dim-body { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.analysis-dim-price { font-family: 'DM Mono', monospace; font-size: 15px; color: var(--amber); font-weight: 500; margin-top: 3px; }

/* ── Signal groups ──────────────────────────────── */
.signal-group { margin-bottom: 24px; }
.signal-group-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px; padding: 0 2px;
}
.signal-group-label {
  font-family: "DM Sans", "Noto Sans SC", sans-serif;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  white-space: nowrap;
}
.signal-group-count {
  font-family: "DM Mono", monospace;
  font-size: 11px; color: var(--text-3);
  white-space: nowrap;
}
.signal-group-rule {
  flex: 1; height: 1px;
  background: var(--border-2);
}

/* ── Loading skeleton (shimmer) ── */
.skel-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r12); padding: 16px 18px; margin-bottom: 10px; }
.skel-line { height: 12px; background: linear-gradient(90deg, var(--surface-2) 25%, rgba(255,255,255,0.06) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: skelShimmer 1.4s infinite; border-radius: 4px; margin-bottom: 10px; }
.skel-line.w30 { width: 30%; } .skel-line.w40 { width: 40%; } .skel-line.w50 { width: 50%; }
.skel-line.w60 { width: 60%; } .skel-line.w70 { width: 70%; } .skel-line.w80 { width: 80%; }
.skel-line.h18 { height: 18px; }
@keyframes skelShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── /today chip filter — desktop polish (post-login IA redesign) ─── */
/* Mobile chip CSS uses nowrap + overflow-x scroll. On desktop wide containers
   we want chips to wrap onto multiple lines at their natural width instead of
   either stretching (fill flex row) or breaking chars vertically. */
body[data-active-page="today"] #mobile-chips-container .chip-row {
  flex-wrap: wrap;
  overflow-x: visible;
  margin-bottom: 12px;
}
body[data-active-page="today"] #mobile-chips-container .chip-btn {
  flex: 0 0 auto;     /* don't shrink, don't grow — respect natural width */
  white-space: nowrap; /* prevent vertical char-by-char wrapping */
}

/* ─── Mobile chip collapse toggle ─── */
.chip-collapse { transition: max-height 0.3s ease; }
.chip-toggle { display: none; }  /* hidden by default; shown on mobile only */
.chip-toggle-row { display: none; }

@media (max-width: 639px) {
  .chip-collapse {
    position: relative;
    max-height: 34px;
    overflow: hidden;
  }
  .chip-collapse.expanded { max-height: 600px; }
  /* Soft fade at the bottom of the collapsed state so the clip reads as
     intentional ("there's more below"), not as a half-visible second row. */
  .chip-collapse:not(.expanded)::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 0;
    height: 18px; pointer-events: none;
    background: linear-gradient(to bottom, rgba(17,17,24,0), var(--bg) 90%);
  }
  .chip-collapse .chip-row { margin-bottom: 6px; }

  .chip-toggle-row {
    display: flex; justify-content: center;
    margin: 4px 0 14px;
  }
  /* Text-only link: distinct from filter chips (pills), but visually quiet.
     No bg / no border — a clear affordance without competing with chips. */
  .chip-toggle {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 8px;
    background: transparent; border: none;
    color: var(--text-4); font-family: "DM Sans", "Noto Sans SC", sans-serif;
    font-size: 11px; font-weight: 500; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
  }
  .chip-toggle:hover,
  .chip-toggle:active { color: var(--text-2); }
  .chip-toggle-caret { font-size: 9px; line-height: 1; opacity: 0.85; }
}

/* ── Scan status bar ── */
.scan-status-bar {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--text-3);
  margin: 8px 0 16px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.scan-status-icon {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.scan-status-bar.is-stale .scan-status-icon { background: var(--amber); }
.scan-status-bar.is-error .scan-status-icon { background: var(--text-3); }
