/* The staff.html style block, hoisted into its own stylesheet (SKY-1037).
   Loads after skyn.css so staff rules still win ties, as the inline block did. */
/* Skip link (skyn-tools#539): first focusable element on the page,
   before #app in the body. Absolutely positioned so the auth-shell
   flex centering never sees it; parked off-screen until focused. */
.skip-link { position: absolute; top: 0.75rem; left: -100vw; z-index: 300; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.8rem; font-size: 13px; box-shadow: var(--shadow-2); }
.skip-link:focus { left: 0.75rem; }
/* The landmark takes focus programmatically from the skip link; the
   whole column lighting up with a ring would be noise, not a cue. */
main#content { outline: none; }
/* Page-specific layout only (DESIGN.md): the study meta card. */
.study-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 0.75rem; padding: 0.25rem 0 0.5rem; }
.study-meta h3 { font-size: 1.05rem; margin: 0; }
/* Every view's page h1 (skyn-tools#539): one element before all
   sections, so the outline never puts an h1 under a section h2. The
   page scale is 24/32 (SKY-1022): single line, ellipsis when the name
   is longer than the row, the full name in its title attribute. */
h1.page-title { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.015em; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Page and entity header (skyn-tools#758, SKY-1022): the kicker on its
   own line, the title row, then the chip row. Rows are separated by
   space-2 and the region is followed by space-6.

   The title row is a fixed control-md (32px) box the h1 and the
   actions center in, with or without actions, so the h1 lands at the
   same y on every route. Below 700px the actions drop under the h1
   and the row stops being a fixed height; the h1 still never wraps.

   The chip row collapses while it holds nothing, which is what lets
   every page build one unconditionally: a page with no chips (Home)
   and a page whose chips have not landed yet both reserve no height
   above their sections, and chips arriving with a fetch push nothing
   down when they do. */
.page-header { display: grid; gap: var(--space-2); margin: 0 0 var(--space-6); }
/* A page with no trail above its header (Home, the root) holds the line
   the trail would take, so its h1 sits at the same y as every other
   route's: 16px trail line plus the space-2 row gap. */
.page > .page-header:first-child { margin-top: calc(16px + var(--space-2)); }
.page-title-row { display: flex; align-items: center; gap: var(--space-4); height: var(--control-md); }
.page-kicker { margin: 0; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.page-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); flex: none; }
.page-actions:empty { display: none; }
.page-actions .pager-pos { color: var(--ink-3); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; margin-right: var(--space-1); }
.page-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.page-chips:empty { display: none; }
/* The copyable identity chip. Mono, because it is an id; a real button,
   because copying is an action. The icon sits after the value so the
   value reads first. */
.id-chip { display: inline-flex; align-items: center; gap: var(--space-1h); height: 24px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-1); background: var(--surface-sunken); color: var(--ink-2); font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: 0; cursor: pointer; }
/* The global button rule sets user-select: none, and the copy
   failure's alert tells the reader to select the value and copy it by
   hand; the value says otherwise for itself (the skyn.css by-hand
   fallback idiom). */
.id-chip code { font-size: 12px; color: var(--ink); user-select: all; }
.id-chip svg { width: var(--icon-sm); height: var(--icon-sm); flex: none; }
.id-chip:hover { background: var(--line); border-color: transparent; color: var(--ink); }
.id-chip:focus-visible { outline: none; box-shadow: var(--ring); border-color: transparent; }
/* The subject pager (skyn-tools#540) rides the shared action row since
   skyn-tools#758; its position text keeps its own treatment there. */
/* The aggregate org Overview's own layout. Its distribution legend is
   the shared .legend (skyn.css): swatch, label, count beside it. The
   closing note says what this section deliberately does not show. */
.overview-note { margin: 0.9rem 0 0; font-style: italic; }
/* The .ov-facts base rules (the strip, the cell, and its label/value
   typography) live in skyn.css since skyn-tools#882: the partner
   dashboard's user heading paints the same strip, so the vocabulary is
   cross-surface foundation now. This page keeps only its own variants
   below. */
/* The study screen's facts strip (skyn-tools#880). The same cells in the
   same box: it builds ON .ov-facts and overrides only what differs, the
   way .org-switcher-panel builds on .user-menu-panel, so a change to the
   strip's chrome reaches both surfaces at once.

   Two things differ, and both come from this strip carrying SEVEN cells
   where the Overview carries four.

   POSITION. The Overview's strip closes a section and is spaced away
   from the cards above and below it; this one opens the page directly
   under .page-header, which already carries its own bottom margin, so
   the strip's own margin goes and the gap down to the first section is
   carried by the block around it instead (that block is what sits
   between the header and the sections, so the gap is its to own).

   SIZING, and this one is not cosmetic. .ov-fact's 9rem basis divides
   the row evenly, which is right for four cells (~279px each at the
   1280 page cap) and wrong for seven: measured, the same rule gave every
   cell 154px and clipped five of the seven values at every desktop
   width, including bounded ones like a timezone and a session policy.
   The strip is meant to make the facts tidy AND readable, so the cells
   size to their content and grow into whatever slack the row has left.
   Measured at 1440, 1280, 1024, 900, and 480, with a 49-character
   organization name and a twelve-version policy: nothing is clipped at
   any of them. A value long enough to overrun its own row still shrinks
   and ellipsizes, which is what min-width: 0 and the shared cell's
   text-overflow are for, and DESIGN.md's rule that an ellipsizing fact
   carries its full value on its title is the recovery.

   The Organization cell's value is a link for the roles that can open
   that page, and it needs no rule of its own: an anchor carries its own
   explicit color, so the shared link treatment wins over the cell's
   inherited one without either being restated here. */
.study-overview { margin: 0 0 var(--space-4); }
.study-facts-strip { margin: 0; }
/* The lifecycle sentence (a draft study, a completed one, an archived
   organization) sits INSIDE the strip, on its own full-width line under
   the cells, the .ov-card-foot idiom. Left as a paragraph immediately
   under a bordered box it read as something that had fallen out of the
   box, which is the loose text this strip exists to remove. */
.study-facts-strip .study-facts-note { grid-column: 1 / -1; margin: 0; padding: var(--space-3) var(--space-4); background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 12px; line-height: 16px; color: var(--ink-3); }
/* The staff account screen's facts strip (skyn-tools#882): the same
   position under .page-header as the study strip, so the same rules
   for the same reasons. Spacing: the block owns the gap down to the
   first section and the strip's own margin goes. Sizing: content-sized
   cells, because the shared 9rem basis divides the row evenly and,
   measured in headless Chrome at 1440/1280/1024/900/480, that clipped
   the two "None recorded" cells at 1024 and 900 once a disabled
   account's sixth cell joined the row; content-sized, nothing clips at
   any of those widths in the five-cell, six-cell, or loading state. */
.account-overview { margin: 0 0 var(--space-4); }
.account-facts-strip { margin: 0; }
/* The subject/user identity block (skyn-tools#882): the dissolved meta
   section's body, holding the facts and the subject banners. The facts
   moved into the shared strip below in skyn-tools#921; the banners
   stay bordered boxes underneath it, as they always were. It stands
   where a .section stood, so it carries the same gap down to the
   section below it. */
.user-overview { margin-bottom: 1.75rem; }
/* The subject/user identity strip (skyn-tools#921): the study and
   account strips' idiom applied to the last block on this surface
   still painting its facts as bare .study-facts prose, which read as
   unfinished once #919 boxed every section below it. Same two
   overrides, same reasons. POSITION: .user-overview above already
   owns the gap down to the section below it, so the strip's own
   margin goes. SIZING: content-sized cells, because the shared 9rem
   basis divides the row evenly and this strip runs from three cells
   (a study-route subject with neither Withdrawn nor Battery to show)
   up to five (both present), the same clipping range the study and
   account strips measured against. Unlike those two, this strip keeps
   full timestamps rather than the compact-date-with-hover form: it
   never reaches the study strip's seven cells, so nothing forces that
   trade. */
.user-facts-strip { margin: 0; }
/* The Sync compliance section's two strips (skyn-tools#925): the last
   surface still painting its facts as bare .study-facts prose once
   #921 boxed the identity block above it (DESIGN.md's facts-strip
   rule named it as the deliberate holdout; this issue ends that).
   Two strips, not one, because Recency (when this participant was
   last heard from) and Coverage (how complete their data is over the
   window) are different questions with different cells, and a single
   eight-cell strip read as a wall the way the study screen's own
   strip did before #880 trimmed it.

   POSITION: this sits inside the section body, a bordered card
   (skyn-tools#919's rail pattern), not directly under the page header
   like the study/account/user strips, so it keeps a little of its own
   vertical rhythm rather than zeroing its margin the way those three
   do. SIZING: content-sized cells, the same reason as every other
   strip on this surface (a shared 9rem basis divides unevenly and a
   percentage-plus-de-emphasized-pair value is exactly the shape that
   clips first). */
