/* xsignalflow.com - shared styles. Dark teal accent, matching the original coming-soon page. */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg:           #0a0e1a;
    --surface:      #131826;
    --surface-2:    #1a2030;
    --surface-3:    #20283d;
    --border:       #232a3d;
    --border-2:     #2e3650;
    --text:         #e6ebf5;
    --text-muted:   #8a93a8;
    --text-dim:     #5e677c;
    --accent:       #14b8a6;
    --accent-hover: #0fa094;
    --accent-soft:  rgba(20, 184, 166, 0.12);
    /* Gold marks "owned/watchlisted" affordances (e.g. the portfolio
     * toggle's pressed state). Warm enough to read as premium on the
     * navy bg, but yellow-leaning so it doesn't get confused with the
     * orange amber --warn / --insider tokens. */
    --gold:         #e0b341;
    --gold-hover:   #f0c156;
    --gold-soft:    rgba(224, 179, 65, 0.14);
    --danger:       #ef4444;
    --warn:         #f59e0b;
    --ok:           #22c55e;
    --insider:      #f59e0b;
    --catalyst:     #a855f7;
    --earnings:     #3b82f6;
    --feed-new:     #5b8fd9;
    --contrarian:   #ec4899;
    --macro:        #14b8a6;
    --alpha:        #84cc16;
}

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.15;
    mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---------- Header / nav ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 14, 26, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 17px;
}
.site-logo:hover { color: var(--text); }
.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s, background-color 0.15s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a.active {
    color: var(--accent) !important;
    background: var(--accent-soft);
}
.site-nav a.active:hover { background: var(--accent-soft); }
.site-nav-login {
    color: var(--bg) !important;
    background: var(--accent);
}
.site-nav-login:hover { background: var(--accent-hover) !important; color: var(--bg) !important; }
.site-nav-profile {
    position: relative;
    margin-left: 4px;
}
.site-nav-profile--guest { display: none; }
.site-nav-profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.site-nav-profile-btn:hover,
.site-nav-profile.is-open .site-nav-profile-btn {
    color: var(--text);
    background: var(--surface-3);
    border-color: var(--border-2);
}
.site-nav-profile.active .site-nav-profile-btn {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: var(--accent-soft);
}
.site-nav-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    padding: 6px;
    z-index: 20;
}
.site-nav-profile-email {
    padding: 8px 10px 10px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 12px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.site-nav-profile-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 10px !important;
    border-radius: 6px;
    color: var(--text-muted) !important;
    font-size: 14px !important;
    font-weight: 500;
    background: transparent !important;
}
.site-nav-profile-item:hover {
    color: var(--text) !important;
    background: var(--surface-2) !important;
}
.site-nav-profile-item svg {
    flex-shrink: 0;
    color: var(--text-dim);
}
.site-nav-profile-item:hover svg { color: var(--accent); }
.site-nav-profile-item-portfolio { display: none !important; }

/* ---------- Layout ---------- */

.site-main {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}
/* Admin pages get more horizontal room so wide tables (backtest discovery,
   analyze discovery) can breathe without horizontal scroll. Keep footer-inner
   in sync so the copyright row aligns with the widened main content edges. */
.page-admin .site-main { max-width: 1300px; }
.page-admin .site-footer-inner { max-width: 1300px; }
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    padding: 18px 24px;
    color: var(--text-dim);
    font-size: 13px;
}
.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.site-footer-disclaimer { color: var(--text-dim); }
.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
}
.site-footer a:hover { color: var(--accent); text-decoration: underline; }

.legal-doc { max-width: 760px; }
.legal-doc h2 {
    font-size: 17px;
    margin-top: 28px;
    margin-bottom: 10px;
}
.legal-doc p,
.legal-doc li {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.65;
}
.legal-doc ul {
    margin: 8px 0 16px;
    padding-left: 1.25em;
}
.legal-doc li { margin-bottom: 6px; }
.legal-updated {
    font-size: 13px;
    color: var(--text-dim);
    margin: 4px 0 0;
}
.legal-summary {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
}

/* ---------- Generic blocks ---------- */

h1, h2, h3 { color: var(--text); margin-top: 0; }
h1 { font-size: 26px; letter-spacing: -0.3px; margin-bottom: 8px; }
h2 { font-size: 20px; margin-bottom: 12px; }
h3 { font-size: 16px; margin-bottom: 8px; }

.page-head {
    margin-bottom: 24px;
}
.page-head-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.page-head-back {
    font-size: 13px;
    text-decoration: none;
}
.page-head p {
    color: var(--text-muted);
    margin: 4px 0 0;
}
@media (max-width: 480px) {
    .page-head p { font-size: 13px; }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.card-tight { padding: 14px 16px; }

.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }

.empty-state {
    background: var(--surface);
    border: 1px dashed var(--border-2);
    border-radius: 10px;
    padding: 40px 24px;
    text-align: center;
    color: var(--text-muted);
}

.flash {
    border: 1px solid var(--border-2);
    background: var(--surface);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.flash-ok { border-color: var(--ok); color: var(--ok); background: rgba(34, 197, 94, 0.08); }
.flash-error { border-color: var(--danger); color: var(--danger); background: rgba(239, 68, 68, 0.08); }
.flash-warn { border-color: var(--warn); color: var(--warn); background: rgba(245, 158, 11, 0.08); }
.flash-info { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.subscribe-cta {
    border: 1px solid var(--accent);
    background: var(--accent-soft);
    color: var(--text);
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.subscribe-cta strong { color: var(--accent); }

/* ---------- Forms / buttons ---------- */

label { display: block; font-size: 13px; color: var(--text-muted); margin: 12px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
    width: 100%;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-2);
    border-radius: 6px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 14px;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-soft);
}

button, .btn {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    border: 0;
    border-radius: 6px;
    padding: 9px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}
button:hover, .btn:hover { background: var(--accent-hover); color: var(--bg); }
.btn-secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--border-2);
}
.btn-secondary:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ---------- Confirm modal ---------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 14, 0.72);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: modalFade 120ms ease-out;
}
.modal-overlay[hidden] { display: none; }
.modal {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    padding: 22px 24px 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: modalPop 140ms ease-out;
}
.modal h3 { margin: 0 0 8px; font-size: 17px; color: var(--text); }
.modal .modal-body {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
    white-space: pre-wrap;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Tables ---------- */

.tbl {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.tbl th, .tbl td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.tbl th {
    background: var(--surface-2);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--surface-2); }

/* ---------- Feed controls (paid /feed/ view + confidence filter) ---------- */

.feed-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0 0 14px;
}
.feed-view-toggle,
.feed-status-toggle,
.feed-conf-toggle,
.feed-mode-toggle {
    display: inline-flex;
    gap: 0;
    padding: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.feed-view-btn,
.feed-status-btn,
.feed-conf-btn,
.feed-mode-btn {
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.feed-view-btn:hover,
.feed-status-btn:hover,
.feed-conf-btn:hover,
.feed-mode-btn:hover { color: var(--text); text-decoration: none; }
.feed-view-btn.active,
.feed-status-btn.active,
.feed-mode-btn.active {
    background: var(--accent);
    color: var(--bg);
}
.feed-view-btn.active:hover,
.feed-status-btn.active:hover,
.feed-mode-btn.active:hover { color: var(--bg); }
.feed-mode-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    font-family: inherit;
}
.feed-mode-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Feed open/closed groups + table view ----------------------------
 * Card modes (list/minimal/full) and table mode both split open vs closed
 * picks into sections with the same stats header. Both trees stay in the
 * DOM; data-feed-mode on <html> decides which is visible. */
.feed-table-wrap { display: none; }
.cat-panel.feed-cards.active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
html[data-feed-mode="table"] .cat-panel.feed-cards { display: none; }
html[data-feed-mode="table"] .feed-table-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.feed-table-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.feed-table-panel {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    -webkit-overflow-scrolling: touch;
}
.feed-table-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 0 2px;
}
.feed-table-section-title {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.feed-table-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px 8px;
    margin-left: auto;
    font-size: 13px;
    line-height: 1.4;
}
.feed-table-stats-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.feed-table-stats-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.feed-table-stats-sep {
    color: var(--text-muted);
    opacity: 0.6;
}
.feed-table-stats-meta {
    font-size: 12px;
    color: var(--text-muted);
}
.feed-table-panel .feed-table tbody tr:last-child td { border-bottom: 0; }
.feed-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}
.feed-table-col-sym    { width: 6.25rem; }
.feed-table-col-name   { width: auto; }
.feed-table-col-cat    { width: 8%; }
.feed-table-col-status { width: 7%; }
.feed-table-col-hold   { width: 8%; }
.feed-table-col-conf   { width: 5%; }
.feed-table-col-entry  { width: 6.5%; }
.feed-table-col-last   { width: 7%; }
.feed-table-col-pnl    { width: 5rem; }
.feed-table-col-when   { width: 8%; }
.feed-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--surface-2);
    color: var(--text-muted);
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 11px;
}
.feed-table th.feed-table-num,
.feed-table td.feed-table-num { text-align: right; font-variant-numeric: tabular-nums; }
.feed-table-name {
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
}
.feed-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
}
.feed-table-panel .feed-table tbody tr:last-child td { border-bottom: 0; }
.feed-table-row { cursor: pointer; }
.feed-table-row:hover td { background: var(--surface-2); }
.feed-table-sym a {
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
.feed-table-sym a:hover { color: var(--accent); }
.feed-table-free {
    display: inline-block;
    margin-left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    vertical-align: middle;
    flex-shrink: 0;
}
.feed-table-when { color: var(--text-muted); }
.feed-table-cat {
    color: var(--cat-color, var(--text-muted));
}
.feed-table-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}
.feed-table-status-new    { background: rgba(56, 189, 248, 0.15);  color: #38bdf8; }
.feed-table-status-open   { background: rgba(34, 197, 94, 0.15);   color: var(--ok); }
.feed-table-status-closed { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.feed-table-pnl { font-weight: 400; }
.feed-table-pnl-up, .feed-table-pnl-down, .feed-table-pnl-flat {
    font-variant-numeric: tabular-nums;
}
.feed-table-pnl-up   { color: var(--ok); }
.feed-table-pnl-down { color: var(--danger); }
.feed-table-pnl-flat { color: var(--text-muted); }

/* Table view: progressively hide non-essential columns on narrow screens.
 * Always keep: Ticker, Category, PnL, Published/Closed. Name goes first
 * (<=900px); desktop above that keeps the original layout. */
@media (max-width: 900px) {
    html[data-feed-mode="table"] .feed-table-panel {
        overflow-x: hidden;
    }
    html[data-feed-mode="table"] .feed-table .feed-table-col-name,
    html[data-feed-mode="table"] col.feed-table-col-name {
        display: none;
    }
    html[data-feed-mode="table"] .feed-table [class*="feed-table-col-"]:not(.feed-table-col-name) {
        width: 1%;
        min-width: 0;
    }
    html[data-feed-mode="table"] .feed-table tbody td {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
@media (max-width: 680px) {
    html[data-feed-mode="table"] .feed-table .feed-table-col-hold,
    html[data-feed-mode="table"] col.feed-table-col-hold { display: none; }
}
@media (max-width: 600px) {
    html[data-feed-mode="table"] .feed-table .feed-table-col-conf,
    html[data-feed-mode="table"] col.feed-table-col-conf { display: none; }
}
@media (max-width: 520px) {
    html[data-feed-mode="table"] .feed-table .feed-table-col-entry,
    html[data-feed-mode="table"] col.feed-table-col-entry { display: none; }
}
@media (max-width: 460px) {
    html[data-feed-mode="table"] .feed-table .feed-table-col-last,
    html[data-feed-mode="table"] col.feed-table-col-last { display: none; }
}
@media (max-width: 400px) {
    html[data-feed-mode="table"] .feed-table .feed-table-col-status,
    html[data-feed-mode="table"] col.feed-table-col-status { display: none; }
}
@media (max-width: 760px) {
    html[data-feed-mode="table"] .feed-table thead th,
    html[data-feed-mode="table"] .feed-table tbody td {
        padding: 8px 10px;
    }
    html[data-feed-mode="table"] .feed-table thead th {
        font-size: 10px;
    }
    html[data-feed-mode="table"] .feed-table {
        font-size: 12px;
    }
}
@media (max-width: 480px) {
    html[data-feed-mode="table"] .feed-table thead th,
    html[data-feed-mode="table"] .feed-table tbody td {
        padding: 7px 8px;
    }
    .feed-table-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .feed-table-stats {
        margin-left: 0;
        justify-content: flex-start;
    }
}

/* Confidence buttons echo the card's high/mid/low coloring when active
 * so the filter visually matches the ring color you'd see on a card. */
.feed-conf-btn.active { color: var(--bg); }
.feed-conf-btn-any.active  { background: var(--accent);   color: var(--bg); }
.feed-conf-btn-any.active:hover  { color: var(--bg); }
.feed-conf-btn-high.active { background: var(--ok);       color: var(--bg); }
.feed-conf-btn-high.active:hover { color: var(--bg); }
.feed-conf-btn-mid.active  { background: var(--accent);   color: var(--bg); }
.feed-conf-btn-mid.active:hover  { color: var(--bg); }

/* Confidence buttons render as "High (70%+)" / "Mid (50-69%)" via the
 * word + pct spans. The parens come from CSS so they vanish along with
 * the word on narrow screens, leaving a tight "70%+" / "50-69%". */
.feed-conf-btn-pct { margin-left: 5px; }
.feed-conf-btn-pct::before { content: "("; }
.feed-conf-btn-pct::after  { content: ")"; }

.feed-list-hints {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 12px;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.45;
}
.feed-list-hints-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}
.feed-list-hints-note {
    margin: 0;
    /* max-width: 72ch; */
}
.feed-list-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.feed-list-hints-primary .feed-list-hint:not(.feed-new-legend):not(.feed-free-legend) {
    color: var(--accent);
}
.feed-list-hints-primary .feed-list-hint + .feed-list-hint::before {
    content: "\00b7";
    margin: 0 12px;
    color: var(--text-dim);
    opacity: 0.65;
}
.feed-new-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 2px solid var(--feed-new);
    background: transparent;
    flex-shrink: 0;
}
.feed-free-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .feed-conf-btn:has(.feed-conf-btn-pct) .feed-conf-btn-word { display: none; }
    .feed-conf-btn:has(.feed-conf-btn-pct) .feed-conf-btn-pct { margin-left: 0; }
    .feed-conf-btn:has(.feed-conf-btn-pct) .feed-conf-btn-pct::before,
    .feed-conf-btn:has(.feed-conf-btn-pct) .feed-conf-btn-pct::after { content: ""; }
}

/* Drop the leading word ("published ") in front of the relative
 * timestamp on really small screens -- the timestamp itself is the
 * informative part and the prefix is a luxury we can shed. */
@media (max-width: 480px) {
    .featured-meta-prefix { display: none; }
}

/* ---------- Tabs (paid home) ---------- */

.cat-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    overflow-x: auto;
}
.cat-tab {
    padding: 10px 16px;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cat-tab:hover { color: var(--text); background: transparent; }
.cat-tab-insider    { --cat-color: var(--insider);    --cat-color-soft: rgba(245, 158, 11, 0.15); }
.cat-tab-catalyst   { --cat-color: var(--catalyst);   --cat-color-soft: rgba(168, 85, 247, 0.15); }
.cat-tab-earnings   { --cat-color: var(--earnings);   --cat-color-soft: rgba(59, 130, 246, 0.15); }
.cat-tab-contrarian { --cat-color: var(--contrarian); --cat-color-soft: rgba(236, 72, 153, 0.15); }
.cat-tab-macro      { --cat-color: var(--macro);      --cat-color-soft: rgba(20, 184, 166, 0.15); }
.cat-tab-alpha      { --cat-color: var(--alpha);      --cat-color-soft: rgba(132, 204, 22, 0.15); }
.cat-tab.active {
    color: var(--cat-color, var(--accent));
    border-bottom-color: var(--cat-color, var(--accent));
}
.cat-tab-count {
    background: var(--surface-3);
    color: var(--text-dim);
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 11px;
}
.cat-tab.active .cat-tab-count {
    background: var(--cat-color-soft, var(--accent-soft));
    color: var(--cat-color, var(--accent));
}
a.cat-tab { text-decoration: none; }
a.cat-tab:hover { text-decoration: none; color: var(--text); }
.cat-panel { display: none; }
.cat-panel.active { display: block; }

/* Feed page: pick cards stack in a single full-width column. Card density
   for min/full modes is tightened in the feed view modes block below; list
   mode has its own row layout there. Open/closed groups live under
   .feed-cards; each group's .feed-grid holds the cards. */

.feed-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 24px 0 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}
.feed-pager-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    background: var(--surface);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}
a.feed-pager-btn:hover { border-color: var(--accent); color: var(--accent); }
.feed-pager-disabled { color: var(--text-dim); opacity: 0.5; cursor: default; }
.feed-pager-status { color: var(--text-muted); font-size: 13px; }

