/* Article "The AI boom in numbers" (/articles/ai-boom/), on top of style.css and
   articles.css. Classes start with .ai-. Frontier models and NVIDIA: blue (--s1);
   other models: gray (--s6); the 10^23 club: one blue, darker for more compute;
   companies of the capex chart: c1…c5 in a fixed order. */

/* the dot cloud */
.ai-plot-cloud { min-height: 460px; }
.ai-dot { fill: var(--s6); fill-opacity: 0.5; }
.ai-dot.fr { fill: var(--s1); fill-opacity: 0.85; }
.ai-dot.spec { fill: none; stroke: var(--s6); stroke-width: 1.2; stroke-opacity: 0.85; }
.ai-dot.fr.spec { fill: none; stroke: var(--s1); stroke-width: 1.5; }
.ai-trend { stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.ai-trend.pre { stroke: var(--ink-2); stroke-dasharray: 6 5; }
.ai-tlbl, .ai-lbl, .ai-era-lbl { paint-order: stroke; stroke: var(--surface); stroke-linejoin: round; }
.ai-tlbl { fill: var(--ink); font: 650 12.5px/1 var(--font); stroke-width: 4px; }
.ai-lbl { fill: var(--ink-2); font: 550 11.5px/1 var(--font); stroke-width: 3.5px; }
.ai-era { stroke: var(--axis); stroke-width: 1; stroke-dasharray: 2 4; }
.ai-era-lbl { fill: var(--muted); font: 600 11px/1 var(--mono); stroke-width: 3px; }
.ai-lead { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.ai-lead-dot { fill: var(--ink); }
.ai-ring { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-opacity: 0.55; }
.ai-ring.on { stroke-opacity: 1; stroke-width: 2; }
.ai-sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--s6); opacity: 0.75; }
.ai-sw.fr { background: var(--s1); opacity: 1; }
.ai-sw.spec { background: none; box-shadow: inset 0 0 0 1.5px var(--s6); }
.ai-sw.fr.spec { box-shadow: inset 0 0 0 1.5px var(--s1); }
.ai-tip-org { margin: -3px 0 5px; font-size: 11.5px; line-height: 1.35; color: var(--muted); max-width: 260px; }
.legend svg .ai-trend { stroke-width: 2; }
@media (max-width: 560px) {
  .ai-tlbl { font-size: 11px; }
  .ai-lbl { font-size: 10px; }
}

.ai-e { font-size: 0.62em; vertical-align: 0.62em; line-height: 0; letter-spacing: 0; margin-left: 0.04em; }

/* the 10^23 club: one square per model */
.ai-units-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 2px 10px 0; margin-bottom: 6px; }
.art .chart.has-full .ai-units-top { padding-right: 44px; }
.ai-units-top .legend { padding: 0 !important; margin: 0 !important; }
.ai-leg[hidden] { display: none; }
.ai-plot-units { min-height: 300px; }
.ai-sq { stroke: none; }
.ai-sq.on { stroke: var(--ink); stroke-width: 2; }
.ai-t23 { fill: var(--s1); fill-opacity: 0.22; }
.ai-t24 { fill: var(--s1); fill-opacity: 0.48; }
.ai-t25 { fill: var(--s1); fill-opacity: 0.78; }
.ai-t26 { fill: var(--ink); }
.sw-sq.ai-t23 { background: color-mix(in srgb, var(--s1) 22%, var(--surface)); }
.sw-sq.ai-t24 { background: color-mix(in srgb, var(--s1) 48%, var(--surface)); }
.sw-sq.ai-t25 { background: color-mix(in srgb, var(--s1) 78%, var(--surface)); }
.sw-sq.ai-t26 { background: var(--ink); }
.ai-g0 { fill: var(--s1); } .sw-sq.ai-g0 { background: var(--s1); }
.ai-g1 { fill: var(--s2); } .sw-sq.ai-g1 { background: var(--s2); }
.ai-g2 { fill: var(--s3); } .sw-sq.ai-g2 { background: var(--s3); }
.ai-g3 { fill: var(--s4); } .sw-sq.ai-g3 { background: var(--s4); }
.ai-a0 { fill: var(--s1); } .sw-sq.ai-a0 { background: var(--s1); }
.ai-a1 { fill: var(--s2); } .sw-sq.ai-a1 { background: var(--s2); }
.ai-a2 { fill: var(--s6); } .sw-sq.ai-a2 { background: var(--s6); }
.ai-a3 { fill: transparent; stroke: var(--muted); stroke-width: 1; } .sw-sq.ai-a3 { background: none; box-shadow: inset 0 0 0 1.5px var(--muted); }
.ai-cnt { fill: var(--ink); font: 600 11.5px/1 var(--mono); }
.ai-sofar { fill: var(--muted); font: 500 10.5px/1 var(--font); }

