/* figures.css — Mathinker SVG figure standard (Spec §2.6, §5).
 *
 * The normative mechanism for STORED CONTENT figures is presentation
 * attributes (the sanitizer bans style/url(), see internal/content/svg.go):
 *
 *   stroke="currentColor"          all primary strokes and text
 *   stroke-width scale             0.75 grid · 1.25 axes · 1.5 secondary
 *                                  · 2 primary curve · 2.5 emphasis
 *   stroke-dasharray="6 4"         dashed: asymptotes, hidden edges
 *   stroke-dasharray="1.5 3.5"     dotted (+ stroke-linecap="round"):
 *                                  projections onto axes
 *   fill="currentColor" +          discrete grayscale ramp instead of
 *   fill-opacity 0.06/.12/.22/.35  gradients (gradients are banned in
 *                                  content SVG)
 *   labels                         italic serif, Latin/Greek only,
 *                                  font-size 14 at standard viewBox density
 *
 * The classes below mirror those scales for hand-authored UI figures
 * inlined into pages (class is whitelisted by the sanitizer, so inlined
 * content figures may carry them too — attributes remain the source of
 * truth for standalone SVG documents). */

.fig {
    max-width: 100%;
    height: auto;
}

/* Only mk pages follow the theme tokens; legacy pages (frozen main.css,
 * always light) let the figure inherit the page text color instead of
 * picking up a dark-theme foreground on a light background. */
.mk-page .fig {
    color: var(--mk-fg);
}

.fig-grid {
    stroke: var(--mk-gray-300);
    stroke-width: 0.75;
    fill: none;
}

.fig-axis {
    stroke: currentColor;
    stroke-width: 1.25;
    fill: none;
}

.fig-curve {
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.fig-curve-2 {
    stroke: var(--mk-gray-500);
    stroke-width: 1.5;
    fill: none;
}

.fig-emphasis {
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.fig-dashed {
    stroke-dasharray: 6 4;
}

.fig-dotted {
    stroke-dasharray: 1.5 3.5;
    stroke-linecap: round;
}

.fig-point {
    fill: currentColor;
    stroke: var(--mk-bg);
    stroke-width: 1.5;
}

.fig-point-open {
    fill: var(--mk-bg);
    stroke: currentColor;
    stroke-width: 1.5;
}

.fig-label {
    fill: currentColor;
    font-family: var(--mk-font-content);
    font-style: italic;
    font-size: 14px;
}

/* Discrete grayscale shading ramp — the standard replacement for
 * gradients in journal-style figures. */
.fig-shade-1 { fill: currentColor; fill-opacity: 0.06; stroke: none; }
.fig-shade-2 { fill: currentColor; fill-opacity: 0.12; stroke: none; }
.fig-shade-3 { fill: currentColor; fill-opacity: 0.22; stroke: none; }
.fig-shade-4 { fill: currentColor; fill-opacity: 0.35; stroke: none; }