/* ---------- Pick card ---------- */

.pick-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 14px;
}
.pick-cat-insider     { border-left-color: var(--insider); }
.pick-cat-catalyst    { border-left-color: var(--catalyst); }
.pick-cat-earnings    { border-left-color: var(--earnings); }
.pick-cat-contrarian  { border-left-color: var(--contrarian); }
.pick-cat-macro       { border-left-color: var(--macro); }
.pick-cat-alpha       { border-left-color: var(--alpha); }

.pick-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.pick-ticker-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pick-ticker {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}
.pick-ticker:hover { color: var(--accent); }
.pick-name { color: var(--text-muted); font-size: 14px; }

.pick-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pick-badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    box-sizing: border-box;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border-2);
}
.pick-badge-cat { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pick-cat-insider .pick-badge-cat    { background: rgba(245, 158, 11, 0.15); color: var(--insider); }
.pick-cat-catalyst .pick-badge-cat   { background: rgba(168, 85, 247, 0.15); color: var(--catalyst); }
.pick-cat-earnings .pick-badge-cat   { background: rgba(59, 130, 246, 0.15); color: var(--earnings); }
.pick-cat-contrarian .pick-badge-cat { background: rgba(236, 72, 153, 0.15); color: var(--contrarian); }
.pick-cat-macro .pick-badge-cat      { background: rgba(20, 184, 166, 0.15); color: var(--macro); }
.pick-cat-alpha .pick-badge-cat      { background: rgba(132, 204, 22, 0.15); color: var(--alpha); }
/* FREE PICK and OPEN use the same slim "outlined pill" treatment as the
 * View-chart link -- transparent fill + 1px colored border + colored
 * text -- so they read as inline labels instead of heavy filled chips
 * crowding the ticker row. CLOSED stays filled (muted gray) so the eye
 * can still distinguish archived picks at a glance. */
.pick-badge-free {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent-soft);
}
/* Feed cards: gold free badge — no glow/shadow */
.feed-grid .pick-badge-free,
.cat-panel.feed-cards .pick-badge-free {
    background: var(--gold-soft);
    color: var(--gold);
    border-color: rgba(224, 179, 65, 0.55);
    font-weight: 700;
    letter-spacing: 0.07em;
}
.pick-status-open {
    background: transparent;
    color: var(--up, #16a34a);
    border-color: rgba(34, 197, 94, 0.45);
}
.pick-status-closed {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border-color: transparent;
}
.featured-card-closed { opacity: 0.7; }
/* Centerpiece cards (pick detail page, home featured pick) are the focus of
   their own surface — never dim them, even when closed. */
.featured-card-nodim.featured-card-closed { opacity: 1; }

/* "REFINED" chip + show-original toggle. Refine is an admin-side
 * affordance to sharpen a draft pick with a deeper ticker-focused
 * tweet pull; the chip uses the catalyst purple so it stands apart
 * from FREE PICK (accent) and OPEN/CLOSED (status). */
.pick-refine-badge {
    background: rgba(168, 85, 247, 0.18);
    color: var(--catalyst);
    border-color: transparent;
}
.pick-refine-notes {
    margin: 8px 0 0;
    padding: 8px 12px;
    background: rgba(168, 85, 247, 0.08);
    border-left: 2px solid var(--catalyst);
    border-radius: 0 6px 6px 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}
.pick-refine-notes-label {
    display: inline-block;
    margin-right: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--catalyst);
}
.pick-refine-original {
    margin: 12px 0 0;
    padding: 0;
    border: 1px dashed var(--border-2);
    border-radius: 8px;
    background: var(--surface-2);
}
.pick-refine-original > summary.pick-refine-original-toggle {
    list-style: none;
    cursor: pointer;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}
.pick-refine-original > summary.pick-refine-original-toggle::-webkit-details-marker { display: none; }
.pick-refine-original > summary.pick-refine-original-toggle::before {
    content: "\25B8";
    display: inline-block;
    margin-right: 6px;
    transition: transform 120ms ease;
}
.pick-refine-original[open] > summary.pick-refine-original-toggle::before {
    transform: rotate(90deg);
}
.pick-refine-original > summary.pick-refine-original-toggle:hover {
    color: var(--text);
}
.pick-refine-original-body {
    padding: 4px 14px 12px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
}
.pick-refine-original-hint {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.pick-refine-original-row { margin: 6px 0; }
.pick-refine-original-row.pick-refine-original-thesis {
    color: var(--text);
    margin-top: 8px;
}
.pick-refine-original-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-right: 4px;
}

/* ---------- Price extremes: max gain + max drawdown (pick detail) ----------
 * Two pill-style stats that live between the featured-card and the
 * close-review block on /pick/?id=N. Trading-lit names: Maximum
 * Favorable Excursion (gain) and Maximum Adverse Excursion (drawdown).
 * Color follows the pick-perf-mini convention -- success for the gain
 * side, danger for the drawdown side -- so they read at a glance. The
 * wrapping flex row lets them stack vertically on narrow screens. */
.pick-extremes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 4px;
}
/* Benchmark row (vs SPY / vs QQQ) sits directly under the gain/drawdown
 * row. Collapse the top margin so the two rows read as one block instead
 * of two disconnected sections. */
.pick-extremes + .pick-extremes-bench {
    margin-top: 0;
}
.pick-drawdown,
.pick-gain,
.pick-alpha {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    font-size: 13px;
    line-height: 1.3;
}
.pick-drawdown-label,
.pick-gain-label,
.pick-alpha-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.pick-drawdown-value,
.pick-gain-value,
.pick-alpha-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.pick-drawdown-down {
    border-left: 3px solid var(--danger);
}
.pick-drawdown-down .pick-drawdown-value {
    color: var(--danger);
}
.pick-drawdown-flat .pick-drawdown-value {
    color: var(--text-muted);
}
.pick-drawdown-meta,
.pick-gain-meta,
.pick-alpha-meta {
    color: var(--text-dim);
    font-size: 12px;
}
.pick-gain-up {
    border-left: 3px solid var(--ok);
}
.pick-gain-up .pick-gain-value {
    color: var(--ok);
}
.pick-gain-flat .pick-gain-value {
    color: var(--text-muted);
}
/* Alpha chip: "vs SPY +1.42%" / "vs QQQ -0.30%" beside Max gain / Max drawdown.
 * Positive alpha (pick beat the benchmark) gets the same success border + value
 * color as Max gain; negative alpha mirrors Max drawdown's danger styling. */
.pick-alpha-up {
    border-left: 3px solid var(--ok);
}
.pick-alpha-up .pick-alpha-value {
    color: var(--ok);
}
.pick-alpha-down {
    border-left: 3px solid var(--danger);
}
.pick-alpha-down .pick-alpha-value {
    color: var(--danger);
}
.pick-alpha-flat .pick-alpha-value {
    color: var(--text-muted);
}

/* ---------- Close review (pick detail page) ---------- */
.close-review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--danger);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 20px 0;
}
.close-review-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.close-review-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.close-review-decision-badge { letter-spacing: 0.5px; }
.close-review-date {
    font-size: 12px;
    color: var(--text-dim);
}
.close-review-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.close-review-meta strong {
    color: var(--text);
    font-weight: 600;
}
.close-review-reason {
    margin: 6px 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
}
.close-review-lanes {
    margin: 14px 0 10px;
}
.close-review-lanes-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.close-review-lane-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}
.close-review-lane-table td {
    padding: 6px 8px;
    vertical-align: top;
}
.close-review-lane-table tr {
    border-top: 1px solid var(--border-soft, rgba(255, 255, 255, 0.06));
}
.close-review-lane-table tr.is-ai {
    border-top: 2px solid var(--border);
}
.close-review-lane-name {
    width: 110px;
    color: var(--text-muted);
    font-weight: 500;
}
.close-review-lane-name.is-ai {
    color: var(--text);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.close-review-lane-verdict { width: 80px; }
.close-review-lane-note { color: var(--text-muted); }
.close-review-lane-note.is-ai {
    color: var(--text);
    font-weight: 600;
}
.close-review-lane-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.close-review-lane-table tr.is-ai .close-review-lane-pill {
    font-size: 11px;
}
.close-review-lane-pill-close {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.40);
}
.close-review-lane-pill-hold {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.40);
}
.close-review-lane-pill-watch {
    background: rgba(234, 179, 8, 0.16);
    color: #facc15;
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.45);
}
.close-review-lane-pill-na {
    background: rgba(148, 163, 184, 0.10);
    color: #94a3b8;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.30);
}
.close-review-lane-pill-supportive {
    background: rgba(34, 197, 94, 0.14);
    color: #4ade80;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.40);
}
.close-review-lane-pill-watching {
    background: rgba(234, 179, 8, 0.16);
    color: #facc15;
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.45);
}
.close-review-lane-pill-caution {
    background: rgba(249, 115, 22, 0.16);
    color: #fb923c;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.45);
}
.close-review-lane-pill-neutral {
    background: rgba(148, 163, 184, 0.10);
    color: #94a3b8;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.30);
}
.close-review-lane-pill-exit {
    background: rgba(239, 68, 68, 0.14);
    color: #f87171;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.40);
}

