/* =========================================================================
   surface-treatments — separate surfaces composed from three axes; the
   disclosure; content emphasis; perimeter paint; the bordered label; the
   labeled range; rail paint; fill paint; the scope underline; the marker.

   An OPT-IN VISUAL RULE under Foundations. It owns PRESENTATION ONLY: no
   markup, no semantics, no template, and no generated preview. A consuming
   surface writes its own markup and applies these classes to it.

   It serves BOTH lifecycles. A live surface references or vendors it and
   re-syncs when it changes. An artifact scaffold may inline it at generation
   time, after which the sealed copy does not re-sync. It loads no resource and
   imports no stylesheet, so it inlines verbatim — together with
   surface-panel.css, which it extends.

   LOAD ORDER   colors_and_type.css -> surface-panel.css -> surface-treatments.css
                (surface-document.css, where a page also uses it, loads before
                this file)

   LOAD ORDER IS LOAD-BEARING.
     1  surface-panel.css comes first. It authors the glass recipe once and
        shares it by selector grouping: .surface-material-page,
        .surface-material-panel, .surface-attach-free and
        .surface-elevation-raised are defined THERE. Without that file those
        four classes do nothing.
     2  Material and elevation precede emphasis. The emphasis border and paint
        then win at equal specificity (0,1,0) over a material's edge and over
        .surface-elevation-flush.
     3  .surface-emphasis.surface-elevation-raised composes the emphasis paint
        with the raised shadow at (0,2,0), so an emphasized surface that is
        also raised keeps both. It names --shadow-md again, because a
        box-shadow list cannot compose across rules.
     4  The accent modifiers follow the base rules that set a default accent.
     5  The disclosure's foreground rules share one specificity per host —
        (0,3,1) for the indicator and (0,2,1) for the summary of a details
        host; (0,3,0) and (0,2,0) for a controlled trigger — and are ordered
        [open] / [aria-expanded="true"] < :hover < :focus-visible, so a
        trigger that is hovered and focused shows the focus signal: the
        magenta indicator and the outline.

   USE. Use .surface-panel for a live content panel, and always for a panel
   that is itself a link: a.surface-panel is the only linked-panel form. Use
   .surface-separate plus one material, one attachment and one elevation where
   the reader needs a separate plane that is not a content panel — an
   emphasis panel or a comparison plane. Never compose
   axis classes or .surface-emphasis onto .surface-panel: this file loads
   later, so either would silently replace part of the panel. This module
   offers no emphasis for a full-panel link; the repository README (Hover,
   press, focus) records that a persistent emphasis on one is overwritten
   while it is hovered or focused and needs the consumer's own composition.

   It introduces no token and no palette value. Space, type, color, radius,
   motion and shadow resolve through the foundation, apart from the registered
   literals below. There is no blur here and no blur token: the one value
   every blurring material uses is the panel recipe's, authored in
   surface-panel.css.

   CATALOG

   SURFACE AXES
     meaning         a separate surface selected on three independent axes:
                     material (fill, blur, edge), attachment (corners) and
                     elevation (depth cue); none determines another
     population      a separate plane that is not a content panel: an
                     emphasis panel, a comparison plane, a section synthesis
                     (surface-document.css: panel material, free, flush), an
                     overlay or an independently scrolling region
     owner           this module; the page material, panel material, free
                     attachment and raised elevation are authored in
                     surface-panel.css and shared by selector grouping
     reuses          --surface-glass, --line-1, --radius-lg, --radius-pill,
                     --shadow-md, --space-5
     variation       material page | panel · attachment free | top | bottom |
                     full-width | chip · elevation flush | raised
     exclusions      content panels take .surface-panel; ordinary flow,
                     subordinate grouping and quotation take no surface
     example         a flush emphasis plane on the page material with free
                     corners
     counterexample  a raised, blurred card wrapped around an ordinary
                     subsection

   ATTACHMENT
     meaning         which edges a surface is joined to; it governs CORNER
                     TREATMENT ONLY — radius on the free corners, none where
                     every edge is joined
     population      free-standing surfaces; surfaces joined at the top or the
                     bottom edge; surfaces joined along their full width; chips
     owner           this module
     reuses          --radius-lg, --radius-pill
     variation       .surface-attach-free · .surface-attach-top (hangs from
                     the top: the bottom corners round) · .surface-attach-bottom
                     (rises from the bottom: the top corners round) ·
                     .surface-attach-full-width (no corner rounds) ·
                     .surface-attach-chip (pill corners)
     exclusions      no fill, blur, edge or shadow; an attached surface here
                     keeps all four edges. surface-shell's navigation panel
                     realizes the same corner rule pattern-locally and also
                     drops the border on its joined edge; it does not consume
                     these classes
     example         a drawer hanging from the top edge rounds its two bottom
                     corners, whatever its material and elevation
     counterexample  a full radius on that drawer, which rounds a joined edge
                     and detaches it from what it hangs from

   DISCLOSURE
     meaning         a trigger and the region it expands
     population      a details element whose summary names what it reveals;
                     or, where the host must keep a region it controls, a
                     button carrying .surface-disclosure-trigger whose
                     aria-expanded and aria-controls state that region. The
                     controlled trigger takes the summary's grammar — label,
                     indicator, rotation, hover and focus — and none of the
                     enclosure's geometry: its host keeps padding, placement
                     and the region's own surface
     owner           this module
     reuses          the panel material, free attachment and flush elevation
                     for its enclosure; operative-label metrics for the
                     trigger; --space-6 inset, --space-4 gap; --fg-1 at 2px,
                     --space-1 out, for the trigger's keyboard-focus outline
     variation       none per artifact
     exclusions      the region takes no second surface; the trigger joins
                     neither the attention edge nor the foreground-bound link
                     treatment: its hover and focus are its own
     example         a census kept behind a "measured census" trigger; a
                     diagram's legend behind a "legend" trigger on a small
                     canvas
     counterexample  a summary styled as a compact action, or a heading
                     standing in for the trigger; a plus or minus sign
                     standing in for the indicator

   CONTENT EMPHASIS
     meaning         "this deserves attention": persistent, assigned by the
                     content's role, and not interactive. It is not elevation,
                     not containment and not interaction — hover and focus are
                     transient and border-only; emphasis stays at rest
     population      .surface-emphasis for a whole unit (a perimeter and a
                     soft bloom, present at rest, drawn with PERIMETER PAINT
                     in its accent); .surface-emphasis-rail for a
                     bounded passage in the reading flow (a vertical accent
                     rule and an inset), which in a document is the authorial
                     callout; .surface-emphasis-chip for the marker that names
                     why — on a surface with no accent of its own, such as a
                     section synthesis panel, the chip carries the accent
                     modifier itself, so only its border takes the accent and
                     the panel gains no perimeter and no bloom
     owner           this module
     reuses          --ask-emphasis-magenta, --ask-emphasis-violet,
                     --ask-emphasis-cyan; operative-label metrics for the chip;
                     --fg-1 for the chip's words; the bordered label's box and
                     edge for the chip
     variation       the accent (.surface-emphasis--magenta | --violet | --cyan)
                     supplied by the content's role; the dose per theme
     exclusions      no hover, press, focus or animation; the chip's words stay
                     in the primary text role and the accent stays on the
                     border; use the least elaborate treatment that expresses
                     the distinction
     example         a finding marked "read this first", its accent on the
                     perimeter and the chip border
     counterexample  a hard directional drop shadow with no visible border,
                     or chip words set in the accent

   PERIMETER PAINT
     meaning         how a governed color is drawn on a separate surface's
                     perimeter, present at rest: a 1px edge in the color, a
                     thin ring in light, and a soft bloom outside the edge. It
                     draws a meaning another owner assigns and asserts none of
                     its own: no emphasis, interaction, urgency or authority
     population      .surface-perimeter on a separate surface, its color in
                     --surface-perimeter-color, and the content-emphasis
                     panel, .surface-emphasis, by selector grouping, in its
                     accent. Two governed meanings draw it: content emphasis,
                     in magenta, violet or cyan, and Review Semantics'
                     decision record shown as a panel, in its role's value
     owner           this module: the edge, the ring, the bloom's blur and
                     spread, and the dose per theme, which is the emphasis
                     dose (--surface-emphasis-ring, --surface-emphasis-bloom).
                     The governing meaning owns the color and binds it, as
                     content emphasis binds its accent and Review Semantics
                     its role values
     reuses          the emphasis dose; --fg-3 for the edge of a perimeter no
                     meaning colors, which draws no ring or bloom
     variation       the color, set only by a governed meaning; the dose per
                     theme
     exclusions      no hover, press, focus or animation, and no fill or
                     wash: the surface keeps its material. Never a color
                     chosen for decoration and never a general accent: a green
                     or red perimeter arrives only with a review record, and
                     content emphasis keeps its three accents. A bloom arrives
                     only with a governed color: with none bound, the edge is
                     the neutral --fg-3 and nothing blooms. The color does not
                     inherit, so a surface inside an emphasis panel or a
                     record takes none of theirs. It is not the attention edge
                     (README, Hover, press, focus), which is transient and
                     draws no bloom
     example         a THESIS panel in the emphasis magenta and an Accepted
                     record in the earned green: one perimeter, two meanings
     counterexample  a red perimeter chosen for a warning's look; a record's
                     perimeter repainted on hover

   BORDERED LABEL
     meaning         a short inert label inside a thin border: a word that is
                     read, never operated. One box for every such label, so a
                     label measures the same wherever it appears and only its
                     meaning changes its color
     population      .surface-bordered-label, neutral by default: a status
                     word such as DRAFT. Six governed meanings take the same
                     box: the emphasis chip, by selector grouping in this file,
                     its border the emphasis accent; Review Semantics' review
                     mark, which carries the class, its border the review
                     role's value; the outcome label that heads Review
                     Semantics' decision record shown as a panel,
                     .review-record-outcome, which carries the class, its
                     border the record's role value; and, outside a
                     multi-axis review annotation, Spectral State's
                     .state-label, Evidence State's .evidence-label and
                     Criterion Assessment's .assessment-label, which carry
                     the class and name their axis and role in their words
                     (State // Held, Evidence // Supported, Assessment //
                     Caution), each border the role's value
     owner           this module: display, size, baseline, wrapping, padding,
                     corners, the 1px layout border, the per-theme edge
                     reinforcement, the clearance that keeps the reinforcement
                     visible, and the neutral border. The words take the
                     composing text role (.doc-label in a document, the chip's
                     operative-label metrics); the border color comes from the
                     composing meaning, through --surface-bordered-label-color
     reuses          --fg-3 for the neutral border; --radius-sm; --space-2
     variation       the border color, set only by a governed meaning; the
                     edge dose per theme
     exclusions      no fill, wash, bloom, depth shadow, hover, press, focus
                     or animation; this treatment takes --radius-sm (8px),
                     not --radius-pill; corner shape alone assigns no
                     interaction. Never a color chosen for contrast or
                     decoration: a neutral label stays --fg-3, and a color
                     arrives only with the emphasis chip, a review mark, a
                     decision record's outcome label or a keyed state,
                     evidence or assessment label whose words name its axis
                     and role.
                     Spectral State's neutral, Evidence State's not yet
                     testable and Criterion Assessment's unassessed take no
                     keyed label. Evidence dots,
                     state squares and the not-yet-testable rail are not
                     bordered labels, and the status badge (surface-shell) is
                     an unbordered note
     example         a neutral DRAFT; a THESIS chip in the emphasis magenta; a
                     PROPOSED review mark in its role value; STATE // HELD in
                     the held role's cyan — one box, four meanings
     counterexample  a review module or a consumer setting its own padding,
                     edge width or corner for a label; a bordered label used as
                     a button

   LABELED RANGE
     meaning         the exact run of blocks one label governs: a scope rail
                     in the outer margin, beginning beside the label at the
                     range's head and ending after its last block, so a reader
                     sees where the label's scope starts and ends without
                     inferring it from placement
     population      .surface-labeled-range on the element that holds the run,
                     or on one whole list item, which is then the range itself
                     (the item host, below). Neutral by default: its first
                     child is the label itself, a
                     neutral bordered label such as DRAFT, over the blocks it
                     marks; a neutral range claims no judgment, and content
                     inside it keeps its own marks. Governed meanings set its
                     color: Review Semantics' annotation range, whose
                     first child is the row naming its one review judgment,
                     and whose rail takes that judgment's value; Spectral
                     State's and Evidence State's keyed range, whose first
                     child is a keyed state or evidence label, and whose rail
                     takes that label's role value; and Criterion
                     Assessment's bounded assessed range, whose first child
                     is its assessment record, headed by a keyed assessment
                     label and naming the criterion, direction, scope and
                     basis, and whose rail takes that assessment's value
     owner           this module: the rail's stroke, its lane outside the
                     content edge, its reach past the range's first child, the
                     label or its row, and its last block (whose outer margins
                     it removes, so the rail ends just past them), the buffer
                     between two ranges and at the edge of a list that opens
                     or closes on an item host, the item host's lane and inset
                     ends, and the neutral color. The run's own
                     flow is its composition's (.doc-group in a document); the
                     color comes from the composing meaning, through
                     --surface-labeled-range-color, and that color's paint as
                     a rail (RAIL PAINT) through --surface-labeled-range-paint
     reuses          --fg-3 for the neutral rail; --space-1, --space-3 and
                     --space-5
     variation       the rail color, set only by a governed meaning, with its
                     color's rail paint; for an item host, the list's
                     indentation, which the host names through
                     --surface-labeled-range-indent
     exclusions      draws nothing on the range's own box and moves nothing it
                     holds sideways: no inline margin, no padding, border,
                     offset, transform, indent, fill or wash. Never a rail at
                     the content edge, which belongs to the passage roles
                     (quotation, preformatted block, callout). Never nested in
                     another range, and never inside a list item, a railed
                     passage, a separate surface or panel, a hierarchy level
                     or an annotation note, whose own edges or markers sit
                     where its rail would; a list inside a range keeps its
                     markers inside its own padding. An item host is the item
                     itself, never a block inside it, and an item of a list in
                     the flow, never of a list inside another item; like any
                     range it takes no content role, so its words sit in its
                     own blocks. No ornament at the rail's ends: no foot, cap,
                     dot or arrow. Never the cue for words inside a block:
                     that is the scope underline. Colors other than neutral,
                     the governed review value and a keyed label's role value
                     are not admitted: emphasis keeps its own rail, a
                     comparison table's assessment its cell-local rail, and
                     not yet testable's lavender-gray is never a scope rail
     example         two paragraphs beside a magenta scope rail under
                     PROPOSED, then one beside a green rail under ACCEPTED; a
                     quotation and the sentence that reads it, beside one
                     scope rail that runs outside the quotation's own violet
                     rail; two judged items of one list, each beside its own
                     rail in that same lane, outside the bullets; an
                     unsettled architectural question beside a cyan rail
                     under STATE // HELD
     counterexample  a review color on a paragraph's own rail; a scope rail
                     with no label at its head; one annotation range over
                     blocks whose judgments differ

   RAIL PAINT
     meaning         how a governed color is painted as a rail, on each
                     field: the same color drawn as the same rail on the same
                     field takes the same paint, whichever meaning draws it
     population      the rails a governed meaning colors: the labeled range's
                     scope rail (this module) and the comparison table's
                     assessment rail (surface-document.css). One paint for
                     each color both of them draw, keyed by the color and not
                     by any meaning that draws it: --surface-rail-paint-green,
                     --surface-rail-paint-yellow and --surface-rail-paint-red.
                     The meaning-named --surface-rail-paint-earned and
                     -deflated are aliases of green and red: each reads its
                     color's paint and carries no value of its own. The
                     -structural alias, which read yellow, is retired with
                     structural's move to violet (2026-11-25)
     owner           this module: each paint and its dose. The semantic
                     systems own each color. The composing meaning
                     binds a role to its color and to that color's paint:
                     Review Semantics for an annotation range, Spectral State
                     and Evidence State for a keyed range, Criterion
                     Assessment for an assessment's table rail and its
                     bounded assessed range. Each rail's composition
                     keeps its place, length, gap and containment
     reuses          the rail's own color, through currentColor
     variation       none today: every color takes none, the plain 2px stroke,
                     on both fields. Each paint stays the one place a measured
                     dose for its color would be added
     exclusions      paint only: no width, place, length or gap, and nothing
                     that moves text. A rail only: never a bordered label's
                     edge, an emphasis perimeter or bloom, the hierarchy rail,
                     the not-yet-testable dashed rail, a scope underline, a
                     diagram's stroke, a dot or a square. It assigns no
                     color: a meaning paints only colors it is already
                     admitted. A rail in a color with no paint here, such as
                     a passage rail's emphasis accent, a range's magenta,
                     cyan, violet or orange, or a neutral, keeps the
                     plain stroke; a paint for one of those colors would bind
                     every rail drawn in it. A meaning binds the color's
                     paint, never an alias: an alias is read-only, and
                     setting one reaches no rail
     example         a declined range's scope rail and an adverse
                     assessment's rail: one red, one paint, in two places;
                     caution's yellow the same plain stroke beside a summary, a
                     value field and the key, and beside a partial state
                     range
     counterexample  a meaning setting its own dose or theme branch for a
                     color this module paints; the bordered label's edge
                     recipe copied onto a rail; a rail's dose that follows a
                     .theme-dark subtree while its color follows the root

   FILL PAINT
     meaning         how a governed color is painted as a filled shape or
                     field: the shape at 100% of its color, its boundary in
                     the same color, and the ink of any text set on it. The
                     same color filled takes the same ink, whichever meaning
                     draws it
     population      role- and state-bearing filled shapes and fields: a
                     state node, an evidence-bearing shape, an assessment
                     node, a decision node in a diagram, a function's part
                     or field, a key's filled specimen. One ink per fill
                     color, keyed by the color:
                     --surface-fill-ink-on-yellow, -on-green, -on-orange,
                     -on-cyan, -on-red, -on-brown, -on-violet, -on-magenta,
                     -on-white and -on-lavender; and the neutral filled
                     shape, --surface-fill-neutral, --surface-fill-neutral-edge
                     and --surface-fill-ink-on-neutral
     owner           this module: the recipe (fill, boundary, ink), each ink,
                     the neutral shape's paint and every theme exception. The
                     semantic systems own each color and bind each role to its
                     color's ink: Spectral State (--state-*-ink), Evidence
                     State (--evidence-*-ink), Review Semantics
                     (--review-*-ink), Criterion Assessment
                     (--assessment-*-ink) and Three Functions
                     (--function-*-ink). The composing surface or engine owns
                     the shape: its geometry, stroke width, cutouts, layout
                     and emphasis
     reuses          the two ink families, --ask-fg-light (#6A637F) and
                     --ask-lavender-ask (#D4C6E1), each at the lightness ASK
                     selected for its fill (2026-11-25): the family's own
                     value on cyan, brown, lavender and the neutral shape,
                     and a registered lighter or darker step of the same hue
                     and saturation on every other fill; --ask-surface for
                     the neutral fill
     variation       one declared theme exception and nothing else: the
                     neutral shape is --ask-surface with a white edge in
                     light and the lavender in dark. Every ink is the same in
                     both themes, as the colors are, magenta's included. The
                     root theme decides, as it does for the colors; a
                     .theme-dark subtree is not a field this module paints
     exclusions      the fill-ink family is an ink for text set on an opaque
                     filled shape and nothing else: never reading text, an
                     outlined label or emphasis chip, a translucent wash, a
                     marker, a rail or a perimeter panel's words, which keep
                     the theme's text roles. A marker (MARKER, below: an
                     evidence dot, a state square, a key's swatch), chip,
                     rail, bordered label,
                     range, underline or sequence node is not a filled shape:
                     it takes no fill paint or ink and keeps its own paint,
                     solid or not. A decision record shown on its own as a
                     panel is not a filled shape: it takes PERIMETER PAINT
                     and keeps its material. The interactive
                     spine's and radial's state marks take this paint; a
                     radial mark that asserts no state is structure, not a
                     filled shape, and keeps its engine's own neutral wash,
                     which this module does not govern. A
                     structural diagram node (diagram-static-H, -V, -SEQ,
                     -FLOW) keeps its own neutral paint. A geometric cutout is
                     the composing shape's own, drawn as a hole, never painted.
                     A filled shape's emphasis (hover, selection) is never a
                     step in its fill. Lavender-gray has no ink and takes no
                     fill paint: its one role, Evidence State's not yet
                     testable, is drawn hollow, dashed and labeled
     example         a held node, an open-question decision node and a
                     judicial part: one cyan, one ink, three meanings
     counterexample  a meaning restating an ink for its own role; a semantic
                     fill at 30% beside one at 100%; text on a fill in the
                     theme foreground; a neutral node drawn in --fg-1, the
                     foreground's color rather than the neutral shape's paint

   SCOPE UNDERLINE
     meaning         the exact words inside a block that one label governs:
                     one solid line under them, so a reader sees which words a
                     record concerns without a field painted behind them. The
                     inline counterpart of the labeled range
     population      .surface-scope-underline on the inline element that holds
                     the words. Neutral by default; a neutral underline claims
                     no judgment. One governed meaning sets its color: Review
                     Semantics' passage mark, which names the note recording
                     its judgment and takes that judgment's value
     owner           this module: the line's style, weight and place, its
                     run through descenders, the words' unchanged color, the
                     absence of fill, padding and corner, and the neutral
                     color. The color comes from the composing meaning,
                     through --surface-scope-underline-color
     reuses          --fg-3 for the neutral line
     variation       the line color, set only by a governed meaning
     exclusions      the words keep their color, weight and box: no text
                     color, fill, wash, padding, corner, border or rail. One
                     solid line: never dotted, dashed, wavy or doubled, and
                     never thinned, raised or lightened toward a text link's
                     line. Inert: no cursor, hover, focus or other interactive
                     behavior; never on a link or a control and never composed
                     onto one, while a link inside the words keeps its own
                     line and its states. Never the cue for whole blocks: that
                     is the labeled range
     example         "two props or fewer" underlined in the emphasis magenta,
                     its CORRECTION REQUESTED note after the paragraph
     counterexample  a tinted field behind the words; the words recolored; an
                     underline that brightens on hover; a text link's 1px line
                     reused to mark scope

   MARKER
     meaning         a small inert shape beside the visible label that names
                     its role: one anatomy wherever it appears, so a dot, a
                     square or a hollow dot measures the same in a document,
                     a key and a legend, and only its meaning changes its color
     population      .surface-marker with one shape and one size: the shape
                     .surface-marker--dot (the default), --square, or --hollow,
                     a hollow dashed dot; the size .surface-marker--sm (the
                     default, 10px, beside a label in the reading flow), --md
                     (12px, a key's or a legend's row) or --lg (30px, a key's
                     swatch). Neutral by default. Review Semantics' evidence
                     and state marks draw the same anatomy on their own
                     ::before at the small size, reading this module's marker
                     properties, so their markup carries no marker class
     owner           this module: the box, its three sizes, the dot's and the
                     square's corners, the hollow marker's dashed edge and
                     the neutral color. The color comes from the composing
                     meaning, through --surface-marker-color; which shape an
                     axis takes is the composing meaning's (Review Semantics
                     gives evidence the dot, state the square and not yet
                     testable the hollow dot)
     reuses          --fg-3 for the neutral marker
     variation       the shape and the size, by modifier; the color, set only
                     by a governed meaning
     exclusions      never alone: the visible label beside it names its role,
                     and color never carries it alone. No text, ink, shadow,
                     bloom, hover, press, focus or cursor, and never a control
                     or a focusable element. Never also a bordered label, a
                     chip, a filled shape (FILL PAINT), a rail, a range, an
                     underline, a sequence node or an element of an
                     annotation composition, whose mark draws its own marker.
                     A hollow marker is never filled and never square, and
                     lavender-gray is drawn only as a hollow marker, never
                     filled. A bare data-state or data-evidence opts nothing
                     in
     example         a key's 30px green swatch beside "state-earned"; a 10px
                     square beside EARNED in a document annotation: one
                     anatomy at two sizes
     counterexample  a hollow swatch drawn larger than the filled swatches
                     beside it because its dashed edge sits outside its box;
                     a colored dot standing for a role with no label beside it

   THE BORDERED LABEL'S EDGE. An apparent 2px edge in light and the plain
   1px border in dark: the fixed 1px border plus a same-color, zero-blur
   reinforcement of 1px in light and 0px in dark, the same layer drawing
   nothing. One recipe for the whole family, review marks, keyed state,
   evidence and assessment labels, neutral labels and emphasis chips alike, calibrated
   by field: a 1px line in a bright color reads strongly on the dark ink and
   quietly on the light lavender, so the light field takes the stronger edge.
   The colors are the same in both themes; only the edge's
   strength differs. The reinforcement is paint, not layout, so the
   box measures the same in both themes and nothing moves when the theme
   changes. Because it paints outside the border, a clipping box (a
   scrolling table, a scrolling block) would cut it where a label meets its
   edge, and that side would fall back to the bare 1px border. The label
   therefore keeps 1px of inline margin, the light dose, in
   both themes: on its inline sides the reinforcement lands inside the
   label's own margin box, so a label at the start of a table's first column
   or the end of its last, scrolled fully into view, keeps its whole edge.
   Above and below, the composing box keeps the clearance, as the document
   table's cells do with their block padding; the label takes no block
   margin, which would change the line it sits on. On a
   surface with an accent of its own the chip's edge is heavier than the
   panel's perimeter in light (2px against 1.5px) and equal to it in dark
   (1px each); a compact label and a whole unit's perimeter work at
   different scales, and neither is adjusted to match the other.

   THE LABELED RANGE'S LANE. Every passage rail in the register sits at the
   content edge and insets its text. A range's scope rail sits outside that
   edge, in the outer margin, so it is never read as a passage's own rail: a
   quotation inside a range keeps its violet rail, and the scope rail runs
   beside it, outside, as it does beside a callout of its own color. The label
   at its head names the range, and the rail ends with the last block it
   covers; two ranges in a row keep the passage buffer between them, so their
   rails never join, even where they share a color. The stroke is 2px, the
   passage rails' width: one straight line with plain ends, its outer edge
   14px and its inner edge 12px (--space-3) outside the content edge. It
   extends 4px (--space-1) above the range's first child, its label or the row
   that holds it, and below its last block; the range removes those two
   children's outer margins, so the rail ends just past them. It is paint on
   the range's ::before, so no line of the range's content moves sideways; the
   buffer between two ranges moves what follows down. The host keeps the lane:
   at least 14px of unclipped space to the left of the content edge, and
   --space-5 (24px) of side padding is recommended at the narrowest page
   width, so the rail stays clear of the screen edge. A scrolling or
   paint-contained box clips the lane at its own edge. In a document table a
   range hangs into the gutter of the column before it; the first column has
   none, so a table with a range in its first or only column keeps the lane in
   its own box: .doc-table-scroll--range-lane (surface-document.css) reaches
   the lane's width into the page's margin and pads it back, so no column
   moves and the rail sits where a range's in the flow does.

   THE ITEM HOST. One whole list item may itself be the range. It keeps its
   list semantics: display: list-item, its marker, its indentation and its
   place in the list's order. Its rail is the same 2px stroke in the same
   lane as every other scope rail, reached back across the list's
   indentation and then 14px outside the content edge, so it clears the
   marker and lines up with the rail of a range in the flow beside the list.
   That indentation is --surface-labeled-range-indent, 24px (--space-5) by
   default; a list indented otherwise sets it. The rail's ends sit 2px inside
   the item instead of 4px beyond it, so two item hosts in a row never join,
   even in one color, and the list keeps its own item spacing between them:
   no passage buffer opens between the items of one list. The marker sits on
   a line of the item's own font, which can hold the first block a few pixels
   below the item's top, so the rail may begin just above the label. A list that opens
   or closes on an item host keeps the 24px passage buffer from a range, or
   from another such list, beside it, whether the list stands directly
   beside it or is the first or last child of one block that wraps it. A
   deeper wrapper is not reached; a host that nests its lists deeper
   composes its own buffer.

   THE RAIL'S PAINT. A paint is a dose with no color of its own: a
   zero-blur box-shadow layer, or none. The rail that takes it sets its own
   color and draws both its 2px stroke and the paint in that color, so a
   paint can never drift from its rail's color. Each paint is named by the
   color it is drawn in, as each ink is named by the fill it is set on (THE
   FILL'S PAINT); the names earned and deflated are only aliases of green
   and red, and structural's alias is retired. Every paint is none: since
   Spectral State v1.2 a color takes one value in both themes, and in it the
   plain 2px stroke reads on the light lavender and the dark ink alike,
   caution's yellow included. Until then caution's rail took
   a 1px same-color ring on the light field, answering Spectral State's
   deeper light yellow, which as a bare rail all but disappeared there; that
   dose is retired with the value it answered, and the rail paint no longer
   reads a root's data-surface-field declaration, which selected it (the
   declaration keeps its other readers). A paint of none
   leaves its rail with no shadow at all, as the labeled range's contract asks
   of every color it admits. A dose added here later must be measured on the
   field it answers, and would reach every rail drawn in its color, the scope
   rail included. criterion-assessment.html draws the three assessment rails
   as they ship. Under forced colors the browser gives the stroke a system
   color.

   THE FILL'S PAINT. A filled shape takes its color at 100%, its boundary
   in the same color unless the composing meaning claims the outline for
   another meaning (Three Functions gives function the fill and state the
   outline), and any text on it in its color's ink. The inks are two
   families, each held to its own hue and saturation: the theme
   foreground's light value, #6A637F, on yellow, green, orange, cyan, white
   and lavender, and the lavender, #D4C6E1, on red, violet, brown and
   magenta. ASK selected each ink's lightness on its fill by rendered
   comparison, in both themes (2026-11-25): a lighter step of #6A637F on
   yellow, green and white, a darker one on orange, and a lighter step of the
   lavender on red, violet and magenta; cyan, brown and lavender keep their
   family's own value. The set was chosen to read as one balanced family, not
   to a contrast target, and its measured ratios differ from fill to fill; a
   new fill joins only through the same rendered comparison. Magenta's ink is
   the same in both themes; the dark-only high-contrast ink it took until
   then is retired. The neutral shape is
   the static diagrams' own node in light, --ask-surface inside a white edge,
   and the lavender in dark, its ink #6A637F in both; it is a paint of its
   own, not --fg-1, which is a foreground and would leave the light neutral
   node darker than every other shape. The recipe is two
   classes and a modifier: .surface-fill on the shape, which reads --surface-fill-color and,
   where the outline is claimed, --surface-fill-edge; and .surface-fill-ink on
   text set on it, which reads --surface-fill-ink. .surface-fill--neutral
   sets all three for the neutral shape. A semantic system binds a role to its
   color and that color's ink; it sets no ink of its own. An exporter reads
   the resolved paint from the page it exports, or resolves the same tokens;
   it carries no copy of an ink.

   THE SCOPE UNDERLINE'S PLACE. One solid 2px line, 0.36em below the
   baseline, drawn straight through descenders (no skip-ink), in the full
   value of the composing meaning. A text link's own line
   (surface-text-link.css) is 1px, at half its value at rest and full on
   hover, 0.22em below the baseline and broken at descenders, and its
   keyboard focus is a 2px foreground line 2px below the baseline. The two
   lines differ in weight, place and continuity at rest, and each keeps its
   place while a link is hovered or focused. A link inside underlined words
   keeps its own line above the scope line, which runs on under the whole
   phrase. At body leading the line can paint just past the line box: it is
   paint, not layout, so no line of text moves, and what follows the words
   keeps its own clearance (Review Semantics gives a note in a list item its
   attachment space).

   THE MARKER'S BOX. One empty border-box square, so a hollow marker's 2px
   dashed edge sits inside its size and a filled and a hollow marker of one
   size measure the same. The three sizes are the ones each place draws: 10px
   beside a label in the reading flow, 12px on a key's or a legend's row and
   30px for a key's swatch. A dot's corner is 50%, a circle; a square keeps a
   2px corner, which softens it without reading as a dot. A filled marker is
   its color at 100%, with no edge of its own; where its color is its own
   field's, such as Spectral State's neutral or Three Functions' executive,
   the composing surface may draw one 1px solid line around it, inside its
   box. A hollow marker is a transparent box inside a 2px dashed edge in its
   color: Evidence State's not yet testable draws it. A flex row neither
   stretches nor squeezes a marker, and it sits on the middle of the line of
   text beside it. Review Semantics' evidence and state marks keep their own
   ::before and read its size, corners and dashed edge from the custom
   properties this module declares (--surface-marker-size-sm, -md and -lg,
   --surface-marker-corner-dot and -square, --surface-marker-hollow-edge), so
   a document's marks and a key's swatches are one anatomy and no existing
   markup changes.

   THE EMPHASIS DOSE. The themes are deliberately not numerically equal,
   because equal numbers do not read as equal emphasis: light has an apparent
   1.5px edge (the 1px border plus a 0.5px zero-blur ring, which grows the edge
   without growing layout) and a 28% bloom; dark has a 1px edge and a 50%
   bloom. The dark dose applies under an explicit dark theme, a .theme-dark
   subtree and an automatic dark theme.

   REGISTERED LITERALS — no token expresses these values
     1px, 2px              surface edge and accent-rail widths
     0.5px, 0              the emphasis ring, light and dark
     28%, 50%              the emphasis bloom alpha, light and dark
     70%                   the emphasis ring's accent mix
     22px 1px              the emphasis bloom's blur and spread
     -90deg                the closed disclosure indicator's rotation
     1                     the disclosure indicator's leading
     2px                   the bordered label's block padding
     1px, 0                the bordered label's edge reinforcement, light and
                           dark: an apparent 2px edge, and the plain 1px border
     1px                   the bordered label's inline margin, the light dose
     calc(100% - 2px)      the bordered label's widest box: its container less
                           its two 1px margins
     2px                   the disclosure trigger's focus-outline width
     2px                   the labeled range's scope-rail stroke, and the width
                           of the ::before that draws it; with --space-3 it
                           sets the rail's lane, 14px outside the content edge
     2px                   the item host's rail ends, inside the item
     rgba(255, 255, 255, 0.90)  the neutral filled shape's edge in light: the
                           static diagrams' own line, diagram-static-H
                           --diagram-line, restated here for shapes that do
                           not load diagrams.css
     2px, 0.36em           the scope underline's thickness and its offset
                           below the baseline
     10px, 12px, 30px      the marker's three sizes: beside a label, on a key's
                           or a legend's row, and a key's swatch
     50%, 2px              the marker's corners: the dot's (a circle) and the
                           square's
     2px                   the hollow marker's dashed edge
     hsl(255.0000 12.3894% 51.0988%), hsl(255.0000 12.3894% 54.6289%),
     hsl(255.0000 12.3894% 25.4694%), hsl(255.0000 12.3894% 53.9877%)
                           the fill inks on yellow, green, orange and white:
                           #6A637F's hue and saturation at the lightness ASK
                           selected for each fill (THE FILL'S PAINT)
     hsl(271.1111 31.0345% 88.0838%), hsl(271.1111 31.0345% 84.9231%),
     hsl(271.1111 31.0345% 91.9618%)
                           the fill inks on red, violet and magenta: the
                           lavender's hue and saturation at the lightness ASK
                           selected for each fill

   LIMITS
     - Hover and focus colors on the disclosure trigger depend on the
       source order stated above; a consumer that restates one of them
       restates all three in the same order.
     - Under prefers-reduced-motion: reduce the indicator changes state
       without animating.
     - The trigger's focus outline is drawn --space-1 outside the summary,
       inside the disclosure's --space-6 inset; a consumer that clips that
       band hides it.
     - The labeled range's scope rail is its ::before. A consumer that draws
       its own ::before on a range replaces the rail. A host with less than
       14px of space left of the content edge, or a clipping box at the
       content edge, cuts it. The rail is drawn on the left: a right-to-left
       document is not yet served.
     - The rail's color for an annotation range, a keyed range or a bounded
       assessed range comes through :has(). A browser without :has() draws the neutral rail beside
       the colored label. The buffer at a list's edge comes through :has()
       too: without it, an item host's rail can meet a neighboring range's. It counts
       siblings, so a wrapper laid out beside its neighbor, a grid or flex
       column, takes the margin too; a host that sets such lists side by side
       composes its own spacing.
     - CSS cannot read a list's indentation, so the item host's rail reaches
       back by --surface-labeled-range-indent: a list indented otherwise that
       does not set it puts its item rails out of the lane.
     - The scope underline is text decoration, so it runs under everything
       inline inside the words; an inline element that draws its own line, a
       text link, draws it beside the scope line. The 0.36em offset follows
       the font's metrics, so the line sits a little differently in another
       family.
     - Perimeter paint's bloom is a box-shadow: a clipping box around the
       surface, or a neighbor painted over it, cuts the bloom. Under forced
       colors the browser drops the bloom and gives the edge, and a decision
       record's outcome label's border, a system color, so the record's
       outcome is carried by its label's words. The perimeter takes the
       emphasis dose; a theme the foundation does not declare keeps the light
       dose. The color's non-inheritance is an @property registration: a
       browser without @property lets it inherit, so an unbound perimeter
       inside a colored one takes that color.
     - A filled marker is a background. Where a browser suppresses
       backgrounds (forced colors, a print without backgrounds) it may not
       paint, and the label beside it still names the role; a hollow marker's
       dashed edge is a border and still draws.
   ========================================================================= */

