/* css/em-infographic-v2.css
 * Purpose: Styles for /info/ (Expected Move Performance) V2 sandbox redesign.
 *
 *   This is the React year/quarter view restyle. Lives in react-src-v2/ and
 *   ships in dist/bundle-v2.js. The production /info/ stays on the current
 *   stonks bundle until the swap is approved.
 *
 * Palette (approved in Phase 1):
 *   Cards        : rgba(26, 26, 46, 0.85)     (docs/development tokens.css navy)
 *   Surface      : #000000
 *   Amber        : #fbbf24  (borders & CTAs ONLY — never a badge identity)
 *   Hairline     : #374151
 *   Text primary : #ffffff / muted #d1d5db / dim #9ca3af / faint #6b7280
 *   HOT          : text #f87171 / fill #ef4444
 *   WARM         : #FFD700  (gold — deliberate to avoid brand-amber clash)
 *   COLD         : text #60a5fa / fill #3b82f6
 *   Success ✓    : #22c55e
 *   Danger  ✗    : #f87171  (never raw #ff0000 in this build)
 *   Mono         : ui-monospace + tabular-nums for all $ / % / counts
 *
 * Known deviations (documented in the summary):
 *   - Card surface follows tokens.css navy, NOT levels-v3 gray-900. Both are
 *     legitimate v2 tones; this build defers to tokens.css as the approved
 *     source of truth. levels-v3-styled pages remain unchanged.
 *
 * Type scale (rev 3):
 *   - Body/label text: 14px
 *   - Mono data values: 13.5px tabular-nums
 *   - Section headings: +2px from base (20px section, 18px quarter, 17px card)
 *   - Hero percentage: 40px (unchanged)
 *   - Footnote-tier minimum: 12px — nothing below 12px
 *   - Line-height: 1.5 on root and multi-line blocks
 *
 * Section spacing (rev 3):
 *   - 24px gap between all major sections (desktop)
 *   - 16px gap at ≤480px
 *
 * All class names namespaced `emiv2-` to avoid collision with anything else.
 */

/* ==================================================================
   Layout root
   ================================================================== */