/* Pick detail: stack triangulation lane rows on narrow screens */
@media (max-width: 760px) {
    body.page-pick .close-review-card,
    body.page-pick .pick-combo-monitor-card {
        padding: 14px 12px;
    }
    body.page-pick .close-review-lane-table,
    body.page-pick .review-history-lane-table {
        table-layout: auto;
    }
    body.page-pick .close-review-lane-table tbody,
    body.page-pick .review-history-lane-table tbody {
        display: block;
        width: 100%;
    }
    body.page-pick .close-review-lane-table tr,
    body.page-pick .review-history-lane-table tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "lane verdict"
            "note note";
        gap: 6px 10px;
        padding: 10px 0;
        border-top: 1px solid var(--border-soft, rgba(255, 255, 255, 0.06));
    }
    body.page-pick .close-review-lane-table tr.is-ai,
    body.page-pick .review-history-lane-table tr.is-ai {
        border-top-width: 2px;
        border-top-color: var(--border);
    }
    body.page-pick .close-review-lane-table td,
    body.page-pick .review-history-lane-table td {
        display: block;
        padding: 0;
        width: auto;
    }
    body.page-pick .close-review-lane-name,
    body.page-pick .review-history-lane-name {
        grid-area: lane;
        width: auto;
        font-size: 12px;
        line-height: 1.35;
    }
    body.page-pick .close-review-lane-verdict,
    body.page-pick .review-history-lane-verdict {
        grid-area: verdict;
        width: auto;
        align-self: start;
        justify-self: end;
        text-align: right;
    }
    body.page-pick .close-review-lane-note,
    body.page-pick .review-history-lane-note {
        grid-area: note;
        font-size: 11px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }
    body.page-pick .pick-combo-monitor-tri-asof {
        font-size: 11px;
        margin-bottom: 6px;
    }
}

/* Combo pick trade monitoring (detail page) */
.pick-combo-monitor-card {
    border-left-color: var(--accent, #14b8a6);
}
.pick-combo-monitor-card.pick-combo-monitor-close-active {
    border-left-color: var(--danger);
}
.pick-combo-monitor-head {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.45;
    margin-bottom: 10px;
}
.pick-combo-monitor-label {
    flex-shrink: 0;
}
.pick-combo-monitor-status {
    font-style: italic;
    color: #cbd5e0;
    font-size: 14px;
    font-weight: 400;
}
.pick-combo-monitor-analysis {
    margin: 0 0 14px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-muted);
}
.pick-combo-monitor-tri {
    margin-top: 4px;
}
.pick-combo-monitor-tri-toggle {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.pick-combo-monitor-tri-asof {
    margin: 6px 0 8px;
    font-size: 12px;
}
.pick-combo-monitor-tri-pending {
    margin: 8px 0 0;
    font-size: 12px;
}

/* Citation list at the bottom of a card. Two callers share the look:
   - .close-review-cited inside the AI close-review card
   - .featured-cited inside the pick card on the detail page
   Both render an "ID-list" of #N - @handle links to x.com -- the visual
   alignment is intentional so the two cards feel like the same family. */
.close-review-cited,
.featured-cited {
    border-top: 1px solid var(--border);
    padding-top: 12px;
}
.featured-cited {
    margin-top: 16px;
}
.close-review-cited-label,
.featured-cited-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.close-review-cited-list,
.featured-cited-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.close-review-cited-item,
.featured-cited-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.4;
}
.close-review-cited-link,
.close-review-cited-num,
.featured-cited-link,
.featured-cited-num {
    font-weight: 600;
}
.close-review-cited-missing .close-review-cited-num {
    font-style: italic;
    opacity: 0.7;
}

/* ---------- Publish history (pick detail page) ---------- */
/* Chronological log of every individual publish that contributed to
   this open pick's headline. The "Original" card is the frozen
   pre-merge snapshot (is_seed=true); subsequent cards are addenda.   */
.publish-history-section {
    margin-top: 28px;
}
.publish-history-title {
    margin: 0 0 6px;
}
.publish-history-hint {
    font-size: 13px;
    margin: 0 0 14px;
}
.publish-history-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 12px;
}
.publish-history-card.publish-history-seed {
    border-left-color: var(--text-dim);
    opacity: 0.92;
}
.publish-history-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}
.publish-history-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.publish-history-conf {
    font-size: 12px;
    color: var(--text-muted);
}
.publish-history-thesis {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
}
.publish-history-line {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 4px;
}
.publish-history-line:last-child {
    margin-bottom: 0;
}
.publish-history-line-label {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.06em;
    margin-right: 4px;
}

.pick-free-when { font-size: 12px; color: var(--text-dim); text-transform: none; letter-spacing: 0; padding: 3px 4px; }
.pick-published-when { font-size: 12px; color: var(--text-dim); text-transform: none; letter-spacing: 0; padding: 3px 4px; }

.pick-conf {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.pick-conf-bar {
    height: 4px;
    background: var(--surface-2);
    border-radius: 2px;
    flex: 1;
    overflow: hidden;
}
.pick-conf-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
}
.pick-conf-pct { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Compact one-line "Entry $X . Now $Y . +Z.ZZ%" pill that lives below
   the hold-horizon chip in the featured-side-stack column. */
.pick-perf-mini {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 5px 11px;
    border-radius: 8px;
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--border);
    font-size: 14px;
    line-height: 1.2;
}
.pick-perf-mini-cell {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}
.pick-perf-mini-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-dim);
}
.pick-perf-mini-value {
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.pick-perf-mini-pending { color: var(--text-dim); font-weight: 500; }
.pick-perf-up   .pick-perf-mini-pnl { color: var(--ok); }
.pick-perf-down .pick-perf-mini-pnl { color: var(--danger); }
.pick-perf-flat .pick-perf-mini-pnl { color: var(--text-muted); }

/* Column wrapper inside featured-card-head that stacks the hold chip
   and the mini perf pill to the left of the confidence ring. */
.featured-side-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.pick-angle {
    background: var(--surface-2);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.5;
}
.pick-angle-label {
    display: block;
    text-transform: uppercase;
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 0.6px;
    margin-bottom: 4px;
}
.pick-thesis {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 8px;
}
.pick-locked {
    color: var(--text-muted);
    font-style: italic;
    padding: 12px;
    border: 1px dashed var(--border-2);
    border-radius: 6px;
    background: rgba(255,255,255,0.02);
    text-align: center;
}
.pick-meta-row {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.5;
}
.pick-meta-label {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.6px;
    margin-right: 6px;
}
.pick-meta-insider { color: var(--insider); }

/* ----- Technicals block (Pick::renderTechnicalsBlock) ----- */
/* Lane chips: Trend / Momentum / Volatility / Range, each colored
 * green/yellow/red by the deterministic verdict computed off
 * app.pick_snapshot. Signal badges trail the chip row with a colored
 * pill per fired CloseSignal (severity = crit/warn/info). The whole
 * block falls back to a stripped RSI 56.2 / RSIw 60.1 chip pair when
 * the snapshot is still warming up (first 24h after pick open). */
.pick-tech-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}
.pick-tech-row .pick-meta-label {
    margin-right: 2px;
}
.pick-tech-age {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-right: 4px;
}
.pick-tech-chips,
.pick-tech-signals {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pick-tech-signals { margin-left: 2px; }
.pick-tech-chip,
.pick-tech-signal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
    cursor: default;
}
.pick-tech-chip { letter-spacing: 0.2px; }
.pick-tech-chip-green {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}
.pick-tech-chip-yellow {
    background: rgba(234, 179, 8, 0.16);
    color: #b88403;
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.40);
}
.pick-tech-chip-red {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.40);
}
.pick-tech-signal-info {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.30);
    font-size: 10px;
    letter-spacing: 0.4px;
}
.pick-tech-signal-warn {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.45);
    font-size: 10px;
    letter-spacing: 0.4px;
}
.pick-tech-signal-crit {
    background: rgba(220, 38, 38, 0.18);
    color: #b91c1c;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.55);
    font-size: 10px;
    letter-spacing: 0.4px;
}
/* HOLD-bias signal (severity = 'pos'). Green pill so it visually
   reads as "supporting evidence to keep holding" against the red
   warn/crit pills. Used by signals like rsi_bullish_divergence and
   dmi_bullish_dominance fired by CloseSignals. */
.pick-tech-signal-pos {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.45);
    font-size: 10px;
    letter-spacing: 0.4px;
}

/* ----- Setup health (Pick::renderSetupHealthSummary) ----- */
.setup-health {
    display: block;
    line-height: 1.45;
}
.setup-health-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
}
.setup-health-compact {
    font-size: 12px;
    margin-top: 2px;
}
.setup-health-row {
    display: block;
    margin-top: 10px;
}
.setup-health-row .setup-health-detail {
    margin-top: 6px;
}
.setup-health-pill {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 2px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
.setup-health-pill-hold {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}
.setup-health-pill-watch {
    background: rgba(234, 179, 8, 0.16);
    color: #b88403;
    box-shadow: inset 0 0 0 1px rgba(234, 179, 8, 0.40);
}
.setup-health-pill-exit {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.40);
}
.setup-health-pill-label-short {
    display: none;
}
@media (max-width: 480px) {
    .feed-grid .setup-health-pill-watch .setup-health-pill-label-full {
        display: none;
    }
    .feed-grid .setup-health-pill-watch .setup-health-pill-label-short {
        display: inline;
    }
}
.setup-health-summary {
    color: var(--text-muted);
    flex: 1 1 120px;
    min-width: 0;
}
.setup-health-summary-muted {
    font-size: 12px;
    font-style: italic;
}
/* Inline collapsible triangulation (feed, portfolio, pick detail). */
.setup-health-details {
    display: block;
}
.setup-health-details > summary.setup-health-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.setup-health-details > summary.setup-health-head::-webkit-details-marker {
    display: none;
}
.setup-health-tri-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
    list-style: none;
}
.setup-health-tri-toggle::-webkit-details-marker { display: none; }
.setup-health-tri-toggle::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    transition: transform 120ms ease;
}
.setup-health-details[open] .setup-health-tri-toggle {
    color: var(--accent);
}
.setup-health-details[open] .setup-health-tri-toggle::after {
    transform: rotate(180deg);
}
.setup-health-lanes {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 8px;
    margin-bottom: 0;
}
/* Flyout triangulation (admin picks only). */
.setup-health-tri-flyout-mode {
    display: inline-flex;
    position: relative;
}
.setup-health-tri-flyout-mode .setup-health-tri-toggle {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
}
.setup-health-tri-flyout-mode .setup-health-tri-toggle.is-open {
    color: var(--accent);
}
.setup-health-tri-flyout-mode .setup-health-tri-toggle.is-open::after {
    transform: rotate(180deg);
}
.setup-health-tri-flyout {
    position: fixed;
    z-index: 1200;
    width: min(380px, calc(100vw - 16px));
    max-height: min(420px, calc(100vh - 16px));
    overflow: auto;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: 12px;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.55);
}
.setup-health-tri-flyout.setup-health-tri-flyout--portaled {
    z-index: 10000;
}
body.setup-health-tri-flyout-active .setup-health-tri-toggle {
    position: relative;
    z-index: 1;
}
body.setup-health-tri-flyout-active .setup-health-tri-toggle.is-open {
    z-index: 2;
}
.setup-health-tri-flyout[hidden] {
    display: none !important;
}
.setup-health-tri-flyout-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
}
.setup-health-tri-flyout-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.setup-health-tri-flyout-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.setup-health-tri-flyout-close:hover {
    background: var(--accent-soft);
    color: var(--text);
}
.setup-health-tri-flyout-body {
    padding: 8px 10px 10px;
}
.setup-health-tri-flyout-body.setup-health-lanes {
    margin: 0;
}

