/* Overclocked — inline data figures (js/figures.js). Class prefix: fg-
 * Paper + ink + accent, mono for every label, serif italic captions. */

/* ---------- figure shell ---------- */
.oc-fig { margin: 0; padding: 0; }
.oc-fig.fg {
  position: relative;
  margin: 38px 0 34px;
  padding-top: 10px;
  border-top: 1.5px solid var(--ink);
  font-size: 16px;
  line-height: 23px;
}
.fg-head { margin: 0 0 12px; }
.fg-kick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  font-family: var(--mono); font-size: 10.5px; line-height: 16px;
  letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 6px;
}
.fg-pill {
  background: var(--ink); color: var(--bg);
  border-radius: 4px; padding: 1px 7px; letter-spacing: .03em; white-space: nowrap;
}
.fg.fg-in .fg-pill { background: var(--accent); transition: background .6s var(--ease); }
.fg-topic::before { content: '· '; }
.fg-title {
  font-family: var(--mono); font-size: 13.5px; line-height: 19px; font-weight: 700;
  letter-spacing: -.01em; color: var(--ink); margin: 0; text-wrap: balance;
}
.fg-body { position: relative; }
.fg-cap {
  margin: 14px 0 0;
  font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 23px;
  color: var(--ink-2);
}
.fg-src {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-style: normal; font-size: 10px; line-height: 14px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}

/* ---------- SVG canvas + text ---------- */
.fg-svg { display: block; width: 100%; height: auto; overflow: visible; }
.fg-svg text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.fg-svg .t-ink { fill: var(--ink); }
.fg-svg .t-mut { fill: var(--muted); }
.fg-svg .t-acc { fill: var(--accent); }
.fg-svg .t-inv { fill: var(--bg); }
.fg-svg .t-b { font-weight: 700; }
.fg-svg .t-sm { font-size: 10px; }
.fg-svg .t-12 { font-size: 12px; }
.fg-svg .t-v { font-size: 13px; font-weight: 700; fill: var(--ink); }
.fg-svg .t-v15 { font-size: 15px; font-weight: 700; fill: var(--ink); letter-spacing: -.01em; }
.fg-svg .t-tick { font-size: 10px; fill: var(--ink-2); }
.fg-svg .t-cap { font-size: 9.5px; letter-spacing: .06em; fill: var(--muted); }
.fg-svg .t-halo { paint-order: stroke; stroke: var(--bg); stroke-width: 3.2px; stroke-linejoin: round; }

/* fills */
.fg-svg .f-acc { fill: var(--accent); }
.fg-svg .f-ink { fill: var(--ink); }