.sync-facts-strip { margin: var(--space-2) 0; }
/* The kicker style: the same 12/16 uppercase ink-2 line the section
   header's h2 wears, so a strip's heading reads as a label for its
   cells and never as a second section title. */
.sync-strip-heading { margin: var(--space-4) 0 var(--space-1); font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.sync-strip-heading:first-child { margin-top: 0; }
/* Gap dates as amber chips (skyn-tools#925), replacing the plain-text
   hint line: the dates are figures, not bounded vocabulary, so they
   are not .badge (DESIGN.md's badge rule) and get their own small
   chip instead. Amber (the --warn-ink family, shared with the stale-24h
   tier and the battery-warning chip) because a gap day is the same
   flavor of "notice this" as those, never a level (--level-* stays
   reserved for measurements). Lowercase and tabular-nums defensively:
   fmtDate's numeric form has no case today, but the rule should not
   silently stop holding if the date format ever grows a month name.
   12px/16px and 20px tall, the badge's own box, at 12px. */
.gap-day-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; margin: 0.5rem 0 0; }
.gap-day-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-2); font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; text-transform: lowercase; border-radius: var(--radius-1); background: var(--warn-bg); color: var(--warn-ink); }
.gap-day-chips .muted { font-size: 12px; }
/* The Data gaps section's summary strip (skyn-tools#925): the five
   facts that used to be a .study-facts prose line, boxed the same way
   as every other strip on this surface. Sits inside its own section
   body, so no position override is needed the way the page-header
   strips need one; content-sized cells for the same clipping reason
   as the sync strips above. */
.gaps-facts-strip { margin: 0 0 var(--space-3); }
/* The activity hero: a 30-day readings line beside the counts it
   summarizes. The chart box holds a fixed height, so a line, a
   skeleton, and an empty state all occupy the same band and the read
   lands with no shift. */
.ov-hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-3); box-shadow: var(--shadow-1); padding: var(--space-4); margin: var(--space-3) 0; }
.ov-hero-head { display: flex; align-items: center; gap: var(--space-3); height: 24px; margin-bottom: var(--space-3); }
.ov-hero-title { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
.ov-hero-note { margin-left: auto; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-3); }
.ov-hero-body { display: flex; align-items: stretch; flex-wrap: wrap; }
.ov-chart { flex: 1 1 22rem; min-width: 0; height: 190px; display: flex; align-items: center; justify-content: center; }
.ov-chart svg { width: 100%; height: 100%; display: block; }
.ov-chart .skeleton { width: 100%; height: 150px; }
/* The dormant-org empty state, sized to live INSIDE the chart band
   rather than to fill a section: no card chrome (the hero is already a
   card), and a max-height plus hidden overflow so it can never spill
   over the tiles below whatever the copy says. */
.ov-chart-empty { border: none; background: none; padding: 0 1rem; max-height: 190px; overflow: hidden; }
/* The axis and endpoint labels. Mono, because they are figures a
   reader compares down a column of gridlines. */
.ov-axis { font-family: var(--font-mono); font-size: 12px; fill: var(--ink-3); }
.ov-endpoint { font-family: var(--font-mono); font-size: 12px; fill: var(--accent-ink); }
/* Chart marks painted from CSS: an SVG presentation attribute does not
   resolve var(), a class does. */
.ov-chart-grid { stroke: var(--surface-sunken); stroke-width: 1; }
.ov-chart-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ov-chart-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.org-spark path { fill: none; stroke: var(--accent); }
.events-grid { stroke: var(--line); stroke-width: 1; }
.events-line { fill: none; stroke: var(--ink); }
.ov-rail { flex: 0 0 var(--rail); border-left: 1px solid var(--line); margin-left: var(--space-5); padding-left: var(--space-5); display: flex; flex-direction: column; justify-content: center; gap: var(--space-4); }
.ov-rail-label { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-2); }
.ov-rail-value { font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--ink); }

/* The four distribution cards. Two up, one column once the row would
   squeeze the bars below reading width.

   ONE shape per card, in one order: heading, band, chips, foot
   (skyn-tools#875). The bars used to sit at two different heights
   because the gaps card floated a label above its track, so a row of
   cards read as misaligned; .ov-band is the shared 14px track every
   card's second row is, and nothing is allowed between it and the
   heading.

   The card is a COLUMN and its foot is pushed to the bottom edge (the
   .org-card precedent below), which is what keeps the last row aligned
   too. Grid stretches the cards in a row to one height, so without it
   a card whose chips wrap to two lines pushes its own foot a line below
   its neighbour's inside the same box, and the complaint that started
   this comes back one row lower. */
.ov-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin: var(--space-3) 0; }
.ov-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-3); box-shadow: var(--shadow-1); padding: var(--space-4); }
/* min-height, not the text's own line box: the heading row is a flex
   container, so a skeleton placeholder inside it is a flex ITEM and
   carries no text strut to hold the row open (the .org-card-head fixed
   height, one block down, is the same reservation for the same
   reason). Written as the line box it reserves, 12px at the body's
   1.55, so the two cannot drift silently. */
.ov-card-head { display: flex; align-items: center; gap: var(--space-2); height: 24px; margin-bottom: var(--space-3); font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
/* A card's scale note, in the .ov-hero-note idiom one section up: what
   the reader needs to size the band, stated in the heading row so the
   band itself stays clean. */
.ov-card-note { margin-left: auto; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--ink-3); }
/* margin-top: auto, not a fixed offset: it takes the slack the grid
   gave this card and puts all of it above the foot, so every foot in a
   row sits on its own card's bottom edge however many lines the chips
   above it took. */
.ov-card-foot { margin: auto 0 0; padding-top: var(--space-3); font-size: 13px; line-height: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ov-band { height: var(--space-2); border-radius: var(--radius-1); }
.ov-bar { display: flex; gap: var(--space-0); overflow: hidden; }
.ov-bar-empty { background: var(--surface-sunken); }
.ov-seg { display: block; min-width: 2px; border-radius: 0; }
/* A linked segment (SKY-1061): same box as the plain one. The focus
   ring is inset because .ov-bar clips overflow. */
a.ov-seg:hover { filter: brightness(0.88); }
a.ov-seg:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* The Data gaps card's foot link sits on the foot's own line. */
.ov-card-foot-split { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.ov-card-foot-link { flex: none; color: var(--accent-ink); text-decoration: none; }
.ov-card-foot-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.ov-card-foot-link:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-1); }
/* The legend's top margin; the legend itself is the shared .legend. */
.ov-legend { margin-top: var(--space-3); }
/* The legend placeholder is a skel-text-shaped bar sized per item by
   overviewChipWidth (staff.js). */
/* The gap range strip: one day end to end, filled to the median and
   banded on to the p95, with a tick at each. NO text lives on the
   track (skyn-tools#875); the two figures read as chips below it, laid
   out by the flow, so they cannot overlap at any pair of values. The
   fill and band hexes are the swatch colors OVERVIEW_GAP_CHIPS carries
   in staff.js; a change here changes both. */
.ov-strip-track { position: relative; background: var(--line); overflow: hidden; }
.ov-strip-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.ov-strip-band { position: absolute; top: 0; bottom: 0; background: var(--level-low); }
.ov-strip-tick { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--accent-strong); }
/* The org landing's roster summary cards (skyn-tools#912, umbrella
   #908). Four cards where four rosters used to stack: a head carrying
   the count and one View all link, three preview rows, and a signal
   foot line. Colocated with .ov-cards above because they are the same
   grid at the same width, and the head wears the same uppercase muted
   treatment .ov-card-head does; a card that looked like a near-miss of
   its neighbour one row up is the misalignment DESIGN.md's one-shape
   rule is about.

   ONE shape per card, in one order: head, rows, foot. NOTHING sits
   between the head and the first row, and the foot is pushed to the
   card's bottom edge with margin-top: auto (the .ov-card-foot and
   .org-card precedent), because the grid stretches a row of cards to
   one height and a card whose rows run shorter would otherwise land its
   foot mid-box beside its neighbour's. */
.dir-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-6); }
.dir-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-3); box-shadow: var(--shadow-1); padding: var(--space-4); }
.dir-head { display: flex; align-items: center; gap: var(--space-2); height: 24px; margin-bottom: var(--space-2); font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); }
/* The count is the card's own read's total, so it reads as a figure
   beside the name rather than as part of it: same size, lighter, and
   without the head's uppercase tracking. */