/* ---- Surface axes ----------------------------------------------------- */

/* Material, free attachment and raised elevation are authored in
   surface-panel.css. What follows is what the panel recipe does not select. */

/* ATTACHMENT — corners only. */
.surface-attach-top        { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.surface-attach-bottom     { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.surface-attach-full-width { border-radius: 0; }
.surface-attach-chip       { border-radius: var(--radius-pill); }

/* ELEVATION — flush. Absence of a shadow is not deficient elevation. */
.surface-elevation-flush { box-shadow: none; }

/* A SEPARATE SURFACE — the plane itself. Its material, attachment and
   elevation are chosen with the axis classes above. */
.surface-separate { padding: var(--space-5); }

/* ---- Disclosure ------------------------------------------------------- */

/* The enclosure composes the axes: .surface-disclosure +
   .surface-material-panel + .surface-attach-free + .surface-elevation-flush. */
.surface-disclosure {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
}
/* The trigger's grammar, shared by the summary of a details host and a
   controlled trigger. */
.surface-disclosure > summary,
.surface-disclosure-trigger {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: var(--fw-light);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-2);
}
.surface-disclosure > summary {
  list-style: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
/* A controlled trigger is a native button: its own chrome is reset, and its
   host supplies any surface around it. */
.surface-disclosure-trigger {
  appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-align: start;
}
.surface-disclosure-trigger > .surface-disclosure-label { flex: 0 1 auto; min-width: 0; }
.surface-disclosure > summary::-webkit-details-marker { display: none; }
/* The label is a real flex item so a long label can shrink and wrap. It
   shrinks and does not grow: justify-content already places the indicator at
   the trailing edge. */
.surface-disclosure > summary > .surface-disclosure-label { flex: 0 1 auto; min-width: 0; }
.surface-disclosure[open] > summary { color: var(--fg-1); }
.surface-disclosure > summary .surface-disclosure-indicator,
.surface-disclosure-trigger .surface-disclosure-indicator {
  flex: 0 0 auto;
  font-size: var(--fs-caption);
  line-height: 1;
  color: var(--fg-2);
  transition: transform var(--dur-2) var(--ease-out);
}
.surface-disclosure[open] > summary .surface-disclosure-indicator { color: var(--fg-1); }
.surface-disclosure:not([open]) > summary .surface-disclosure-indicator { transform: rotate(-90deg); }
/* The controlled trigger reads its state from aria-expanded, the one truthful
   source its controller keeps. */
.surface-disclosure-trigger[aria-expanded="true"] { color: var(--fg-1); }
.surface-disclosure-trigger[aria-expanded="true"] .surface-disclosure-indicator { color: var(--fg-1); }
.surface-disclosure-trigger[aria-expanded="false"] .surface-disclosure-indicator { transform: rotate(-90deg); }
/* Hover: a closed disclosure's foreground rises; an open one already rests at
   --fg-1. No border, no opacity drop, no press. */
.surface-disclosure > summary:hover { color: var(--fg-1); }
.surface-disclosure > summary:hover .surface-disclosure-indicator { color: var(--fg-1); }
.surface-disclosure-trigger:hover { color: var(--fg-1); }
.surface-disclosure-trigger:hover .surface-disclosure-indicator { color: var(--fg-1); }
/* Focus: the summary is at --fg-1, the indicator takes the emphasis magenta and
   a 2px --fg-1 outline surrounds the trigger, --space-1 out. The outline is the
   signal that always shows: an open disclosure's summary already rests at --fg-1,
   and a trigger may lead with a mark that keeps its own color.
   These follow the hover rules on purpose (load order, item 5). */
.surface-disclosure > summary:focus-visible { color: var(--fg-1); outline: 2px solid var(--fg-1); outline-offset: var(--space-1); }
.surface-disclosure > summary:focus-visible .surface-disclosure-indicator { color: var(--ask-emphasis-magenta); }
.surface-disclosure-trigger:focus-visible { color: var(--fg-1); outline: 2px solid var(--fg-1); outline-offset: var(--space-1); }
.surface-disclosure-trigger:focus-visible .surface-disclosure-indicator { color: var(--ask-emphasis-magenta); }
.surface-disclosure > .surface-disclosure-body { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .surface-disclosure > summary .surface-disclosure-indicator,
  .surface-disclosure-trigger .surface-disclosure-indicator { transition: none; }
}

/* ---- Content emphasis ------------------------------------------------- */

/* The rail: a bounded passage inside the reading flow or inside an existing
   surface. No perimeter, no bloom, no second wash. It marks attention, not a
   change of voice, so it is not quotation. In a document it is the authorial
   callout: a thesis, posed question or contrast the document states in its own
   voice (surface-document.css). surface-document.css reuses its geometry —
   width, style and inset — for the passage rail of a quotation and a
   preformatted block, but not its meaning: a quotation's rail is violet,
   represented voice, and a preformatted block's is magenta like this one.
   check-type-roles.mjs (R7) keeps the geometry equal and pins each color. On
   document text this rail is always magenta; elsewhere the violet and cyan
   modifiers below stay valid. Where surface-document.css is loaded, a rail
   inside a railed passage — a quotation, a block or another rail — draws none:
   that module's nested-rail rule removes it, so one passage keeps one rail. */
.surface-emphasis-rail {
  --surface-emphasis-accent: var(--ask-emphasis-magenta);
  border-left: 2px solid var(--surface-emphasis-accent);
  padding-left: var(--space-4);
}
/* Two rails in a row would read as one passage. A rail directly after a rail
   takes a buffer, added to whatever gap its parent supplies. */
.surface-emphasis-rail + .surface-emphasis-rail { margin-top: var(--space-5); }

/* The dose, per theme. */
:root                             { --surface-emphasis-ring: 0.5px; --surface-emphasis-bloom: 28%; }
:root[data-theme="dark"],
.theme-dark                       { --surface-emphasis-ring: 0;     --surface-emphasis-bloom: 50%; }
:root[data-theme="light"]         { --surface-emphasis-ring: 0.5px; --surface-emphasis-bloom: 28%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --surface-emphasis-ring: 0;     --surface-emphasis-bloom: 50%; }
}

/* The panel: a perimeter plus a soft bloom, present at rest, drawn with
   PERIMETER PAINT in its accent. Flush by default: an emphasized unit must be
   easier to notice, not necessarily higher. */
.surface-emphasis {
  --surface-emphasis-accent: var(--ask-emphasis-magenta);
  --surface-perimeter-color: var(--surface-emphasis-accent);
}
/* PERIMETER PAINT: a governed color on a separate surface's perimeter, at
   rest. One recipe, shared by selector grouping: the emphasis panel draws it
   in its accent, and .surface-perimeter in the color a governed meaning binds
   to --surface-perimeter-color (Review Semantics' decision record, in its
   role's value). The edge, the ring and the bloom take the emphasis dose.
   The color does not inherit: each surface binds its own. With none bound
   the edge is the neutral --fg-3, and the ring and the bloom are transparent:
   a bloom arrives only with a governed color. */
@property --surface-perimeter-color { syntax: '*'; inherits: false; }
.surface-emphasis,
.surface-perimeter {
  border: 1px solid var(--surface-perimeter-color, var(--fg-3));
  box-shadow:
    0 0 0 var(--surface-emphasis-ring) color-mix(in srgb, var(--surface-perimeter-color, transparent) 70%, transparent),
    0 0 22px 1px color-mix(in srgb, var(--surface-perimeter-color, transparent) var(--surface-emphasis-bloom), transparent);
}
/* Emphasis and elevation are separate axes: a raised emphasized surface keeps
   both rather than one replacing the other. */
.surface-emphasis.surface-elevation-raised {
  box-shadow:
    0 0 0 var(--surface-emphasis-ring) color-mix(in srgb, var(--surface-emphasis-accent) 70%, transparent),
    0 0 22px 1px color-mix(in srgb, var(--surface-emphasis-accent) var(--surface-emphasis-bloom), transparent),
    var(--shadow-md);
}

/* The accent is supplied by the content's role, never chosen decoratively.
   These bind the existing emphasis accents and create none. */
.surface-emphasis--magenta { --surface-emphasis-accent: var(--ask-emphasis-magenta); }
.surface-emphasis--violet  { --surface-emphasis-accent: var(--ask-emphasis-violet); }
.surface-emphasis--cyan    { --surface-emphasis-accent: var(--ask-emphasis-cyan); }

/* ---- Bordered label --------------------------------------------------- */

/* The edge dose, per theme, set as the emphasis dose is set. */
:root                             { --surface-bordered-label-reinforce: 1px; }
:root[data-theme="dark"],
.theme-dark                       { --surface-bordered-label-reinforce: 0px; }
:root[data-theme="light"]         { --surface-bordered-label-reinforce: 1px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --surface-bordered-label-reinforce: 0px; }
}

