﻿/* ============================================================
   analysts.css — /analysts/{ticker}. Prefix an-.
   ============================================================ */

.an-page {
    width: 100%;
    padding: 1.25rem 0 3rem;
    color: var(--text);
}

.an-head {
    margin-bottom: 1.5rem;
}

.an-title {
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: clamp(1.4rem, 2.8vw, 1.9rem);
    color: var(--text);
    margin: 0 0 .75rem;
    letter-spacing: -.01em;
}

.an-lede {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    max-width: 78ch;
    margin: 0 0 1rem;
}

/* ---- recommendation donut ----
   Floated so the explanation reads around it rather than being interrupted by it.
   Inline SVG, no script: three arcs and a number don't need a chart library. */
.an-fig {
    float: right;
    width: min(300px, 38%);
    margin: .25rem 0 1rem 1.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    text-align: center;
}

.an-donut {
    width: 100%;
    max-width: 190px;
    height: auto;
}

/* rotate so the arcs start at twelve o'clock instead of three */
.an-ring,
.an-ring-bg {
    fill: none;
    stroke-width: 16;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}

.an-ring-bg {
    stroke: var(--border);
    opacity: .5;
}

.an-ring {
    stroke-linecap: butt;
}

.an-ring-buy {
    stroke: var(--positive, #0F8A3B);
}

.an-ring-hold {
    stroke: var(--ew-gold, #DDB785);
}

.an-ring-sell {
    stroke: var(--negative, #c62828);
}

.an-donut-val {
    text-anchor: middle;
    font-family: "Arial Black", "Arial Bold", Gadget, sans-serif;
    font-size: 26px;
    fill: var(--text);
    dominant-baseline: middle;
}

.an-donut-lbl {
    text-anchor: middle;
    font-size: 9px;
    letter-spacing: .08em;
    text-transform: uppercase;
    fill: var(--text-muted);
}

.an-key {
    list-style: none;
    margin: .75rem 0 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .3rem .9rem;
    font-size: 12px;
    color: var(--text-muted);
}

    .an-key b {
        color: var(--text);
        margin-left: .2rem;
    }

.an-dot {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    border-radius: 2px;
    margin-right: .35rem;
}

.an-dot-buy {
    background: var(--positive, #0F8A3B);
}

.an-dot-hold {
    background: var(--ew-gold, #DDB785);
}

.an-dot-sell {
    background: var(--negative, #c62828);
}

.an-fig figcaption {
    margin-top: .6rem;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-muted);
}

/* the float can outrun the copy on a narrow column; keep the summary strip below it */
.an-head::after {
    content: "";
    display: block;
    clear: both;
}

/* the Farrell line carries the whole argument, so it gets room */
.an-quote {
    margin: 1.25rem 0;
    padding: .9rem 0 .9rem 1.25rem;
    border-left: 3px solid var(--ew-gold, #DDB785);
    max-width: 70ch;
}

    .an-quote p {
        margin: 0 0 .5rem;
        font-size: 1.15rem;
        line-height: 1.45;
        font-weight: 600;
        color: var(--text);
    }

    .an-quote cite {
        font-size: .82rem;
        font-style: normal;
        color: var(--text-muted);
    }

/* ---- summary strip ---- */
.an-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2.5rem;
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.an-stat {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.an-stat-lbl {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* the window the extremes are measured over, under its label */
.an-stat-since {
    display: block;
    margin-top: .1rem;
    font-size: .66rem;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: none;
    color: var(--text-muted);
    opacity: .85;
}

.an-stat-val {
    font-size: 1.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
    color: var(--text);
}

.an-ord {
    font-size: .9rem;
    font-weight: 600;
    vertical-align: super;
}

.an-stat-note {
    font-size: .78rem;
    color: var(--text-muted);
}

/* ---- chart ---- */
/* Lightweight Charts is told its pixel width at creation, and a zero-width
   container silently draws nothing. */
.an-chart {
    width: 100%;
    min-height: 440px;
}

.an-note {
    margin: 1rem 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 82ch;
}

.an-empty {
    color: var(--text-muted);
    padding: 2.5rem 0;
}

@media (max-width: 48rem) {
    /* stacked on a phone: a 45% float leaves neither the chart nor the prose enough */
    .an-fig {
        float: none;
        width: 100%;
        max-width: 320px;
        margin: 1rem auto 1.25rem;
    }

    .an-summary {
        gap: 1rem 1.5rem;
    }

    .an-stat-val {
        font-size: 1.4rem;
    }

    .an-quote p {
        font-size: 1.02rem;
    }

    .an-chart {
        min-height: 340px;
    }
}