.dir-head .count { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* The one link in the head, and the card's only navigation. Sentence
   case, so it reads as a control rather than as a second heading. */
.dir-head .view-all { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-0); font-weight: 500; font-size: 12px; line-height: 16px; }
.dir-head .view-all .icon svg { width: 12px; height: 12px; }
.dir-rows { border-top: 1px solid var(--line); }
.dir-row { display: flex; align-items: center; gap: var(--space-3); padding: 0 var(--space-1); border-bottom: 1px solid var(--line); font-size: 14px; line-height: 20px; min-height: var(--row); }
/* A row with somewhere to go is an anchor (studies, device users), so
   the pointer treatment rides a.dir-row alone: the Staff and API keys
   rows have no per-record route on this surface and must not offer a
   press that does nothing. The anchor gives up the link color, since
   the row is a record rather than a phrase to click. */
a.dir-row { color: inherit; text-decoration: none; transition: background 100ms var(--ease), border-color 100ms var(--ease), box-shadow 100ms var(--ease); }
/* Card hover vocabulary (see .org-card:hover): the fill plus the
   border-and-shadow lift. The row keeps its 40px min-height and hairline. */
a.dir-row:hover { background: var(--accent-soft); border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.dir-row code { font-family: var(--font-mono); font-size: 12px; line-height: 16px; }
.dir-row .sub { color: var(--ink-2); font-size: 13px; line-height: 20px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dir-row .end { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-3); }
.dir-row .when { color: var(--ink-2); font-size: 13px; line-height: 20px; font-variant-numeric: tabular-nums; }
.dir-row .name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* An empty roster's one line, in the rows region rather than as a
   card of its own: an .empty-state card inside a card is two boxes for
   one fact, and this landing has no CTA to put under it (the create
   lives on the subpage the View all above points at). */
.dir-empty { margin: 0; display: flex; align-items: center; min-height: var(--row); padding: 0 var(--space-1); font-size: 13px; line-height: 20px; color: var(--ink-2); }
.dir-foot { margin-top: auto; padding-top: var(--space-3); margin-bottom: 0; font-size: 13px; line-height: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
/* Home's organization cards (skyn-tools#861): the platform screen's
   Organizations table, one card per organization, ordered by activity.
   Two up on the desktop grid, the .ov-cards shape.

   Each of a card's three rows carries its OWN fixed height, and the
   skeleton card emits the same three wrappers, so the loading and
   loaded states occupy exactly the same band without either one naming
   a total height (DESIGN.md: zero layout shift). */
.org-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.org-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-3); box-shadow: var(--shadow-1); padding: var(--space-4); display: grid; grid-template-rows: 24px 20px 32px 20px; row-gap: var(--space-2); align-items: center; cursor: pointer; transition: border-color 100ms ease, box-shadow 100ms ease; }
.org-card > * { min-width: 0; }
/* DESIGN.md's card rule: subtle border PLUS shadow change on hover, at
   the standard 100ms. Border alone reads as a highlight rather than as
   a liftable surface. */
.org-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.org-card-head { display: flex; align-items: center; gap: var(--space-2); height: 24px; }
/* The name never wraps: a two-line name would make one card taller
   than the card beside it and break the fixed band above. */
.org-card-name { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-card-head .row-menu { flex: none; }
/* Row 2: the id chip, then the state badges, in one clipped line. A
   third state belongs on the organization's own page, not a wrapped row. */
.org-card-chips { display: flex; align-items: center; gap: var(--space-2); height: 20px; overflow: hidden; white-space: nowrap; }
.org-card-chips > * { flex: none; }
.org-card-chips .skel-chip { height: 20px; }
.org-card-id { display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-2); font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-2); background: var(--surface-sunken); border-radius: var(--radius-1); }
/* Row 3 columns: the line (shrinks to 72px before anything else gives),
   the figure (never clips), the caption (clips first), the badge. */
