/*
 * Data Resources — data stories (15 Nov 2026). First story: Pakistan's Compute Gap.
 * Kept in BOTH public trees (laravel-app/public/css and public_html/css);
 * only public_html is served. Bump ?v= in the views on every change.
 *
 * Colour: one highlight (Pakistan, dark gold #B07D0E — 3:1+ on white) against
 * slate for every other market. Text never wears the mark colour.
 */

.fi-ds { --ds-navy: #0E1A2B; --ds-ink: #1F2A3A; --ds-muted: #5B6B7C; --ds-gold: #B07D0E; --ds-gold-soft: #FCF3C7;
         --ds-slate: #64748B; --ds-line: #D8DEE6; --ds-cream: #F7F3E8; }

/* ---- Hero ---------------------------------------------------------------- */
.fi-ds-hero { margin: 8px 0 28px; max-width: 860px; }
/* 16 Nov 2026: sticker beside the text (stacks under it on a phone). */
.fi-ds-hero--art { max-width: none; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.fi-ds-hero__art { margin: 0; }
.fi-ds-hero__art img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--ds-line); box-shadow: 0 10px 28px rgba(14, 26, 43, .12); }
.fi-ds-hero__actions { margin: 6px 0 10px; }
.fi-ds-kicker { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
                color: var(--ds-navy); background: #F2C811; padding: .25em .7em; border-radius: 999px; }
.fi-ds-title { font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.15; color: var(--ds-navy); margin: 14px 0 12px; }
.fi-ds-hook { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; color: var(--ds-navy); background: var(--ds-cream);
              border-left: 4px solid #F2C811; padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 0 0 14px; }
.fi-ds-intro { font-size: 1.05rem; line-height: 1.6; color: var(--ds-ink); margin: 0 0 8px; }

/* ---- Sections ------------------------------------------------------------ */
.fi-ds-section { margin: 0 0 40px; }
.fi-ds-lead { color: var(--ds-muted); margin: -4px 0 14px; max-width: 760px; }
.fi-ds-h3 { font-size: 1.05rem; color: var(--ds-navy); margin: 22px 0 8px; }
.fi-ds-note { color: var(--ds-muted); font-size: .9rem; }
.fi-ds-big { font-size: 1.1rem; color: var(--ds-ink); }
.fi-ds-big strong { font-size: 2.2rem; color: var(--ds-navy); display: block; line-height: 1.1; }

/* ---- Charts -------------------------------------------------------------- */
/* 15 Nov 2026, 23:20 (owner, phone): every chart fits its box — nothing scrolls sideways. */
.fi-ds-chart { margin: 0; background: #fff; border: 1px solid var(--ds-line); border-radius: 12px; padding: 16px; min-width: 0; max-width: 100%; }
.fi-ds-svg { display: block; width: 100%; height: auto; font-family: inherit; }
.fi-ds-svg--square { max-width: 320px; }
.fi-ds-cap { color: var(--ds-muted); font-size: .85rem; margin-top: 10px; }

/* Bubbles: wrap onto new rows; each row sits on a shared baseline. */
.fi-ds-bubbles { list-style: none; margin: 0; padding: 0 0 4px; display: flex; flex-wrap: wrap; align-items: flex-end;
                 justify-content: flex-start; gap: 18px 14px; border-bottom: 1px solid #94A3B8; }
.fi-ds-bub { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 76px; text-align: center; }
.fi-ds-bub__art { display: block; overflow: visible; }
.fi-ds-bub__name { font-size: .82rem; font-weight: 600; color: var(--ds-ink); line-height: 1.2; }
.fi-ds-bub__value { font-size: .78rem; color: var(--ds-muted); }
.fi-ds-bub--focus .fi-ds-bub__name { color: var(--ds-navy); font-weight: 800; }
.fi-ds-bub--focus .fi-ds-bub__value { color: var(--ds-navy); font-weight: 700; }

/* Today → 2030: name and figure on top, the track below (phone); side by side on wider screens. */
.fi-ds-legend { display: flex; gap: 16px; margin: 0 0 10px; color: var(--ds-muted); font-size: .85rem; }
.fi-ds-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fi-ds-dumb { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.fi-ds-dumb__row { display: grid; grid-template-columns: 1fr; gap: 4px; }
.fi-ds-dumb__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.fi-ds-dumb__name { color: var(--ds-ink); font-size: .95rem; }
.fi-ds-dumb__value { color: var(--ds-ink); font-size: .88rem; }
.fi-ds-dumb__kind { color: var(--ds-muted); font-size: .8rem; flex-basis: 100%; }
.fi-ds-dumb__row.is-focus .fi-ds-dumb__name { color: var(--ds-navy); font-weight: 800; }
.fi-ds-dumb__track { display: block; overflow: visible; }
.fi-ds-dumb__row--axis { margin-top: -6px; }
.fi-ds-dumb__axis { position: relative; height: 18px; }
.fi-ds-dumb__axis span { position: absolute; top: 0; transform: translateX(-50%); font-size: .75rem; color: var(--ds-muted); white-space: nowrap; }
.fi-ds-dumb__axis span:first-child { transform: none; }
.fi-ds-dumb__axis span:last-child { transform: translateX(-100%); }
@media (min-width: 720px) {
    .fi-ds-dumb__row { grid-template-columns: 210px 1fr; align-items: center; gap: 14px; }
    .fi-ds-dumb__row--axis .fi-ds-dumb__head { min-height: 0; }
}

/* 5G bars: HTML, width in percent of the track. */
.fi-ds-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fi-ds-bars__row { display: grid; grid-template-columns: minmax(84px, 120px) 1fr 40px; align-items: center; gap: 10px; }
.fi-ds-bars__name { font-size: .88rem; font-weight: 600; color: var(--ds-ink); text-align: right; }
.fi-ds-bars__track { display: block; height: 22px; border-radius: 4px; background: #F1F4F8; overflow: hidden; }
.fi-ds-bars__fill { display: block; height: 100%; background: var(--ds-slate); border-radius: 4px; }
.fi-ds-bars__track--none { background: transparent; border: 1.5px dashed var(--ds-gold); color: var(--ds-navy); font-size: .8rem;
                           font-weight: 800; display: flex; align-items: center; padding: 0 8px; overflow: visible; white-space: nowrap; }
.fi-ds-bars__value { font-size: .82rem; color: var(--ds-muted); font-variant-numeric: tabular-nums; }
.fi-ds-bars__row.is-focus .fi-ds-bars__name { color: var(--ds-navy); font-weight: 800; }

.fi-ds-mark { fill: var(--ds-slate); stroke: #fff; stroke-width: 2; }
.fi-ds-mark--focus { fill: var(--ds-gold); }
.fi-ds-ring { fill: none; stroke: var(--ds-gold); stroke-width: 2; stroke-dasharray: 3 3; }
.fi-ds-axis { stroke: #94A3B8; stroke-width: 1; }
.fi-ds-grid { stroke: #E5E9EF; stroke-width: 1; }
.fi-ds-tick { fill: var(--ds-muted); font-size: 12px; }
.fi-ds-label { fill: var(--ds-ink); font-size: 13px; font-weight: 600; }
.fi-ds-label--focus { fill: var(--ds-navy); font-weight: 800; }
.fi-ds-value { fill: var(--ds-muted); font-size: 12px; }
.fi-ds-kind { fill: var(--ds-muted); font-size: 11px; }
.fi-ds-link { stroke: #94A3B8; stroke-width: 2; }
.fi-ds-link--focus { stroke: var(--ds-gold); }
.fi-ds-dot-today { fill: #fff; stroke: var(--ds-slate); stroke-width: 2; }
.fi-ds-dot-today--focus { stroke: var(--ds-gold); }
.fi-ds-dot-2030 { fill: var(--ds-slate); stroke: #fff; stroke-width: 2; }
.fi-ds-dot-2030--focus { fill: var(--ds-gold); }
.fi-ds-track { fill: none; stroke: var(--ds-gold); stroke-width: 1.5; stroke-dasharray: 5 4; }
.fi-ds-hit:hover .fi-ds-mark, .fi-ds-hit:hover .fi-ds-dot-2030 { opacity: .85; }

.fi-ds-sq-all { fill: var(--ds-cream); stroke: var(--ds-navy); stroke-width: 1.5; stroke-dasharray: 6 4; }
.fi-ds-sq-2030 { fill: var(--ds-gold); stroke: #fff; stroke-width: 2; }
.fi-ds-sq-today { fill: var(--ds-navy); stroke: #fff; stroke-width: 2; }

.fi-ds-split { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 24px; align-items: center; }
.fi-ds-split__text { min-width: 0; }
.fi-ds-key { list-style: none; padding: 0; margin: 12px 0; }
.fi-ds-key li { display: flex; align-items: center; gap: 10px; margin: 6px 0; color: var(--ds-ink); }
.fi-ds-swatch { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.fi-ds-swatch--all { background: var(--ds-cream); border: 1.5px dashed var(--ds-navy); }
.fi-ds-swatch--2030 { background: var(--ds-gold); }
.fi-ds-swatch--today { background: var(--ds-navy); }

/* ---- Stat tiles ---------------------------------------------------------- */
.fi-ds-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fi-ds-tile { background: var(--ds-navy); color: #fff; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.fi-ds-tile__value { font-size: 2.6rem; font-weight: 800; line-height: 1; color: #F2C811; }
.fi-ds-tile__label { font-weight: 700; }
.fi-ds-tile__text { color: #C9D4E3; font-size: .9rem; line-height: 1.45; }

/* ---- Tables -------------------------------------------------------------- */
.fi-ds-table { margin-top: 12px; }
.fi-ds-table summary { cursor: pointer; color: var(--ds-navy); font-weight: 700; }
.fi-ds-table table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.fi-ds-table th, .fi-ds-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--ds-line); }
.fi-ds-table thead th { background: var(--ds-navy); color: #fff; font-weight: 700; }
.fi-ds-table tr.is-focus th, .fi-ds-table tr.is-focus td { background: var(--ds-gold-soft); }
.fi-ds-table--open { overflow-x: auto; }
.fi-ds-status { display: inline-block; padding: .1em .55em; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #E7F0E9; color: #1E5631; }
.fi-ds-status--pending { background: var(--ds-gold-soft); color: #6B4A00; }
.fi-ds-status--pending::before { content: "⏳ "; }

/* ---- Discussion ---------------------------------------------------------- */
.fi-ds-discuss { background: var(--ds-cream); border-radius: 14px; padding: 22px; }
.fi-ds-flash { background: #fff; border-left: 4px solid #1E8E5A; padding: 10px 14px; border-radius: 0 8px 8px 0; }
.fi-ds-picks { list-style: none; padding: 0; margin: 6px 0 4px; display: grid; gap: 8px; max-width: 520px; }
.fi-ds-pick { display: grid; grid-template-columns: 90px 1fr 36px; gap: 10px; align-items: center; }
.fi-ds-pick__label { font-weight: 700; color: var(--ds-ink); }
.fi-ds-pick__bar { height: 12px; background: #fff; border-radius: 4px; overflow: hidden; border: 1px solid var(--ds-line); }
.fi-ds-pick__bar span { display: block; height: 100%; background: var(--ds-navy); border-radius: 0 4px 4px 0; }
.fi-ds-pick__n { text-align: right; color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.fi-ds-form { background: #fff; border-radius: 12px; padding: 16px; margin: 16px 0; display: grid; gap: 8px; max-width: 720px; }
.fi-ds-form__picks { border: 0; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 14px; }
.fi-ds-form__picks legend { font-weight: 700; color: var(--ds-ink); margin-bottom: 6px; }
.fi-ds-form__label { font-weight: 700; color: var(--ds-ink); }
.fi-ds-form textarea, .fi-ds-form input[type="text"] { width: 100%; border: 1px solid #C5CDD8; border-radius: 8px; padding: 10px; font: inherit; }
.fi-ds-form button { justify-self: start; }
.fi-ds-error { color: #B42318; font-size: .88rem; margin: 0; }
.fi-ds-signin { background: #fff; border-radius: 12px; padding: 16px; margin: 16px 0; }
.fi-ds-comments { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.fi-ds-comment { background: #fff; border-radius: 10px; padding: 12px 14px; position: relative; }
.fi-ds-comment__meta { margin: 0 0 4px; font-size: .88rem; color: var(--ds-muted); }
.fi-ds-comment__meta strong { color: var(--ds-ink); }
.fi-ds-comment__pick { background: var(--ds-gold-soft); color: #6B4A00; padding: .05em .5em; border-radius: 999px; font-weight: 700; }
.fi-ds-comment__body { margin: 0; white-space: pre-line; color: var(--ds-ink); }
.fi-ds-comment__hide { position: absolute; top: 10px; right: 12px; }
.fi-ds-comment__hide button { background: none; border: 1px solid var(--ds-line); border-radius: 6px; font-size: .78rem; color: var(--ds-muted); cursor: pointer; }

/* ---- Data Stories tab: the latest story as the panel (15 Nov 2026, 23:30) ---- */
.fi-ds-panel__hook { font-size: 1.05rem; font-weight: 700; color: var(--ds-navy, #0E1A2B); background: #F7F3E8;
                     border-left: 4px solid #F2C811; padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 4px 0 10px; }


/* ---- General story sections (16 Nov 2026, story #2) --------------------- */
.fi-ds-answer { background: #fff; border: 2px solid #F2C811; border-radius: 14px; padding: 18px 20px; margin: 0 0 34px; max-width: 900px; }
.fi-ds-answer__title { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6B4A00; margin: 0 0 6px; }
.fi-ds-answer p { margin: 0; font-size: 1.08rem; line-height: 1.6; color: var(--ds-ink); }
.fi-ds-para { font-size: 1.02rem; line-height: 1.65; color: var(--ds-ink); max-width: 860px; margin: 0 0 12px; }
.fi-ds-tile--focus { background: #F2C811; color: var(--ds-navy); }
.fi-ds-tile--focus .fi-ds-tile__value { color: var(--ds-navy); }
.fi-ds-tile--focus .fi-ds-tile__text { color: var(--ds-ink); }

.fi-ds-timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 3px solid var(--ds-line); display: grid; gap: 14px; max-width: 900px; }
.fi-ds-timeline__item { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 2px 14px; }
.fi-ds-timeline__item::before { content: ""; position: absolute; left: -31px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--ds-slate); border: 2px solid #fff; }
.fi-ds-timeline__item.is-focus::before { background: var(--ds-gold); }
.fi-ds-timeline__when { font-weight: 800; color: var(--ds-navy); }
.fi-ds-timeline__item.is-focus .fi-ds-timeline__when { color: #6B4A00; }
.fi-ds-timeline__what { color: var(--ds-ink); font-weight: 600; }
.fi-ds-timeline__why { grid-column: 2; color: var(--ds-muted); font-size: .9rem; }

/* fixed side columns: minmax() maxima are filled before 1fr, which left the bar 20px wide on a phone */
.fi-ds-bars__row--wide { grid-template-columns: 5.5rem 1fr 4.75rem; }
.fi-ds-bars__fill--focus { background: var(--ds-gold); }
.fi-ds-bars__row--wide .fi-ds-bars__value { white-space: nowrap; }

.fi-ds-code { margin: 0; }
.fi-ds-code pre { margin: 0; background: #0E1A2B; color: #E6EDF6; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: .9rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

.fi-ds-table th.is-focus-col, .fi-ds-table td.is-focus-col { background: var(--ds-gold-soft); }
.fi-ds-table thead th.is-focus-col { background: #6B4A00; color: #fff; }

.fi-ds-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.fi-ds-faq__item { background: #fff; border: 1px solid var(--ds-line); border-radius: 10px; padding: 12px 16px; margin: 0 0 10px; max-width: 900px; }
.fi-ds-faq__item summary { cursor: pointer; font-weight: 700; color: var(--ds-navy); }
.fi-ds-faq__item p { margin: 8px 0 0; line-height: 1.6; color: var(--ds-ink); }

@media (max-width: 720px) {
    /* tables become one card per row — no sideways scroll on a phone */
    .fi-ds-table--cards table, .fi-ds-table--cards tbody, .fi-ds-table--cards tr, .fi-ds-table--cards th, .fi-ds-table--cards td { display: block; width: 100%; box-sizing: border-box; }
    .fi-ds-table--cards thead { display: none; }
    .fi-ds-table--cards tr { border: 1px solid var(--ds-line); border-radius: 10px; margin: 0 0 12px; overflow: hidden; background: #fff; }
    .fi-ds-table--cards tbody th { background: var(--ds-navy); color: #fff; }
    .fi-ds-table--cards tr.is-focus th { background: #6B4A00; color: #fff; }
    .fi-ds-table--cards td { border-bottom: 1px solid var(--ds-line); }
    .fi-ds-table--cards td::before { content: attr(data-label); display: block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); margin-bottom: 2px; }
    .fi-ds-timeline__item { grid-template-columns: 1fr; }
    .fi-ds-timeline__why { grid-column: 1; }
    .fi-ds-hero--art { grid-template-columns: 1fr; gap: 16px; }
    .fi-ds-hero__art { order: -1; }
    .fi-ds-tiles { grid-template-columns: 1fr; }
    .fi-ds-chart { padding: 12px; }
    .fi-ds-bub { min-width: 64px; }
    .fi-ds-split { grid-template-columns: 1fr; }
    .fi-ds-discuss { padding: 16px; }
}