/* Feed list view: verdict pill beside perf (side stack), not meta row. */
.setup-health-list-pill {
    display: none;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .setup-health-list-pill:not(.setup-health-list-pill-side),
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-combo-list-pill:not(.pick-combo-list-pill-side) {
    display: none !important;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .setup-health-list-pill-side,
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-combo-list-pill-side {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .setup-health-list-pill-side .setup-health-pill,
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-combo-list-pill-side .pick-combo-pill {
    font-size: 10px;
    padding: 2px 7px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .setup-health {
    display: none;
}

/* Combo-pick AI Status: list-view collapses the full
   .pick-combo-narrative card (pill + "AI Status:" label + sentence)
   down to just the HOLD/CLOSE pill beside perf, mirroring how
   .setup-health-list-pill-side behaves for non-combo picks above. */
.pick-combo-list-pill {
    display: none;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-combo-narrative {
    display: none;
}

/* Side-stack copy of list-view verdict pill (shown in list mode above). */
.setup-health-list-pill-side,
.pick-combo-list-pill-side {
    display: none;
}

/* /admin/picks/ "Entry" column pill (Pick::renderEntryBadge).
   Compact pill so the column stays narrow; verdict-specific classes
   pick up the same palette as the .pick-tech-signal-* family for
   visual continuity with the signal badges underneath. The .is-ai
   modifier bumps the box-shadow border weight so an operator can tell
   at a glance whether the AI has weighed in yet vs the row is showing
   the deterministic fallback. */
.pick-entry-pill {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
    white-space: nowrap;
    vertical-align: middle;
}
.pick-entry-pill-favor {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.45);
}
.pick-entry-pill-avoid {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.45);
}
.pick-entry-pill-mixed {
    background: rgba(245, 158, 11, 0.16);
    color: #b45309;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.45);
}
.pick-entry-pill-neutral {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
    box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.30);
}
.pick-entry-pill.is-ai {
    /* slightly thicker outline = "AI has weighed in"; works on top of
       any verdict color so we don't have to redeclare per-verdict. */
    box-shadow: inset 0 0 0 2px currentColor;
    opacity: 0.95;
}
.pick-entry-pill.is-asking {
    /* JS adds this while the AI job is in-flight. Gentle pulse so the
       operator can see the deterministic pill knows AI is coming. */
    animation: pickEntryPillPulse 1.4s ease-in-out infinite;
}
@keyframes pickEntryPillPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}
.pick-entry-pill-pending {
    /* "still polling" / "no bars" placeholder. Looks neutral but
       slightly dimmer so it reads as "not weighed in yet". */
    background: rgba(148, 163, 184, 0.12);
    color: #64748b;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.30);
    font-style: italic;
}

/* Full entry-quality block rendered on /admin/analyze/ scan candidate
   cards by renderCard when showEntry is set. Sits between the card
   head and the angle/thesis text. Visually grouped via a subtle
   inset background so it reads as a distinct quality bar without
   competing with the thesis prose underneath. */
.featured-entry-block {
    margin: 10px 0 4px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.06);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.featured-entry-block-empty {
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.20);
}
.featured-entry-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.featured-entry-label {
    color: var(--muted, #8b94a6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    font-size: 11px;
}
.featured-entry-source {
    font-size: 12px;
    color: var(--muted, #8b94a6);
}
.featured-entry-source.is-ai {
    color: var(--text, #e6e6e6);
    font-weight: 500;
}
.featured-entry-reason {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text, #e6e6e6);
}
.featured-entry-cites {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.featured-entry-cites-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}
.featured-entry-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.featured-entry-counts {
    margin: 0;
    font-size: 11px;
}
/* Cited-signal chips. Defined globally so renderScanCardEntryEval on
   /admin/analyze/ can reuse the same chip look that renderEntryEval
   uses on /pick/?id=N (where the style ships inside an inline
   <style> block from entryEvalStyleBlock). */
.entry-eval-cite {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: var(--surface-2, #1a2030);
    color: var(--muted, #8b94a6);
    box-shadow: inset 0 0 0 1px var(--border, rgba(148, 163, 184, 0.20));
}

.pick-hold-callout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.35);
    line-height: 1.2;
    flex-shrink: 0;
    align-self: center;
}
.pick-hold-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--accent);
}
.pick-hold-icon svg { width: 100%; height: 100%; display: block; }
.pick-hold-label {
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
}
.pick-hold-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.pick-cite {
    background: var(--accent-soft);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}
.pick-cite:hover { background: var(--accent); color: var(--bg); }

/* ---------- Login page ---------- */

.auth-wrap {
    max-width: 380px;
    margin: 40px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 32px;
}
.auth-wrap h1 { font-size: 22px; margin-bottom: 24px; text-align: center; }
.auth-wrap .auth-forgot-link {
    margin: 8px 0 0;
    text-align: right;
    font-size: 13px;
}
.auth-wrap .auth-forgot-link a {
    color: var(--text-muted);
    text-decoration: none;
}
.auth-wrap .auth-forgot-link a:hover {
    color: var(--accent);
    text-decoration: underline;
}
.auth-wrap button { width: 100%; padding: 11px; margin-top: 16px; }

/* ---------- Admin ---------- */

.admin-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.admin-tile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    text-decoration: none;
    color: var(--text);
}
.admin-tile:hover { border-color: var(--accent); color: var(--text); }
.admin-tile h3 { color: var(--accent); margin: 0 0 4px; }
.admin-tile p { margin: 0; color: var(--text-muted); font-size: 13px; }

.admin-section-head {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 8px 0 10px;
}