/* The box. One atomic inline box on the text baseline, as wide as its words
   on one line: a flex or grid parent never stretches it, and neither a flex
   row nor a table column squeezes it, so a line never breaks inside it while
   it fits. Only a
   label wider than its container wraps, inside its border, rather than
   overflow. An inline-block, not a flex box: a label may hold inline
   emphasis (strong, em), which a flex box would split into separate items
   and close up. Neutral by default; a governed meaning sets
   --surface-bordered-label-color and nothing else. The 1px inline margin
   holds the reinforcement inside the label's own margin box (THE BORDERED
   LABEL'S EDGE, above). */
.surface-bordered-label,
.surface-emphasis-chip {
  display: inline-block;
  box-sizing: border-box;
  width: max-content;
  max-width: calc(100% - 2px);
  flex-shrink: 0;
  vertical-align: baseline;
  white-space: normal;
  margin: 0 1px;
  padding: 2px var(--space-2);
  border: 1px solid var(--surface-bordered-label-color, var(--fg-3));
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 var(--surface-bordered-label-reinforce) var(--surface-bordered-label-color, var(--fg-3));
}

/* The marker that names why a unit is emphasized: the emphasis member of the
   bordered label. Two channels on purpose: the accent arrives on the border,
   where it cannot drift from the perimeter it belongs to, and the words are
   set in the primary text role. Outside an accented surface the border falls
   back to the tertiary foreground. Its box is the bordered label's. It keeps
   its own placement at the start of the unit it names (align-self), so in a
   flex row it sits at the row's start rather than on the row's baseline. */
