/* ============================================================================
   room-illuminated-index.css — the interior of the Documentation Room.

   furnishing-vessel-interiors S5 (DT authoring). Presentation only.
   Spec: docs/room-specs/06-documentation.md — committed before this file.
   Pattern: the S2-accepted pair (room-librarians-desk / room-lineage-dial),
   as re-applied at S3 (room-discovery-lens / room-practice-board).

   ── THE SEAM ───────────────────────────────────────────────────────────────
   buildWindow() stamps `.ffrw-shell.ffrw-vessel.ffrw-documentation`; the
   view-room factory reparents `#view-documentation` into `.ffrw-body` with
   `.ffrw-hosted`. Everything below rides

       .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted

   so the flat App-Panel view and mobile are untouched by construction, and
   the single-step revert is this file plus its one <link>.

   ── NO CHROME CUSTODY (unlike Stories/Training) ────────────────────────────
   ffa-launcher-design-manifest.json carries `chrome: null` for
   `documentation`, so `.ffvl-chromed-header` never applies. The FN/Explore
   case: the Room CSS takes the header band whole.

   ── ⛔ THE SCROLL ARCHITECTURE IS WITHHELD — READ THIS BEFORE EDITING ──────
   `.docs-layout` declares `height: calc(100vh - 280px)` (styles.css:41455) —
   a VIEWPORT-derived height inside a window that is not the viewport. It
   yields TWO competing scroll owners at default/minimum size and one when
   maximized, which D1 §8.2 forbids. That condition is PRE-EXISTING (measured
   by the Mac S4 gate before this dress) and is NOT touched here: every
   correct fix re-architects the host's own overflow contract, and a
   reachability regression is exactly the class of failure a headless host
   cannot see. Routed to the Room's own follow-on, like Family Navigator's.
   Spec §6.1 carries the arithmetic. DO NOT "fix" it opportunistically.

   ── WHAT THIS FILE MAY NOT DO ──────────────────────────────────────────────
   No handler, no label, no route, no truthful string, no bang-important, no
   NEW scroll owner. `.docs-viewer-frame` (#525659) is the mat behind a
   literal PDF facsimile and is UNTOUCHED (D1 §6.2, §10.4) — recolouring it
   would tint a family document. Counts and sizes are renderer truth.

   ── WHY THIS FILE DRESSES STATES YOU CANNOT SEE ON OPEN ────────────────────
   The Mac S4 baseline honestly measured ZERO foreign indigo here — correct
   for the RESTING state and misleading for the Room. The indigo lives in
   states the resting index never renders: the PDF viewer toolbar (the
   surface a reader looks at the entire time they read), the bundle banner,
   and the audio indicator. All three are dressed below. S6 MUST open a
   document, find a bundle, and find a narrated document, or the Room's most
   foreign surfaces go ungated a second time. Spec §1.1 and §7.

   WITHHELD (spec §6): the Fergi aperture; the scroll architecture; the D1
   §3.3 paper ground (declined for the reason Stories declined it); the two
   inline styles on the search row, which outrank this file and are harmless;
   and every census behavioral finding (BR-42/43/13/44/45/46/47) — notably
   BR-43, a CONSTITUTIONAL unlogged-egress finding that is NOT touched merely
   because the download button is restyled.
   ============================================================================ */

