/* Figure classes for the essay's inline SVGs.
   The article stylesheet (theseus_build/article.css, Phase G) must include this file
   unchanged. The tokens come from theseus_build/styles.css. */

/* On narrow screens a figure keeps 640px and scrolls sideways inside its frame,
   so labels never fall below about 10px. */
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 680px) {
    .fig-scroll svg.fig { min-width: 640px; }
}

figure svg.fig {
    display: block;
    width: 100%;
    max-width: 720px;
    height: auto;
    margin: 0 auto;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 13px;
    overflow: visible;
}

svg.fig text { fill: currentColor; }
svg.fig .sm { font-size: 11.5px; }
svg.fig .hd { font-size: 14px; font-weight: 600; }
svg.fig .mono { font-family: var(--mono); font-size: 11.5px; }
svg.fig .it { font-style: italic; }

/* ink levels: .ink2/.ink3 colour text and fills only; .s-ink2/.s-ink3 colour strokes */
svg.fig .ink2 { fill: var(--ink-2); }
svg.fig .ink3 { fill: var(--ink-3); }
svg.fig .s-ink2 { stroke: var(--ink-2); fill: none; }
svg.fig .s-ink3 { stroke: var(--ink-3); fill: none; }

/* surfaces and lines */
svg.fig .box { fill: var(--bg-2); stroke: currentColor; stroke-width: 1.25; }
svg.fig .box-mut { fill: var(--bg-2); stroke: var(--ink-3); stroke-width: 1.25; }
svg.fig .rule { stroke: var(--rule); fill: none; }
svg.fig .ln { stroke: currentColor; stroke-width: 1.5; fill: none; }
svg.fig .ln-mut { stroke: var(--ink-3); stroke-width: 1.5; fill: none; }
svg.fig .dash { stroke-dasharray: 4 4; }

/* the one meaningful accent */
svg.fig .acc { fill: var(--accent); stroke: none; }
svg.fig text.acc { fill: var(--accent); }
svg.fig .acc-s { stroke: var(--accent); fill: none; stroke-width: 2; }
svg.fig .acc-box { fill: var(--bg-2); stroke: var(--accent); stroke-width: 2; }
svg.fig .acc-wash { fill: var(--accent); fill-opacity: 0.12; stroke: none; }

/* CIR step figures (derived from the master by the build) */
svg.fig .step-later { opacity: 0.34; }
/* in its own step the affective state's links are what is new, so they take the accent */
svg.fig .step-now .rule { stroke: var(--accent); stroke-width: 1.25; }
svg.fig .step-now .box,
svg.fig .step-now .box-mut { stroke: var(--accent); stroke-width: 2; }

/* Charts */
svg.fig .grid { stroke: var(--rule); stroke-width: 1; }
svg.fig .axis { stroke: var(--ink-3); stroke-width: 1; }
svg.fig .dot { fill: currentColor; stroke: var(--bg); stroke-width: 2; }
svg.fig .dot-acc { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }

/* figures drawn narrow so they fit a phone (class "fit") keep their drawn size on wide screens */
figure svg.fig.w440 { max-width: 440px; }
figure svg.fig.w500 { max-width: 500px; }