.surface-emphasis-chip {
  --surface-bordered-label-color: var(--surface-emphasis-accent, var(--fg-3));
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: var(--fs-caption);
  font-weight: var(--fw-light);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--fg-1);
}

/* Inline emphasis inside the trigger and the chip. Scoped, so strong and em
   elsewhere keep their own styling. */
:where(.surface-disclosure, .surface-emphasis-chip) strong { font-weight: var(--fw-medium); color: var(--fg-1); }
:where(.surface-disclosure, .surface-emphasis-chip) em { font-style: italic; }

/* ---- Rail paint ------------------------------------------------------- */

/* One paint for each governed color a rail draws, keyed by the color and not
   by any meaning that draws it (RAIL PAINT and THE RAIL'S PAINT, above): a
   dose drawn in the rail's own color, or none. Every one is none, the plain
   2px stroke, in both themes. The meaning-named paints are aliases: each reads
   its color's paint and carries no value of its own. */
:root {
  --surface-rail-paint-green:      none;
  --surface-rail-paint-yellow:     none;
  --surface-rail-paint-red:        none;
  --surface-rail-paint-earned:     var(--surface-rail-paint-green);
  --surface-rail-paint-deflated:   var(--surface-rail-paint-red);
}

/* ---- Fill paint ------------------------------------------------------- */

