{# Brutalist strip — LIGHT substrate brutalist strip grammar (v0.3.2 Phase C).
   Mirror of brutalist-dark-content.j2 with substrate inversion via CSS vars:
   paper canvas + dark gradient panel + INK-SEAM-INK triple divider + dark
   ink on paper for metric values + gold seam color for accents.

   Same coordinate vocabulary as dark (geometry shared via paradigm YAML);
   only the fill routing differs. Polarity flip enables the scholar manuscript
   aesthetic while preserving exact layout-engine + parent-template contract. #}
<g clip-path="url(#{{ uid }}-clip)">
  {# (1) Paper substrate. surface_0 resolves to paper hex per variant override. #}
  <rect width="{{ width }}" height="{{ strip_h }}" fill="var(--dna-surface)"/>

  {# (2) Perimeter — dark ink hairline at 0.15 (v0.3.13 cohesion: structure
     is ink on light, never accent — matches the badge's ink perimeter).
     Reads as a faint manuscript margin on cream without dominating. #}
  <rect x="{{ strip_perimeter_inset }}" y="{{ strip_perimeter_inset }}" width="{{ strip_perimeter_w }}" height="{{ strip_perimeter_h }}"
        fill="none" stroke="var(--dna-ink-primary)" stroke-width="1" opacity="0.15"/>

  {# (3) Left rail — 6px INK bar (v0.3.13 cohesion: the brutalist scholar
     manuscript margin rule is dark ink, NOT accent — the accent role is
     reserved for the gold seam vein + status dot. Matches the badge left
     ink bar and the stats card left rail). #}
  <rect width="{{ accent_w }}" height="{{ strip_h }}" fill="var(--dna-ink-primary)"/>

  {# (4) Dark gradient brand panel — uses panel_gradient_stops defined per
     light variant. The gradient defs in brutalist-defs.j2 emits the
     {{ uid }}-panel linearGradient gated on the same presence check. #}
  <rect x="{{ strip_zones.core.brand_panel_x }}" y="{{ strip_origin_y }}"
        width="{{ strip_zones.core.brand_panel_w }}" height="{{ strip_h }}"
        fill="url(#{{ uid }}-panel)"/>

  {# (5) INK-SEAM-INK triple divider — the identity↔metrics separator, so it
     renders only when metrics are present (empty strips are identity-only, no
     dangling divider). Outer bars --dna-ink-primary; center seam --dna-seam-color. #}
  {# v0.3.13: light seam is a 2-bar INK + ACCENT (matches the prototype), NOT
     the dark 3-bar triple divider. The trailing ink bar is dropped — the cream
     cells butt directly against the accent vein. #}
  {% if metrics %}
  <rect x="{{ strip_zones.core.triple_divider_x }}" y="{{ strip_origin_y }}"
        width="{{ triple_divider_bar_w }}" height="{{ strip_h }}"
        fill="var(--dna-ink-primary)"/>
  <rect x="{{ strip_zones.core.triple_divider_void_x }}" y="{{ strip_origin_y }}"
        width="{{ triple_divider_void_w }}" height="{{ strip_h }}"
        fill="var(--dna-seam-color)"/>
  {% endif %}

  {# (6) Identity glyph slot — same pattern as dark partial. glyph_path is the
     explicit/provider glyph or the resolver's HyperWeave-sigil strip default;
     it renders in the brand panel. Empty only under ?glyph=none (suppression),
     in which case nothing renders. Glyph fill uses --dna-signal (accent) for
     visibility on the dark brand panel. #}
  {% if glyph_path %}
  {# v0.3.9 algorithmic strip glyph: identity glyph sized by ``strip_glyph_size``
     (derived in compose/resolver.py as ``strip_height * strip_glyph_ratio``),
     distinct from ornament_size which sizes the right bookend. Centers
     within the ornament's bounding box. #}
  <g data-hw-zone="brand-glyph" transform="translate({{ strip_zones.bookend.identity_glyph_x }},{{ strip_zones.bookend.identity_glyph_y }})">
    <svg viewBox="{{ glyph_viewbox }}" width="{{ strip_glyph_size }}" height="{{ strip_glyph_size }}">
      <path d="{{ glyph_path }}"{% if glyph_fill_rule %} fill-rule="{{ glyph_fill_rule }}"{% endif %} fill="var(--dna-glyph-inner, var(--dna-signal))"/>
    </svg>
  </g>
  {% endif %}

  {# (7) HYPERWEAVE identity text — paper-color (brand_text = surface_0 for
     light variants) for visibility on the dark gradient panel.
     v0.3.9: textLength + lengthAdjust shrink-to-fit when identity overflows
     the brand panel (per compute_strip_zones). Attribute lives on <text>. #}
  <text data-hw-zone="identity"
        x="{{ identity_text_x }}" y="{{ identity_text_y }}"
        class="{{ uid }}-brand-text"{% if identity_text_length and identity_text_length > 0 %} textLength="{{ identity_text_length }}" lengthAdjust="spacingAndGlyphs"{% endif %}>{{ identity | upper }}</text>

  {# (8) Metric cells — dark ink values on paper substrate. Inter-cell
     divider uses --dna-ink-primary at 0.08 opacity (slightly lower than
     dark's 0.10 because dark ink on paper has higher luminance contrast
     at the same opacity). #}
  {% for metric in metrics %}
    {% set _layout = cell_layouts[loop.index0] %}
    {% if _layout.show_leading_rule %}
    <line x1="{{ _layout.cell_x }}" y1="{{ strip_zones.core.metric_rule_y1 }}" x2="{{ _layout.cell_x }}" y2="{{ strip_zones.core.metric_rule_y2 }}"
          stroke="var(--dna-ink-primary)" stroke-width="0.5" opacity="0.08"/>
    {% endif %}
    <g data-hw-zone="metric-{{ loop.index0 }}" transform="translate({{ _layout.cell_x }},0)">
      <text x="{{ _layout.label_x }}" y="{{ metric_label_y }}"
            text-anchor="{{ _layout.text_anchor }}"
            class="{{ uid }}-metric-label"{% if _layout.label_w and _layout.label_w > 0 %} textLength="{{ _layout.label_w | round(1) }}" lengthAdjust="spacingAndGlyphs"{% endif %}>{{ metric.label | upper }}</text>
      <text x="{{ _layout.value_x }}" y="{{ metric_value_y }}"
            text-anchor="{{ _layout.text_anchor }}"
            class="{{ uid }}-metric-value"{% if _layout.value_w and _layout.value_w > 0 %} textLength="{{ _layout.value_w | round(1) }}" lengthAdjust="spacingAndGlyphs"{% endif %}>{{ metric.value }}</text>
    </g>
  {% endfor %}

  {# (9) Ink bookend — the right terminus that gives the strip closure and
     signals liveness. An INK rect (matching the left identity panel) with a
     2px accent edge; inside, a breathing accent square (stateless) or a
     double-square state indicator (stateful). Geometry from compute_strip_zones
     (light_bookend_* reserved a fixed terminus for the light substrate). #}
  {% if light_strip_bookend %}
  <g data-hw-zone="bookend">
    <rect x="{{ light_bookend_ink.x }}" y="{{ light_bookend_ink.y }}" width="{{ light_bookend_ink.w }}" height="{{ light_bookend_ink.h }}" fill="var(--dna-ink-primary)"/>
    <rect x="{{ light_bookend_edge.x }}" y="{{ light_bookend_edge.y }}" width="{{ light_bookend_edge.w }}" height="{{ light_bookend_edge.h }}" fill="var(--dna-signal)"/>
    {% if light_bookend_has_state %}
      <rect x="{{ light_bookend_state_outer.x }}" y="{{ light_bookend_state_outer.y }}" width="{{ light_bookend_state_outer.w }}" height="{{ light_bookend_state_outer.h }}" fill="none" stroke="var(--dna-signal)" stroke-width="1.5"/>
      <rect x="{{ light_bookend_state_inner.x }}" y="{{ light_bookend_state_inner.y }}" width="{{ light_bookend_state_inner.w }}" height="{{ light_bookend_state_inner.h }}" fill="var(--dna-signal)" shape-rendering="crispEdges"/>
    {% else %}
      <rect class="{{ uid }}-bk" x="{{ light_bookend_square.x }}" y="{{ light_bookend_square.y }}" width="{{ light_bookend_square.w }}" height="{{ light_bookend_square.h }}" fill="var(--dna-signal)" shape-rendering="crispEdges"/>
    {% endif %}
  </g>
  {% endif %}
</g>