.emiv2-page {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px 48px;
    color: #ffffff;
    background: #000000;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
.emiv2-page *,
.emiv2-page *::before,
.emiv2-page *::after {
    box-sizing: border-box;
}

.emiv2-mono {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Roboto Mono', monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}

/* ==================================================================
   Card chassis (canonical for /info/ v2)
   ================================================================== */
.emiv2-card {
    background: rgba(26, 26, 46, 0.85);
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.emiv2-card + .emiv2-card {
    margin-top: 24px;
}
.emiv2-card-compact { padding: 14px; }

/* ==================================================================
   Header / dropdowns
   ================================================================== */
.emiv2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.emiv2-h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.01em;
}
.emiv2-selectors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.emiv2-dropdown-wrap { position: relative; }
.emiv2-dropdown-btn {
    min-height: 44px;
    min-width: 120px;
    padding: 8px 36px 8px 14px;
    background: rgba(0, 0, 0, 0.35);
    color: #ffffff;
    border: 1px solid #374151;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: border-color 150ms;
    position: relative;
}
.emiv2-dropdown-btn:hover,
.emiv2-dropdown-btn:focus-visible { border-color: #fbbf24; outline: none; }
.emiv2-dropdown-caret {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 200ms;
    color: #9ca3af;
    pointer-events: none;
}
.emiv2-dropdown-btn[aria-expanded="true"] .emiv2-dropdown-caret {
    transform: translateY(-50%) rotate(180deg);
}
.emiv2-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #0f0f1a;
    border: 1px solid #374151;
    border-radius: 8px;
    z-index: 20;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.emiv2-dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    color: #ffffff;
    border: none;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
}
.emiv2-dropdown-item:hover { background: rgba(251, 191, 36, 0.10); }
.emiv2-dropdown-item[aria-selected="true"] {
    background: rgba(251, 191, 36, 0.18);
    color: #fbbf24;
    font-weight: 600;
}

/* ==================================================================
   Hero stat cards (three badge headliners)
   ================================================================== */
.emiv2-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.emiv2-hero-card {
    background: rgba(26, 26, 46, 0.85);
    border: 1px solid #374151;
    border-top: 3px solid #374151;
    border-radius: 10px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    min-height: 178px;
}
.emiv2-hero-card-hot  { border-top-color: #ef4444; background: rgba(239, 68, 68, 0.06); }
.emiv2-hero-card-warm { border-top-color: #FFD700; background: rgba(255, 215, 0, 0.06); }
.emiv2-hero-card-cold { border-top-color: #3b82f6; background: rgba(59, 130, 246, 0.06); }
/* Filled pill badge */
.emiv2-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: #ffffff;
}
.emiv2-hero-pill-hot  { background: #ef4444; }
.emiv2-hero-pill-warm { background: #b8860b; color: #ffffff; }
.emiv2-hero-pill-cold { background: #3b82f6; }
.emiv2-hero-pill-emoji { font-size: 14px; line-height: 1; }
.emiv2-hero-pct {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    margin: 4px 0 2px;
}
.emiv2-hero-pct-hot  { color: #f87171; }
.emiv2-hero-pct-warm { color: #FFD700; }
.emiv2-hero-pct-cold { color: #60a5fa; }
/* Rate fill bar */
.emiv2-hero-bar {
    width: 100%;
    height: 5px;
    background: rgba(55, 65, 81, 0.7);
    border-radius: 999px;
    overflow: hidden;
    margin: 6px 0 8px;
}
.emiv2-hero-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 200ms;
}
.emiv2-hero-bar-fill-hot  { background: #ef4444; }
.emiv2-hero-bar-fill-warm { background: #FFD700; }
.emiv2-hero-bar-fill-cold { background: #3b82f6; }
.emiv2-hero-delivered {
    font-size: 14px;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}
.emiv2-hero-baseline {
    font-size: 14px;
    color: #d1d5db;
    margin-bottom: 4px;
}
.emiv2-hero-baseline strong { font-weight: 600; }
.emiv2-hero-count { font-size: 12px; color: #9ca3af; }

/* Explainer strip (verbatim SEO copy) */
.emiv2-explainer {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #374151;
    border-radius: 10px;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.55;
    text-align: center;
}
.emiv2-explainer-sentence {
    color: #ffffff;
    font-weight: 600;
    font-size: 17px;
    margin: 0 0 8px;
}
.emiv2-explainer-baseline {
    color: #d1d5db;
    font-size: 14px;
    margin: 0;
}
.emiv2-explainer-baseline strong { color: #fbbf24; font-weight: 600; }
.emiv2-explainer-per-badge {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 13.5px;
}

/* Footnote chip line */
.emiv2-footnote {
    margin-top: 12px;
    text-align: center;
    color: #9ca3af;
    font-size: 12px;
}

/* ==================================================================
   Badge detail cards
   ================================================================== */
.emiv2-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.emiv2-detail-card {
    background: rgba(26, 26, 46, 0.85);
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 18px 16px 12px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}
.emiv2-detail-card-hot  { border-color: rgba(239, 68, 68, 0.35); }
.emiv2-detail-card-warm { border-color: rgba(255, 215, 0, 0.35); }
.emiv2-detail-card-cold { border-color: rgba(59, 130, 246, 0.35); }

.emiv2-detail-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.emiv2-detail-head-hot  { color: #f87171; }
.emiv2-detail-head-warm { color: #FFD700; }
.emiv2-detail-head-cold { color: #60a5fa; }

.emiv2-rate-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: 14px;
    color: #d1d5db;
}
.emiv2-rate-value { color: #ffffff; font-weight: 700; font-size: 15px; }
.emiv2-rate-delta {
    font-size: 12px;
    margin-bottom: 6px;
    color: #9ca3af;
}
.emiv2-rate-delta-pos { color: #22c55e; }
.emiv2-rate-delta-neg { color: #f87171; }

.emiv2-progress {
    height: 8px;
    background: rgba(55, 65, 81, 0.7);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}
.emiv2-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 200ms;
}
.emiv2-progress-fill-hot  { background: #ef4444; }
.emiv2-progress-fill-warm { background: #FFD700; }
.emiv2-progress-fill-cold { background: #3b82f6; }

.emiv2-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 6px 0;
    font-size: 14px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}
.emiv2-stat-row:first-of-type { border-top: none; }
.emiv2-stat-label { color: #9ca3af; }
.emiv2-stat-val { color: #ffffff; font-weight: 600; }
.emiv2-stat-val-alt { color: #FFD700; font-weight: 600; }

.emiv2-saved-note {
    margin-top: 10px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

.emiv2-see-all {
    margin-top: auto;
    padding-top: 12px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #fbbf24;
    text-decoration: none;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    margin-top: 12px;
    padding-top: 10px;
    cursor: pointer;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    display: block;
    width: 100%;
    min-height: 44px;
}
.emiv2-see-all:hover { color: #fcd34d; }
.emiv2-see-all-placeholder {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    font-style: italic;
}

.emiv2-detail-empty {
    color: #6b7280;
    text-align: center;
    padding: 24px 8px;
    font-size: 14px;
    font-style: italic;
}

/* ==================================================================
   Quarter breakdown (year view)
   ================================================================== */
.emiv2-section-title {
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 12px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.emiv2-q-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.emiv2-q-card {
    background: rgba(26, 26, 46, 0.85);
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 150ms;
    min-height: 220px;
    text-align: left;
    color: inherit;
    font: inherit;
    width: 100%;
}
.emiv2-q-card:hover,
.emiv2-q-card:focus-visible { border-color: #fbbf24; outline: none; }
.emiv2-q-card-empty {
    cursor: default;
    opacity: 0.65;
}
.emiv2-q-card-empty:hover { border-color: #374151; }

.emiv2-q-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.emiv2-q-title { font-size: 18px; font-weight: 700; color: #ffffff; }
.emiv2-q-meta { font-size: 12px; color: #9ca3af; }

.emiv2-q-row {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    font-size: 14px;
}
.emiv2-q-row-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #d1d5db;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.03em;
}
.emiv2-q-row-bar {
    height: 6px;
    background: rgba(55, 65, 81, 0.7);
    border-radius: 999px;
    overflow: hidden;
}
.emiv2-q-row-bar-fill {
    height: 100%;
    border-radius: 999px;
}
.emiv2-q-row-value {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    font-weight: 700;
    font-size: 13.5px;
}
.emiv2-q-row-count { color: #9ca3af; font-size: 12px; font-weight: 400; }
.emiv2-q-trend { font-size: 12px; line-height: 1; }
.emiv2-q-trend-up   { color: #22c55e; }
.emiv2-q-trend-down { color: #f87171; }
.emiv2-q-trend-flat { color: #6b7280; }

.emiv2-q-empty {
    color: #6b7280;
    font-style: italic;
    font-size: 14px;
    padding: 18px 0;
    text-align: center;
}
.emiv2-q-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* ==================================================================
   Earnings timeline (quarter view)
   ================================================================== */
.emiv2-timeline-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 12px;
}
.emiv2-clear-filter {
    min-height: 44px;
    padding: 8px 14px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #374151;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.emiv2-clear-filter:hover { border-color: #fbbf24; }

.emiv2-timeline {
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.emiv2-timeline-row {
    display: flex;
    gap: 10px;
    min-width: min-content;
}
.emiv2-tile {
    flex: 0 0 auto;
    min-width: 128px;
    padding: 12px;
    background: rgba(26, 26, 46, 0.85);
    border: 1px solid #374151;
    border-left-width: 3px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: border-color 150ms, transform 150ms;
    text-align: center;
}
.emiv2-tile:hover,
.emiv2-tile:focus-visible { border-color: #fbbf24; outline: none; }
.emiv2-tile-hot  { border-left-color: #ef4444; }
.emiv2-tile-warm { border-left-color: #FFD700; }
.emiv2-tile-cold { border-left-color: #3b82f6; }
.emiv2-tile-pending { opacity: 0.55; cursor: default; }

.emiv2-tile-badge { font-size: 18px; line-height: 1; }
.emiv2-tile-ticker {
    font-weight: 700;
    color: #ffffff;
    font-size: 15px;
    letter-spacing: 0.02em;
}
.emiv2-tile-date { color: #9ca3af; font-size: 12px; }
.emiv2-tile-glyph {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    margin: 2px 0;
}
.emiv2-tile-glyph-ok { color: #22c55e; }
.emiv2-tile-glyph-miss { color: #f87171; }
.emiv2-tile-move { font-size: 13.5px; color: #ffffff; }
.emiv2-tile-em { font-size: 12px; color: #9ca3af; }
.emiv2-tile-pending-label {
    color: #9ca3af;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.05em;
}
.emiv2-timeline-empty {
    text-align: center;
    color: #9ca3af;
    padding: 24px 8px;
}

/* ==================================================================
   Transparency (collapsible panel — levels-v3 VolatilityPanel pattern)
   ================================================================== */
.emiv2-transparency-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: transparent;
    border: none;
    padding: 10px 12px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
    border-radius: 8px;
}
.emiv2-transparency-head:hover { background: rgba(255, 255, 255, 0.03); }
.emiv2-transparency-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #ffffff;
}
.emiv2-transparency-emoji { font-size: 18px; line-height: 1; }
.emiv2-transparency-name-hot  { color: #f87171; font-weight: 700; }
.emiv2-transparency-name-warm { color: #FFD700; font-weight: 700; }
.emiv2-transparency-name-cold { color: #60a5fa; font-weight: 700; }
.emiv2-transparency-counts { color: #d1d5db; font-weight: 500; font-size: 13.5px; }
.emiv2-transparency-chevron { color: #9ca3af; transition: transform 200ms; }
.emiv2-transparency-chevron.is-open { transform: rotate(180deg); }
.emiv2-transparency-body {
    padding: 4px 12px 12px 40px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    margin-top: 4px;
}
.emiv2-transparency-miss {
    color: #d1d5db;
    font-size: 14px;
    padding: 4px 0;
    line-height: 1.5;
}
.emiv2-transparency-miss-ticker { color: #ffffff; font-weight: 700; }
.emiv2-transparency-empty { color: #22c55e; font-weight: 600; font-size: 14px; }
.emiv2-transparency-footer {
    margin-top: 14px;
    padding-top: 10px;
    text-align: center;
    color: #9ca3af;
    font-size: 14px;
    font-style: italic;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
}

/* ==================================================================
   Modal (ticker detail) — Phase 5 compact card + 15% scale-up
   All dimensions ×1.15 from the 440px base design.
   ================================================================== */
.emiv2-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 14, 20, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 1000;
}
.emiv2-modal {
    max-width: 506px;
    width: 100%;
    background: #10131b;
    border: 0.5px solid #2b3348;
    border-radius: 16px;
    padding: 23px;
    color: #e8ecf5;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
/* Header */
.emiv2-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}
.emiv2-modal-title {
    font-size: 23px;
    font-weight: 500;
    color: #ffffff;
    margin: 0;
}
.emiv2-modal-sub {
    font-size: 14px;
    color: #9ca3af;
    margin-top: 2px;
}
.emiv2-modal-pills {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
}
.emiv2-modal-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.emiv2-modal-pill--em {
    background: rgba(255, 255, 255, 0.08);
    color: #fbbf24;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 9px;
    border: 1px solid rgba(251, 191, 36, 0.25);
}
/* Body */
.emiv2-modal-body {
    margin-top: 25px;
}
.emiv2-modal-em-label {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 7px;
}
/* Stock-price bar (Phase 6 — mimic Historical Quarters QuarterCard pattern) */
.emiv2-modal-pricebar {
    position: relative;
    margin-bottom: 4px;
}
.emiv2-modal-pricebar-labels-top {
    position: relative;
    height: 34px;
    margin-bottom: 4px;
}
.emiv2-modal-pricebar-labels-bottom {
    position: relative;
    height: 34px;
    margin-top: 4px;
}
.emiv2-modal-pricebar-label {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
    line-height: 1.15;
    white-space: nowrap;
}
.emiv2-modal-pricebar-price {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.55);
    font-size: 11px;
    color: #ffffff;
}
.emiv2-modal-pricebar-caption {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 2px;
    letter-spacing: 0.02em;
}
/* Before ER label = info-blue */
.emiv2-modal-pricebar-label--before .emiv2-modal-pricebar-price,
.emiv2-modal-pricebar-label--before .emiv2-modal-pricebar-caption {
    color: #60a5fa;
}
/* After ER label = amber */
.emiv2-modal-pricebar-label--after .emiv2-modal-pricebar-price {
    color: #fbbf24;
}
/* Track */
.emiv2-modal-pricebar-track {
    position: relative;
    height: 32px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
}
/* Center marker at before-ER (blue) */
.emiv2-modal-pricebar-center {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #60a5fa;
    z-index: 3;
    transform: translateX(-1px);
}
/* Bound tick marks (dashed) */
.emiv2-modal-pricebar-bound {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0;
    border-left: 1px dashed rgba(255, 255, 255, 0.5);
    z-index: 2;
}
/* Fill: beforeER → afterER */
.emiv2-modal-pricebar-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    opacity: 0.75;
}
.emiv2-modal-pricebar-fill--in {
    background: #22c55e;
}
.emiv2-modal-pricebar-fill--out {
    background: #fbbf24;
}
/* Crosshatch beyond bound (breach only) */
.emiv2-modal-pricebar-hatch {
    position: absolute;
    top: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 5px,
            rgba(255, 255, 255, 0.28) 5px,
            rgba(255, 255, 255, 0.28) 10px
        );
    z-index: 2;
}
/* Verdict block (EM + DAITA Direction rows) */
.emiv2-modal-verdict {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.emiv2-modal-verdict-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
}
.emiv2-modal-verdict-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.emiv2-modal-verdict-label {
    color: #9ca3af;
    white-space: nowrap;
    font-size: 14px;
}
.emiv2-modal-verdict-spacer {
    flex: 1;
}
.emiv2-modal-verdict-chip {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.emiv2-modal-verdict-chip.is-ok { color: #22c55e; }
.emiv2-modal-verdict-chip.is-miss { color: #f87171; }
.emiv2-modal-verdict-chip.is-neutral { color: #6b7280; }
/* Bias chip (BULLISH / BEARISH / NEUTRAL) */
.emiv2-modal-verdict-bias {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.emiv2-bias-bullish { background: #173404; color: #C0DD97; }
.emiv2-bias-bearish { background: #3D0A0A; color: #F87171; }
.emiv2-bias-neutral { background: #1f2937; color: #9ca3af; }
/* Interpretation strip — quiet neutral caption */
.emiv2-modal-summary {
    margin-top: 14px;
    padding: 9px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #374151;
    border-radius: 9px;
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.5;
}
/* Pending state */
.emiv2-modal-pending {
    color: #8b93a7;
    font-style: italic;
    font-size: 16px;
    text-align: center;
    padding: 23px 0;
    margin: 0;
}
/* Action buttons — 15% scaled */
.emiv2-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 21px;
}
.emiv2-modal-btn {
    flex: 1;
    min-height: 51px;
    padding: 12px 16px;
    text-align: center;
    border-radius: 9px;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    color: #c9d1e3;
    border: 0.5px solid #2b3348;
}
.emiv2-modal-btn:hover {
    border-color: #fbbf24;
    color: #e8ecf5;
}
.emiv2-modal-btn-primary {
    background: #EF9F27;
    color: #412402;
    border-color: #EF9F27;
    white-space: nowrap;
}
.emiv2-modal-btn-primary:hover {
    background: #fbbf24;
    border-color: #fbbf24;
}

/* ==================================================================
   Loading / error states
   ================================================================== */
.emiv2-loading {
    text-align: center;
    padding: 48px 12px;
    color: #9ca3af;
}
.emiv2-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #fbbf24;
    border-radius: 50%;
    animation: emiv2-spin 800ms linear infinite;
}
@keyframes emiv2-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .emiv2-spinner { animation: none; }
    .emiv2-progress-fill,
    .emiv2-transparency-chevron,
    .emiv2-dropdown-caret,
    .emiv2-tile { transition: none; }
}

.emiv2-error {
    background: rgba(248, 113, 113, 0.10);
    border: 1px solid rgba(248, 113, 113, 0.35);
    color: #f87171;
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
}

/* ==================================================================
   Focus visibility for keyboard users
   ================================================================== */
.emiv2-page :focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* ==================================================================
   Transparency form-guide strips (Phase 3)
   ================================================================== */
.emiv2-strip-section {
    /* margin-bottom removed — parent .emiv2-page gap: 24px handles section spacing */
}
.emiv2-strip-badge-row {
    margin-bottom: 14px;
}
.emiv2-strip-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}
.emiv2-strip-label-emoji { font-size: 16px; line-height: 1; }
.emiv2-strip-label-hot  { color: #f87171; }
.emiv2-strip-label-warm { color: #FFD700; }
.emiv2-strip-label-cold { color: #60a5fa; }
.emiv2-strip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}
.emiv2-strip-segment {
    flex: none;
    width: 12px;
    height: 18px;
    border-radius: 2px;
    position: relative;
    cursor: pointer;
    transition: opacity 120ms;
}
.emiv2-strip-segment:hover { opacity: 0.75; }
.emiv2-strip-segment-hit-hot  { background: #ef4444; }
.emiv2-strip-segment-hit-warm { background: #FFD700; }
.emiv2-strip-segment-hit-cold { background: #3b82f6; }
.emiv2-strip-segment-miss     { background: #374151; }
.emiv2-strip-summary {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    color: #9ca3af;
    margin-top: 4px;
}
/* CSS tooltip */
/* Detail line — replaces floating tooltips; shows hovered segment info */
.emiv2-strip-detail-line {
    margin-top: 10px;
    padding: 8px 14px;
    min-height: 34px;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    transition: color 120ms, background 120ms;
}
/* Dim placeholder state when nothing is hovered */
.emiv2-strip-detail-line:empty,
.emiv2-strip-detail-line--idle {
    color: #6b7280;
    font-weight: 400;
    background: rgba(255, 255, 255, 0.03);
    border-color: transparent;
}
.emiv2-strip-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    font-size: 12px;
    color: #9ca3af;
}
.emiv2-strip-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.emiv2-strip-legend-swatch {
    display: inline-block;
    width: 12px;
    height: 8px;
    border-radius: 2px;
}
.emiv2-strip-data-warn {
    color: #fbbf24;
    font-size: 12px;
    padding: 8px 0;
    font-style: italic;
}

/* ==================================================================
   Past Quarters PANEL — its own black rounded surface sized to
   match React's .emiv2-page (max-width:1200, centered) so the two
   panels stack as an aligned pair rather than sitting on the site's
   blue background. Loaded by stonks.bundle.js for /info/ (via the V2
   React component tree) and via a plain <link> tag by
   page-em-quarterly-v2.php and page-em-quarters-archive-v2.php.

   ================================================================== */
.emiv2-pq-panel {
    width: 100%;
    max-width: 1200px;
    /* Negative top margin pulls the panel up so its black surface
       overlaps the tail of .emiv2-page's bottom padding — no blue
       seam between the two panels. Bottom margin stays for breathing
       room above the footer. */
    margin: -8px auto 24px;
    background: #000000;
    border-radius: 12px;
    padding: 20px 16px;
    box-sizing: border-box;
    color: #ffffff;
    position: relative; /* ensure the negative-margin overlap paints on top */
}

/* ==================================================================
   Past Quarters scorecards — PHP SSR (Phase 3)
   Layout: grouped by year, fixed 4-column grid (Q1..Q4). Missing
   quarters render as blank cells so the visual grid stays aligned.
   ================================================================== */
.emiv2-pq-section {
    max-width: 960px;
    margin: 0 auto 24px;
}
.emiv2-pq-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 20px 0 6px;
}
.emiv2-pq-desc {
    font-size: 14px;
    color: #9ca3af;
    margin: 0 0 14px;
    line-height: 1.5;
}
.emiv2-pq-year {
    font-size: 15px;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.5px;
    margin: 14px 0 8px;
}
.emiv2-pq-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 4px;
}
.emiv2-pq-card {
    display: block;
    background: rgba(26, 26, 46, 0.85);
    border: 1px solid #374151;
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color 150ms;
}
.emiv2-pq-card:hover { border-color: #fbbf24; }
.emiv2-pq-card-empty {
    background: transparent;
    border: 1px dashed rgba(55, 65, 81, 0.35);
    pointer-events: none;
}
.emiv2-pq-card-empty:hover { border-color: rgba(55, 65, 81, 0.35); }
@media (max-width: 600px) {
    .emiv2-pq-grid { grid-template-columns: repeat(2, 1fr); }
}
.emiv2-pq-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.emiv2-pq-card-label {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
}
.emiv2-pq-card-count {
    font-size: 12px;
    color: #9ca3af;
}
.emiv2-pq-card-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    padding: 3px 0;
}
.emiv2-pq-card-row-hot  { color: #f87171; }
.emiv2-pq-card-row-warm { color: #FFD700; }
.emiv2-pq-card-row-cold { color: #60a5fa; }
.emiv2-pq-card-pct {
    font-weight: 700;
}
.emiv2-pq-card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(55, 65, 81, 0.5);
    text-align: center;
    font-size: 12px;
    color: #fbbf24;
}

/* ==================================================================
   EM band bar — modal (Phase 3) + table column (Phase 4)
   ================================================================== */
.emiv2-band-wrap {
    margin-top: 12px;
    padding: 10px 0;
}
.emiv2-band-label {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.emiv2-band-svg {
    display: block;
    overflow: visible;
}
/* Table-cell mini band — constrained by td */
.emiv2-td-band {
    padding: 10px 6px;
    text-align: center;
}
.emiv2-td-band svg {
    display: inline-block;
    vertical-align: middle;
    overflow: visible;
}


/* ==================================================================
   Small-screen adjustments (mobile-first at 380px)
   ================================================================== */
@media (max-width: 480px) {
    .emiv2-page { padding: 14px 10px 36px; }
    .emiv2-h1 { font-size: 20px; }
    .emiv2-hero-pct { font-size: 32px; }
    .emiv2-hero { grid-template-columns: 1fr; }
    .emiv2-detail-grid { grid-template-columns: 1fr; }
    .emiv2-q-grid { grid-template-columns: 1fr; }
    .emiv2-explainer-per-badge { gap: 8px; }
    /* Section spacing — tighter on mobile (via parent gap) */
    .emiv2-page { gap: 16px; }
    .emiv2-card + .emiv2-card { margin-top: 16px; }
    /* Modal compact card — stack header on narrow screens */
    .emiv2-modal-head { flex-direction: column; gap: 10px; }
    .emiv2-modal-pills { align-self: flex-start; }
    .emiv2-modal-actions { flex-direction: column; }
    .emiv2-modal-btn { flex: none; width: 100%; }
}
