/* Dominion Labs - Market insights, /insights/. Colours, fonts and the page frame come from index.css and
   chrome.css; this file adds the page's own parts: the figure rows, the charts, and the source register.
   The two chart hues are the site's own series blue and orange, chosen because they stay apart for colour
   blind readers and checked against each surface for contrast. Every bar is labelled, so colour never
   carries meaning on its own. */

:root {
    --ins-a:      #5b86d8;   /* the measured year, or the published finding */
    --ins-b:      #c9803f;   /* the forecast, or the projection */
    --ins-b-soft: rgba(201, 128, 63, 0.38);
    --ins-track:  rgba(242, 237, 225, 0.07);
}

@media (prefers-color-scheme: light) {
    :root {
        --ins-a:      #3b6fd4;
        --ins-b:      #b5742f;
        --ins-b-soft: rgba(181, 116, 47, 0.32);
        --ins-track:  rgba(20, 18, 14, 0.06);
    }
}

body.insights { font-family: var(--chrome-body); }

.ins {
    flex: 1;
    display: block;
    width: 100%;
    max-width: 1176px;
    margin: 0 auto;
    gap: 0;
    padding: clamp(5rem, 9vw, 7rem) clamp(24px, 4vw, 48px) clamp(4rem, 7vw, 6rem);
}

/* the page's head */
.ins-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ins-top { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3rem; margin-top: 1rem; }
.ins-top h1 {
    flex: 3 1 540px;
    min-width: 0;
    margin: 0;
    font-family: var(--chrome-display);
    font-size: clamp(2.5rem, 5vw, 3.625rem);
    font-weight: 300;
    line-height: 1.04;
    letter-spacing: -0.01em;
}
.ins-top-say { flex: 2 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 0.875rem; }
.ins-top-say p { margin: 0; font-size: 1.0625rem; line-height: 1.65; color: var(--text-secondary); }
.ins-top-say p + p { font-size: 0.9375rem; color: var(--text-muted); }

.ins-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--rule);
}
.ins-nav a { font-size: 0.875rem; font-weight: 500; color: var(--text-muted); text-decoration: none; }
.ins-nav a:hover { color: var(--text); }

/* a section and its head */
.ins-sec { padding-top: clamp(6rem, 10vw, 10rem); scroll-margin-top: 92px; }
.ins-sec#economics { padding-top: clamp(4rem, 7vw, 7rem); }
.ins-sec-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3rem; }
.ins-sec-head > div { flex: 3 1 540px; min-width: 0; }
.ins-sec-head h2 {
    margin: 0.875rem 0 0;
    font-family: var(--chrome-display);
    font-size: clamp(1.875rem, 3.2vw, 2.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.ins-sec-head p { flex: 2 1 360px; min-width: 0; margin: 0; font-size: 1rem; line-height: 1.6; color: var(--text-secondary); }

/* figures on a rule */
.ins-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.5rem; row-gap: 2rem; margin-top: 2.875rem; }
.ins-figs.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3.5rem; }
.ins-fig { min-width: 0; padding-top: 1.125rem; border-top: 1px solid var(--rule-strong); display: flex; flex-direction: column; gap: 0.375rem; }
.ins-fig b {
    font-family: var(--chrome-display);
    font-size: clamp(1.75rem, 3vw, 2.875rem);
    font-weight: 300;
    line-height: 1.02;
    font-variant-numeric: tabular-nums;
}
.ins-fig .ins-eyebrow { margin-bottom: 0.125rem; }
.ins-fig span { font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); }
.ins-fig small { font-size: 0.8125rem; line-height: 1.45; color: var(--text-faint); }

.ins-claim { margin: 2.125rem 0 0; font-size: 1.0625rem; line-height: 1.6; color: var(--text-secondary); }

/* charts */
.ins-charts { display: flex; flex-wrap: wrap; gap: 3.5rem; margin-top: 3.75rem; }
.ins-chart { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.ins-chart h3 { margin: 0; font-family: var(--chrome-display); font-size: 1.5625rem; font-weight: 400; line-height: 1.2; }
.ins-src { font-size: 0.8125rem; line-height: 1.5; color: var(--text-faint); }

.ins-legend { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; }
.ins-key { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-secondary); }
.ins-key i { width: 11px; height: 11px; border-radius: 3px; background: var(--ins-a); }
.ins-key.b i { background: var(--ins-b); }
.ins-key.soft i { background: var(--ins-b-soft); }

.ins-split { display: flex; height: 44px; gap: 2px; }
.ins-split > span {
    display: flex;
    align-items: center;
    padding-left: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #000;
}
.ins-split > span:first-child { background: var(--ins-a); border-radius: 4px 0 0 4px; }
.ins-split > span:last-child { background: var(--ins-b); border-radius: 0 4px 4px 0; }