.admin-ops-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: var(--text);
    transition: border-color 150ms ease;
}
.admin-ops-strip:hover { border-color: var(--accent); }
.admin-ops-strip-label { font-weight: 600; }
.admin-ops-strip-detail { color: var(--text-muted); font-size: 13px; }
.admin-ops-strip-link {
    margin-left: auto;
    font-size: 13px;
    color: var(--accent);
}
.admin-ops-strip--active { border-color: var(--accent); }
.admin-ops-strip--stale { border-color: var(--danger, #c0392b); }
.admin-ops-strip--stale .admin-ops-strip-label { color: var(--danger, #c0392b); }

.admin-action-alerts {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}
.admin-action-alert {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}
.admin-action-alert:hover { border-color: var(--accent); color: var(--text); }
.admin-action-alert strong { color: var(--text); }
.admin-action-alert span:not(.admin-action-alert-cta) { color: #f87171; font-weight: 600; }
.admin-action-alert--warn { border-color: rgba(234, 179, 8, 0.45); background: rgba(234, 179, 8, 0.08); }
.admin-action-alert--err { border-color: rgba(192, 57, 43, 0.45); background: rgba(192, 57, 43, 0.08); }
.admin-action-alert--err span:not(.admin-action-alert-cta) { color: var(--danger, #c0392b); }
.admin-action-alert--stale {
    border-color: rgba(192, 57, 43, 0.45);
    background: rgba(192, 57, 43, 0.06);
}
.admin-action-alert-cta {
    margin-left: auto;
    color: var(--accent);
    font-size: 12px;
}

.admin-global-alerts {
    margin-top: 10px;
}
.admin-global-alerts[hidden] {
    display: none !important;
}

.admin-subnav-wrap {
    position: sticky;
    top: var(--site-header-height, 59px);
    z-index: 9;
    width: 100%;
    padding: 10px 0 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.admin-subnav-link {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid transparent;
}
.admin-subnav-link:hover {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface);
}
.admin-subnav-link.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}
.admin-subnav-badge {
    display: inline-block;
    min-width: 18px;
    padding: 0 6px;
    margin-left: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
}
.admin-subnav-badge[hidden] {
    display: none !important;
}
.admin-subnav-badge--err {
    background: rgba(192, 57, 43, 0.18);
    color: var(--danger, #c0392b);
}
.admin-subnav-badge--warn {
    background: rgba(217, 119, 6, 0.18);
    color: var(--warning, #d97706);
}
.admin-subnav-sep {
    width: 1px;
    height: 22px;
    margin: 0 2px 0 4px;
    background: var(--border);
    align-self: center;
}
.admin-subnav-link--manage {
    font-size: 12px;
    padding: 5px 10px;
}

.admin-analyze-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin: 0 0 12px;
    align-items: center;
    padding: 0 0 10px;
    border-bottom: 1px solid var(--border);
}
.admin-analyze-switcher-link {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid var(--border-soft, #2b2f36);
    background: var(--surface, #14171c);
}
.admin-analyze-switcher-link:hover {
    color: var(--text);
    border-color: var(--border, #3a3f48);
}
.admin-analyze-switcher-link.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
    font-weight: 500;
}

.admin-scans-filter-bar,
.admin-users-filter-bar,
.admin-tokens-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    position: sticky;
    top: 100px;
    z-index: 6;
    padding: 6px 0 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.admin-scans-filter-input,
.admin-users-filter-input,
.admin-tokens-filter-input {
    max-width: 360px;
    padding: 8px 10px;
}
.admin-scans-filter-nav,
.admin-users-filter-nav,
.admin-tokens-filter-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.admin-scans-filter-meta,
.admin-users-filter-meta,
.admin-tokens-filter-meta {
    font-size: 13px;
}

.admin-settings-ops-strip {
    margin-bottom: 20px;
}
.admin-settings-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 12px;
    align-items: center;
    position: sticky;
    top: 100px;
    z-index: 7;
    padding: 6px 0 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.admin-settings-jump-link {
    display: inline-block;
    padding: 5px 12px;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid var(--border-soft, #2b2f36);
    background: var(--surface, #14171c);
}
.admin-settings-jump-link:hover {
    color: var(--text);
    border-color: var(--border, #3a3f48);
}
.admin-settings-jump-count {
    font-size: 11px;
    opacity: 0.8;
    margin-left: 2px;
}
.admin-settings-save-top {
    margin-bottom: 14px;
    position: sticky;
    top: 100px;
    z-index: 6;
}
.admin-settings-save-top--solo {
    top: 100px;
}

.btn.btn-sm.btn-secondary.is-active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
    font-weight: 500;
}

.admin-jobs-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    margin-bottom: 12px;
    align-items: center;
}
.admin-jobs-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    text-decoration: none;
    background: var(--surface);
}
.admin-jobs-quick-link:hover { color: var(--text); border-color: var(--accent); }
.admin-jobs-quick-link.is-active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}
.admin-jobs-quick-link--err.is-active {
    border-color: var(--danger, #c0392b);
    color: var(--danger, #c0392b);
    background: rgba(192, 57, 43, 0.12);
}
.admin-jobs-quick-count { font-size: 11px; opacity: 0.9; }

.admin-jobs-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 16px;
}
.admin-jobs-filter-row .admin-jobs-quick {
    margin-bottom: 0;
    flex: 1 1 auto;
}
.admin-jobs-kind-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-jobs-kind-label {
    font-size: 12px;
    color: var(--text-muted);
}
.admin-jobs-kind-select {
    min-width: 200px;
    padding: 5px 8px;
    font-size: 12px;
}
.admin-jobs-clear-filters {
    font-size: 13px;
}

.admin-jobs-ops { margin-bottom: 16px; }
.admin-jobs-ops-state { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
.admin-jobs-ops-counts { color: var(--text-muted); font-size: 13px; }
.admin-jobs-ops-err { color: var(--danger, #c0392b); }
.admin-jobs-running-list {
    margin: 10px 0 0;
    padding-left: 18px;
    font-size: 13px;
}
.admin-jobs-running-list li { margin: 4px 0; }

.admin-job-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.admin-job-status--queued { background: var(--surface-2); color: var(--text-muted); }
.admin-job-status--running { background: var(--accent-soft); color: var(--accent); }
.admin-job-status--done { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.admin-job-status--error { background: rgba(192, 57, 43, 0.15); color: var(--danger, #c0392b); }
.admin-job-status--error-acked { background: var(--surface-2); color: var(--text-dim); }
.admin-job-status--canceled { background: var(--surface-2); color: var(--text-dim); }

.admin-jobs-pct { font-weight: 600; font-size: 13px; }
.admin-jobs-toolbar {
    position: sticky;
    top: 100px;
    z-index: 7;
    padding: 6px 0 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.admin-jobs-actions { white-space: nowrap; }
.admin-jobs-actions .btn-sm { margin-right: 4px; }

.token-display {
    background: var(--bg);
    border: 1px solid var(--accent);
    padding: 14px;
    border-radius: 6px;
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 13px;
    word-break: break-all;
    color: var(--accent);
    margin: 12px 0;
}

/* ---------- Button variants used by the anonymous landing ---------- */

.btn-primary { background: var(--accent); color: var(--bg); }
.btn-primary:hover { background: var(--accent-hover); color: var(--bg); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-2);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-lg {
    padding: 13px 22px;
    font-size: 15px;
    border-radius: 8px;
}

/* ---------- Anonymous landing: section heads ---------- */

.section-head { margin-bottom: 28px; }
.section-head h2 {
    margin: 6px 0 0;
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.section-eyebrow {
    display: inline-block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.section-head-labels {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.section-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.3;
}
.section-sub {
    color: var(--text-muted);
    margin: 10px 0 0;
    /* max-width: 640px; */
    font-size: 15px;
}

/* ---------- Hero ---------- */

.landing-hero {
    position: relative;
    margin: 8px 0 36px;
    padding: 0 4px 40px;
}
.landing-hero-inner {
    max-width: 820px;
}
.landing-eyebrow {
    display: inline-block;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 4px 10px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: var(--accent-soft);
}
.landing-headline {
    margin: 22px 0 18px;
    font-size: clamp(36px, 5.4vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-weight: 700;
}
.landing-accent {
    background: linear-gradient(90deg, var(--accent) 0%, #34d3c2 50%, var(--accent) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    animation: landing-accent-shimmer 6s ease-in-out infinite;
}
@keyframes landing-accent-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.landing-sub {
    max-width: 640px;
    margin: 0 0 28px;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.6;
}
.landing-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 24px 40px;
    margin: 0 0 32px;
}
.landing-stat {
    border-left: 2px solid var(--accent);
    padding-left: 14px;
}
.landing-stat-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}
.landing-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 6px;
}
.landing-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* ---------- Winners section + ticker tape ---------- */

/* Wraps the section-head + tape on the home page. Bottom margin matches
 * the spacing the bare tape used to claim so the page rhythm stays the
 * same after we added a heading above it. */
.winners-section { margin: 0 0 56px; }
.winners-section .ticker-tape { margin-bottom: 0; }

/* Variant of section-head with a smaller bottom margin -- the tape that
 * follows already has its own visual breathing room from the border and
 * the green PnL chips, so we don't need the full 28px gap below. */
.section-head-tight { margin-bottom: 14px; }

.ticker-tape {
    position: relative;
    display: flex;
    align-items: stretch;
    margin: 0 0 56px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.ticker-tape-label {
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--bg);
    background: var(--accent);
    flex-shrink: 0;
    position: relative;
}
.ticker-tape-label::after {
    content: "";
    position: absolute;
    right: -1px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bg);
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--bg);
}
.ticker-tape-mask {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 14px 0;
    mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
}
.ticker-tape-track {
    display: inline-flex;
    gap: 36px;
    padding-left: 24px;
    animation: ticker-scroll 55s linear infinite;
    white-space: nowrap;
    will-change: transform;
}
.ticker-tape:hover .ticker-tape-track { animation-play-state: paused; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.ticker-tape-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.ticker-tape-sym {
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}
/* Performance chip on the winners tape. Subtle green wash on a thin
 * outline so the eye lands on the number itself, not the container. */
.ticker-tape-pnl {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(34, 197, 94, 0.12);
    color: var(--ok);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
    font-variant-numeric: tabular-nums;
}
.ticker-tape-cat {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    background: var(--surface-2);
}
.ticker-tape-cat-insider    { color: var(--insider);    box-shadow: inset 0 0 0 1px var(--insider); }
.ticker-tape-cat-catalyst   { color: var(--catalyst);   box-shadow: inset 0 0 0 1px var(--catalyst); }
.ticker-tape-cat-earnings   { color: var(--earnings);   box-shadow: inset 0 0 0 1px var(--earnings); }
.ticker-tape-cat-contrarian { color: var(--contrarian); box-shadow: inset 0 0 0 1px var(--contrarian); }
.ticker-tape-cat-macro      { color: var(--macro);      box-shadow: inset 0 0 0 1px var(--macro); }
.ticker-tape-cat-alpha      { color: var(--alpha);      box-shadow: inset 0 0 0 1px var(--alpha); }

@media (prefers-reduced-motion: reduce) {
    .ticker-tape-track { animation: none; transform: translateX(0); }
    .landing-accent { animation: none; background-position: 0% 50%; }
}

/* ---------- Featured free pick ---------- */

.featured-section { margin: 0 0 72px; scroll-margin-top: 96px; }
.featured-section .home-featured-hint {
    margin: 0 0 3px;
    font-size: 11px;
    color: var(--accent);
}


/* Home featured pick: entire card navigates to pick detail (Chart link
 * stays interactive above the stretched-link overlay). */
.featured-section .feed-grid > .featured-card {
    cursor: pointer;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.featured-section .feed-grid > .featured-card:hover {
    border-color: var(--accent);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 4px 12px -6px rgba(0, 0, 0, 0.4);
}
.featured-section .feed-grid > .featured-card .featured-sym-link {
    position: static;
}
.featured-section .feed-grid > .featured-card .featured-sym-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
.featured-section .feed-grid > .featured-card .featured-sym-link:focus-visible { outline: none; }
.featured-section .feed-grid > .featured-card .featured-sym-link:focus-visible::after {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.featured-section .feed-grid > .featured-card a:not(.featured-sym-link),
.featured-section .feed-grid > .featured-card button,
.featured-section .feed-grid > .featured-card summary {
    position: relative;
    z-index: 2;
}
.featured-card {
    position: relative;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
    border: 1px solid var(--border-2);
    border-radius: 14px;
    padding: 28px 28px 24px;
    margin-bottom: 20px;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 2px 8px -2px rgba(0, 0, 0, 0.28);
}
.featured-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent) 0%, transparent 40%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
            mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.featured-card-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.featured-sym-block { flex: 1; min-width: 220px; }
.featured-sym-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.featured-free-badge { letter-spacing: 0.5px; }
.featured-sym-link, .featured-sym-link:visited {
    color: inherit;
    text-decoration: none;
}
.featured-sym-link:hover { color: var(--accent); }
.featured-sym {
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
}
.featured-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    min-width: 0;
}
.featured-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 17px;
    font-weight: 500;
}
.featured-name-row .pick-portfolio-btn {
    flex: 0 0 auto;
}
.featured-meta-row {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 4px;
    font-size: 13px;
    color: var(--text-muted);
}
/* Render the "·" separator as a ::before pseudo on each bit (except the
 * first), so the dot is part of the bit's box and wraps with it. The
 * old standalone <span class="featured-meta-sep"> spans were independent
 * flex items, which let them wrap onto a different line than their
 * trailing bit and orphan a dot at the end of a row. */
.featured-meta-row > * + *::before {
    content: "\00B7";
    color: var(--text-dim);
    margin-right: 4px;
}
.featured-meta-sep { color: var(--text-dim); }
.featured-cat {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--surface-3);
}
.featured-cat-insider    { color: var(--insider);    box-shadow: inset 0 0 0 1px var(--insider); }
.featured-cat-catalyst   { color: var(--catalyst);   box-shadow: inset 0 0 0 1px var(--catalyst); }
.featured-cat-earnings   { color: var(--earnings);   box-shadow: inset 0 0 0 1px var(--earnings); }
.featured-cat-contrarian { color: var(--contrarian); box-shadow: inset 0 0 0 1px var(--contrarian); }
.featured-cat-macro      { color: var(--macro);      box-shadow: inset 0 0 0 1px var(--macro); }
.featured-cat-alpha      { color: var(--alpha);      box-shadow: inset 0 0 0 1px var(--alpha); }

.featured-confidence {
    position: relative;
    flex-shrink: 0;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(var(--accent) var(--conf, 0%), var(--surface-3) 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.featured-confidence-high { background: conic-gradient(var(--ok)        var(--conf, 0%), var(--surface-3) 0); }
.featured-confidence-mid  { background: conic-gradient(var(--accent)    var(--conf, 0%), var(--surface-3) 0); }
.featured-confidence-low  { background: conic-gradient(var(--text-dim)  var(--conf, 0%), var(--surface-3) 0); }
.featured-confidence-ring {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: var(--surface);
}
.featured-confidence-num {
    position: relative;
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}
.featured-confidence-num span {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 600;
    margin-left: 1px;
}
.featured-confidence-label {
    position: relative;
    margin-top: 4px;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* Pick detail (/pick/?id=N): slightly smaller confidence ring on the
   desktop full-card layout. Mobile keeps the global corner treatment. */
@media (min-width: 761px) {
    body.page-pick .featured-card .featured-confidence {
        width: 100px;
        height: 100px;
    }
    body.page-pick .featured-card .featured-confidence-ring {
        inset: 8px;
    }
    body.page-pick .featured-card .featured-confidence-num {
        font-size: 26px;
    }
    body.page-pick .featured-card .featured-confidence-num span {
        font-size: 13px;
    }
    body.page-pick .featured-card .featured-confidence-label {
        margin-top: 3px;
        font-size: 8px;
        letter-spacing: 1.6px;
    }
}

.featured-angle {
    margin: 24px 0 18px;
    padding: 14px 16px;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    border-radius: 0 8px 8px 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
}
.featured-angle-label {
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 11px;
    margin-right: 6px;
}
.featured-thesis {
    color: var(--text);
    line-height: 1.65;
    font-size: 15px;
    margin: 0 0 22px;
}
.featured-thesis a {
    color: var(--accent);
    border-bottom: 1px dashed var(--accent);
}
.featured-thesis a.pick-cite { border-bottom: 0; }
.featured-actions {
    border-top: 1px solid var(--border);
    padding-top: 18px;
    display: flex;
    gap: 10px;
}
.feed-grid > .featured-card .featured-actions .btn {
    padding: 5px 10px;
    font-size: 12px;
}

/* ---------- Feed view modes ----------
 * Three card density modes the visitor can flip between on /feed/. The
 * choice is persisted in localStorage and stamped on <html> as
 * data-feed-mode so CSS can drive the layout without re-rendering.
 *   - full     : nothing hidden; default on first visit when viewport >= 768px.
 *   - minimal  : same card chrome, but the thesis paragraph and the
 *                catalyst row are hidden -- visitors who only want to
 *                scan tickers and confidence get a denser feed.
 *   - list     : default on first visit when viewport < 768px; thin full-width rows. Strips the long-form prose
 *                (angle/thesis/catalyst/insider) and the bottom CTA so
 *                each pick fits on one or two visual lines. The
 *                "Read the full pick" affordance moves to the ticker
 *                glyph itself, which is already a link. */
html[data-feed-mode="minimal"] .feed-grid .featured-thesis,
html[data-feed-mode="minimal"] .feed-grid .pick-meta-catalyst,
html[data-feed-mode="minimal"] .feed-grid .pick-refine-notes {
    display: none;
}

/* Min + Full: single-column full-width cards with a tighter layout than
 * the default featured-card treatment used on home / pick detail. */
html[data-feed-mode="minimal"] .feed-grid,
html[data-feed-mode="full"] .feed-grid,
html[data-feed-mode="minimal"] .cat-panel.feed-cards.active .feed-grid,
html[data-feed-mode="full"] .cat-panel.feed-cards.active .feed-grid {
    display: block;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card,
html[data-feed-mode="full"] .feed-grid > .featured-card {
    padding: 14px 18px;
    margin-bottom: 16px;
}
.feed-grid > .featured-card.featured-card-new {
    border: 2px solid var(--feed-new);
}
.feed-grid > .featured-card.featured-card-new::before {
    padding: 2px;
    background: linear-gradient(135deg, var(--feed-new) 0%, var(--feed-new) 50%, transparent 80%);
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card::before,
html[data-feed-mode="full"] .feed-grid > .featured-card::before {
    display: none;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-card-head,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-card-head {
    gap: 16px;
    align-items: center;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-name-row,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-name-row {
    margin-top: 2px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-sym,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-sym {
    font-size: 28px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-name,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-name {
    font-size: 13px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-meta-row,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-meta-row {
    margin-top: 4px;
    font-size: 12px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-sym-block,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-sym-block {
    flex: 1 1 240px;
    min-width: 0;
    padding-right: 0;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-side-stack,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-side-stack {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    width: auto;
    flex-shrink: 0;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence {
    position: relative;
    top: auto;
    right: auto;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-ring,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-ring {
    inset: 6px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-num,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-num {
    font-size: 17px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-num span,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-num span {
    font-size: 10px;
    margin-left: 1px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-label,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-label {
    margin-top: 1px;
    font-size: 7px;
    letter-spacing: 1.2px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-angle,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-angle {
    margin: 12px 0 8px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
}
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-thesis {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .pick-meta-row,
html[data-feed-mode="full"] .feed-grid > .featured-card .pick-meta-row {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.4;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-cited,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-cited {
    margin-top: 10px;
    padding-top: 10px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-cited-label,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-cited-label {
    margin-bottom: 6px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-cited-list,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-cited-list {
    gap: 6px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-actions,
html[data-feed-mode="full"] .feed-grid > .featured-card .featured-actions {
    padding-top: 12px;
}
html[data-feed-mode="minimal"] .feed-grid > .featured-card .pick-refine-original,
html[data-feed-mode="full"] .feed-grid > .featured-card .pick-refine-original {
    margin-top: 8px;
}

/* Admin analyze-discovery scan feed: match public feed "full" list density
   on featured-card pick previews. */
.admin-scan-feed .axd-scan-pick {
    margin-bottom: 18px;
}
.admin-scan-feed .axd-scan-pick:last-child {
    margin-bottom: 0;
}
.admin-scan-feed .featured-card {
    padding: 14px 18px;
    margin-bottom: 0;
    box-shadow: none;
}
.admin-scan-feed .featured-card::before {
    display: none;
}
.admin-scan-feed .featured-card .featured-card-head {
    gap: 16px;
    align-items: center;
}
.admin-scan-feed .featured-card .featured-name-row {
    margin-top: 2px;
}
.admin-scan-feed .featured-card .featured-sym {
    font-size: 28px;
}
.admin-scan-feed .featured-card .featured-name {
    font-size: 13px;
}
.admin-scan-feed .featured-card .featured-meta-row {
    margin-top: 4px;
    font-size: 12px;
}
.admin-scan-feed .featured-card .featured-sym-block {
    flex: 1 1 240px;
    min-width: 0;
    padding-right: 0;
}
.admin-scan-feed .featured-card .featured-side-stack {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    width: auto;
    flex-shrink: 0;
}
.admin-scan-feed .featured-card .featured-confidence {
    position: relative;
    top: auto;
    right: auto;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}
.admin-scan-feed .featured-card .featured-confidence-ring {
    inset: 6px;
}
.admin-scan-feed .featured-card .featured-confidence-num {
    font-size: 17px;
}
.admin-scan-feed .featured-card .featured-confidence-num span {
    font-size: 10px;
    margin-left: 1px;
}
.admin-scan-feed .featured-card .featured-confidence-label {
    margin-top: 1px;
    font-size: 7px;
    letter-spacing: 1.2px;
}
.admin-scan-feed .featured-card .featured-angle {
    margin: 12px 0 8px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
}
.admin-scan-feed .featured-card .featured-thesis {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 12px;
}
.admin-scan-feed .featured-card .featured-cited {
    margin-top: 10px;
    padding-top: 10px;
}
.admin-scan-feed .featured-card .featured-cited-label {
    margin-bottom: 6px;
}
.admin-scan-feed .featured-card .featured-cited-list {
    gap: 6px;
}
.admin-scan-feed .featured-card .featured-actions,
.admin-scan-feed .featured-card .axd-publish-actions {
    padding-top: 12px;
    margin-top: 0;
}
.admin-scan-feed .featured-card .pick-refine-original {
    margin-top: 8px;
}

/* Admin discovery scan pick tier sections */
.admin-scan-feed .axd-pick-section {
    margin-top: 28px;
    border: 1px solid var(--border-2);
    border-radius: 12px;
    overflow: hidden;
}
.admin-scan-feed .axd-pick-section {
    background: transparent;
}
.admin-scan-feed .axd-pick-section:first-child {
    margin-top: 0;
}
.admin-scan-feed .axd-pick-section-head {
    margin: 0;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-3);
}
.admin-scan-feed .axd-pick-section-head strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.admin-scan-feed .axd-pick-section-sub {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted, #8b94a6);
}
.admin-scan-feed .axd-pick-section-body {
    padding: 14px 16px 16px;
}
.admin-scan-feed .axd-pick-section-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.admin-scan-feed .axd-pick-section--strict {
    border-left: 4px solid var(--accent);
}
.admin-scan-feed .axd-pick-section--strict .axd-pick-section-head strong {
    color: var(--accent);
}
.admin-scan-feed .axd-pick-section--best_effort {
    border-left: 4px solid #f59e0b;
}
.admin-scan-feed .axd-pick-section--best_effort .axd-pick-section-head strong {
    color: #fbbf24;
}
.admin-scan-feed .axd-pick-section--fallback {
    border-left: 4px solid #64748b;
}
.admin-scan-feed .axd-pick-section--fallback .axd-pick-section-head strong {
    color: #94a3b8;
}
.admin-scan-feed .axd-pick-group-head {
    margin: 20px 0 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}
.admin-scan-feed .axd-pick-group-head:first-child {
    margin-top: 0;
}
.admin-scan-feed .axd-pick-group-head strong {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text, #e8eaed);
}
.admin-scan-feed .axd-pick-group-sub {
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted, #8b94a6);
    line-height: 1.4;
}

html[data-feed-mode="list"] .feed-grid,
html[data-feed-mode="list"] .cat-panel.feed-cards .feed-grid {
    display: block;
}
html[data-feed-mode="list"] .feed-grid > .featured-card {
    margin-bottom: 10px;
    padding: 14px 18px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-card-head {
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-name-row {
    margin-top: 2px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-name {
    font-size: 13px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-meta-row {
    margin-top: 4px;
    font-size: 12px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence {
    width: 64px;
    height: 64px;
    position: relative;
    top: auto;
    right: auto;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-ring { inset: 6px; }
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-num { font-size: 17px; }
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-num span {
    font-size: 10px;
    margin-left: 1px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-label {
    font-size: 7px;
    letter-spacing: 1.2px;
    margin-top: 1px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym { font-size: 28px; }
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-block {
    flex: 1 1 240px;
    padding-right: 0;
    min-width: 220px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-side-stack {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: 0;
    width: auto;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-angle,
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-thesis,
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-meta-row,
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-refine-notes,
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-cited,
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-refine-original,
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-actions {
    display: none;
}
html[data-feed-mode="list"] .feed-grid > .featured-card::before { display: none; }

/* /feed/ page: entire card navigates to pick detail (all density modes).
 * Scoped to .cat-panel.feed-cards; home uses .featured-section .feed-grid
 * with the same stretched-link pattern. Interactive controls sit above the
 * overlay. */
.cat-panel.feed-cards .feed-grid > .featured-card {
    cursor: pointer;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.cat-panel.feed-cards .feed-grid > .featured-card:hover {
    border-color: var(--accent);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 4px 12px -6px rgba(0, 0, 0, 0.4);
}
.cat-panel.feed-cards .feed-grid > .featured-card .featured-sym-link {
    position: static;
}
.cat-panel.feed-cards .feed-grid > .featured-card .featured-sym-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
.cat-panel.feed-cards .feed-grid > .featured-card .featured-sym-link:focus-visible { outline: none; }
.cat-panel.feed-cards .feed-grid > .featured-card .featured-sym-link:focus-visible::after {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.cat-panel.feed-cards .feed-grid > .featured-card .pick-portfolio-btn,
.cat-panel.feed-cards .feed-grid > .featured-card a:not(.featured-sym-link),
.cat-panel.feed-cards .feed-grid > .featured-card button,
.cat-panel.feed-cards .feed-grid > .featured-card summary {
    position: relative;
    z-index: 2;
}

/* Stretched-link click target: in list mode the entire row navigates to
 * the pick detail page via the ticker <a>'s ::after overlay (same pattern
 * as .portfolio-compact-card). The chart link is already z-index: 2
 * globally; .pick-portfolio-btn needs the bump scoped to list mode so it
 * stays interactive over the overlay. */
html[data-feed-mode="list"] .feed-grid > .featured-card {
    cursor: pointer;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
html[data-feed-mode="list"] .feed-grid > .featured-card:hover {
    border-color: var(--accent);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.04) inset,
        0 4px 12px -6px rgba(0, 0, 0, 0.4);
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-link {
    position: static;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-link:focus-visible { outline: none; }
html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-link:focus-visible::after {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
html[data-feed-mode="list"] .feed-grid > .featured-card .pick-portfolio-btn {
    position: relative;
    z-index: 2;
}

/* List mode at narrow screens: the global mobile rules try to absolutely
 * position the confidence ring into the card corner and stack the
 * side-stack onto a full second row, which fights the "thin row" intent.
 * Override to keep the row inline and shed non-essential bits (company
 * name, meta-row, hold chip, confidence label) so the visible payload
 * collapses to ticker + status + perf + ring. */
@media (max-width: 760px) {
    html[data-feed-mode="minimal"] .feed-grid > .featured-card,
    html[data-feed-mode="full"] .feed-grid > .featured-card {
        padding: 12px 14px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-card-head,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-card-head {
        flex-wrap: wrap;
        gap: 10px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-sym,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-sym {
        font-size: 22px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-sym-row,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-sym-row {
        gap: 8px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-sym-block,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-sym-block {
        flex: 1 1 auto;
        padding-right: 0;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence {
        width: 52px;
        height: 52px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-ring,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-ring {
        inset: 5px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-num,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-num {
        font-size: 14px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-num span,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-num span {
        font-size: 9px;
        margin-left: 1px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .pick-perf-mini,
    html[data-feed-mode="full"] .feed-grid > .featured-card .pick-perf-mini {
        font-size: 11px;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card { padding: 12px 14px; }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-card-head {
        gap: 10px;
        flex-wrap: wrap;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .setup-health-list-pill-side .setup-health-pill,
    html[data-feed-mode="list"] .feed-grid > .featured-card .pick-combo-list-pill-side .pick-combo-pill {
        font-size: 9px;
        padding: 2px 6px;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym { font-size: 22px; }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-row { gap: 8px; }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-block {
        flex: 1 1 auto;
        min-width: 0;
        padding-right: 0;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .pick-hold-callout {
        display: none;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-sym-row,
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-name-row {
        padding-right: 58px;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence {
        width: 52px;
        height: 52px;
        position: absolute;
        top: 12px;
        right: 14px;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-ring { inset: 5px; }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-num { font-size: 14px; }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-num span {
        font-size: 9px;
        margin-left: 1px;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence-label { display: none; }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-side-stack {
        flex: 0 0 100%;
        width: 100%;
        margin-top: 8px;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .pick-perf-mini { font-size: 11px; }
}

/* The portfolio toggle ships in two visual variants -- a pill ("Add" /
 * "In portfolio") that lives in the ticker row at wide widths, and a
 * star icon (☆ / ★, gold) that lives in the company-name row at narrow
 * widths. Only one variant is visible at a time; PHP renders both, the
 * toggle JS syncs state across all .pick-portfolio-btn elements that
 * share a data-pick-id. */
.pick-portfolio-btn-star { display: none !important; }

/* List mode at really narrow screens: keep the row tight and visually
 * stable -- pin the confidence ring to the top-right corner instead of
 * letting it wrap onto a second line. The FREE PICK badge also
 * collapses to just "FREE" so the top row of the card has room for
 * the ticker + status pill. */
@media (max-width: 480px) {
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-confidence {
        position: absolute;
        top: 12px;
        right: 14px;
    }

    /* Let the meta-row use the full card width so "published HH:MM"
     * doesn't wrap onto a second line at narrow widths. We can't drop
     * the gauge-clearance padding from .featured-sym-block (its parent)
     * because that padding also serves as the flex hypothetical-size
     * trigger that forces the .featured-side-stack onto its own row;
     * removing it collapses sym-block to 0 width. Instead, keep the
     * sym-block padding as-is and pull the meta-row out of it with a
     * matching negative right margin. The meta-row sits below the
     * gauge's bottom edge, so this is purely visual width relief --
     * nothing actually overlaps the ring.
     *
     * Scoped to .feed-grid so the pick-detail page (which reuses the
     * same .featured-card classes but has its own header layout) isn't
     * affected.
     *
     * List mode uses its own row-level padding approach below (the
     * sym-block has padding-right: 0 in list mode at <=760px, so a
     * negative margin would have nothing to negate); the row-level
     * 58px pad on sym-row/name-row is set in the list-only block. */
    .feed-grid > .featured-card .featured-meta-row,
    body.page-pick .featured-card .featured-meta-row {
        margin-right: -88px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-meta-row,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-meta-row {
        margin-right: 0;
    }
    html[data-feed-mode="list"] .feed-grid > .featured-card .featured-meta-row {
        margin-right: 0;
    }
    /* Min/Full (and the home featured cards) already reserve ring
     * clearance on .featured-sym-block (padding-right: 58px above), so the
     * sym/name rows must NOT reserve it again -- a second 58px shrinks the
     * ticker row and forces the Chart button to wrap onto its own line.
     * (List mode keeps its own row padding since its sym-block has none.) */
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-sym-row,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-sym-row,
    .featured-section .feed-grid > .featured-card .featured-sym-row,
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-name-row,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-name-row,
    .featured-section .feed-grid > .featured-card .featured-name-row {
        padding-right: 0;
    }

    /* Swap pill <-> star at the narrow breakpoint. The star variant
     * keeps the same .pick-portfolio-btn click handler so JS doesn't
     * care which form is on screen. Selectors chain .pick-portfolio-btn
     * + .pick-portfolio-btn-star to outweigh the same-specificity base
     * rules that appear later in the source (height, background, border,
     * border-radius, etc.). */
    .pick-portfolio-btn-pill { display: none !important; }
    .pick-portfolio-btn-star { display: inline-flex !important; }
    .pick-portfolio-btn.pick-portfolio-btn-star,
    .pick-portfolio-btn.pick-portfolio-btn-star:hover,
    .pick-portfolio-btn.pick-portfolio-btn-star.pick-portfolio-btn-active,
    .pick-portfolio-btn.pick-portfolio-btn-star.pick-portfolio-btn-active:hover {
        height: auto;
        padding: 4px;
        gap: 0;
        background: transparent;
        border-color: transparent;
        border-radius: 0;
        box-shadow: none;
        color: inherit;
    }
    .pick-portfolio-btn.pick-portfolio-btn-star:focus,
    .pick-portfolio-btn.pick-portfolio-btn-star:focus-visible,
    .pick-portfolio-btn.pick-portfolio-btn-star.pick-portfolio-btn-active:focus,
    .pick-portfolio-btn.pick-portfolio-btn-star.pick-portfolio-btn-active:focus-visible {
        outline: none;
        box-shadow: none;
    }
    .pick-portfolio-btn.pick-portfolio-btn-star .pick-portfolio-btn-label { display: none; }
    .pick-portfolio-btn.pick-portfolio-btn-star .pick-portfolio-btn-icon,
    .pick-portfolio-btn.pick-portfolio-btn-star.pick-portfolio-btn-active .pick-portfolio-btn-icon {
        width: auto;
        height: auto;
        background: transparent;
        border-radius: 0;
        font-size: 0;
    }
    .pick-portfolio-btn.pick-portfolio-btn-star .pick-portfolio-btn-icon::before {
        content: "\2606";
        font-size: 22px;
        line-height: 1;
        color: var(--text-muted);
        transition: color 0.15s ease;
    }
    .pick-portfolio-btn.pick-portfolio-btn-star:hover .pick-portfolio-btn-icon::before {
        color: var(--gold);
    }
    .pick-portfolio-btn.pick-portfolio-btn-star.pick-portfolio-btn-active .pick-portfolio-btn-icon::before {
        content: "\2605";
        color: var(--gold);
    }

    .pick-badge-free {
        font-size: 0;
        letter-spacing: 0;
        padding-left: 7px;
        padding-right: 7px;
    }
    .pick-badge-free::before {
        content: "FREE";
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.07em;
        margin-right: -0.5px;
    }
    .feed-grid .pick-badge-free::before,
    .cat-panel.feed-cards .pick-badge-free::before {
        color: var(--gold);
    }
}

/* ---------- How it works ---------- */

.how-it-works { margin: 0 0 72px; }
.hiw-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.hiw-step {
    position: relative;
    padding: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 12px;
    transition: border-color 0.2s, transform 0.2s;
}
.hiw-step:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.hiw-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 14px;
}
.hiw-step h3 { margin: 0 0 8px; font-size: 18px; }
.hiw-step p  { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }

/* ---------- Categories grid ---------- */

.categories-section { margin: 0 0 72px; }
.cat-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cat-tile {
    position: relative;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}
.cat-tile::before {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 4px;
}
.cat-tile-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.cat-tile-sub {
    font-size: 13px;
    color: var(--text-muted);
}
.cat-tile-flag {
    margin-top: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-dim);
}
.cat-tile-active .cat-tile-flag { color: var(--accent); }
.cat-tile-locked { opacity: 0.7; }
.cat-tile-insider::before    { background: var(--insider); }
.cat-tile-catalyst::before   { background: var(--catalyst); }
.cat-tile-earnings::before   { background: var(--earnings); }
.cat-tile-contrarian::before { background: var(--contrarian); }
.cat-tile-macro::before      { background: var(--macro); }
.cat-tile-alpha::before      { background: var(--alpha); }

/* ---------- Track record ---------- */

.track-record { margin: 0 0 72px; }

/* ---------- Final CTA ---------- */

.final-cta {
    text-align: center;
    padding: 56px 32px;
    border: 1px solid var(--border-2);
    background:
        radial-gradient(ellipse at top, var(--accent-soft) 0%, transparent 60%),
        var(--surface);
    border-radius: 14px;
    margin: 0 0 32px;
}
.final-cta h2 {
    margin: 12px 0 12px;
    font-size: 30px;
}
.final-cta p {
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 24px;
    font-size: 15px;
    line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
    .site-main { padding: 20px 14px 48px; }
    .admin-subnav { padding: 0 14px; }
    .pick-card { padding: 14px; }
    .pick-ticker { font-size: 18px; }
    .site-nav a { padding: 7px 10px; font-size: 13px; }
}

@media (max-width: 480px) {
    .site-nav-portfolio { display: none; }
    .site-nav-login { display: none; }
    .site-nav-profile--guest { display: block; }
    .site-nav-profile-item-portfolio { display: flex !important; }
}

@media (max-width: 760px) {

    .landing-hero { padding: 0 0 8px; }
    .landing-headline { font-size: 38px; }
    .landing-sub { font-size: 15px; }
    .section-head h2 { font-size: 26px; }
    .landing-stats { gap: 18px 28px; }
    .landing-cta-row .btn { flex: 1; text-align: center; }

    .featured-card { padding: 22px 18px 18px; }
    .featured-sym { font-size: 32px; }

    /* On narrow screens the big confidence ring eats too much vertical
     * space and visually disconnects from the symbol block. Pull it out
     * of the flex flow and tuck it into the top-right corner of the card
     * so it sits in line with the ticker name, freeing the side-stack
     * (hold horizon + perf pill) to use the full width below. We keep
     * the "CONFIDENCE" label visible so first-time viewers immediately
     * understand what the ring represents. */
    .featured-confidence {
        position: absolute;
        top: 18px;
        right: 18px;
        width: 78px;
        height: 78px;
    }
    .featured-confidence-ring { inset: 7px; }
    .featured-confidence-num { font-size: 20px; }
    .featured-confidence-num span { font-size: 11px; margin-left: 1px; }
    .featured-confidence-label {
        margin-top: 2px;
        font-size: 7px;
        letter-spacing: 1.3px;
    }

    /* Reserve right padding for the absolute ring so the symbol and name
     * rows never underrun it. min-width: 0 overrides the desktop 220px
     * floor so the block can shrink to fit narrow viewports. The
     * padding also doubles as a flex hypothetical-size trigger that
     * keeps the .featured-side-stack from sharing a row with sym-block
     * (it has width: 100%, so without sym-block contributing 88px of
     * basis, the two would tile at exactly 100% on a single row and
     * sym-block would compute to 0 width). At <=480px the meta-row is
     * pulled out of this padding with a negative right margin so it
     * can use the full card width; see the @max-width:480 block. */
    .featured-sym-block { min-width: 0; padding-right: 88px; }

    /* On desktop the side-stack (hold horizon + entry/now/pnl pill) sits
     * to the right of the sym-block in the same flex row, stacked
     * vertically. On mobile we drop it onto its own full-width row below
     * the sym-block AND flip it to row direction so the hold chip sits
     * inline at the left with the perf pill immediately to its right.
     * flex-wrap means the pill drops below the chip on really narrow
     * viewports instead of overflowing the card. */
    .featured-side-stack {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 14px;
    }

    .hiw-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: 1fr 1fr; }

    .final-cta { padding: 36px 18px; }
    .final-cta h2 { font-size: 24px; }
}

/* Feed min/full + home featured pick: the global featured-card mobile
 * rules above assume the legacy stacked layout. Re-apply the feed-grid
 * mobile treatment here (after those globals) so cards stay full-width,
 * the confidence ring tucks into the corner, and the hold/perf row wraps
 * beneath the ticker block instead of overflowing horizontally. */
@media (max-width: 760px) {
    html[data-feed-mode="minimal"] .feed-grid > .featured-card,
    html[data-feed-mode="full"] .feed-grid > .featured-card,
    .featured-section .feed-grid > .featured-card {
        overflow-x: hidden;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-card-head,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-card-head,
    .featured-section .feed-grid > .featured-card .featured-card-head {
        align-items: flex-start;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-sym-block,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-sym-block,
    .featured-section .feed-grid > .featured-card .featured-sym-block {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        padding-right: 58px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence,
    .featured-section .feed-grid > .featured-card .featured-confidence {
        position: absolute;
        top: 12px;
        right: 14px;
        width: 52px;
        height: 52px;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-confidence-label,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-confidence-label,
    .featured-section .feed-grid > .featured-card .featured-confidence-label {
        display: none;
    }
    html[data-feed-mode="minimal"] .feed-grid > .featured-card .featured-side-stack,
    html[data-feed-mode="full"] .feed-grid > .featured-card .featured-side-stack,
    .featured-section .feed-grid > .featured-card .featured-side-stack {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
        box-sizing: border-box;
    }
}

/* Home featured pick on mobile: match feed Min-view density. Keep the
 * angle box, meta row, setup-health / combo narrative, citations, and
 * the read-full-pick CTA visible; only the long thesis paragraph, the
 * catalyst row, and refined notes are hidden -- same fields Min mode
 * suppresses on /feed/. Scoped to .featured-section so pick detail and
 * feed list/full cards are untouched. */
@media (max-width: 760px) {
    .featured-section .feed-grid {
        display: block;
    }
    .featured-section .feed-grid > .featured-card {
        padding: 12px 14px;
        margin-bottom: 10px;
    }
    .featured-section .feed-grid > .featured-card::before {
        display: none;
    }
    .featured-section .feed-grid > .featured-card .featured-card-head {
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
    }
    .featured-section .feed-grid > .featured-card .featured-name-row {
        margin-top: 2px;
    }
    .featured-section .feed-grid > .featured-card .featured-name {
        font-size: 13px;
    }
    .featured-section .feed-grid > .featured-card .featured-meta-row {
        margin-top: 4px;
        font-size: 12px;
        margin-right: 0;
    }
    .featured-section .feed-grid > .featured-card .featured-sym {
        font-size: 22px;
    }
    .featured-section .feed-grid > .featured-card .featured-sym-row {
        gap: 8px;
    }
    .featured-section .feed-grid > .featured-card .featured-sym-block {
        flex: 1 1 auto;
        min-width: 0;
        padding-right: 0;
    }
    .featured-section .feed-grid > .featured-card .featured-confidence-ring {
        inset: 5px;
    }
    .featured-section .feed-grid > .featured-card .featured-confidence-num {
        font-size: 14px;
    }
    .featured-section .feed-grid > .featured-card .featured-confidence-num span {
        font-size: 9px;
        margin-left: 1px;
    }
    .featured-section .feed-grid > .featured-card .featured-side-stack {
        margin-top: 8px;
        flex-wrap: nowrap;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }
    .featured-section .feed-grid > .featured-card .pick-perf-mini {
        font-size: 11px;
    }
    .featured-section .feed-grid > .featured-card .featured-thesis,
    .featured-section .feed-grid > .featured-card .pick-meta-catalyst,
    .featured-section .feed-grid > .featured-card .pick-refine-notes {
        display: none;
    }
}

/* ---------- Portfolio: in-card add/remove toggle ---------- */
/* Lives in the same featured-sym-row strip as the OPEN / FREE / CLOSED
 * chips. Small pill so it tucks next to the badges without competing
 * with the big ticker glyph. */
.pick-portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    box-sizing: border-box;
    padding: 0 10px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
                transform 0.1s ease, box-shadow 0.15s ease;
    user-select: none;
}
.pick-portfolio-btn:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-soft);
}
.pick-portfolio-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.pick-portfolio-btn:active { transform: translateY(1px); }
.pick-portfolio-btn[disabled] { opacity: 0.6; cursor: progress; }

.pick-portfolio-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.pick-portfolio-btn-active {
    background: var(--gold);
    color: var(--bg);
    border-color: var(--gold);
}
.pick-portfolio-btn-active:hover {
    background: var(--gold-hover);
    color: var(--bg);
    border-color: var(--gold-hover);
}
.pick-portfolio-btn-active:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}
.pick-portfolio-btn-active .pick-portfolio-btn-icon {
    background: rgba(10, 14, 26, 0.22);
    color: var(--bg);
}

.pick-portfolio-btn-error {
    border-color: var(--danger) !important;
    color: var(--danger) !important;
    animation: pick-portfolio-shake 0.4s ease;
}
.pick-portfolio-btn-error .pick-portfolio-btn-icon {
    background: rgba(239, 68, 68, 0.18);
    color: var(--danger);
}
@keyframes pick-portfolio-shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-3px); }
    75%      { transform: translateX(3px); }
}

/* Inline preview chip used in copy on the portfolio page. Mirrors the
 * "In portfolio" active button so the reader recognizes the affordance. */
.pick-portfolio-btn-inline {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    vertical-align: 1px;
}

/* ---------- Portfolio page ---------- */
.portfolio-section { margin-top: 28px; }
.portfolio-section:first-of-type { margin-top: 8px; }
.portfolio-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    margin: 0 0 14px;
    color: var(--text);
}
.portfolio-section-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
}
.portfolio-section-sub {
    margin: -6px 0 14px;
    font-size: 13px;
}
.portfolio-section-closed { opacity: 0.95; }
.portfolio-section-closed .portfolio-section-title { color: var(--text-muted); }
.portfolio-section-closed .portfolio-section-count {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}
.portfolio-empty-sub {
    margin: 6px 0 12px;
    padding: 14px 16px;
    font-size: 14px;
}

/* Smooth fade-out when a card is removed via the toggle. */
.featured-card-removing {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

/* ---------- Portfolio member-preview (anonymous + free users) ---------- */
/* Marketing pitch shown when a non-paid visitor hits /portfolio/. The
 * Portfolio header link is visible to everyone so this page doubles as
 * a feature explainer + upsell. */
.portfolio-pitch {
    max-width: 880px;
    margin: 0 auto 40px;
    padding: 56px 32px 48px;
    border: 1px solid var(--border-2);
    background:
        radial-gradient(ellipse at top, var(--accent-soft) 0%, transparent 65%),
        var(--surface);
    border-radius: 16px;
    text-align: center;
}
.portfolio-pitch-title {
    margin: 0 0 14px;
    font-size: 34px;
    letter-spacing: -0.01em;
}
.portfolio-pitch-lead {
    max-width: 560px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
}
.portfolio-pitch-block {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: left;
}
.portfolio-pitch-block-portfolio {
    text-align: center;
}
.portfolio-pitch-block:last-of-type {
    margin-bottom: 0;
}
.portfolio-pitch-section-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
.portfolio-pitch-section-sub {
    margin: 0 0 20px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.55;
}

.portfolio-pitch-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 0;
    text-align: left;
}
.portfolio-pitch-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 18px 16px;
    /* Two-column grid: icon left, title right on row 1; body
     * spans both columns on row 2. Keeps the HTML structure
     * untouched and lets each card author its own copy without
     * caring about layout. */
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 12px;
    align-items: center;
}
.portfolio-pitch-icon {
    grid-row: 1;
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}
.portfolio-pitch-card-title {
    grid-row: 1;
    grid-column: 2;
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
}
.portfolio-pitch-card-body {
    grid-row: 2;
    grid-column: 1 / -1;
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin: 10px 0 0;
}

/* The same compact card the upsell mock teases. Paid portfolio rows
 * also use it -- see Pick::renderCompactCard -- so the look the visitor
 * is sold on is exactly what they get after subscribing. */
.portfolio-pitch-preview {
    margin: 0 auto;
    max-width: 460px;
}

.portfolio-pitch-cta {
    margin-top: 40px;
}
.portfolio-pitch-cta-line {
    color: var(--text);
    font-size: 15px;
    margin: 0 0 14px;
}
.portfolio-pitch-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.portfolio-pitch-cta-fineprint {
    margin: 14px 0 0;
    font-size: 12.5px;
}

@media (max-width: 760px) {
    .portfolio-pitch { padding: 36px 18px 32px; }
    .portfolio-pitch-title { font-size: 26px; margin-bottom: 12px; }
    .portfolio-pitch-lead { font-size: 15px; margin-bottom: 32px; }
    .portfolio-pitch-block { text-align: left; }
    .portfolio-pitch-grid { grid-template-columns: 1fr; }
    .portfolio-pitch-cta-row .btn { flex: 1; text-align: center; }
}

/* ---------- Portfolio compact card (shared by upsell preview + paid view) ---------- */
/* Single-row card. The whole card is clickable thanks to the
 * "stretched link" pattern -- the ticker is a real <a>, and its ::after
 * pseudo-element extends the click target to the entire card. The
 * In-portfolio toggle keeps a higher z-index so its own click handler
 * always wins. */
.portfolio-compact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.portfolio-compact-card {
    position: relative;
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 12px;
    padding: 18px 22px;
    box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.55);
    transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.portfolio-compact-card:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px -14px rgba(0, 0, 0, 0.7);
}
.portfolio-compact-card-closed {
    border-left-color: var(--danger);
    opacity: 0.82;
}
.portfolio-compact-card-closed:hover {
    border-color: var(--danger);
}

/* The ticker IS the link, plus an invisible ::after that stretches over
 * the whole parent card. Static content (badges, name, perf) has no
 * z-index, so the overlay (z-index: 1) is above it and captures clicks.
 * The toggle button sits at z-index: 2 to stay interactive. */
.portfolio-compact-card-link {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1;
    text-decoration: none;
}
.portfolio-compact-card-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
.portfolio-compact-card-link:hover { color: var(--accent); }
.portfolio-compact-card-link:focus-visible { outline: none; }
.portfolio-compact-card-link:focus-visible::after {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.portfolio-compact-card-btn {
    position: relative;
    z-index: 2;
}

.portfolio-compact-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.portfolio-compact-card-name {
    color: var(--text-muted);
    margin-top: 6px;
    font-size: 14.5px;
    font-weight: 500;
}
.portfolio-compact-card-perf {
    margin-top: 14px;
}
.portfolio-compact-card-tech {
    margin-top: 10px;
    position: relative;
    z-index: 2;
}
.portfolio-compact-card-tech .setup-health {
    margin-top: 0;
}
.portfolio-compact-card-tech .setup-health-pill {
    font-size: 10px;
    padding: 2px 8px;
}
.portfolio-compact-card-tech .setup-health-summary {
    font-size: 11px;
}
.portfolio-compact-card-tech .setup-health-tri-toggle {
    font-size: 10px;
}
.portfolio-compact-card-tech .setup-health-lanes {
    font-size: 11px;
}

/* The mock preview is decorative -- suppress hover lift so it doesn't
 * look interactive, and let it sit centered like the original. */
.portfolio-compact-card-preview { cursor: default; pointer-events: none; }
.portfolio-compact-card-preview:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: 0 8px 24px -16px rgba(0, 0, 0, 0.55);
}
.portfolio-compact-card-preview .portfolio-compact-card-link { color: var(--text); }
.portfolio-compact-card-preview .portfolio-compact-card-link::after { content: none; }

/* Two-up on wide viewports -- same breakpoint the feed grid uses. */
@media (min-width: 1200px) {
    .portfolio-compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* ---------- Pick: per-user "View chart" link ---------- */
/* Rendered next to the OPEN/CLOSED chip via Pick::renderChartLink. The
 * link is always visible; tier-specific click behavior is handled by
 * Layout::pickChartLinkHandler. Bumped to z-index 2 so it always wins
 * over the stretched-link overlay on compact cards. */
.pick-chart-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    box-sizing: border-box;
    padding: 0 10px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.pick-chart-link:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-soft);
}
.pick-chart-link:active { transform: translateY(1px); }
.pick-chart-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.pick-chart-link-icon { flex-shrink: 0; }
.pick-chart-link-set {
    color: var(--accent);
    border-color: var(--accent-soft);
}
.pick-chart-link-set:hover {
    color: var(--bg);
    background: var(--accent);
    border-color: var(--accent);
}
/* Paid + unset, and the paywall tier, look the same -- a muted nudge. */
.pick-chart-link-unset,
.pick-chart-link-paywall {
    border-style: dashed;
}

@media (max-width: 760px) {
    /* Closed cards already carry the closed date -- drop the publish date
     * on mobile so the meta row stays compact. */
    .featured-card-closed .featured-meta-published {
        display: none;
    }
}

/* Demo pill inlined in marketing body copy. Shrinks to fit the running
 * line so the cadence of the sentence isn't broken. Always visually the
 * "set" variant since the upsell is showing what the working button
 * looks like. */
/* Link to the pick's X post (detail page header). Uses .pick-x-link, not
 * .pick-chart-link, so Layout::pickChartLinkHandler does not intercept. */
.pick-x-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    box-sizing: border-box;
    padding: 0 10px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.pick-x-link:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-soft);
}
.pick-x-link:active { transform: translateY(1px); }
.pick-x-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.pick-x-link-icon { flex-shrink: 0; }
.pick-x-post-link {
    color: var(--text);
    border-color: var(--border-2);
}

.pick-chart-link-inline {
    padding: 1px 7px 1px 6px;
    font-size: 11.5px;
    vertical-align: 1px;
    pointer-events: none;
    cursor: default;
}

/* ---------- Account tabs ---------- */
/* Sectioned tab strip for /account/, modelled on .feed-view-toggle so
 * the visual language stays consistent across the site. */
.account-tabs {
    display: inline-flex;
    margin: 8px 0 20px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.account-tab {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.account-tab:hover { color: var(--text); }
.account-tab.active {
    background: var(--accent);
    color: var(--bg);
}

/* Inline help copy in the settings card. */
.account-settings-help {
    font-size: 13.5px;
    margin: 4px 0 10px;
}
.account-settings-help code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
    color: var(--accent);
}
.account-settings-fineprint {
    margin-top: 8px;
    font-size: 12.5px;
}
.account-settings-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}
/* The settings input is a long URL, so let it span the whole card. */
#chart_url_template {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
}

/* ---------- Pick detail embedded chart ---------- */
.page-pick .pick-chart-section {
    margin-top: 28px;
    margin-bottom: 8px;
}
.pick-chart-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 650;
}
.pick-chart-sub {
    margin: 0 0 14px;
    font-size: 13px;
}
.pick-chart-attribution {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}
.pick-chart-attribution a {
    color: var(--text-muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.pick-chart-attribution a:hover {
    color: var(--accent);
}
.pick-chart-root {
    position: relative;
    width: 100%;
    min-height: 880px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    overflow: hidden;
}
.pick-chart-root.pick-chart-loading,
.pick-chart-root.pick-chart-empty,
.pick-chart-root.pick-chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 24px;
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
}
.pick-chart-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pick-chart-pane-wrap {
    border-top: 1px solid var(--border);
}
.pick-chart-pane-wrap:first-child {
    border-top: none;
}
.pick-chart-pane-label {
    padding: 6px 12px 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.pick-chart-pane {
    width: 100%;
}
/* Compact SMA legend pinned to the top-left of the price pane. */
.pick-chart-legend {
    position: absolute;
    top: 6px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    pointer-events: none;
}
.pick-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pick-chart-legend i {
    display: inline-block;
    width: 9px;
    height: 2px;
    border-radius: 1px;
}
@media (max-width: 480px) {
    .pick-chart-root {
        min-height: 680px;
    }
    .pick-chart-legend {
        font-size: 9.5px;
        gap: 7px;
    }
}

/* ---------- Landing page sections (home) ---------- */

.page-about .about-page {
    margin: -8px 0 0;
}
.about-draft-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 10px 14px;
    border: 1px dashed var(--border-2);
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.06);
    color: var(--text-muted);
    font-size: 13px;
}
.about-draft-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.16);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #b88403;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.about-hero {
    margin-bottom: 40px;
    padding-bottom: 8px;
}
.about-hero-promise {
    margin: 0 0 20px;
    max-width: 640px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.45;
}
.about-hero-promise::before {
    content: "";
    display: block;
    /* width: 40px; */
    height: 2px;
    margin-bottom: 14px;
    border-radius: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
}
.about-hero-detail {
    max-width: 640px;
    margin: 0 0 28px;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.6;
}
.about-hero .landing-sub {
    margin-bottom: 14px;
}
.about-winners {
    margin-bottom: 56px;
}
.about-featured {
    margin-bottom: 40px;
}
.about-featured .feed-grid {
    width: 100%;
    max-width: none;
}
.about-featured .feed-grid > .featured-card {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}
/* Card header row: icon / number / badge inline with title (about page). */
.about-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    min-width: 0;
}
.about-card-head h3 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.about-card-head .about-dual-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-bottom: 0;
    border-radius: 9px;
}
.about-card-head .hiw-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin-bottom: 0;
    font-size: 13px;
}
.about-card-head-label .about-lifecycle-label {
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--accent-soft);
    border: 1px solid rgba(20, 184, 166, 0.2);
    font-size: 9px;
    letter-spacing: 0.1em;
}
.about-card-head-badge .about-tier-badge {
    flex-shrink: 0;
    margin-bottom: 0;
}
.about-dual {
    margin: 0 0 72px;
}
.about-dual-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.about-dual-card {
    position: relative;
    padding: 28px 26px 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
}
.about-dual-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}
.about-dual-card-narrative::before {
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}
.about-dual-card-technical::before {
    background: linear-gradient(90deg, var(--accent), #34d3c2);
}
.about-dual-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(20, 184, 166, 0.25);
}
.about-dual-role {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.about-dual-q {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}
.about-dual-foot {
    margin: 18px 0 0;
    max-width: 720px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}
.about-how {
    margin-bottom: 40px;
}
.about-hiw-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.about-lifecycle {
    margin: 0 0 40px;
}
.about-lifecycle-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.about-lifecycle-card {
    position: relative;
    padding: 24px 22px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}
.about-lifecycle-card-mid {
    border-color: rgba(20, 184, 166, 0.35);
    background:
        radial-gradient(ellipse at top, var(--accent-soft) 0%, transparent 70%),
        var(--surface);
}
.about-lifecycle-label {
    display: inline-block;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.about-lifecycle-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.about-live-signals {
    margin: 0 0 40px;
}
.about-live-signals-panel {
    padding: 24px 26px;
    border: 1px solid rgba(20, 184, 166, 0.35);
    border-radius: 12px;
    background:
        radial-gradient(ellipse at top left, var(--accent-soft) 0%, transparent 65%),
        var(--surface);
}
.about-live-signals-panel p {
    margin: 0;
    max-width: 720px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}
.about-live-signals-panel a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.about-live-signals-panel a:hover {
    text-decoration: underline;
}
.about-categories {
    margin-bottom: 40px;
}
.about-tiers {
    margin: 0 0 56px;
}
.about-tier-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.about-tier-card {
    padding: 28px 26px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}
.about-tier-card h3 {
    margin: 0;
}
.about-tier-lead {
    margin: 0 0 16px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
}
.about-tier-subhead {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.about-tier-card-free {
    border-color: var(--border);
}
.about-tier-badge-free {
    background: rgba(148, 163, 184, 0.12);
    border-color: var(--border-2);
    color: var(--text-muted);
}
.about-tier-card-members {
    position: relative;
    border-color: rgba(20, 184, 166, 0.4);
    background:
        radial-gradient(ellipse at top right, var(--accent-soft) 0%, transparent 55%),
        var(--surface);
}
.about-tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(20, 184, 166, 0.35);
    color: var(--accent);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.about-tier-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.about-tier-list li {
    position: relative;
    margin: 0 0 12px;
    padding-left: 22px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.55;
}
.about-tier-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.about-tier-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}
.about-cta .about-cta-row {
    justify-content: center;
}
.about-legal {
    max-width: 640px;
    margin: 0 auto;
    padding-top: 8px;
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
    line-height: 1.6;
}
@media (max-width: 960px) {
    .about-hiw-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .about-card-head h3 {
        font-size: 14px;
    }
}
@media (max-width: 760px) {
    .about-dual-grid,
    .about-lifecycle-grid,
    .about-tier-grid {
        grid-template-columns: 1fr;
    }
    .about-hiw-grid {
        grid-template-columns: 1fr;
    }
    .about-hero {
        margin-bottom: 40px;
    }
    .about-hero .landing-sub,
    .about-hero-detail,
    .about-hero-promise {
        font-size: 15px;
        line-height: 1.6;
    }
    .about-hero-promise {
        font-weight: 600;
    }
    .about-cta .landing-cta-row .btn {
        flex: 1;
        text-align: center;
    }
}
@media (prefers-reduced-motion: reduce) {
    .page-about .landing-accent {
        animation: none;
        background-position: 0% 50%;
    }
}