/* axes, grids, guides */
.fg-svg .fg-axis { stroke: var(--ink); stroke-width: 1.2; fill: none; }
.fg-svg .fg-gridline { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 3; }
.fg-svg .fg-grid-major { stroke: var(--rule); stroke-width: 1; fill: none; }
.fg-svg .fg-grid-minor { stroke: var(--rule); stroke-width: .6; opacity: .6; fill: none; }
.fg-svg .fg-guide { stroke: var(--accent-soft); stroke-width: 1; stroke-dasharray: 3 3; }
.fg-svg .fg-front { stroke: var(--accent); stroke-width: 1; stroke-dasharray: 2 2; }
.fg-svg .fg-today { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.fg-svg .fg-over { fill: var(--bg-sunk); }
.fg-svg .fg-conn { fill: none; stroke: var(--muted); stroke-width: 1; stroke-dasharray: 1.5 3; }

/* compute-squares */
.fg-svg .fg-ring { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 2 2; }

/* china-cdz */
.fg-svg .fg-area-cdz { fill: var(--accent); fill-opacity: .34; }
.fg-svg .fg-area-dc { fill: #dcdbd0; }
.fg-svg .fg-area-cn { fill: #eeede3; }
.fg-svg .fg-line-cdz { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.fg-svg .fg-line-dc { fill: none; stroke: #8f8f86; stroke-width: 1.4; stroke-linejoin: round; }
.fg-svg .fg-line-cn { fill: none; stroke: #bdbcb1; stroke-width: 1.2; stroke-linejoin: round; }
.fg-svg .fg-dot-acc { fill: var(--accent); stroke: var(--bg); stroke-width: 1; }
.fg-svg .fg-dot-dc { fill: #5f5f58; stroke: var(--bg); stroke-width: 1; }
.fg-svg .fg-dot-cn { fill: #9d9c92; stroke: var(--bg); stroke-width: 1; }
.fg-svg .fg-dot-ink { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }
.fg-svg .fg-ann-line { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }

/* compute-allocation (classes shared by SVG arcs and HTML swatches) */
.fg-c-acc { fill: var(--accent); background: var(--accent); }
.fg-c-acc2 { fill: var(--accent-soft); background: var(--accent-soft); }
.fg-c-ink { fill: #2b2b2b; background: #2b2b2b; }
.fg-c-mid { fill: #7a7a72; background: #7a7a72; }
.fg-c-light { fill: #c6c5ba; background: #c6c5ba; }
.fg-svg .fg-arc { stroke: var(--bg); stroke-width: 1.5; stroke-linejoin: round; transition: opacity .2s var(--ease); }
.fg-svg .fg-arrowpath { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fg-dim { opacity: .22; }

/* research-tradeoff */
.fg-svg .fg-curve { fill: none; stroke: var(--accent); stroke-linecap: round; stroke-linejoin: round; }
.fg-svg .fg-pt { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.fg-svg .fg-box { fill: var(--bg); stroke: var(--ink); stroke-width: 1; }

/* takeoff-forecast */
.fg-svg .fg-ghost line, .fg-svg .fg-ghost path { stroke: var(--others); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fg-svg .fg-ghost circle { fill: var(--bg); stroke: var(--others); stroke-width: 1.5; }
.fg-svg .fg-chev { fill: none; stroke: var(--bg); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* robot-economy bars */
.fg-svg .fg-bar-ref { fill: var(--bg); stroke: var(--ink); stroke-width: 1.2; }
.fg-svg .fg-bar-spec { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 2; }
.fg-svg .fg-notch { stroke: var(--bg); stroke-width: 1.5; }

/* ---------- HTML legend ---------- */
.fg-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  margin: 0 0 10px;
  font-family: var(--mono); font-size: 10.5px; line-height: 16px; color: var(--ink-2);
}
.fg-lg-lead { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 10px; }
.fg-lg-item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fg-sw { display: inline-block; flex: none; width: 12px; height: 10px; border-radius: 2px; }
.fg-sw--sq { width: 10px; height: 10px; }
.fg-sw--cdz { background: color-mix(in srgb, var(--accent) 34%, var(--bg)); border-top: 2px solid var(--accent); border-radius: 0; }
.fg-sw--dc { background: #dcdbd0; border-top: 2px solid #8f8f86; border-radius: 0; }
.fg-sw--cn { background: #eeede3; border-top: 2px solid #bdbcb1; border-radius: 0; }
.fg-sw--line { width: 18px; height: 0; border-top: 2px solid var(--accent); border-radius: 0; }
.fg-sw--line.fg-o0 { opacity: .42; }
.fg-sw--line.fg-o1 { opacity: .7; }
.fg-sw--line.fg-o2 { border-top-width: 2.5px; }
.fg-sw--bar-acc { width: 20px; height: 8px; border-radius: 4px; background: var(--accent); }
.fg-sw--dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.fg-sw--ghost { width: 20px; height: 0; border-top: 2px solid var(--others); border-radius: 0; }

/* ---------- key-metrics cards ---------- */
.fg-km { display: grid; gap: 14px; }
.fg-km-gh {
  display: flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-family: var(--mono); font-size: 10.5px; line-height: 14px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.fg-km-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 10px; }
.fg-km-grid--lab { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.fg-card {
  position: relative; min-height: 96px; padding: 9px 11px 10px;
  border: 1.5px solid var(--ink); border-radius: 6px; background: var(--bg); color: var(--ink);
  font-family: var(--mono);
}
.fg-card--acc { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.fg-card-k { padding-right: 18px; font-size: 10px; line-height: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.fg-card-v { margin: 6px 0 2px; font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fg-card-s { font-size: 9.5px; line-height: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fg-card--acc .fg-card-k, .fg-card--acc .fg-card-s { color: inherit; opacity: .86; }
.fg-card .fg-glyph { position: absolute; top: 8px; right: 8px; }
.fg-card-bar { height: 4px; margin-top: 7px; border-radius: 2px; background: var(--rule); overflow: hidden; }
.fg-card-barfill { display: block; width: 0; height: 100%; background: var(--accent); }
.fg-glyph { display: inline-block; flex: none; vertical-align: middle; }

/* ---------- compute-allocation table ---------- */
.fg-al { margin-top: 12px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; line-height: 15px; }
.fg-al-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 46px 46px 14px; gap: 8px; align-items: center;
  padding: 5px 0; border-bottom: 1px solid var(--rule); transition: opacity .2s var(--ease);
}
.fg-al-head { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fg-al-head span:nth-child(2), .fg-al-head span:nth-child(3) { text-align: right; }
.fg-al-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); }
.fg-al-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.fg-al-b { font-weight: 700; color: var(--ink); }
.fg-al-d { font-size: 9px; text-align: center; }
.fg-al-d.is-up { color: var(--accent); }
.fg-al-d.is-down { color: var(--muted); }

/* ---------- robot-economy header ---------- */
.fg-ro-top { margin-bottom: 16px; }
.fg-ro-big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-family: var(--mono); }
.fg-ro-num { font-size: 30px; line-height: 34px; font-weight: 700; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.fg-ro-unit { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); }
.fg-ro-sub { margin-top: 2px; font-family: var(--mono); font-size: 10.5px; line-height: 15px; letter-spacing: .03em; color: var(--muted); }
.fg .fg-steps {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
}
.fg .fg-step { position: relative; margin: 0; padding: 18px 8px 0 0; font-family: var(--mono); }
.fg .fg-step::before {
  content: ''; position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg);
}
.fg .fg-step:not(:last-child)::after {
  content: ''; position: absolute; left: 13px; right: 2px; top: 5px; border-top: 1.5px solid var(--ink);
}
.fg-step-d { display: block; font-size: 11px; line-height: 15px; font-weight: 700; color: var(--ink); }
.fg-step-t { display: block; font-size: 10px; line-height: 13px; color: var(--muted); }

/* ---------- small screens ---------- */
@media (max-width: 480px) {
  .oc-fig.fg { margin: 30px 0 28px; }
  .fg-title { font-size: 12.5px; line-height: 17px; }
  .fg-cap { font-size: 15px; line-height: 21px; }
  .fg-card-v { font-size: 21px; line-height: 26px; }
  .fg-ro-num { font-size: 26px; line-height: 30px; }
}