/* ── The well ─────────────────────────────────────────────────────────────
   Gutters + scroll padding so the first and last regions are reachable, not
   merely painted (D1 §1.3, §8.2). Contemplative density (D1 §4.2 names
   Documentation calm): 32px between regions. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted {
  --ii-gutter: 20px;
  --ii-ink: var(--ffvr-ink, #FFFBEF);
  --ii-ink-muted: var(--ffvr-ink-muted, #C5C3B9);
  --ii-rule: color-mix(in srgb, var(--ffvr-rule, #D5B46F) 32%, transparent);
  --ii-rule-strong: color-mix(in srgb, var(--ffvr-rule, #D5B46F) 58%, transparent);
  --ii-plane: var(--ffvr-surface-raised, #272C29);
  --ii-plane-hover: color-mix(in srgb, var(--ffvr-surface-raised, #272C29) 90%, var(--ffvr-ink, #FFFBEF) 10%);
  --ii-control: color-mix(in srgb, var(--ffvr-surface-raised, #272C29) 72%, var(--ffvr-surface-sunken, #000) 28%);
  --ii-accent: var(--ffvr-accent, #55C7C0);
  --ii-selection-ground: color-mix(in srgb, var(--ffvr-accent, #55C7C0) 16%, var(--ffvr-surface, #161B19));
  --ii-note-ground: color-mix(in srgb, var(--ffvr-rule, #D5B46F) 10%, transparent);

  padding: 0 var(--ii-gutter) 24px;
  scroll-padding-block-start: 16px;
  scroll-padding-block-end: 24px;
  color: var(--ii-ink);
}

/* ── One hierarchy: the chassis title is the title ─────────────────────────
   The vessel header already says `Documentation / ILLUMINATED INDEX`. The
   hosted view repeats it as `<h2>📚 Documentation</h2>`. VISUALLY RETIRED,
   NOT REMOVED (D1 §2.2 outcome 2): heading node, order and outline survive
   for AT; only the pixels go. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .view-header h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── The rail (D1 §1.3 rule 4, §2.3) ──────────────────────────────────────
   No chrome custody, so this file owns the band: bled to the ground edges,
   radius 0, one 1px gilt rule beneath, no border, no shadow. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .view-header {
  display: flex;
  align-items: center;
  min-height: 52px;
  margin: 0 calc(-1 * var(--ii-gutter)) 16px;
  padding: 8px var(--ii-gutter);
  border-bottom: 1px solid var(--ii-rule);
}

/* The subtitle is the eyebrow context slot. Its TEXT is renderer-swapped per
   library by switchDocsLibrary — this styles whatever string is set and
   never asserts one. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .view-header .view-subtitle {
  margin: 0;
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ii-ink-muted);
  opacity: 1;
}

/* ── The library toggles (D1 §4.4 binary pill register) ───────────────────
   Already token-driven; the ACTIVE accent+on-accent pairing is the existing
   RECIPE and is untouched. Only the dims and the hover tint are ours. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle {
  min-height: 36px;
  transition: background 150ms, color 150ms;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle:hover {
  background: var(--ii-plane-hover);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle.active:hover {
  background: var(--ii-accent);
}

/* ── ⛔ S6 RETURN, fix 1 and 3 of 3: the toggle's two survivors ────────────
   The Mac S6 gate ACCEPTED Dashboard and RETURNED this Room for three
   foreign-palette survivors it found in states the S5 pass never reached.
   Two of them live on this control.

   (1) `.docs-library-toggle[data-lib="biography"].active` paints
       `linear-gradient(135deg,#6a3aa8,#8e60d4)` from admin-documentation.css
       :22 — a bright purple pill and, by S6's screenshot, the loudest element
       in the Room. ⚠️ The diagnostic S6 recorded matters: the USER lane's
       toggle already showed the Room accent, so the seam DOES match — this is
       a PER-LIBRARY rule the seam never covered, not a broken seam. The
       `[data-lib]` attribute below matches every lane, so a fourth library
       cannot reintroduce the class of defect. The Biography lane stays
       recognizable by its own label text (`📚 Biography`), untouched.
   (3) The base `.active` rule (styles.css:41448) carries
       `box-shadow: 0 1px 2px rgba(76,29,149,.25)` — #4c1d95 at 25%. S5
       dissolved backgrounds and left shadows; this closes that.

   On the label colour S6 also flagged: admin-documentation.css declares
   `color:#fff` on that same rule, so SOURCE says white-on-purple while S6
   MEASURED the inactive `rgb(197,195,185)` in the browser. The two disagree
   and a headless host cannot settle which is right. This rule makes the
   question moot by pairing the Room's own accent with its own on-accent
   above both — a deliberately contrast-measured pair, not an inherited one. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle[data-lib].active,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle[data-lib].active:hover {
  background: var(--ii-accent);
  background-image: none;
  color: var(--ffvr-on-accent, #000000);
  box-shadow: none;
}

/* The foreign 2px #8b5cf6 ring becomes the fleet focus treatment. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 2px;
  box-shadow: 0 0 0 1px #000000;
}

/* ── The search field ─────────────────────────────────────────────────────
   `.form-input` declares no background, so this rendered UA WHITE on a dark
   Room — the S4 baseline's one white ground. The Room's control ground
   instead (D1 §3.2). The inline `flex:1; min-width:220px` on this input
   outranks any rule here; it is layout-only and left alone (spec §6.4). */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .form-input {
  min-height: 36px;
  background: var(--ii-control);
  border: 1px solid var(--ii-rule-strong);
  color: var(--ii-ink);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .form-input::placeholder {
  color: var(--ii-ink-muted);
  opacity: 1;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .btn-sm {
  min-height: 36px;
}

/* ── ⛔ S6 RETURN, fix 2 of 3: `Refresh` was a fully NATIVE UA control ─────
   `<button class="btn btn-sm">Refresh</button>` sits in the Room's own search
   row. `.btn` (styles.css:3199) declares padding, radius, cursor and layout
   but NO background, colour, font-family or appearance — so with neither
   `.btn-primary` nor `.btn-secondary` on it, it fell all the way through to
   the user agent: `appearance:auto`, an `rgb(239,239,239)` ground and Arial,
   exactly as S6 measured. Return 023's pilot mandate names native
   browser-like buttons as something that must be reconciled.

   It takes the same control grammar as `.docs-toolbar-btn` below, so the two
   buttons of this Room read as one family. Label, handler and `onclick` are
   untouched — this is paint only.

   Scope note, verified rather than assumed: this is the ONLY `.btn` in the
   Room. The static markup carries one and the renderer emits none —
   `admin-documentation.js` emits `.docs-bundle-download-btn` and
   `.docs-toolbar-btn`, both of which carry their own classes and their own
   dress — so no already-dressed variant is caught by this rule. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .btn {
  appearance: none;
  -webkit-appearance: none;
  background: var(--ii-control);
  border: 1px solid var(--ii-rule-strong);
  color: var(--ii-ink);
  font-family: inherit;
  font-weight: 600;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .btn:hover {
  background: var(--ii-plane-hover);
}

/* ── The desk: two zones, one surface (D1 §1.4) ───────────────────────────
   The shelf and the reading page BOTH keep their perimeters — D1 §1.4
   permits a complete boundary around "a scrollable subregion whose
   independent scroll ownership already exists and is necessary", which is
   exactly what these two are. Their borders become the Room's rule and
   their grounds the Room's plane, so they read as two zones of one desk
   rather than a gray sidebar beside a white SaaS panel.
   ⛔ Their overflow and the parent's height are NOT touched — see the
   scroll-architecture withhold in the file header. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-sidebar,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-content {
  background: var(--ii-plane);
  border: 1px solid var(--ii-rule);
  border-radius: 8px;
}

/* ── The shelf items ──────────────────────────────────────────────────────
   `.docs-cat-item` carried a hard-coded `color:#374151` with NO token
   fallback — near-black ink on a near-black ground — plus an #eef2ff hover
   and an #e0e7ff/#1e40af active. Three foreign light-indigo states in the
   Room's primary navigation. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-item {
  color: var(--ii-ink);
  border-left: 4px solid transparent;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-item:hover {
  background: var(--ii-plane-hover);
}

/* Selection carries all four D1 §3.7 signals: accent border, selection
   ground, a 3px leading edge, and the renderer's own .active semantics
   (untouched). Hover must never look selected — it has no edge and no
   accent, which is what keeps the two distinguishable. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-item.active,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-item.active {
  background: var(--ii-selection-ground);
  color: var(--ii-ink);
  border-left-color: var(--ii-accent);
  box-shadow: inset 0 0 0 2px var(--ii-accent);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-item {
  border-left: 4px solid transparent;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-item:hover {
  background: var(--ii-plane-hover);
  color: var(--ii-ink);
}

/* The count pill: a gray #e5e7eb/#4b5563 chip becomes the Room's pill. The
   NUMBER is renderer truth and untouched; only its register is ours. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-count {
  background: transparent;
  border: 1px solid var(--ii-rule);
  color: var(--ii-ink-muted);
  font-variant-numeric: tabular-nums;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-size {
  font-variant-numeric: tabular-nums;
}

/* Group heads take the eyebrow register — the gilt labels of a catalogue. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-group .docs-cat-header {
  font-size: 11px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* ── The page (D1 §6.2) ───────────────────────────────────────────────────
   The one prose rule this file applies is the reading measure. The paper
   ground is DECLINED for the reason Stories declined it: this pane shows
   either a PDF facsimile that carries its own paper, or short renderer-
   emitted index extracts — papering them would make the catalogue look like
   the document. Spec §6.2 states the judgment so S6 can overrule it in one
   block. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-section-body {
  max-width: 72ch;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-section {
  border-bottom-color: var(--ii-rule);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-section.docs-section-child {
  border-left-color: var(--ii-rule);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-header {
  border-bottom-color: var(--ii-rule-strong);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-section-cat {
  letter-spacing: 0.12em;
}

/* Inline code: an #f3f4f6 light chip on a dark page. The Room's recessed
   ground instead. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-section-body code {
  background: var(--ffvr-surface-sunken, #000000);
  border: 1px solid var(--ii-rule);
  color: var(--ii-ink-muted);
}

/* ── The welcome hint and the bundle banner: the note grammar ─────────────
   The FN/Training-accepted treatment — a gilt tint ground, one strong left
   edge, Room ink. The bundle banner's #ede9fe→#ddd6fe gradient with a
   #c4b5fd border and #4c1d95 ink is the Room's second-largest foreigner and
   it renders only when a bundle exists (spec §1.1). Copy untouched. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-welcome-hint,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-banner {
  background: var(--ii-note-ground);
  background-image: none;
  border: 0;
  border-left: 3px solid var(--ii-rule-strong);
  border-radius: 0 8px 8px 0;
  color: var(--ii-ink);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-banner-title {
  color: var(--ii-ink);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-banner-desc {
  color: var(--ii-ink-muted);
}

/* The download control takes the existing accent+on-accent RECIPE; hover
   deepens by plane mix rather than by changing hue.
   ⛔ BR-43 — that this button is restyled does NOT mean the unlogged-egress
   finding beneath it is touched. It is not. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-download-btn {
  background: var(--ii-accent);
  color: var(--ffvr-on-accent, #000000);
  transition: background 150ms;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-download-btn:hover {
  background: color-mix(in srgb, var(--ffvr-accent, #55C7C0) 82%, var(--ffvr-surface-sunken, #000) 18%);
}

/* ── The reading toolbar: the Room's largest foreigner ────────────────────
   `.docs-viewer-toolbar` is a 135deg #667eea→#764ba2 gradient with white
   ink — and it is the surface a family member looks at for the WHOLE time
   they are reading a document. It renders only once a document is opened,
   which is exactly why the resting-state baseline measured zero indigo.
   It becomes the Room's rail: raised plane, one gilt rule beneath, Room ink,
   no radius, no shadow. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-viewer-toolbar {
  background: var(--ii-plane);
  background-image: none;
  color: var(--ii-ink);
  border-bottom: 1px solid var(--ii-rule);
  border-radius: 0;
  box-shadow: none;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-viewer-toolbar-cat {
  color: var(--ii-ink-muted);
  opacity: 1;
}

/* Its buttons were rgba(255,255,255,.18) glass tuned for the indigo band. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-toolbar-btn {
  background: var(--ii-control);
  border: 1px solid var(--ii-rule-strong);
  color: var(--ii-ink);
  min-height: 32px;
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-toolbar-btn:hover {
  background: var(--ii-plane-hover);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-toolbar-audio-btn.playing {
  background: var(--ii-selection-ground);
  border-color: var(--ii-accent);
}

/* ── The audio indicator ──────────────────────────────────────────────────
   #ede9fe disc, #c4b5fd ring, #6d28d9 hover → the Room's accent.
   ⚠️ `.no-audio` carried `opacity: .2`, which drops its glyph far below any
   readable contrast. D1 §3.4: an opacity must not lower a role below its
   required contrast — use an opaque mixed colour instead. Raised to a
   compliant muted register; it still reads as unavailable, and it is still
   not a control (its `cursor: default` is untouched). */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-audio-indicator.has-audio {
  background: var(--ii-selection-ground);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ffvr-accent, #55C7C0) 58%, transparent);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-audio-indicator.has-audio:hover {
  background: var(--ii-accent);
  box-shadow: inset 0 0 0 1px var(--ii-accent);
}

.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-audio-indicator.no-audio {
  opacity: 1;
  color: var(--ffvr-ink-faint, #97978F);
}

/* ── The other surfaces of the same Room ──────────────────────────────────
   `.docs-welcome` and `.placeholder-text` are already token-driven; only the
   welcome heading needs the Room's section-title face. */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-welcome h2 {
  font-family: var(--font-heading, "Playfair Display", Georgia, serif);
}

/* ── Focus is the universal treatment on every control (D1 §3.6) ──────────*/
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-item:focus-visible,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-item:focus-visible,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-toolbar-btn:focus-visible,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-download-btn:focus-visible,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-audio-indicator:focus-visible,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .form-input:focus-visible,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .btn:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 2px;
  box-shadow: 0 0 0 1px #000000;
}

/* The shelf scrolls, so a focused item's ring must not be clipped at the
   edge of its own scroller (D1 §3.6: the focus outline is never clipped). */
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-item,
.ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-item {
  scroll-margin: 12px;
}

/* ── Reduced motion (the floor plus the list — pilot pattern) ─────────────*/
@media (prefers-reduced-motion: reduce) {
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted * {
    transition: none;
  }

  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-item,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-item,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-download-btn {
    transition: none;
  }

  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-audio-indicator {
    transition: none;
  }

  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-audio-indicator.has-audio:hover {
    transform: none;
  }
}

/* ── Forced colours ───────────────────────────────────────────────────────
   Restore system borders so the two zones, the pills and the controls keep
   their shapes; selection takes the system's Highlight pairing so it stays
   distinguishable from hover; essential text never sits under an opacity. */
@media (forced-colors: active) {
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-sidebar,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-content,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-count,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-toolbar-btn,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .form-input,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .btn,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-viewer-toolbar {
    border: 1px solid ButtonBorder;
  }

  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-cat-item.active,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-doc-item.active,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-library-toggle.active {
    border: 2px solid Highlight;
  }

  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-bundle-banner,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-welcome-hint {
    border-left: 3px solid ButtonBorder;
  }

  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .view-header .view-subtitle,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-viewer-toolbar-cat,
  .ffrw-documentation .ffrw-body > #view-documentation.ffrw-hosted .docs-audio-indicator.no-audio {
    opacity: 1;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   THE V14 CHASSIS DRESS — porting-perimeter-souls S5 (designed at S4)

   Everything below this line is reached ONLY through `html.ffv-modal-fleet-v14`.
   With the flag off not one selector here matches, and the room renders exactly
   as the lines above render it. The SHELL half needs the flag class because
   `.ffvc-rim-glow`, `.ffvc-body` and `.ffvc-lip` are drawn by room-windows.css
   in BOTH states; an unconditioned override would break the byte-identity that
   makes this flag a rollback path.

   ── WHAT THE PORT TOUCHES, AND WHAT IT DOES NOT ─────────────────────────
   Nothing below reaches the library's two-column reading layout, its category
   shelf, its PDF or audio controls, or its scroll architecture. Every rule is
   scoped `html.ffv-modal-fleet-v14 .ffrw-documentation`, which cannot reach the
   flat App Panel, mobile, or another room's chassis.

   The port's only geometry is VERTICAL, through the theme's own DERIVED
   keep-outs (141 / 97, from 84 / 72) — and every unit of that raise is the
   SHELL: BOTH numbers are driven by the lip alone, head and foot, with no
   ornament in either band. No horizontal inset moves — which matters more here
   than anywhere in the fleet, because this vessel's flank reveal is 2.5 units
   and the two columns have no width to spare.

   Widths are the lab's times the geometric mean sqrt(0.625 * 0.7) = 0.6614.
   ═══════════════════════════════════════════════════════════════════════════ */

html.ffv-modal-fleet-v14 .ffrw-documentation {
  --v14-indigo: #7987ff;   /* the lab's --room-a     */
  --v14-gild:   #e4b85d;   /* the lab's --room-b     */
  --v14-orchid: #ef3fa5;   /* the lab's --room-c     */
  --v14-metal:  #40e2d2;   /* the lab's --room-metal */
}

html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-rim-glow { stroke-width: 6.61; opacity: .24; }   /* lab 10  x 0.6614 */
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-body     { stroke-width: 2.65; }                 /* lab 4   x 0.6614 */
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-lip      { stroke: rgba(220, 246, 255, .45); stroke-width: .99; opacity: 1; }  /* lab 1.5 x 0.6614 */

html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-scriptorium path,
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-index path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the head: the canopy springing from both shoulders, and the two vellum rules
   clamped back under the line it springs from */
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-canopy {
  stroke: var(--v14-metal);
  stroke-width: 1.98;                                                                           /* lab 3   x 0.6614 */
}
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-vellum-rule {
  stroke: color-mix(in srgb, var(--v14-metal) 56%, transparent);
  stroke-width: 1.32;                                                                           /* lab 2   x 0.6614 */
}

/* the index card standing in the pointed head the canopy leaves */
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-hero-ring { fill: rgba(4, 15, 26, .96); stroke-width: 1.46; }  /* lab 2.2 x 0.6614 */
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-hero-line {
  stroke: color-mix(in srgb, var(--v14-indigo) 78%, #ffffff 8%);
  stroke-width: 1.32;                                                                           /* lab 2   x 0.6614 */
}

/* the foot: the volume's six inner thumb tabs — the index the dropped margin
   tabs could not give it — and the quill's flourish across the sill */
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-thumb-tabs {
  stroke: var(--v14-orchid);
  stroke-width: 1.32;                                                                           /* lab 2   x 0.6614 */
}
html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-quill-line {
  stroke: var(--v14-indigo);
  stroke-width: 1.98;                                                                           /* lab 3   x 0.6614 */
}

/* ── motion: PAINT CARRIES, GEOMETRY DOES NOT (HELPER_CONTRACT §6b) ────────
   The lab gives this room exactly one animation that its carried elements
   touch: `ink-draw` on `.quill-line`, which walks a STROKE-DASHOFFSET from the
   stroke's own length down to zero, so the flourish appears to be written. Dash
   phase is PAINT — the ink is drawn along geometry that never moves — so it is
   carried, and it is the third dash-phase animation this train has admitted
   after Import Media's conveyor and the fleet's signal rails.

   Its two lengths ARE lengths along a path, so they take the geometric mean
   0.6614 exactly as a stroke width does (judgement #1, not a second question):
   the lab's 420 becomes 277.8. The .2s delay and the 2.8s duration are time,
   not length, and carry unchanged.

   Nothing else in this room moves. `.canopy`, `.vellum-rule`, `.thumb-tabs` and
   the index card appear nowhere in the lab's
   `prefers-reduced-motion: no-preference` block — an absence, stated here so
   the next reader does not have to infer it.
   ───────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  html.ffv-modal-fleet-v14 .ffrw-documentation .ffvc-v14-quill-line {
    stroke-dasharray: 277.8;                                                                    /* lab 420 x 0.6614 */
    stroke-dashoffset: 277.8;
    animation: ffvc-v14-ink-draw 2.8s .2s ease-out forwards;
  }
}
@keyframes ffvc-v14-ink-draw { to { stroke-dashoffset: 0; } }