.ins-rows { display: flex; flex-direction: column; gap: 1.125rem; }
.ins-row { display: flex; flex-direction: column; gap: 0.5rem; }
.ins-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.ins-row-top span { font-size: 0.875rem; color: var(--text-secondary); }
.ins-row-top b { font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.ins-track { position: relative; height: 16px; width: 100%; background: var(--ins-track); border-radius: 4px; }
.ins-track > i { position: absolute; left: 0; top: 0; height: 16px; border-radius: 4px; background: var(--ins-a); }
.ins-track > i.b { background: var(--ins-b); }
.ins-track > i.soft { background: var(--ins-b-soft); }
.ins-track > i.lead { box-shadow: 2px 0 0 0 var(--bg); }
.ins-diff { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 0.625rem; border-top: 1px solid var(--rule); }
.ins-diff span { font-size: 0.875rem; color: var(--text-muted); }
.ins-diff b { font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }

/* the market rows: name, bar, figures */
.ins-mkts { display: flex; flex-direction: column; gap: 1.625rem; margin-top: 1.625rem; }
.ins-mkt { display: grid; grid-template-columns: 220px minmax(0, 1fr) 200px; column-gap: 1.75rem; align-items: center; }
.ins-mkt-name { font-family: var(--chrome-display); font-size: 1.5625rem; font-weight: 400; line-height: 1.15; }
.ins-mkt-src { font-size: 0.78125rem; line-height: 1.45; color: var(--text-faint); }
.ins-mkt .ins-track, .ins-mkt .ins-track > i { height: 26px; }
.ins-mkt-val { text-align: right; min-width: 0; }
.ins-mkt-val b { display: block; font-size: 0.9375rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.ins-mkt-val span { display: block; font-size: 0.78125rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.ins-axis { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }

/* published findings, then forecasts */
.ins-group { margin-top: 2.75rem; padding-top: 1.125rem; border-top: 1px solid var(--rule-strong); }
.ins-group-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2.5rem; row-gap: 2rem; margin-top: 1.375rem; }
.ins-group-items.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3.5rem; }
.ins-item { min-width: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.ins-item b { font-family: var(--chrome-display); font-size: clamp(2.25rem, 4vw, 3.5rem); font-weight: 300; line-height: 1; font-variant-numeric: tabular-nums; }
.ins-item b.words { font-size: clamp(1.5rem, 2.6vw, 2.5rem); line-height: 1.1; }
.ins-item span { font-size: 0.9375rem; line-height: 1.5; color: var(--text-secondary); }
.ins-item small { font-size: 0.8125rem; line-height: 1.45; color: var(--text-faint); }

.ins-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3.5rem; row-gap: 2rem; margin-top: 2.75rem; padding-top: 1.125rem; border-top: 1px solid var(--rule-strong); }
.ins-compare > div { min-width: 0; display: flex; flex-direction: column; gap: 0.625rem; align-items: flex-start; }
.ins-compare p { margin: 0; font-size: 1.0625rem; line-height: 1.55; color: var(--text-secondary); }

/* reports */
.ins-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 2rem; row-gap: 2rem; margin-top: 2.875rem; }
.ins-card { min-width: 0; padding-top: 1.125rem; border-top: 1px solid var(--rule-strong); display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.ins-card b { font-family: var(--chrome-display); font-size: 2rem; font-weight: 300; line-height: 1.05; }
.ins-card span { font-size: 0.90625rem; line-height: 1.5; color: var(--text-secondary); }

/* sources */
.ins-sources { margin-top: clamp(6rem, 10vw, 10rem); padding-top: 1.25rem; border-top: 1px solid var(--rule-strong); }
.ins-source-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 2rem; row-gap: 0.5625rem; margin-top: 1.125rem; }
.ins-source-list a {
    font-size: 0.84375rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    text-decoration-color: var(--rule);
}
.ins-source-list a:hover { color: var(--text); }
.ins-note { margin: 1.125rem 0 0; font-size: 0.84375rem; line-height: 1.6; color: var(--text-faint); }

.ins-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.25em;
    text-decoration-color: var(--rule-strong);
    white-space: nowrap;
}
.ins-link:hover { text-decoration-color: var(--text-faint); }

@media (max-width: 1000px) {
    .ins-mkt { grid-template-columns: minmax(0, 1fr); row-gap: 0.625rem; }
    .ins-mkt-val { text-align: left; }
    .ins-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ins-source-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .ins-figs, .ins-figs.two, .ins-group-items, .ins-group-items.two,
    .ins-compare, .ins-cards, .ins-source-list { grid-template-columns: minmax(0, 1fr); }
    .ins-nav { gap: 0.75rem 1.5rem; }
}
