/* ═══════════════════════════════════════════════════════════════════════════
   THE HAND — authorship-provenance treatment · v2
   Loop MMT™ · Mature Maple (Instar 8) · CC BY-NC 4.0

   Which HAND wrote a passage — Shea's or the system's. Two hands on one page,
   made visible. Layer 2 in the composition triple (tokens → shell → this).

   v2 CHANGE (NOTE-28.1843-5): the v1 byline label read as a prose sentence
   ("In the system's hand") that carried unwanted tone — operator flagged it as
   Handmaid's-Tale-creepy. v2 replaces the prose byline with a SMALL GLYPH CHIP
   + a ROLLOVER GLOSS: the mark is a symbol, the words are one hover away (and
   always in the a11y tree + print + the source attribute). Same single-attribute
   fold; only the label's SURFACE changed. Christened as a reusable pattern —
   the Glyph-Gloss Provenance Mark — a reusable pattern in the pattern registry.

   THE AXIS (read before touching): this is AUTHORSHIP provenance, NOT the Score
   Band Grammar's reader-audience split. The Score's [HUMAN]/[AI] bands answer
   "which reader is this line FOR"; The Hand answers "whose hand WROTE this prose."
   Orthogonal. Do not fold the two. Sibling: the Score Band Grammar.

   THE MECHANISM: a single declared attribute, data-hand="shea" | "system", on a
   prose block. Everything here is a PURE DECLARATIVE FOLD over that one attribute
   — the attribute is the ground truth (the human's editorial call); the styling
   derives from it and adds nothing the attribute doesn't say. (No HTML edits: v2
   is a stylesheet-only change; every page using The Hand inherits it.)

   THE FIDELITY LAW (inherited from the Score; intent non-negotiable): authorship
   is never conveyed by colour alone, and the WORDS survive tag-stripping. v2
   carries the words on THREE independent paths so the glyph-only visible state is
   never the sole tell: (1) the source attribute data-hand="system|shea" (the
   word is right there for a source reader); (2) the ::after gloss content, which
   stays in the rendered a11y tree at all times (opacity, never display:none, so
   screen readers read it even unhovered) and is forced visible in print; (3) the
   hover/focus reveal for sighted mouse/keyboard users. display:none remains
   FORBIDDEN on any hand block or its gloss.
   OPERATOR CALL PENDING (owed): v1's letter said "legible from the visible label
   TEXT"; v2's non-hover visible surface is a GLYPH, not words (words via the three
   paths above). This honours the law's INTENT (never hidden, never colour-only)
   but departs from its letter. Flagged for Shea's ruling; revert-to-label is one
   commit if he'd rather keep prose.

   THE HARD RULE (shell.css J3): every colour reads var(--*) from tokens.css.
   NO hex literals in declarations. Grep test:
     grep -E '^[^*/]*#[0-9a-fA-F]{6}' the-hand.css   → returns nothing.

   TREATMENT (v2): Shea's hand = quiet ✎ chip, muted. The system's hand = ⌘ chip
   with a persimmon edge, over the retained "machine with a soul" box (mono face,
   persimmon left edge, ground wash). The soul status-strip moved off ::after
   (now the gloss) to an inset top hairline.
   ═══════════════════════════════════════════════════════════════════════════ */


/* ═══ 1. The glyph chip — the always-visible mark (::before) ═══
   A small pill carrying ONLY the symbol. The chip is the visible tell; the words
   live in the gloss (§2). cursor:help signals the rollover. */

[data-hand] { position: relative; }

[data-hand]::before {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--size-label, 0.72rem);
  line-height: 1;
  letter-spacing: 0;
  padding: 0.28em 0.5em;
  margin-bottom: 0.55em;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  opacity: 0.9;
  cursor: help;
}

[data-hand="shea"]::before {
  content: "✎";
  color: var(--muted);
}

[data-hand="system"]::before {
  content: "⌘";
  color: var(--persimmon);
  border-color: var(--persimmon);
}


/* ═══ 2. The rollover gloss — the words, on three paths (::after) ═══
   The explanatory text. Always in the a11y tree (opacity, not display:none), so
   a screen reader reads it unhovered; revealed to sighted users on hover/focus;
   forced visible in print. This is the fidelity carrier that keeps the glyph
   from being the sole tell. */

[data-hand]::after {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 0.4em;
  max-width: 32ch;
  font-family: var(--font-mono);
  font-size: var(--size-label, 0.72rem);
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--persimmon);
  border-radius: 4px;
  padding: 0.45em 0.65em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease-out;
  z-index: 5;
}

[data-hand="shea"]::after {
  content: "Shea-authored — written by Shea, not the system.";
}

[data-hand="system"]::after {
  content: "System-authored — written by the AI, not the operator.";
}

[data-hand]:hover::after,
[data-hand]:focus-within::after {
  opacity: 1;
}


/* ═══ 3. Shea's hand — the default prose voice ═══
   Restrained: Shea's writing IS the site's baseline, so his blocks carry the
   quiet chip and nothing more. */

[data-hand="shea"] {
  /* inherits body prose from shell.css §2 — intentionally unstyled beyond the chip */
}


/* ═══ 4. The system's hand — "a machine with an (AI) soul" ═══
   Retained from v1: the site's mono face, a persimmon left edge, a faint ground
   wash. The soul status-strip that lived on ::after in v1 is now an inset top
   hairline (::after became the gloss). */

[data-hand="system"] {
  font-family: var(--font-mono);
  font-size: 0.94em;
  line-height: 1.7;
  color: var(--ink);
  background: var(--ground);
  border-left: 3px solid var(--persimmon);
  border-radius: 0 4px 4px 0;
  padding: 0.9em 1.1em 1em;
  margin: var(--gap, 1rem) 0;
  box-shadow: inset 0 1px 0 var(--hairline);  /* the soul status-strip, relocated */
}

[data-hand="system"] p { margin: 0 0 0.7em; }
[data-hand="system"] p:last-of-type { margin-bottom: 0; }


/* ═══ 5. Reduced-motion / print honesty ═══
   The only motion is the gloss opacity fade; honour prefers-reduced-motion by
   dropping the transition (the reveal still works, instantly). For print, the
   gloss is forced visible + static so authorship is legible on paper — the
   fidelity law on paper, where hover cannot exist. */

@media (prefers-reduced-motion: reduce) {
  [data-hand]::after { transition: none; }
}

@media print {
  [data-hand="system"] { background: transparent; }   /* ink economy; edge + chip carry it */
  [data-hand]::after {
    position: static;
    opacity: 1;
    max-width: none;
    margin: 0.3em 0 0;
    border: 0;
    border-left: 2px solid var(--persimmon);
    padding: 0.2em 0 0.2em 0.6em;
  }
}

/* keel: component-css */