.org-card-spark { display: grid; grid-template-columns: minmax(72px, var(--spark)) auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-2); height: 32px; }
.org-card-spark > .skel-block { grid-column: 1 / -1; height: var(--space-6); }
.org-card-spark .badge { justify-self: end; }
.org-spark { display: block; width: 100%; height: 32px; }
/* The dormant card's stand-in for the line, in the line's own box. */
.org-spark-none { font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-card-readings { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.org-card-cap { font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* One line, clipped rather than wrapped, for the same reason the name
   is: the row's height is what the skeleton reserves. */
.org-card-counts { display: flex; align-items: center; gap: var(--space-4); height: 20px; overflow: hidden; white-space: nowrap; font-size: 13px; line-height: 20px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.org-card-counts b { color: var(--ink); font-weight: 500; }
/* The surface's one ratified narrow breakpoint, reused rather than
   added to: the two-up card grids and the hero's side rail are all
   past their reading width by the time the chrome gutters tighten. */
@media (max-width: 700px) {
  .ov-cards, .org-cards, .dir-cards { grid-template-columns: minmax(0, 1fr); }
  .ov-rail { flex-basis: 100%; border-left: none; border-top: 1px solid var(--line); margin: var(--space-3) 0 0; padding: var(--space-3) 0 0; flex-direction: row; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }
}
/* Breadcrumb styles live in the shared skyn.css (skyn-tools#579). */
/* The old in-page section nav (skyn-tools#540) retired with the
   subject/user detail screen's move onto the settings rail + card
   pattern (skyn-tools#919); .settings-grid / .settings-rail /
   .settings-groups below now carry every multi-section screen,
   including this one, and the events chart's pin popover
   (.events-plot-wrap's isolation) no longer has a sticky strip to
   clear. */
/* The jump moves focus to the section heading for reading order; a
   focus ring on a non-interactive heading would be noise (the
   skip-link precedent above). */
.section-header h2:focus { outline: none; }
.code-handoff .field-row { margin: var(--space-3) 0; }
.code-handoff .field-row code { font-family: var(--font-mono); font-size: 15px; line-height: 20px; letter-spacing: 0.04em; margin-right: var(--space-2); }
/* Two-factor setup QR (skyn-tools#501): centered in the modal. The SVG
   paints its own white backing and quiet zone, so the code keeps spec
   contrast on any surface behind it. */
.totp-qr { display: flex; justify-content: center; margin: 0.75rem 0; }
.totp-qr svg { display: block; border: 1px solid var(--line); border-radius: 6px; }
/* Two-factor setup steps (skyn-tools#521): numbered scan-then-verify
   headers in the section-header voice; the manual secret/link path is
   demoted behind a closed disclosure so it cannot compete with the QR. */
.totp-step { margin: 1.1rem 0 0.45rem; font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.code-handoff .totp-step:first-child { margin-top: 0; }
.totp-fallback { margin: 0.6rem 0 0.2rem; }
.totp-fallback summary { cursor: pointer; color: var(--ink-2); font-size: 13px; line-height: 20px; user-select: none; }
.totp-fallback summary:hover { color: var(--ink); }
.totp-label { display: block; margin: var(--space-2) 0 var(--space-1); }
/* Timezone picker (skyn-tools#485): searchable dropdown in the New study
   modal. The options render in normal flow (not overlaid) so the modal
   grows with them instead of clipping them under its own scroll. */
.tz-picker { position: relative; }
.tz-options { max-height: 176px; overflow-y: auto; border: 1px solid var(--line-control); border-radius: var(--radius-2); margin-top: var(--space-1); background: var(--surface); }
.tz-options:empty { display: none; }
.tz-option { padding: var(--space-1h) var(--space-3); font-size: 13px; line-height: 20px; cursor: pointer; }
.tz-option:hover, .tz-option.active { background: var(--accent-soft); color: var(--accent-ink); }
.tz-empty { padding: var(--space-1h) var(--space-3); font-size: 13px; line-height: 20px; color: var(--ink-2); }
/* Enrollment slip (SKY-1146): the QR sits inline in the code dialog;
   the slip itself is on the page only while the dialog is open, hidden
   on screen and the only visible element when printing. */
.enroll-qr-block { margin-top: var(--space-3); }
.enroll-slip { display: none; }
@media print {
  html:has(body > .enroll-slip) body > *:not(.enroll-slip) { display: none !important; }
  .enroll-slip { display: block; padding: 24pt; color: black; background: white; }
  .enroll-slip h1 { font-size: 20pt; margin: 0 0 16pt; }
  .enroll-slip .slip-row { margin: 0 0 12pt; }
  .enroll-slip p { margin: 0; }
  .enroll-slip .slip-label { font-size: 11pt; }
  .enroll-slip .slip-value { font-family: var(--font-mono); font-size: 22pt; letter-spacing: 0.04em; }
  .enroll-slip .slip-qr { margin: 16pt 0; }
  .enroll-slip .slip-note { font-size: 11pt; }
}
/* Copyable handoff message (skyn-tools#486) in the code dialogs. */
.share-message { margin-top: 0.9rem; }
.share-message pre { margin: var(--space-1) 0 var(--space-2); padding: var(--space-2) var(--space-3); background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 6px; font-family: var(--font-mono); font-size: 13px; line-height: 20px; white-space: pre-wrap; word-break: break-word; }
/* Subject detail (skyn-tools#423): status banners. The old 30-day
   wear strip retired with the merged detail screen (skyn-tools#529);
   the wear calendar below owns the per-day picture. */
.subject-banner { border: 1px solid var(--warn-ink); background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; padding: 0.6rem 0.9rem; margin: 0.25rem 0 0.75rem; font-size: 13px; }
.subject-banner.info { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
/* Per-reading wear signals (skyn-tools#495): missing-signal placeholder
   plus the dotted-underline cue for the wear-rule title tooltip. */
.signal-none { color: var(--ink-3); }
.wear-rule-hint { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
/* Where a serial was before it entered this study (skyn-tools#790). The
   free text rides BESIDE the "prior use" chip, never inside it: study
   names are unbounded, and chip chrome roughly doubles the width of
   whatever it wraps (DESIGN.md). Visible rather than a title tooltip, so
   it reaches touch and screen readers (skyn-tools#536). */
.device-prior-where { color: var(--ink-3); font-size: 12.5px; }
/* Readings recorded by an app version the study does not approve
   (skyn-tools#771). An inset left accent rather than a tinted row: the
   badge in the App version cell already names the condition, and a
   full-row wash on a high-volume table reads as an error state. */
.row-flagged td:first-child { box-shadow: inset 3px 0 0 var(--warn-ink); }
/* Study export (skyn-tools#424): the self-test toggle in the new-export modal. */
.export-toggle { display: flex; align-items: center; gap: 0.5rem; margin: 0.6rem 0 0.25rem; font-weight: normal; }
.export-toggle input[type="checkbox"] { width: auto; margin: 0; }
.export-note { color: var(--ink-2); font-size: 13px; line-height: 20px; margin: 0.25rem 0 0; }
/* Org admin surface (skyn-tools#425): audit filters + invite study picker.
   The platform surface (skyn-tools#426) reuses the same filter row, plus
   a select for its cross-org organization filter. */
.audit-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: 0.25rem 0 0.75rem; }
.audit-filters input { max-width: 200px; }
.audit-filters select { max-width: 220px; }
/* Below the skyn-tools#527 chrome breakpoint the row wraps in a fixed
   order instead of wherever the caps happen to break it: the org
   select and each free-text filter take a full line in DOM order, and
   the two date inputs share the last line with Apply. The dates are
   one range control and must not split; the 8rem basis keeps the pair
   plus the button inside a 390px viewport's content width. */
@media (max-width: 700px) {
  .audit-filters select,
  .audit-filters input[type="text"] { flex: 1 1 100%; max-width: none; }
  .audit-filters input[type="date"] { flex: 1 1 8rem; min-width: 0; max-width: none; }
}
/* One-line expandable audit rows (skyn-tools#487), shared by both
   viewers. The compact line truncates with an ellipsis; clicking (or
   Enter/Space on) the row reveals the full entry in place, the same
   reveal idiom as the breath-tests panel. */
.audit-table { table-layout: fixed; }
.audit-table td, .audit-table th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-row td:first-child, .audit-table th:first-child { padding-right: 0; }
.audit-row { cursor: pointer; }
.audit-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.audit-row.expanded td { border-bottom: none; }
.audit-chevron { color: var(--ink-3); display: inline-flex; transition: transform 0.12s ease; }
.audit-row.expanded .audit-chevron { transform: rotate(90deg); }
.audit-expand td { white-space: normal; padding-top: 0; }
.audit-expand:hover { background: none; }
.audit-expand-body { font-size: 13px; line-height: 20px; color: var(--ink-2); }
.audit-expand-row { margin: 2px 0; }
.audit-expand-row .k { color: var(--ink-3); }
.audit-expand-pre { margin: 4px 0 0; padding: 0.5rem 0.75rem; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-1); font-family: var(--font-mono); font-size: 12px; line-height: 16px; overflow-x: auto; }
.invite-studies { max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; padding: 0.4rem 0.6rem; margin: 0.4rem 0; }
.invite-studies label { display: flex; align-items: center; gap: 0.5rem; padding: 0.15rem 0; font-weight: normal; }
.invite-studies input[type="checkbox"] { width: auto; margin: 0; }
/* Impersonation banner (skyn-tools#403): persistent on every screen
   while a platform admin is scoped into an organization. Warn palette
   on purpose: the elevated state should be unmissable. The wrap
   mirrors .page's width and side gutters (skyn.css) so the banner
   aligns with the content at every viewport. */
.impersonation-banner-wrap { max-width: var(--page-max); margin: 0 auto; padding: 0.75rem 2rem 0; }
/* The mirror must track skyn.css's narrow-chrome breakpoint and gutter
   value (skyn-tools#527) or the banner misaligns with the content
   column exactly on the viewports the breakpoint exists for. */
@media (max-width: 700px) {
  .impersonation-banner-wrap { padding: 0.75rem 1rem 0; }
}
.impersonation-banner { display: flex; align-items: center; gap: 0.6rem; border: 1px solid var(--warn-ink); background: var(--warn-bg); color: var(--warn-ink); border-radius: 6px; padding: 0.5rem 0.9rem; font-size: 13px; }
.impersonation-banner b { font-weight: 600; }
/* The duration line (skyn-tools#545) is context, not the headline:
   muted against the warn text so the org name stays the loudest. */
.impersonation-banner .impersonation-since { opacity: 0.75; }
/* Cap the exit button (skyn-tools#545: it now carries the org name)
   with the standing truncation pattern (overflow + ellipsis, as on
   .audit-table cells) so a long name cannot crowd the banner row. */
.impersonation-banner button { margin-left: auto; flex-shrink: 0; max-width: 45%; }
.impersonation-banner button .exit-label { overflow: hidden; text-overflow: ellipsis; }
/* Per-user detail (skyn-tools#467): the events chart, the wear
   calendar, and their shared legends, ported from the legacy admin
   user page and restyled to this surface. The band palette
   (low/moderate/high) is one source of truth for the calendar cells,
   the chart shading, and every legend. */
/* Level badges paint with the same lvl-* hue families as the data
   marks (skyn-tools#538): low is blue in the badges because it is blue
   in the calendar, the chart, and every legend. Green never means a
   level on this surface; it stays reserved for "active/correct" states
   so a low badge cannot read as a verdict. Soft background plus a
   deep text tone from the same family keeps each pairing at or above
   the 4.5:1 AA floor. */
.badge.lvl-low { background: var(--level-low-soft); color: var(--level-low-ink); }
.badge.lvl-moderate { background: var(--level-moderate-soft); color: var(--level-moderate-ink); }
.badge.lvl-high { background: var(--level-high-soft); color: var(--level-high-ink); }
/* Role-badge cells (skyn-tools#588): pills never break internally and
 * wrap as whole units, so several roles stack cleanly instead of
 * interleaving wrapped fragments. */
/* Single-line roles (skyn-tools#595): every row the same height, so
 * the roles cell never stacks. Overflow ellipsizes and the cell title
 * carries the full list. */
td.roles-cell { max-width: 360px; }
.roles-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roles-line .badge { vertical-align: middle; }
.roles-line .role-org { color: var(--ink-3); font-size: 12.5px; }
.roles-line .role-org::after { content: "   "; white-space: pre; }
/* The org settings page's one-page redesign (skyn-tools#903): a sticky
 * rail of jump links beside a column of bordered cards, replacing the
 * flat run of bare .section headers. Reused by the account settings
 * page (skyn-tools#915) and the subject/user detail screen
 * (skyn-tools#919), the latter through the shared rail factory in
 * staff.js rather than a page-local copy. Scoped under .settings-groups
 * rather than a new class on .section itself: the shared section
 * pattern stays the shared section pattern, and each carrier page is
 * what dresses its own sections as cards.
 *
 * The design system's SettingsRail: a --rail wide column, then the card
 * column. Below 900px the rail becomes a chip row above the cards (the
 * 900px block further down holds only that collapse). */
.settings-grid { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: var(--space-6); align-items: start; }
/* top clears the sticky app-header first (skyn-tools#949): the rail's
 * own gap rides after --band rather than from the viewport edge. Only
 * matters at desktop width; the collapse below drops the rail back to
 * position: static, where a sticky offset does nothing. */
.settings-rail { position: sticky; top: calc(var(--band) + var(--space-4)); display: flex; flex-direction: column; gap: var(--space-0); }
.settings-rail a {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-2);
  height: var(--control-md); padding: 0 var(--space-3); border-radius: var(--radius-2);
  font-size: 13px; line-height: 20px; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.settings-rail a:hover { color: var(--ink); background: var(--surface-sunken); text-decoration: none; }
.settings-rail a.active { background: var(--accent-soft); color: var(--accent-ink); }
.settings-rail a:focus-visible { outline: none; box-shadow: var(--ring); }
/* The platform-only groups' lock glyph in the rail, and the legend
 * line that explains it once instead of every locked link repeating
 * why (the org-admin viewer only; a platform admin's rail carries
 * neither). */
.rail-lock { display: inline-flex; opacity: 0.55; }
.rail-lock svg { width: var(--icon-sm); height: var(--icon-sm); display: block; }
.rail-legend {
  margin: var(--space-3) 0 0; padding: 0 var(--space-3); font-size: 12px; line-height: 16px; color: var(--ink-3);
  display: flex; align-items: center; gap: var(--space-1);
}
.rail-legend svg { width: var(--icon-sm); height: var(--icon-sm); display: block; }
/* Design system: "Two breakpoints: 900 and 700". At 900 the settings
 * rail folds into a chip row above the cards; this block holds only
 * that collapse (tests/test_staff_responsive_chrome.py pins it). */
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
  .settings-rail a { height: var(--control-sm); padding: 0 var(--space-2); font-size: 12px; line-height: 16px; border: 1px solid var(--line-strong); }
  .rail-legend { flex-basis: 100%; margin: 0; padding: 0; }
}
/* Each group (or, on the subject/user detail screen, each content
 * section) becomes a bordered card. Same .section/.section-header
 * elements makeSection always built; only the .settings-groups scope
 * borders and pads them, so a change to the shared header (a count
 * badge, an action) still reaches every carrier for free. The head is
 * the plain 32px section header inside the card padding. */
.settings-groups .section { border: 1px solid var(--line); border-radius: var(--radius-3); background: var(--surface); box-shadow: var(--shadow-1); padding: var(--space-4); }
/* A rail jump's landing cue (SKY-1059): the target card's border and
 * a soft ring take the accent, then settle back. A click on a short
 * page may scroll nothing, so this is the only sign it landed. */
.settings-groups .section.rail-flash { animation: skyn-rail-flash 900ms ease-out; }
@keyframes skyn-rail-flash {
  from { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-1); }
  to { border-color: var(--line); box-shadow: var(--shadow-1); }
}
.settings-groups .section-header { min-height: var(--control-md); height: auto; padding: 0; margin-bottom: var(--space-3); border-bottom: 0; }
/* Below the chrome breakpoint the page header's actions drop under the
 * h1; the settings card head already grows to fit a wrapped action row. */
@media (max-width: 700px) {
  .page-title-row { height: auto; min-height: var(--control-md); flex-wrap: wrap; row-gap: var(--space-2); }
  h1.page-title { flex: 1 1 100%; }
  .page-actions { margin-left: 0; flex-wrap: wrap; }
}
.settings-groups .section > div { padding: 0; }
/* A collapsed card (skyn-tools#926: Readings and Levels start
 * collapsed and fetch nothing until the first expand) has no body
 * beneath its header, so the head carries no bottom margin. */
.settings-groups .section.is-collapsed .section-header { margin-bottom: 0; }
/* A section-level paragraph (the Events card's TAC definition, the
 * exports narrowing note) sits between a card's header and body,
 * deliberately outside the innerHTML-wiped body; the card padding
 * carries the side inset, so it adds none (skyn-tools#919). */
.settings-groups .section > p { margin-left: 0; margin-right: 0; }
/* The stand-in for an action an org admin can never press (the
 * managedMarker() builder in staff.js): a 20px badge-shaped marker that
 * reads like a real action without being one. */
.managed {
  display: inline-flex; align-items: center; gap: var(--space-1);
  height: 20px; padding: 0 var(--space-2); border-radius: var(--radius-1);
  font-size: 12px; line-height: 16px; font-weight: 500;
  color: var(--ink-2); background: var(--surface-sunken); border: 1px solid var(--line);
}
.managed .icon svg { width: var(--icon-sm); height: var(--icon-sm); }
/* A card's first line: the setting's current value, a badge riding
 * beside it where the value is bounded vocabulary (On/Off,
 * Required/Not required, Visible/Hidden) rather than free text. The
 * 20px badge sits in the 20px line. */
.value-line { margin: 0; font-size: 14px; line-height: 20px; }
.value-line .badge { margin-left: var(--space-2); vertical-align: top; }
/* A hint riding right under a value-line (skyn-tools#915's account
 * settings cards: a name or an email under its own value-line) reads
 * as flush-attached without this: the base p rule already zeroes
 * margin-top, so a value-line's own bottom margin (also zero) leaves
 * no breathing room at all between the two lines. */
.value-line + .hint { margin-top: var(--space-1); }
/* The Data visibility group's three bundle rows (skyn-tools#792, moved
 * off a bulleted list by skyn-tools#903): name and hint on the left, a
 * real .badge on the right, each row divided from the one above it. */
.vis-rows { margin-top: var(--space-2); }
.vis-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.vis-row:first-child { border-top: none; padding-top: 0; }
.vis-row .vis-name { font-size: 14px; line-height: 20px; font-weight: 500; margin: 0; }
.vis-row.is-hidden .vis-name { color: var(--ink-3); }
.vis-row .hint { margin: 0; }
/* The cross-cutting caveats a card needs to state beyond its value
 * line (skyn-tools#903): a bordered note block rather than loose hint
 * paragraphs, so a card with more than one thing to say still reads as
 * one unit. */
.note {
  margin-top: var(--space-3); padding: var(--space-2) var(--space-3);
  background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-2);
  color: var(--ink-2); font-size: 13px; line-height: 20px;
}
.note p { margin: 0; }
.note p + p { margin-top: var(--space-2); }
/* The show-disabled toggle in the section header (skyn-tools#595). */
.toggle-label {
  display: inline-flex; align-items: center; gap: var(--space-1h);
  font-size: 13px; line-height: 20px; color: var(--ink-2); cursor: pointer;
  user-select: none;
}
/* Merged identity cell (skyn-tools#591): the name leads and the email
 * rides underneath, muted; nameless rows show the email as the
 * primary line. */
.person-cell { display: flex; flex-direction: column; gap: 0.1rem; }
.person-cell .person-email, .person-cell .person-email code { font-size: 12px; color: var(--ink-3); }
/* The managed-studies modal list (skyn-tools#591). */
.manages-list { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.manages-list li { margin: 0.2rem 0; }
/* Roles on the staff account screen, the facts strip's first cell
 * (SKY-1058; a described list under skyn-tools#761 before that). Each
 * role is its badge with the scope beside it: plain muted text for a
 * global role's fixed phrase, a link for an organization, which is the
 * DESIGN.md badges rule (free text rides beside a chip, never inside
 * it). The badges never shrink; a long org name ellipsizes instead. */
.role-pills { display: inline-flex; align-items: center; gap: var(--space-3); min-width: 0; max-width: 100%; }
.role-pill { display: inline-flex; align-items: center; gap: var(--space-1); min-width: 0; }
.role-pill .role-scope { font-size: 12px; line-height: 16px; overflow: hidden; text-overflow: ellipsis; }
.role-pill span.role-scope, .role-pill .role-sep { color: var(--ink-3); }
.role-pills .badge { flex: none; }
/* Role descriptions in the role-change modals (skyn-tools#759): those
 * modals offer buttons rather than a select, so each role they offer
 * explains itself in place. Hint scale, because the sentences are
 * secondary to the arms below them. No bullets and no indent: these
 * are two short explanations, not a list of things. The role name
 * leads on its own line in the body color, so a reader can scan for
 * the role and then read, and so the sentence under it needs no
 * separator punctuation. */
.role-description-list { list-style: none; margin: 0.6rem 0 0; padding: 0; font-size: 12.5px; color: var(--ink-3); }
.role-description-list li { margin: 0.5rem 0 0; }
.role-description-list li:first-child { margin-top: 0; }
.role-description-list b { display: block; color: var(--ink); }
.legend-row { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 0.55rem; font-size: 12px; color: var(--ink-3); }
.legend-key { display: inline-flex; align-items: center; gap: 0.35rem; }
.legend-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; border: 1px solid color-mix(in srgb, var(--ink) 6%, transparent); }
.legend-swatch.low { background: var(--level-low); }
.legend-swatch.moderate { background: var(--level-moderate); }
.legend-swatch.high { background: var(--level-high); }
.legend-swatch.band-moderate { background: var(--level-moderate-soft); }
.legend-swatch.band-high { background: var(--level-high-soft); background-image: repeating-linear-gradient(45deg, transparent 0 3px, color-mix(in srgb, var(--level-high) 45%, transparent) 3px 6px); }
.legend-swatch.no-readings { background: var(--surface); border: 1px dashed var(--line-control); }
.legend-swatch.bar-low, .legend-swatch.bar-moderate, .legend-swatch.bar-high { height: 4px; }
.legend-swatch.bar-low { background: var(--level-low); }
.legend-swatch.bar-moderate { background: var(--level-moderate); }
.legend-swatch.bar-high { background: var(--level-high); }
.legend-line { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--ink); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.legend-dot.included { background: var(--breath-teal); }
.legend-dot.excluded { background: var(--ink-4); }
/* Screen-reader-only text (skyn-tools#544): visually hidden but still
   in the accessibility tree, the standard clip pattern. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Events chart: TAC line + elevated-period shading + breath pins, with
   a session stepper and pan/zoom. Axis labels are HTML around the SVG
   so they stay crisp under the non-uniform horizontal scaling. */
.events-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.6rem; }
.events-controls .control-group { display: inline-flex; align-items: center; gap: 0.3rem; }
.events-controls .control-group.right { margin-left: auto; }
.events-session-label { font-size: 12.5px; color: var(--ink); min-width: 11rem; text-align: center; font-variant-numeric: tabular-nums; }
.events-session-label .muted { color: var(--ink-3); }
.events-plot-area { position: relative; display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 0.4rem 0.4rem 0.4rem 0; }
/* The plot area is keyboard-focusable (skyn-tools#544); same focus
   ring as buttons (skyn.css). */
.events-plot-area:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
/* Three value labels space-between in the flex column; the rotated
   title is absolutely positioned OUT of the flow so the midpoint
   label's flex slot is the exact vertical center, where the middle
   gridline runs (skyn-tools#544). */
.events-yaxis { position: relative; flex: 0 0 auto; width: 3.4rem; height: 200px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; padding-right: 0.4rem; font-size: 12px; line-height: 16px; color: var(--ink-3); font-family: var(--font-mono); }
.events-yaxis .axis-title { position: absolute; left: 0; top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; font-family: inherit; color: var(--ink-3); margin: 0; }
/* isolation contains the pin popover's z-index 5 to the chart's own
   stacking order, so it stays under the sticky section nav (z-index 2
   in the page's order) instead of painting over it. */
.events-plot-wrap { position: relative; isolation: isolate; flex: 1 1 auto; height: 200px; cursor: grab; overflow: hidden; touch-action: pan-y; }
.events-plot-area.grabbing .events-plot-wrap { cursor: grabbing; }
.events-plot-wrap svg { display: block; width: 100%; height: 200px; }
/* Tick labels are absolutely positioned at their tick's exact fraction
   of the plot width (drawPlot sets `left`), centered on it; the end
   labels pin inward so nothing overflows the plot edges. */
.events-xaxis { position: relative; height: 16px; margin: 0.3rem 0 0 3.4rem; font-size: 12px; line-height: 16px; color: var(--ink-3); font-family: var(--font-mono); }
.events-xaxis span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.events-xaxis span:first-child { transform: none; }
.events-xaxis span:last-child { transform: translateX(-100%); }
.events-xaxis-title { text-align: center; margin: 0.15rem 0 0 3.4rem; font-size: 12px; line-height: 16px; color: var(--ink-3); }
.events-pin-head { fill: var(--breath-teal); stroke: var(--surface); stroke-width: 1.5; cursor: pointer; }
/* Focused pins get an outline ring: SVG elements cannot take the
   box-shadow ring, and the outline survives the non-uniform svg
   scaling (skyn-tools#544). */
.events-pin-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.events-pin.excluded .events-pin-head { fill: var(--line-control); }
.events-pin-stem { stroke: var(--breath-teal); stroke-width: 1; opacity: 0.85; }
.events-pin.excluded .events-pin-stem { stroke: var(--line-control); opacity: 0.5; stroke-dasharray: 3 3; }
.events-pin-pop { position: absolute; z-index: 5; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 12px; line-height: 16px; padding: var(--space-1) var(--space-2); border-radius: var(--radius-1); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-2); }
.events-pin-pop .pop-bac { font-weight: 600; font-variant-numeric: tabular-nums; }
.events-pin-pop .pop-time { opacity: 0.85; margin-left: 0.4rem; }
.events-pin-pop .pop-pred { display: block; margin-top: 2px; opacity: 0.85; }
.events-skel { height: 200px; border-radius: 4px; }
/* Subject-page section placeholders, named rather than inline so the
   heights stay on the 4px grid. Gaps: the loaded strip, its margins and
   its scale row measure 48px, so the swap does not move the table below.
   Breath tests and Wear timeline: the loaded body varies with the data and
   the viewport width (the calendar runs roughly 330px at 1372 to 990px at
   1024), so these stay compact stand-ins rather than a guess at one state. */
