.intelligence-intro { padding: 1.25rem 0 .1rem; }
.intelligence-eyebrow { margin: 0 0 .6rem; color: var(--brand); font-size: .76rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.intelligence-intro h1 { margin: 0; color: var(--text); font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.025em; }
.intelligence-lead { max-width: 850px; margin: .7rem 0 1rem; color: var(--text-dim); font-size: .92rem; line-height: 1.6; }
.intelligence-nav { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; padding: .85rem 0; border-block: 1px solid var(--line-soft); }
.intelligence-nav a { color: var(--text-dim); text-decoration: none; font-size: .82rem; font-weight: 500; }
.intelligence-nav a:hover, .intelligence-nav a:focus-visible { color: var(--brand); }
.dashboard-shell > section[id], #macro { scroll-margin-top: 1rem; }
.intelligence-section-heading { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.intelligence-badge { color: var(--brand); padding: .3rem .55rem; background: rgba(var(--brand-rgb), .07); border: 1px solid var(--line-brand); border-radius: 5px; font-size: .7rem; }
.intelligence-edition { margin-top: .6rem; font-family: 'IBM Plex Mono', monospace; font-size: .75rem; }
.intelligence-activity-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.intelligence-activity-card { min-width: 0; padding: 1rem; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--surface-0); }
.intelligence-activity-card h3 { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; margin: 0 0 1.2rem; font-size: 1rem; }
.intelligence-metal-code { color: var(--brand); font-family: 'IBM Plex Mono', monospace; font-size: .75rem; font-weight: 500; }
.intelligence-activity-card dl { margin: 0; }
.intelligence-activity-card dl > div + div { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-soft); }
.intelligence-activity-card dt { color: var(--text-dim); font-size: .73rem; }
.intelligence-activity-card dd { margin: .45rem 0 0; color: var(--text-dim); font-family: 'IBM Plex Mono', monospace; font-size: .85rem; line-height: 1.5; overflow-wrap: anywhere; }
.intelligence-activity-card dd.is-published { color: var(--text); font-weight: 500; }
.intelligence-activity-note { margin-top: 1rem; }
/* Same-time order volumes (v7): a 1D line and a small cumulative curve per metal,
   today solid and the previous business day dashed, in theme colours. */
