/* Analysis screen — layered on top of the main portfolio stylesheet.
   Only rules the portfolio page has no use for live here. */

.rank-num {
    color: var(--muted);
    font-weight: 700;
    text-align: right;
}

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.tag-holding { background: var(--accent); color: #fff; }
.tag-closed  { background: var(--soft-accent); color: var(--accent); }
.tag-idle    { background: #f0f1f5; color: var(--muted); }

/* ── Target-price gap ─────────────────────────────────────── */

.gap-value {
    display: block;
    font-weight: 700;
    font-size: 15px;
}
.gap-bar-track {
    display: block;
    position: relative;
    height: 6px;
    margin-top: 5px;
    border-radius: 999px;
    background: var(--soft-accent);
    overflow: hidden;
}
.gap-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    border-radius: 999px;
}
.gap-bar.is-up { background: var(--positive); }
.gap-bar.is-down { background: var(--negative); }

/* A target whose report is old, or carries no date at all: still shown, but
   never with the confident styling of a fresh one. */
.is-stale { color: #9a7b00; }

.untargeted {
    margin: 12px 2px 0;
    color: var(--muted);
    font-size: 12px;
}
.untargeted span:first-child { font-weight: 700; }
.untargeted-item {
    display: inline-block;
    background: var(--soft-accent);
    border-radius: 999px;
    padding: 2px 10px;
    margin: 2px 4px 2px 0;
    color: var(--accent);
}

.empty-note {
    margin: 0;
    padding: 28px 20px;
    color: var(--muted);
    text-align: center;
}

/* ── Returns table ────────────────────────────────────────── */

th.is-sortable { cursor: pointer; user-select: none; }
th.is-sortable:hover { background: var(--accent-strong); }
th.sorted-asc::after  { content: " ▲"; font-size: 10px; }
th.sorted-desc::after { content: " ▼"; font-size: 10px; }

#returns-table td.heat { font-variant-numeric: tabular-nums; }
#returns-table th, #returns-table td { padding: 10px 12px; }

.range-track {
    display: block;
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(217, 51, 63, .25), var(--soft-accent), rgba(15, 157, 139, .25));
}
.range-marker {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 12px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--accent);
}

/* ── Own lines (entry / take-profit / stop-loss) ──────────── */

.line-track {
    display: block;
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(217, 51, 63, .35), var(--soft-accent) 50%, rgba(15, 157, 139, .35));
}
.line-marker {
    position: absolute;
    top: -3px;
    width: 3px;
    height: 14px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--accent);
}
.line-entry {
    position: absolute;
    top: 1px;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--gold);
    border: 1px solid rgba(0, 0, 0, .15);
}
.line-legend {
    display: flex !important;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
}

/* ── Membership notice ────────────────────────────────────────
   Card and buttons taken from club_crypto_01's style.css so a visitor turned
   away from either tool sees the same panel. Both projects read the same CSS
   variables, so only these rules had to travel. Keep them in sync. */

.content-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
    padding: 20px 22px;
}
.membership-notice {
    padding: 48px 32px;
    text-align: center;
    max-width: 560px;
    margin: 32px auto 0;
}
.membership-notice h2 {
    margin-bottom: 16px;
    color: var(--accent-strong);
    font-family: var(--heading-font);
    font-size: 22px;
}
.notice-message {
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 24px;
}
.membership-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .02em;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
    text-decoration: none;
}
.btn-secondary {
    background: var(--soft-accent);
    color: var(--accent-strong);
    border: 1px solid var(--accent);
}
.btn-secondary:hover {
    background: var(--gold);
    color: var(--accent-strong);
    transform: translateY(-1px);
    text-decoration: none;
}

.page-footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 720px) {
    .hero { grid-template-columns: 1fr; }
}

/* ── In-page contents ─────────────────────────────────────────
   A table of contents, not four cards: a labelled, numbered list where each row
   is visibly a link — accent rule, index number, underlined title and an arrow
   that steps right on hover. */

.toc {
    margin: 0 0 32px;
    padding: 18px 20px 8px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
    border-radius: 0 0 14px 14px;
}
.toc-heading {
    margin: 0 0 10px;
    font-family: var(--heading-font);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* min() so the 420px track can shrink below its floor on a narrow screen —
       a bare minmax(420px, 1fr) keeps the column at 420px and overflows the
       phone viewport, clipping the descriptions. */
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: 2px 28px;
}
.toc-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: baseline;
    gap: 12px;
    padding: 10px 10px 10px 6px;
    border-bottom: 1px dotted var(--line);
    text-decoration: none;
    color: inherit;
    transition: background-color .15s ease;
}
.toc-item:hover { background: var(--soft-accent); }
.toc-num {
    font-family: var(--heading-font);
    font-size: 12px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: .06em;
}
.toc-body { display: block; }
.toc-title {
    display: inline;
    font-family: var(--heading-font);
    font-weight: 700;
    font-size: 14px;
    color: var(--link);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.toc-item:hover .toc-title { color: var(--accent-strong); }
.toc-desc {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}
.toc-go {
    color: var(--link);
    font-size: 13px;
    transition: transform .15s ease;
}
.toc-item:hover .toc-go { transform: translateX(3px); }

/* Security name linking to its own detail page. Underlined only on hover so a
   table of 35 rows does not turn into a wall of blue. */
.sec-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--line);
}
.sec-link:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.sec-link strong { cursor: pointer; }

/* ── Security detail ──────────────────────────────────────────*/

.detail-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}
.figure-item {
    background: var(--panel);
    padding: 10px 14px;
}
.figure-item .label { display: block; font-size: 11px; }
.figure-item strong {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    font-family: var(--heading-font);
}