.gaps-skel { height: 48px; border-radius: var(--radius-1); }
.breath-skel { height: 128px; border-radius: var(--radius-1); }
.wear-skel { height: 160px; border-radius: var(--radius-1); }
/* Text alternative for the chart (skyn-tools#544): the same breath
   tests the pins draw, as a collapsible table below the legend. */
.events-text-alt { margin-top: 0.55rem; font-size: 12.5px; }
.events-text-alt summary { cursor: pointer; color: var(--ink-3); width: fit-content; }
.events-text-alt summary:hover { color: var(--ink); }
.events-text-alt .table-scroll { margin-top: 0.4rem; }
.events-text-alt th, .events-text-alt td { padding: var(--space-1) var(--space-3); }
/* Breath-tests curation panel (skyn-tools#470), ported from the legacy
   admin panel (skyn-tools#275): fixed-height, grouped by day, scroll
   within. Rows lead with time + BAC + the wearable-agreement chip + an
   exclude toggle; source / provenance / editable note reveal on row
   tap. */
.bt-summary { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.6rem; font-size: 12.5px; color: var(--ink-3); }
.bt-summary strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.bt-summary .wa-dist { display: inline-flex; gap: 0.5rem; align-items: center; }
.bt-summary .wa-dist .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.bt-panel { max-height: 22rem; overflow-y: auto; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); }
.bt-day-header { position: sticky; top: 0; z-index: 1; background: var(--surface-sunken); border-bottom: 1px solid var(--line); padding: 5px 12px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.01em; display: flex; justify-content: space-between; }
.bt-day-header .bt-day-count { font-weight: 400; color: var(--ink-3); }
.bt-item { border-bottom: 1px solid var(--line); }
.bt-item:last-child { border-bottom: none; }
.bt-row { display: flex; align-items: center; gap: 0.75rem; padding: 7px 12px; cursor: pointer; }
.bt-row:hover { background: var(--accent-soft); }
.bt-chevron { color: var(--ink-3); display: inline-flex; transition: transform 0.12s ease; }
.bt-item.expanded .bt-chevron { transform: rotate(90deg); }
.bt-time { flex: 1 1 auto; font-size: 13px; color: var(--ink); }
.bt-bac { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; color: var(--ink); }
.bt-bac .bt-bac-unit { font-weight: 400; color: var(--ink-3); font-size: 12px; line-height: 16px; }
.bt-item.excluded .bt-time,
.bt-item.excluded .bt-bac { opacity: 0.5; }
.bt-item.excluded .bt-bac { text-decoration: line-through; }
.bt-exclude-btn { flex: 0 0 auto; display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 4px; padding: 3px; cursor: pointer; color: var(--ink-3); transition: color 0.1s ease, border-color 0.1s ease; }
.bt-exclude-btn:hover { color: var(--ink); border-color: var(--ink-4); }
.bt-item.excluded .bt-exclude-btn { color: var(--accent-strong); border-color: var(--accent); }
.bt-detail { display: none; padding: 0 12px 10px 32px; font-size: 12px; color: var(--ink-3); }
.bt-item.expanded .bt-detail { display: block; }
.bt-detail-row { margin: 2px 0; }
.bt-detail-row code { font-family: var(--font-mono); font-size: 12px; line-height: 16px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-1); padding: 0 var(--space-1); }
.bt-note-input { width: 100%; max-width: 24rem; box-sizing: border-box; height: var(--control-sm); margin-top: var(--space-1); font: inherit; font-size: 13px; line-height: 20px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-control); border-radius: var(--radius-2); padding: 0 var(--space-2); }
.bt-note-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.bt-item.saving { opacity: 0.6; }
/* Wearable-agreement chip on a breath row (skyn-tools#278): the level
   the wearable predicted nearest the test, for eyeballing TAC vs
   ground truth. */