/* One ink per governed fill color, keyed by the color and not by any meaning
   that draws it, and the neutral filled shape (FILL PAINT and THE FILL'S
   PAINT, above). Each ink is one of the two ink families, the foreground's
   light value #6A637F, hsl(255 12.3894% 44.3137%), or the lavender #D4C6E1,
   hsl(271.1111 31.0345% 82.9412%), at the lightness ASK selected for its fill
   by rendered comparison (2026-11-25); its hue and saturation stay the
   family's. Where the selected ink is the family's own value, the token is
   named. These are the fill-ink family's registered literals (REGISTERED
   LITERALS, above). */
:root {
  --surface-fill-ink-on-yellow:   hsl(255.0000 12.3894% 51.0988%);
  --surface-fill-ink-on-green:    hsl(255.0000 12.3894% 54.6289%);
  --surface-fill-ink-on-orange:   hsl(255.0000 12.3894% 25.4694%);
  --surface-fill-ink-on-cyan:     var(--ask-fg-light);
  --surface-fill-ink-on-red:      hsl(271.1111 31.0345% 88.0838%);
  --surface-fill-ink-on-violet:   hsl(271.1111 31.0345% 84.9231%);
  --surface-fill-ink-on-brown:    var(--ask-lavender-ask);
  --surface-fill-ink-on-magenta:  hsl(271.1111 31.0345% 91.9618%);
  --surface-fill-ink-on-white:    hsl(255.0000 12.3894% 53.9877%);
  --surface-fill-ink-on-lavender: var(--ask-fg-light);
  --surface-fill-neutral:         var(--ask-surface);
  --surface-fill-neutral-edge:    rgba(255, 255, 255, 0.90);
  --surface-fill-ink-on-neutral:  var(--ask-fg-light);
}
/* The one declared theme exception: the neutral shape. Every ink is the same
   in both themes, magenta's included. */