.activity-same-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .4rem; margin: .7rem 0 0; color: var(--text-dim); font-size: .76rem; }
.activity-same-time small { flex-basis: 100%; font-size: .64rem; }
.activity-change-label { font-family: 'IBM Plex Mono', monospace; font-size: .68rem; }
.activity-spark { display: block; width: 100%; height: 2rem; margin: .6rem 0 .1rem; overflow: visible; }
.activity-spark polyline { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.activity-spark-today { stroke: var(--brand); }
.activity-spark-previous { stroke: var(--text-dim); stroke-dasharray: 3 3; }
/* Mini-legend under each curve: the line style, the day and its cumulative quantity. */
.activity-spark-key { display: flex; flex-wrap: wrap; gap: .1rem .7rem; margin: .1rem 0 .3rem; font-size: .66rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* A long quantity wraps inside the card on phones; the line marker keeps its width. */
.activity-spark-key span { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; }
.activity-spark-key i { display: inline-block; flex: none; width: .9rem; border-top: 1.5px solid var(--brand); }
.activity-spark-key i.activity-key-previous { border-top: 1.5px dashed var(--text-dim); }
.intelligence-activity-note a { color: var(--brand); }
.intelligence-curve { margin: 1rem 0 1.25rem; padding: 1rem; background: var(--surface-0); border: 1px solid var(--line-soft); border-radius: var(--radius-sm); }
.intelligence-curve-heading { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; }
.intelligence-curve figcaption { color: var(--text); font-size: .85rem; font-weight: 500; }
.intelligence-curve label { display: flex; gap: .55rem; align-items: center; color: var(--text-dim); font-size: .75rem; }
.intelligence-curve select { max-width: 100%; color: var(--text); background: var(--surface-1); border: 1px solid var(--line-brand); border-radius: 5px; padding: .4rem .5rem; font: inherit; }
.intelligence-curve svg { display: block; width: 100%; height: auto; min-height: 155px; margin: .6rem 0; overflow: visible; }
.intelligence-curve svg text { fill: var(--text-dim); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }
.intelligence-curve-grid { stroke: var(--line-soft); stroke-width: 1; }
.intelligence-curve-line { stroke: var(--brand); stroke-width: 2.5; fill: none; }
.intelligence-curve-point { fill: var(--brand); }
.forward-rates-table .is-curve-market { background-color: rgba(var(--brand-rgb), .07); }
.intelligence-method h2 { font-size: 1.05rem; margin: 0 0 1rem; }
.intelligence-dicor-method { margin-bottom: 1.5rem; }
.intelligence-method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.intelligence-method h3 { color: var(--text); font-size: .82rem; margin: 0 0 .5rem; }
.intelligence-method p { margin: 0; color: var(--text-dim); font-size: .76rem; line-height: 1.7; }
@media (max-width: 850px) { .intelligence-activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .intelligence-method-grid { grid-template-columns: 1fr; gap: 1rem; } }
@media (max-width: 480px) { .intelligence-activity-card { padding: .75rem; } .intelligence-activity-card dd { font-size: .75rem; } .intelligence-curve { padding: .75rem; } }
.market-tape {
    display: flex;
    align-items: stretch;
    min-width: 0;
    background: var(--surface-0);
    border-bottom: 1px solid var(--line-soft);
}
.market-tape .news-ticker {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
}
.market-tape .news-ticker:focus-within .news-ticker-track { animation-play-state: paused; }
.spot-tape {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    max-width: 78%;
    padding: 0 .9rem;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    border-right: 1px solid var(--line-brand);
    font: 500 .74rem/2rem "IBM Plex Mono", monospace;
    color: var(--text);
}
.spot-tape::-webkit-scrollbar { display: none; }
.spot-tape:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.tape-label { color: var(--text); text-decoration: none; }
.tape-label span, #tape-close { color: var(--text-dim); font-size: .66rem; }
.tape-quote { display: inline-flex; align-items: baseline; gap: .36rem; }
.tape-metal { color: var(--brand); }
.tape-quote b { font-weight: 600; }
.tape-quote .up { color: var(--positive); }
.tape-quote .down { color: var(--negative); }
.tape-quote .flat { color: var(--text-dim); }
@media (max-width: 810px) {
    .spot-tape { max-width: 74%; gap: .9rem; padding-inline: .5rem; }
    .tape-label span { display: none; }
}
@media (max-width: 700px) {
    .scroll-top-btn,
    .scroll-top-btn.show {
        position: static;
        display: block;
        width: max-content;
        margin: 0 .8rem 1.2rem auto;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

/* Links in rate notes and calendar sources keep the theme colour: never the
   browser default blue, or purple once visited (Cedric, 8 November 2026). */
.intelligence-v2 .footnote a, .intelligence-v2 .footnote a:visited,
.macro-event-meta a, .macro-event-meta a:visited,
.macro-calendar-sources a, .macro-calendar-sources a:visited {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: rgba(var(--brand-rgb), .45);
    text-underline-offset: 2px;
}
.intelligence-v2 .footnote a:hover, .intelligence-v2 .footnote a:focus-visible,
.macro-event-meta a:hover, .macro-event-meta a:focus-visible,
.macro-calendar-sources a:hover, .macro-calendar-sources a:focus-visible {
    text-decoration-color: currentColor;
}

/* Type colours (Cedric, 8 November 2026): three families, two shades each.
   The darker shade is forward or instant, the lighter one realised. They are
   only ever small dots: never on text or numbers, never as a background fill. */
:root {
    --type-swap: #378ADD; --type-dicor: #85B7EB;
    --type-lease: #7F77DD; --type-arrears: #AFA9EC;
    --type-spot: #BA7517; --type-vol: #FAC775;
}
[data-theme="light"] {
    --type-swap: #185FA5; --type-dicor: #4F8FD0;
    --type-lease: #534AB7; --type-arrears: #857DD9;
    --type-spot: #8A5410; --type-vol: #B8801C;
}
.type-dot { display: inline-block; flex: none; width: 7px; height: 7px; margin-right: .45em; border-radius: 50%; background: var(--type-color); vertical-align: .1em; }
.type-dot--swap { --type-color: var(--type-swap); }
.type-dot--dicor { --type-color: var(--type-dicor); }
.type-dot--lease { --type-color: var(--type-lease); }
.type-dot--arrears { --type-color: var(--type-arrears); }
.type-dot--spot { --type-color: var(--type-spot); }
.type-dot--vol { --type-color: var(--type-vol); }