.bt-pred { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; }
.bt-pred .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.bt-pred .dot.low { background: var(--level-low); }
.bt-pred .dot.moderate { background: var(--level-moderate); }
.bt-pred .dot.high { background: var(--level-high); }
.bt-pred.none { color: var(--ink-3); }
/* Wear calendar: three dated month blocks. A day's fill is hours worn
   in four quiet accent steps (SKY-1077), shared with the legend swatches
   so they cannot drift; the level mix is a 4px bar along the bottom edge
   (moderate or high days only), a corner dot marks a breath test, and a
   click opens the day popup. */
.cal-day.hrs-1, .legend-swatch.hrs-1 { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.cal-day.hrs-2, .legend-swatch.hrs-2 { background: color-mix(in srgb, var(--accent) 17%, var(--surface)); }
.cal-day.hrs-3, .legend-swatch.hrs-3 { background: color-mix(in srgb, var(--accent) 26%, var(--surface)); }
.cal-day.hrs-4, .legend-swatch.hrs-4 { background: color-mix(in srgb, var(--accent) 36%, var(--surface)); }
.cal-months { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.cal-month { flex: 1 1 16rem; min-width: 14rem; }
.cal-month-label { font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 0 0 0.4rem; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-weekdays { margin-bottom: 3px; font-size: 12px; line-height: 16px; color: var(--ink-3); text-align: center; text-transform: uppercase; letter-spacing: 0.03em; }
.cal-day { position: relative; aspect-ratio: 1 / 1; min-height: 30px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.cal-day.has-data { cursor: pointer; }
/* Clickability must be visible at rest, not hover-only (skyn-tools#537):
   the day number in cells with data reads as a link. :not(.empty-day)
   because has-data rides every in-range cell (the server timeline is
   dense), and a link cue on a day whose popup only says "no data"
   advertises nothing. */
.cal-day.has-data:not(.empty-day) .cal-day-num { text-decoration: underline; text-underline-offset: 1px; }
.cal-day.has-data:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Keyboard focus gets the hover affordance (skyn-tools#536): the day
   cells are focusable buttons, not click-only divs. */
.cal-day.has-data:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cal-day.empty-day { background: var(--surface); border: 1px dashed var(--line-control); }
.cal-day.out-of-range { background: transparent; border-color: transparent; }
.cal-lvl-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; display: flex; }
.cal-lvl-seg { display: block; height: 100%; }
.cal-lvl-seg.low { background: var(--level-low); }
.cal-lvl-seg.moderate { background: var(--level-moderate); }
.cal-lvl-seg.high { background: var(--level-high); }
.cal-day-num { position: absolute; top: 1px; left: 3px; z-index: 1; font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; color: var(--ink); }
.cal-day.out-of-range .cal-day-num { color: var(--ink-3); }
.cal-bac-dot { position: absolute; top: 2px; right: 2px; z-index: 1; width: 8px; height: 8px; border-radius: 50%; background: var(--breath-teal); border: 1.5px solid var(--surface); box-shadow: 0 0 0 0.5px var(--line-strong); }
/* Day popup body (rendered through the shared openModal). */
.day-popup-stat { margin: 0.35rem 0; font-size: 13px; }
.day-popup-stat .label { color: var(--ink-3); }
.day-popup-stat strong { font-variant-numeric: tabular-nums; }
.day-popup-levels { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: 0.35rem 0; font-size: 12.5px; }
.day-popup-levels .lvl { display: inline-flex; align-items: center; gap: 0.3rem; }
.day-popup-h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin: 0.9rem 0 0.35rem; border: none; }
.day-popup-tests { list-style: none; margin: 0; padding: 0; }
.day-popup-tests li { display: flex; justify-content: space-between; gap: 1rem; padding: 3px 0; font-size: 13px; border-bottom: 1px solid var(--line); }
.day-popup-tests li:last-child { border-bottom: none; }
.day-popup-tests .test-bac { font-variant-numeric: tabular-nums; font-weight: 600; }
.day-popup-tests li.excluded { color: var(--ink-3); }
.day-popup-tests li.excluded .test-bac { text-decoration: line-through; }
.day-popup-empty { color: var(--ink-3); font-size: 12.5px; margin: 0.35rem 0; }
/* Sub-day wear strip (SKY-1005). Fixed rows (caption 20, strip 24,
   ticks 16, legend 20 with its 8px top margin) so the skeleton's
   92px matches the loaded shell. Worn and density cells use the
   accent; not worn the warn ink; no data the empty surface, hatched. */
.wear-strip-wrap { min-height: 92px; }
.wear-strip-zone { margin: 0; height: 20px; line-height: 20px; font-size: 12.5px; color: var(--ink-3); }
.wear-strip { display: grid; height: 24px; margin-top: 4px; border: 1px solid var(--line-control); border-radius: var(--radius-1); overflow: hidden; background: var(--surface); box-sizing: border-box; }
.wear-cell, .legend-swatch.wc-worn, .legend-swatch.wc-read, .legend-swatch.wc-off, .legend-swatch.wc-none { display: block; }
.wear-cell.wc-worn, .wear-cell.wc-read, .legend-swatch.wc-worn, .legend-swatch.wc-read { background: var(--accent); }
.wear-cell.wc-off, .legend-swatch.wc-off { background: var(--warn-ink); }
.wear-cell.wc-none, .legend-swatch.wc-none { background: var(--surface); background-image: repeating-linear-gradient(45deg, transparent 0 3px, color-mix(in srgb, var(--line-control) 45%, transparent) 3px 6px); }
.legend-swatch.wc-none { border-color: var(--line-control); }
.wear-cell.wc-future { background: var(--surface); }
.wear-cell.wc-paused, .legend-swatch.wc-paused { background: var(--line-control); }
.legend-swatch.wc-paused { display: block; }
/* Paused day marker (SKY-1074): a right-edge rule, clear of the
   level bar along the bottom edge (SKY-1077) and the day number. */
.cal-day .cal-paused-mark { position: absolute; right: 0; top: 0; bottom: 4px; width: 3px; z-index: 1; background: var(--line-control); }
.cal-day.paused-partial .cal-paused-mark { bottom: auto; height: 50%; }
.legend-swatch.cal-paused { width: 3px; background: var(--line-control); }
.wear-ticks { position: relative; height: 16px; font-size: 12px; line-height: 16px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.wear-tick { position: absolute; top: 0; transform: translateX(-50%); }
.wear-tick.first { transform: none; }
.wear-tick.last { transform: translateX(-100%); }
.wear-strip-legend { margin-top: 8px; height: 20px; align-items: center; }
.wear-strip-skel { height: 92px; border-radius: var(--radius-1); }
/* Wear-accuracy advisory panel (skyn-tools#472): platform admins only.
   Ported from the legacy admin user page: in-page range chips, headline
   metrics as stat cards, visual 2x2 confusion matrix. */
.wa-controls { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.5rem; }
.wa-controls .row-label { font-size: 12px; color: var(--ink-3); }
.wa-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin: var(--space-3) 0; }
.wa-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-3); box-shadow: var(--shadow-1); padding: var(--space-3) var(--space-4); display: grid; grid-template-rows: 16px 28px; row-gap: var(--space-1); min-width: 0; }
.wa-stat .label { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-stat .value { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.wa-matrix-wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.wa-matrix { border-collapse: separate; border-spacing: 5px; }
.wa-matrix th { height: auto; font-size: 12px; line-height: 16px; color: var(--ink-2); font-weight: 600; padding: 2px 6px; text-align: center; }
.wa-matrix th.rowhead { text-align: right; white-space: nowrap; }
.wa-cell { border-radius: 6px; padding: 0.65rem 1rem; text-align: center; min-width: 6.5rem; }
.wa-cell .n { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.wa-cell .lbl { font-size: 12px; line-height: 16px; display: block; opacity: 0.75; margin-top: 1px; }
.wa-cell.correct { background: var(--ok-bg); color: var(--ok-ink); }
/* err-bg, not lvl-high-soft (skyn-tools#538): the pixels are the same
   today, but "classifier was wrong" is an error state, not a level, and
   the two tokens must be free to diverge. */
.wa-cell.wrong { background: var(--err-bg); color: var(--err-ink); }
.wa-range-note { font-size: 12px; color: var(--ink-3); margin: 0.3rem 0 0; }
.wear-raw-json { margin-top: 1rem; }
.wear-raw-json summary { cursor: pointer; color: var(--ink-3); font-size: 12.5px; user-select: none; }
.wear-raw-json summary:hover { color: var(--ink); }
.wear-raw-json pre { margin: 0.5rem 0 0; padding: 0.75rem; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 4px; max-height: 24rem; overflow: auto; }
/* Sortable table headers (skyn-tools#532): the th itself is the
   control (tabindex plus Enter/Space, the audit-row idiom; a nested
   button would fight the th's columnheader semantics), aria-sort names
   the state, and the chevron is the visible indicator: dimmed on
   inactive sortable columns to advertise the affordance, solid on the
   active one, rotated for ascending (chevron-down is the one vertical
   chevron in ICON_SVG). */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--ink); }
th.sortable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
th.sortable .sort-indicator { display: inline-flex; vertical-align: -2px; margin-left: 2px; opacity: 0.35; }
th.sortable .sort-indicator .icon svg { width: 12px; height: 12px; }
th.sortable[aria-sort="ascending"] .sort-indicator, th.sortable[aria-sort="descending"] .sort-indicator { opacity: 1; color: var(--ink); }
th.sortable[aria-sort="ascending"] .sort-indicator svg { transform: rotate(180deg); }
/* Section-header filter inputs (skyn-tools#532): compact enough to sit
   in the actions row next to the section's buttons. */
.section-actions input.table-filter { max-width: 170px; height: var(--control-md); }
/* Section-header day pickers (skyn-tools#543): capped width in the
   actions row; height, font, and border come from the shared Form
   controls rule in skyn.css. */
.section-actions input.range-day { max-width: 150px; }
/* Resolved-day text beside each picker (skyn-tools#543 review): the
   picker is the pin control and stays empty while the walk follows the
   latest day, so this text names the day the table shows. */
.section-actions .range-resolved { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
/* Gap threshold picker: the Data gaps section's own control, sized like
   the other actions-row controls above. */
.section-actions select.gap-threshold { max-width: 175px; height: var(--control-md); padding-top: 0; padding-bottom: 0; }
/* Roster compliance filter: the triage select, sized like the other
   actions-row controls above. */
.section-actions select.compliance-filter { max-width: 190px; height: var(--control-md); padding-top: 0; padding-bottom: 0; }
/* The roster's Compliance cell holds two chips (sync recency, then
   reminder status), spaced without a wrapper element. They sit on one
   line with no vertical margin, so a two-chip cell never grows its row
   past --row (SKY-1041). */
td.compliance-cell { white-space: nowrap; }
td.compliance-cell .badge + .badge { margin-left: var(--space-1); }
/* The roster's Battery cell (skyn-tools#800): a charge figure, and a
   chip after it only for the subjects who need one. Left-aligned rather
   than .num, because a right-aligned column whose chip is present on
   some rows and absent on others lands its numbers in a different place
   per row. Tabular figures so the charges still read as a column, and
   nowrap so a chip never drops under its own number. */
td.battery-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
td.battery-cell .badge { margin-left: var(--space-2); }
/* Data-gap strip: an uptime bar over the enrolled window. The track is
   the covered stretch and the marks are cut out of it, so the filled
   parts cost no elements. Green is the "on" state, never a level
   (DESIGN.md); the gap marks ride the error tokens, the same choice the
   wear-accuracy matrix's wrong cells make. */
.gap-strip { position: relative; height: 1.5rem; border-radius: 4px; border: 1px solid var(--line); background: var(--ok-bg); overflow: hidden; margin: 0.15rem 0 0.3rem; }
.gap-strip-gap { position: absolute; top: 0; bottom: 0; background: var(--err-bg); border-left: 1px solid var(--err-ink); box-sizing: border-box; }
.gap-strip-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-bottom: 0.75rem; }
/* Header lookup (skyn-tools#531): the results are a keyboard-operable
   list of real anchors inside the shared modal. */
.lookup-panel .field input { width: 100%; }
.lookup-results { margin-top: 0.6rem; max-height: 20rem; overflow-y: auto; }
.lookup-group-title { font-size: 12px; line-height: 16px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; margin: 0.7rem 0 0.25rem; }
.lookup-results a.lookup-result { display: block; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 0.35rem; text-decoration: none; color: var(--ink); transition: background 100ms ease, border-color 100ms ease; }
.lookup-results a.lookup-result:hover, .lookup-results a.lookup-result:focus-visible { background: var(--accent-soft); border-color: var(--accent); }
.lookup-primary { display: block; font-weight: 600; }
.lookup-secondary { display: block; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
/* A match the caller can only open by impersonating its organization:
   the row still navigates (to the org's own screen), so it keeps the
   anchor chrome and gains a third line naming the way in. */
.lookup-results a.lookup-gated { border-style: dashed; }
.lookup-gated-note { display: block; font-size: 12px; line-height: 16px; color: var(--ink-3); font-style: italic; margin-top: var(--space-1); }
.lookup-note { font-size: 12px; color: var(--ink-3); margin-top: 0.4rem; }
/* Pending rows (skyn-tools#571): the same box a result lands in,
   holding the primary/secondary skeleton pair, so the swap from
   pending to real matches costs no layout shift. The shimmer and its
   reduced-motion flattening both come from the shared .skeleton rule. */
.lookup-results .lookup-pending { padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 0.35rem; }
.lookup-pending .skeleton { display: block; }
.lookup-pending .skel-text.short { margin-top: var(--space-1); }
/* The Usage page (SKY-1011): the partner picker, the identity block, and
   the features table's group rows. Page-specific layout only; the
   facts strips, badges, tables, and buttons are the shared ones. */
.usage-hero { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-2); padding: 1rem 1.1rem 1.05rem; margin: 1.1rem 0 0; }
.usage-hero-head { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.7rem; }
.usage-hero-title { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--ink); }
.usage-hero-head .section-note { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.usage-picker { position: relative; max-width: 640px; }
.usage-picker > .icon { position: absolute; left: 0.7rem; top: 14px; color: var(--ink-3); pointer-events: none; }
.usage-picker input { width: 100%; font-size: 15px; height: 44px; padding: 0 0.75rem 0 2.1rem; }
.usage-pick-list { position: absolute; z-index: 20; left: 0; right: 0; top: 48px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-pop); padding: 0.3rem; max-height: 320px; overflow: auto; }
.usage-pick-list[hidden] { display: none; }
.usage-pick-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; height: auto; padding: 0.45rem 0.6rem; border: none; border-radius: 6px; background: transparent; text-align: left; justify-content: flex-start; }
.usage-pick-item:hover, .usage-pick-item.is-active { background: var(--accent-soft); }
.usage-pick-name { font-weight: 600; }
.usage-pick-item code { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.usage-pick-empty { padding: 0.5rem 0.6rem; color: var(--ink-3); font-size: 12.5px; }
.usage-recent { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; margin-top: 0.6rem; font-size: 12.5px; color: var(--ink-3); }
.usage-recent:empty { display: none; }
.usage-empty { margin-top: 1rem; }
.usage-partner-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin: 1.2rem 0 0.2rem; }
.usage-partner-kicker { width: 100%; margin-bottom: calc(-1 * var(--space-1)); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.usage-partner-name { margin: 0; font-size: 1.2rem; font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--ink); }
.usage-kind:empty { display: none; }
.usage-open-org { margin-left: auto; }
.usage-fact-lead .ov-fact-label { color: var(--ink); }
.usage-features { margin-top: 1.4rem; }
.usage-features .section-header .section-note { font-size: 12px; color: var(--ink-3); }
.usage-feat-name { font-weight: 600; }
.usage-feat-desc { display: block; font-size: 12.5px; color: var(--ink-3); max-width: 30rem; }
.usage-setting-cell { white-space: nowrap; }
.usage-limit { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.usage-limit.is-at { color: var(--ink); font-weight: 600; }
.usage-setting { font-size: 12px; color: var(--ink-3); }
.usage-setting.is-custom { color: var(--accent-strong); font-weight: 600; }
tr.usage-group td, tr.usage-group:hover td { background: var(--surface-sunken); font-size: 12px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); height: var(--row-head); padding: 0 var(--space-3); }
tr.usage-group .usage-feat-desc { text-transform: none; letter-spacing: 0; font-weight: 400; }
.usage-features td.actions > * { margin-left: var(--space-2); vertical-align: middle; }
.usage-menu-slot { display: inline-block; width: var(--control-sm); }
/* The pack header holds a kicker, a description and a button, so it takes
   its own shape: 48px border included (two 16px lines centred with ~8px
   above and below), while the one-line group rows stay at --row-head
   (SKY-1053). Height on a cell is a floor, as for every row. */
tr.usage-group.usage-pack-head td { height: var(--space-12); padding: 0 var(--space-3); }
tr.usage-group.usage-pack-head .usage-feat-desc { font-size: 12px; line-height: 16px; }
.usage-limit-field { display: flex; flex-direction: column; gap: 0.4rem; }
.usage-limit-field input[type="number"] { width: 9rem; }

/* The high-band hatch pattern in the events chart (SVG pattern children are painted from CSS, not presentation attributes). */
.events-hatch-bg { fill: var(--level-high-soft); }
.events-hatch-line { stroke: var(--level-high); }

/* Device diagnostics by serial (SKY-1130): the lookup row. */
.device-lookup { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); }
.device-lookup input { flex: 1 1 16rem; max-width: 28rem; }

/* Device list by serial (SKY-1132): the filter row reuses .device-lookup; the pager sits under the table. */
.device-lookup select { flex: 0 1 16rem; }
.device-pager { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.device-pager .pager-pos { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