:root[data-theme="dark"] {
  --surface-fill-neutral:        var(--ask-lavender-ask);
  --surface-fill-neutral-edge:   var(--ask-lavender-ask);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --surface-fill-neutral:        var(--ask-lavender-ask);
    --surface-fill-neutral-edge:   var(--ask-lavender-ask);
  }
}
/* The recipe. The composing surface sets --surface-fill-color on the shape,
   --surface-fill-edge only where it claims the outline for another meaning,
   and --surface-fill-ink where text sits on the fill. An HTML box takes the
   background, border color and text color; an SVG shape the fill and stroke,
   and its text .surface-fill-ink. Geometry, border width and stroke width
   stay the composing surface's. */
.surface-fill {
  background-color: var(--surface-fill-color);
  border-color: var(--surface-fill-edge, var(--surface-fill-color));
  color: var(--surface-fill-ink);
  fill: var(--surface-fill-color);
  stroke: var(--surface-fill-edge, var(--surface-fill-color));
}
.surface-fill-ink { color: var(--surface-fill-ink); fill: var(--surface-fill-ink); }
.surface-fill--neutral {
  --surface-fill-color: var(--surface-fill-neutral);
  --surface-fill-edge:  var(--surface-fill-neutral-edge);
  --surface-fill-ink:   var(--surface-fill-ink-on-neutral);
}