/* the largest model of each year */
.ai-best th:nth-child(2) { text-align: left; }
.ai-best td.ai-name { text-align: left; white-space: normal; min-width: 180px; color: var(--ink); font-weight: 550; }
.ai-best td.ai-name .art-when { font-weight: 450; }

/* countries and organizations: bar lists */
.ai-pair { margin-top: 8px; }
.ai-list { margin: 0; padding: 18px 20px 16px; }
.ai-list-h { margin: 0 0 10px; font-weight: 650; color: var(--ink); font-size: 15px; }
.ai-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ai-bars li { display: grid; grid-template-columns: minmax(0, 10.5em) minmax(0, 1fr) 2.6em; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); }
.ai-bar-l { display: flex; align-items: center; min-width: 0; line-height: 1.25; overflow-wrap: anywhere; }
.ai-bar-t { display: block; height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.ai-bar { display: block; height: 100%; border-radius: 5px; background: var(--s1); }
.ai-bars b { text-align: right; color: var(--ink); font: 600 13px/1 var(--mono); font-variant-numeric: tabular-nums; }
.ai-flag { flex: none; width: 20px; height: 15px; margin-right: 7px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px var(--border); }
.ai-noflag { display: inline-block; background: var(--track); }
@media (max-width: 560px) {
  .ai-list { padding: 14px 14px 12px; }
  .ai-bars li { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 2.4em; gap: 8px; font-size: 13px; }
}

/* capital expenditure */
.ai-plot-capex { min-height: 330px; }
.ai-stk { stroke: var(--surface); stroke-width: 0.6; }
.ai-stk.on { stroke: var(--ink); stroke-width: 0.8; }
.ai-win { fill: var(--track); opacity: 0.75; }
.ai-win-lbl { fill: var(--ink-2); font: 600 11.5px/1 var(--font); }
.ai-win-lbl.v { fill: var(--ink); font-family: var(--mono); }
.ai-end { fill: var(--ink); font: 650 12px/1 var(--mono); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.ai-strong { font-weight: 700; }

.ai-cos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 205px), 1fr)); gap: 12px; margin-top: 14px; }
.ai-co { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 16px 14px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: box-shadow 0.15s ease; }
.ai-co:hover { box-shadow: var(--shadow-lg); }
.ai-co-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ai-co-name { font: 650 15px/1.2 var(--font); letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-co-t { margin-left: auto; font: 600 11px/1 var(--mono); color: var(--muted); }
.ai-co-now { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }
.ai-co-v { font: 600 26px/1.05 var(--mono); letter-spacing: -0.05em; }
.ai-co-now .pill { padding: 4px 7px; font-size: 11.5px; }
.ai-co-sub { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
.ai-strip { display: block; width: 100%; height: 40px; margin: 4px 0 2px; }
.ai-co.c1 .ai-strip rect { fill: var(--s1); } .ai-co.c2 .ai-strip rect { fill: var(--s2); }
.ai-co.c3 .ai-strip rect { fill: var(--s3); } .ai-co.c4 .ai-strip rect { fill: var(--s4); }
.ai-co.c5 .ai-strip rect { fill: var(--s5); }
.ai-co-rows { display: grid; gap: 2px; }
.ai-crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; font-size: 12px; color: var(--ink-2); border-top: 1px solid var(--border); padding-top: 5px; }
.ai-crow b { color: var(--ink); font-size: 13px; font-weight: 650; }
.ai-then { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
@media (max-width: 560px) {
  .ai-cos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ai-co { padding: 12px 11px 10px; border-radius: 16px; }
  .ai-co-v { font-size: 21px; }
  .ai-co-t { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ai-co { transition: none; } }

/* NVIDIA */
.ai-plot-nv { min-height: 320px; }
.ai-revb { fill: var(--s1); fill-opacity: 0.26; }
.ai-revb.on { fill-opacity: 0.42; }
.ai-nib { fill: var(--s1); }
.ai-nib.neg { fill: var(--bad); }
.sw-sq.ai-rev { background: color-mix(in srgb, var(--s1) 30%, var(--surface)); }
.sw-sq.ai-ni { background: var(--s1); }
.ai-mark { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 4 4; }
.ai-mark-lbl { fill: var(--ink-2); font: 600 11.5px/1 var(--font); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.art-table tr.ai-ttm th, .art-table tr.ai-ttm td { background: var(--surface-2); }