/* ---- Labeled range ---------------------------------------------------- */

/* The scope rail: one straight stroke in the outer lane beside the label at
   the range's head and the blocks it governs, from just above the label to
   just below the last block, its ends plain. Paint only: the range takes no
   inline margin, padding or border, so nothing it holds moves sideways. The
   host keeps the lane free and unclipped (THE LABELED RANGE'S LANE, above).
   The stroke and its color's paint are drawn in the rail's color. */
.surface-labeled-range { position: relative; }
/* The rail ends just past the first and last child, not their outer margins. */
.surface-labeled-range > :first-child { margin-top: 0; }
.surface-labeled-range > :last-child { margin-bottom: 0; }
.surface-labeled-range::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--space-1));
  bottom: calc(-1 * var(--space-1));
  left: calc(-1 * (var(--space-3) + 2px));
  box-sizing: border-box;
  width: 2px;
  color: var(--surface-labeled-range-color, var(--fg-3));
  border-left: 2px solid currentColor;
  box-shadow: var(--surface-labeled-range-paint, none);
  pointer-events: none;
}
/* Two ranges in a row keep the passage buffer, so their rails never read as
   one. */
.surface-labeled-range + .surface-labeled-range { margin-top: var(--space-5); }

/* The item host: one whole list item that is itself the range. It keeps its
   marker and indentation; its rail sits in every range's lane, reached back
   across the list's indentation, and ends 2px inside the item, so two item
   hosts in a row never join and the list keeps its own spacing between them
   (THE ITEM HOST, above). */
li.surface-labeled-range::before {
  top: 2px;
  bottom: 2px;
  left: calc(-1 * (var(--surface-labeled-range-indent, var(--space-5)) + var(--space-3) + 2px));
}
li.surface-labeled-range + li.surface-labeled-range { margin-top: 0; }
/* A list that opens or closes on an item host keeps the passage buffer from a
   range or from another such list beside it: the list directly beside it, or
   the first or last child of one block that wraps it. */
.surface-labeled-range + :is(
    :is(ul, ol):has(> li.surface-labeled-range:first-child),
    :has(> :is(ul, ol):first-child > li.surface-labeled-range:first-child)),
:is(
    :is(ul, ol):has(> li.surface-labeled-range:last-child),
    :has(> :is(ul, ol):last-child > li.surface-labeled-range:last-child)) + :is(
    .surface-labeled-range,
    :is(ul, ol):has(> li.surface-labeled-range:first-child),
    :has(> :is(ul, ol):first-child > li.surface-labeled-range:first-child)) {
  margin-top: var(--space-5);
}

/* ---- Scope underline -------------------------------------------------- */

/* The exact words one label governs: one solid 2px line 0.36em below the
   baseline, straight through descenders, in the composing meaning's value.
   The words keep their color and their box, so an element that paints its
   own, such as a mark, is reset: no fill, padding or corner. Neutral by
   default; a governed meaning sets --surface-scope-underline-color and
   nothing else (THE SCOPE UNDERLINE'S PLACE, above). */
.surface-scope-underline {
  color: inherit;
  background: none;
  padding: 0;
  border-radius: 0;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.36em;
  text-decoration-skip-ink: none;
  text-decoration-color: var(--surface-scope-underline-color, var(--fg-3));
}

/* ---- Marker ----------------------------------------------------------- */

/* The marker's sizes, corners and dashed edge (THE MARKER'S BOX, above).
   Review Semantics' evidence and state marks read them on their own
   ::before. */
:root {
  --surface-marker-size-sm:       10px;
  --surface-marker-size-md:       12px;
  --surface-marker-size-lg:       30px;
  --surface-marker-corner-dot:    50%;
  --surface-marker-corner-square: 2px;
  --surface-marker-hollow-edge:   2px;
}
/* One empty border-box square beside its label: a filled dot at the small
   size by default, in the neutral color. A flex row neither stretches nor
   squeezes it. A governed meaning sets --surface-marker-color and nothing
   else; the modifiers set the shape and the size. */
.surface-marker {
  display: inline-block;
  flex: none;
  box-sizing: border-box;
  width: var(--surface-marker-size-sm);
  height: var(--surface-marker-size-sm);
  vertical-align: middle;
  border-radius: var(--surface-marker-corner-dot);
  background-color: var(--surface-marker-color, var(--fg-3));
}
.surface-marker--dot    { border-radius: var(--surface-marker-corner-dot); }
.surface-marker--square { border-radius: var(--surface-marker-corner-square); }
/* The hollow dashed dot: no fill, and its dashed edge inside its box. */
.surface-marker--hollow {
  border-radius: var(--surface-marker-corner-dot);
  background-color: transparent;
  border: var(--surface-marker-hollow-edge) dashed var(--surface-marker-color, var(--fg-3));
}
.surface-marker--sm { width: var(--surface-marker-size-sm); height: var(--surface-marker-size-sm); }
.surface-marker--md { width: var(--surface-marker-size-md); height: var(--surface-marker-size-md); }
.surface-marker--lg { width: var(--surface-marker-size-lg); height: var(--surface-marker-size-lg); }
