/**
 * /mdr-content/css/structure.css — shared colourless structure layer
 *
 * The middle of three CSS load layers. Loads AFTER essential.css and BEFORE the
 * area file:  essential.css → structure.css → <area>.css → (optional) page.css.
 * Holds the recurring STRUCTURE building blocks shared by Frontend, Member and
 * Admin — box/card/button/field shape, grid helpers, message and layout
 * geometry — WITHOUT colour. Every colour comes through the semantic --c-*
 * variable contract, which whichever area file loads last fills with its own
 * palette; this file defines no concrete hex values, with only a few deliberate
 * universal signals (the red-amber-green password-strength meter and the arc-*
 * status badges, which are identical across all areas). Widths come from the
 * --w-* tokens. A block moves in here once a SHARED pattern surfaces across
 * pages; page-specific layout stays in that page's own file.
 *
 * Building blocks (all prefixed s-, unless noted): page shell / sticky footer
 * (.s-shell*), centred card (.s-card*), self-profile & detail layout
 * (.s-form-*, .s-prof-*, .s-status, .s-fieldset/.s-legend, read-only and
 * editable field grids), inset panel (.s-panel), form field (.s-field*),
 * reusable password field module (.pw-* — meter, show/hide, generate, match
 * hint), primary/inline/ghost buttons (.s-btn*), success/error message boxes
 * (.s-msg*), secondary hint text (.s-note), metric status grid (.s-stat*),
 * pop-open layers (.s-overlay/.s-modal/.s-menu/.s-panel-head, toggled via
 * .is-open), the railed content+menu layout (.s-shell-railed/-content/-rail with
 * rail links and bottom sub-entries), navigation tiles (.s-tiles/.s-tile, with a
 * danger variant), data table (.s-table), sub-page header (.s-subhead*),
 * multi-column boxes (.s-cols) and the shared error-page block (.s-err-*).
 *
 * Two documented naming exceptions keep their own family prefix because they are
 * shared by Admin AND Member and renaming would churn markup + JS: the archive
 * record curation family (arc-*: two-column search view, status badges, forms,
 * checklists, location search, edit/review/delete surfaces, single-page create
 * modal) and the avatar/preview-image cropper (tm-cropper). Also here: the
 * long-job progress bar (.s-progress), the external-link marker (.s-ext-link, an
 * appended ↗ arrow), a screen-reader-only
 * label helper (.s-visually-hidden), the numbered page links (.s-pager) and the
 * generic deactivated-state modifier (.s-inactive).
 *
 * @package    TaNaSi-MDR
 * @author     Keylam Folker
 * @co-author  Claude (Anthropic)
 * @copyright  2026 TaNaSi
 * @license    proprietary — see RULES.md
 * @link       https://ta-na-si.eu
 * @since      1.0.0
 */

/* ── PAGE SHELL / STICKY FOOTER (optional, shared geometry) ──────────────────
   "Sticky footer": always pushes the footer to the bottom of the window, even
   with little content. Pure geometry (no colour). Activated via OWN classes —
   anyone not writing .s-shell into their HTML is unaffected. Safe to keep here
   even though only the Member area uses it so far; Frontend/Admin can follow
   later. Does NOT bind to body/main/footer as an element selector, so
   existing areas are left unchanged. */
.s-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.s-shell-main {
    flex: 1;          /* stretches, pushing the footer down */
    width: 100%;      /* full width in the flex context (otherwise max-width
                         contents shrink to their content width = "squashed") */
}

/* ── CARD (centred single action: login, dialog, error page) ────────────────
   Geometry of a free-standing card on empty space. Colour/shadow tone via
   --c-*. The WIDTH is deliberately NOT set here — it is context-dependent: the
   login card caps itself at --w-narrow via .login-card, dashboard cards fill
   their grid slot. This keeps .s-card a pure shape (share the structure, not
   the colour). */
.s-card-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--c-bg);
    color: var(--c-ink);
}
.s-card {
    background: var(--c-card);
    border-radius: var(--radius, 12px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, .10);
    padding: 40px 44px;
    width: 100%;
}

/* ── SELF-PROFILE / DETAIL LAYOUT (shared: Admin & Member) ───────────────────
   Colourless geometry for self-profile view pages (header row + profile head +
   read-only field grid). Modelled on the unified Admin my-profile design; colour
   comes per area via --c-*. Member fills them green, Admin blue. */
.s-form-head { display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 6px; padding-bottom: 0;
    border-bottom: 1px solid var(--c-line); }
.s-form-title { margin: 0; font-size: clamp(1.05rem, 3.4vw, 1.25rem); color: var(--c-ink); }

.s-prof-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 6px 0 18px; margin-bottom: 4px; border-bottom: 1px solid var(--c-line); }
.s-prof-avatar { width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
    flex: 0 0 auto; display: inline-flex; background: var(--c-bg); }
.s-prof-avatar svg, .s-prof-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.s-prof-id { min-width: 0; }
.s-prof-name { margin: 0 0 4px; font-size: 1.25rem; color: var(--c-ink); }
.s-prof-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: var(--fs-md); color: var(--c-muted); }
.s-prof-edit { flex: 0 0 auto; margin-inline-start: auto; }
@media (max-width: 640px) { .s-prof-edit { width: 100%; justify-content: center; } }

/* Status pill (active/suspended). Colour via --c-* → green/red per area. */
.s-status { display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: .76rem; font-weight: 700; }
.s-status.ok   { background: var(--c-ok-bg);    color: var(--c-ok); }
.s-status.warn { background: var(--c-error-bg); color: var(--c-danger); }

/* Sectioned field groups: borderless fieldset + uppercase accent legend. */
.s-fieldset { border: none; margin: 0 0 8px; padding: 0; }
.s-legend { font-size: var(--fs-md); font-weight: 800; color: var(--c-accent);
    text-transform: uppercase; letter-spacing: .04em; padding: 0; margin: 22px 0 4px; }

/* Read-only field grid (label above value, underline per cell). Wide cells span all. */
.s-prof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0 28px; margin: 0; }
.s-prof-row { padding: 9px 0; border-bottom: 1px solid var(--c-line); }
.s-prof-row dt { font-size: .76rem; font-weight: 700; color: var(--c-muted);
    text-transform: uppercase; letter-spacing: .03em; margin-bottom: 3px; }
.s-prof-row dd { margin: 0; font-size: .98rem; color: var(--c-ink); word-break: break-word; }
.s-fld-wide { grid-column: 1 / -1; }

/* Editable form field grid (create/edit forms). Colourless; colour via --c-*.
   auto-fit collapses to one column on narrow viewports. Pair cells with .s-fld,
   full-width cells (textarea/address) with .s-fld-wide. */
.s-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 4px 28px; }
.s-fld { min-width: 0; }

/* Inset panel: small, offset box INSIDE a card (reusable: Admin & Member).
   Colourless geometry; surface via --c-panel-bg, border via --c-line. Do NOT
   set width here — set it at the usage site via a --w-* token (e.g. --w-mini). */
.s-panel {
    background: var(--c-panel-bg, var(--c-bg));
    border: 1px solid var(--c-line);
    border-radius: var(--radius, 12px);
    padding: 14px 16px;
    box-sizing: border-box;
}

/* ── FORM FIELD (label + text input) ────────────────────────────────────────
   Shared field shape. Colours (border, focus) via --c-*. */
.s-field-label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--c-ink);
    margin: 16px 0 5px;
}
.s-field {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    font-size: var(--fs-lead);
    font-family: inherit;
    background: var(--c-card);
    color: var(--c-ink);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.s-field:focus {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 3px var(--c-accent-soft, rgba(0, 0, 0, .08));
}

/* ── PASSWORD FIELD MODULE (tana_password_field + pw-browser-convenience-gen.js) ──
   Strength meter, show/hide toggle, generate button, confirm-match hint. Colourless
   geometry; the meter's weak→strong colours are a UNIVERSAL red-amber-green signal
   (not area branding), so the two mid-tones are literal by design; the extremes reuse
   the semantic --c-danger / --c-ok tokens. The wrapper is display:contents so its two
   .s-fld children flow in the surrounding .s-form-grid. */
.pw-field { display: contents; }
.pw-input { position: relative; }
.pw-input input { padding-inline-end: 58px; }
.pw-toggle { position: absolute; inset-inline-end: 8px; top: 20px; background: none; border: 0;
             cursor: pointer; font-size: .78rem; color: var(--c-accent); padding: 4px 6px; }
.pw-meter { height: 6px; border-radius: 4px; background: var(--c-line); overflow: hidden; margin: 8px 0 4px; }
.pw-meter > span { display: block; height: 100%; width: 0; border-radius: 4px;
                   background: var(--c-danger); transition: width .2s ease, background .2s ease; }
.pw-field[data-pw-level="1"] .pw-meter > span { width: 25%;  background: var(--c-danger); }
.pw-field[data-pw-level="2"] .pw-meter > span { width: 50%;  background: #d08a1e; }   /* amber */
.pw-field[data-pw-level="3"] .pw-meter > span { width: 75%;  background: #7aa53c; }   /* yellow-green */
.pw-field[data-pw-level="4"] .pw-meter > span { width: 100%; background: var(--c-ok); }
.pw-meta { display: flex; align-items: center; gap: 12px; min-height: 24px; }
.pw-strength { font-size: .78rem; color: var(--c-muted); }
.pw-gen { margin-inline-start: auto; font-size: .78rem; padding: 5px 12px; }
.pw-match { font-size: .78rem; margin-top: 4px; min-height: 16px; }
.pw-match.ok  { color: var(--c-ok); }
.pw-match.bad { color: var(--c-danger); }

/* ── PRIMARY BUTTON (full width, main action of a card) ─────────────────────
   Shape shared; colour via --c-accent / --c-accent-dk. */
.s-btn-primary {
    width: 100%;
    margin-top: 22px;
    padding: 13px;
    background: var(--c-accent);
    color: var(--c-on-accent, #fff);
    border: none;
    border-radius: 8px;
    font-size: var(--fs-body);
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.s-btn-primary:hover { background: var(--c-accent-dk); }

/* ── MESSAGE BOXES (success / error) ────────────────────────────────────────
   Layout shared; colour fills via --c-ok* / --c-error*. */
.s-msg {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: .88rem;
    margin-top: 16px;
}
.s-msg-ok {
    background: var(--c-ok-bg);
    border: 1px solid var(--c-ok-line, var(--c-ok));
    color: var(--c-ok);
}
.s-msg-error {
    background: var(--c-error-bg);
    border: 1px solid var(--c-error-line, var(--c-error));
    color: var(--c-error);
}
/* Warning (attention, not an error): a reversible/deliberate consequence the operator
   should confirm. Falls back to the error palette until an area defines --c-warn-*. */
.s-msg-warn {
    background: var(--c-warn-bg, var(--c-error-bg));
    border: 1px solid var(--c-warn-line, var(--c-warn, var(--c-error)));
    color: var(--c-warn, var(--c-error));
}

/* ── SECONDARY HINT / DETAIL TEXT (below an intro/lead) ──────────────────────
   Reusable across all areas: footnote, storage location, metric ("kept per
   scope: 10"). Colourless via --c-* + reading width --w-form. */
.s-note { margin: 4px 0 0; color: var(--c-muted); font-size: var(--fs-sm); line-height: 1.5; max-width: var(--w-form); }
/* Same note, but stating something the reader must not miss — e.g. "this switch does nothing on
   this server". Colour comes from the area's own --c-* contract; no hex here. */
.s-note-warn { color: var(--c-error); font-weight: 600; }

/* ── STATUS GRID (metric tiles, e.g. system status on the dashboard) ─────────
   Shared geometry of a compact label/value grid. Colour via --c-*. Used in the
   admin-index status block; later reusable by other tool status displays. */
.s-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: var(--c-line);
    border-radius: var(--radius, 10px);
    overflow: hidden;
}
.s-stat {
    background: var(--c-card);
    padding: 12px 14px;
}
.s-stat-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--c-muted);
    margin-bottom: 4px;
}
.s-stat-value {
    font-size: var(--fs-body);
    font-weight: 700;
    color: var(--c-accent);
}
.s-stat-value.ok   { color: var(--c-ok); }
.s-stat-value.warn { color: var(--c-danger); }
.s-stat-value small { font-size: .72rem; font-weight: 400; color: var(--c-muted); }

/* ── POP-OPEN LAYERS: backdrop, dropdown menu, centred modal ─────────────────
   Shared geometry for open/close layers (header menus, dialogs). Visibility via
   the class .is-open (toggled by JS) — anyone not setting it is unaffected.
   Panel surfaces are coloured by --c-*; the backdrop is a neutral veil (same
   shadow-rgba class already used here, no area colour). */

/* Darkening backdrop behind a modal (e.g. Quick Start). */
.s-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    z-index: 1000;
}
.s-overlay.is-open { display: flex; }

/* Centred dialog box within the overlay. Colour/shadow via --c-*. */
.s-modal {
    background: var(--c-card);
    color: var(--c-ink);
    border-radius: var(--radius, 12px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    width: 100%;
    max-width: var(--w-narrow, 460px);
    padding: 22px 24px;
}
/* Uniform box heading for dropdown panels AND the modal: icon/indicator + title
   + thin divider line. Colourless (colour via --c-*). The ✕ (.s-modal-close) is
   pushed to the inline-end via margin-inline-start and appears only in the modal. */
.s-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--c-line);
}
.s-panel-head-icon { display: inline-flex; align-items: center; color: var(--c-accent); }
.s-panel-head-icon svg { width: 1.05rem; height: 1.05rem; }
.s-panel-head-title { font-size: var(--fs-lead); font-weight: 600; color: var(--c-accent); }
.s-panel-head .s-modal-close { margin-inline-start: auto; }
.s-modal-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.05rem; line-height: 1; color: var(--c-muted);
    padding: 4px 8px; border-radius: 8px;
}
.s-modal-close:hover { background: var(--c-line); color: var(--c-ink); }

/* Dropdown panel, attached to a relatively positioned trigger.
   Visibility via .is-open. */
.s-menu-anchor { position: relative; }
.s-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    min-width: 240px;
    background: var(--c-card);
    color: var(--c-ink);
    border: 1px solid var(--c-line);
    border-radius: var(--radius, 12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
    padding: 8px;
    display: none;
    z-index: 1001;
}
.s-menu.is-open { display: block; }

/* ── RAILED LAYOUT: content left + collapsible menu right ────────────────────
   Shared, COLOURLESS geometry for Admin AND Member. Colour/character in the area
   file (tools.css / members.css). The content fills the space up to the menu (no
   cap) and aligns — like the header — to the edges (28px); the menu stays at the
   far right and follows --rail-w-now (wide/narrow). */

/* Row: content left, menu right. Sits on .s-shell-main (sticky-footer growth
   area) as an add-on — .s-shell-main itself stays unchanged. */
.s-shell-railed {
    display: flex; align-items: stretch;
    column-gap: var(--shell-gap, 28px);   /* gap box ↔ menu = box's left margin */
    padding-inline-start: 28px;                    /* box left margin; menu stays flush at the right edge */
}
.s-shell-content {
    flex: 1 1 auto; min-width: 0;         /* fills the rest up to the menu (no cap) */
    margin-top: 28px;                     /* same spacing as left/right/top to the header */
}
.s-shell-rail {
    flex: 0 0 auto;
    width: var(--rail-w-now, 232px);      /* width follows the token (wide/narrow) */
    transition: width .18s ease;
    overflow: hidden;
}

/* Rail entry: icon + label; in narrow mode icon only. */
.s-rail-link { display: flex; align-items: center; gap: 12px; }
.shell-narrow .s-rail-label { display: none; }

/* Rail SUB-ENTRIES: tool-specific quick jumps as their own block at the VERY
   BOTTOM of the menu (below the last area), set off with a divider — never
   between the areas. Generic for all tools: the page passes
   railSub to admin-page-close → admin-nav-rail. Colourless geometry; colours per
   area via --c-* (tools.css/members.css). In narrow mode (toggle OR small
   screen) icon only — hence an icon per sub-entry is MANDATORY (emoji, later
   graphic). */
.s-rail-sub { border-top: 1px solid var(--c-line, currentColor); margin: 6px 12px 10px; padding-top: 6px; }
.s-rail-sub a { display: flex; align-items: center; gap: 10px; padding-block: 5px; padding-inline: 14px 6px; border-radius: 8px; text-decoration: none; }
.s-rail-sub-icon  { width: 26px; text-align: center; flex: 0 0 auto; }
.s-rail-sub-icon svg { height: 1.5rem; width: auto; vertical-align: middle; }   /* optional SVG quick-jump icon (icon_svg); +~15% over the emoji so the filled SVG matches the emoji quick-jumps */
.s-rail-sub-label { font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; }
.s-rail-sub-badge { font-size: .72rem; }
.shell-narrow .s-rail-sub a { justify-content: center; padding: 5px 0; }
.shell-narrow .s-rail-sub-label, .shell-narrow .s-rail-sub-badge { display: none; }

/* Small screens: menu always narrow (icons only). Full overlay drawer optional
   as a later refinement. */
@media (max-width: 900px) {
    .s-shell-railed { padding-inline-start: 14px; column-gap: 14px; }   /* like the mobile header; menu flush right */
    .s-shell-rail { width: var(--rail-w-narrow, 60px); }   /* forces narrow → box no longer "dives" */
    .s-rail-label { display: none; }
    .s-rail-sub a { justify-content: center; padding: 5px 0; }
    .s-rail-sub-label, .s-rail-sub-badge { display: none; }
}

/* ── NAVIGATION TILES: tool entry points on the area pages ───────────────────
   Shared, COLOURLESS geometry for clickable tile cards (large icon + title +
   short description). Data source: admin-navigation.json (items). Surface and
   accent via --c-*: --c-panel-bg (surface, slightly offset from the card),
   --c-tile-top (top border normal), --c-accent (title). The DANGER variant
   .s-tile.danger colours the top border via --c-danger (red) — general marker
   for hazardous areas. Width comes from the grid (auto-fill). */
.s-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
.s-tile {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 18px 20px;
    background: var(--c-panel-bg, var(--c-bg));
    border-top: 4px solid var(--c-tile-top, var(--c-accent));
    border-radius: var(--radius, 12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
    text-decoration: none;
    color: var(--c-ink);
    transition: transform .2s, box-shadow .2s;
}
.s-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.s-tile.danger { border-top-color: var(--c-danger); }
.s-tile-icon  { font-size: 2.4rem; line-height: 1; color: var(--c-accent); }   /* emoji tiles: reduced from 2.8rem (emoji glyphs overshoot their box optically) so they sit level with the SVG tiles */
.s-tile-icon svg { height: 3.01rem; width: auto; display: block; }   /* height-based; +7.5% from 2.8rem so filled SVG tiles match the (now smaller) emoji glyphs — they meet in the middle */
.s-tile.danger .s-tile-icon { color: var(--c-danger); }
.s-tile-title { font-size: 1.02rem; font-weight: 700; color: var(--c-accent); }
.s-tile.danger .s-tile-title { color: var(--c-danger); }
.s-tile-desc  { font-size: .82rem; line-height: 1.5; color: var(--c-muted); }

/* ── DATA TABLE (lists, e.g. team management) ────────────────────────────────
   Colourless geometry; colour via --c-*. Reusable for further lists. */
.s-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.s-table th, .s-table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--c-line); }
.s-table thead th {
    font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: .5px;
    color: var(--c-muted); font-weight: 700;
}
.s-table tbody tr:hover { background: var(--c-bg); }
.s-table tbody tr:last-child td { border-bottom: none; }

/* ── COMPACT INLINE BUTTON (filter/form bars) ────────────────────────────────
   Shared shape; colour via --c-accent. Counterpart to .s-btn-primary (full width). */
.s-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 16px; border: none; border-radius: 8px;
    background: var(--c-accent); color: var(--c-on-accent, #fff);
    font-size: .88rem; font-weight: 700; font-family: inherit;
    cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background .2s;
}
.s-btn:hover { background: var(--c-accent-dk); }
/* Secondary/cancel variant: colourless, border instead of fill. */
.s-btn-ghost {
    background: transparent; color: var(--c-ink);
    border: 1px solid var(--c-line);
}
.s-btn-ghost:hover { background: var(--c-bg); }

/* ── Sub-page header (s-subhead*) ────────────────────────────────────────────
   Shared geometry for the admin-subhead partial: a header box (or flush) with the
   page title on the left and a back-link top-right. Used by every sub-page under an
   overview (Global/Member Settings, Backup, Info Center …). Colorless — every value
   comes from --c-* so Admin (tools.css) and Member (members.css) fill their own colors. */
.s-subhead { background: var(--c-card); border-radius: var(--radius); border-top: 4px solid var(--c-accent);
             box-shadow: 0 4px 12px rgba(0,0,0,.06); padding: 18px 22px; margin-bottom: 16px; }
.s-subhead.s-subhead-flush { background: transparent; border-top: 0; box-shadow: none; padding: 0; margin-bottom: 0; }
.s-subhead-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
/* Grey divider under title+back — ONLY on free-standing (flush) sub-pages, like the old tm-form-head.
   In the box variant (.s-subhead without -flush) the box already frames → NO line. */
.s-subhead-flush .s-subhead-bar { margin-bottom: 6px; padding-bottom: 0; border-bottom: 1px solid var(--c-line); }
.s-subhead-title { margin: 0 0 6px; font-size: clamp(1.15rem, 3.8vw, 1.4rem); color: var(--c-accent); }
.s-subhead-title svg { height: 1.45em; width: auto; vertical-align: -0.32em; margin-inline-end: 6px; color: var(--c-accent); }
.s-subhead-back { display: inline-flex; align-items: center; gap: 7px; margin-inline-start: auto;
                  color: var(--c-accent); font-size: var(--fs-md); font-weight: 600; text-decoration: none; white-space: nowrap; }
.s-subhead-back:hover { text-decoration: underline; }
.s-subhead-back svg { width: 1em; height: 1em; flex: 0 0 auto; }
.s-subhead-intro { color: var(--c-muted); font-size: .88rem; line-height: 1.55; margin: 0; max-width: var(--w-form); }

/* ── Multi-column boxes (s-cols) ─────────────────────────────────────────────
   Boxes side by side, responsive: from narrow on they wrap/stack. >2 columns
   possible. Colourless/geometry — usable by Admin AND Member. Children = the
   boxes (e.g. .fp-group). `.s-col-fixed` = fixed column (e.g. a list). */
.s-cols { display: flex; flex-wrap: wrap; gap: 18px; align-items: start; }
.s-cols > *           { flex: 1 1 280px; min-width: 0; }
.s-cols > .s-col-fixed { flex: 0 0 240px; }
@media (max-width: 680px) { .s-cols > .s-col-fixed { flex-basis: 100%; } }

/* ── s-err-* : error-page content block (shared public/member/admin) ──────────
   Area-neutral geometry; lives INSIDE the area's full chrome (not detached).
   Colour via --err-accent = --c-accent (fallback --royal), else hard fallbacks. */
.s-err        { --err-accent: var(--c-accent, var(--royal, #4169e1)); max-width: 760px; margin: 0 auto; padding: 44px 20px 60px; text-align: center; }
.s-err-code   { font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 800; line-height: 1; letter-spacing: 2px; color: var(--c-ink, #1f2a37); }
.s-err-title  { font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 700; margin: 6px 0 12px; color: var(--c-ink, #1f2a37); }
.s-err-text   { max-width: 560px; margin: 0 auto; color: var(--c-muted, #5b6b7b); font-size: 1.02rem; line-height: 1.6; }
.s-err-note   { max-width: 560px; margin: 12px auto 0; color: var(--c-muted, #5b6b7b); font-size: var(--fs-lead); line-height: 1.55; }
.s-err-note a { color: var(--err-accent); font-weight: 600; text-decoration: none; }
.s-err-search { display: flex; max-width: 520px; margin: 26px auto 6px; border: 1px solid var(--c-line, #cdd8e6); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(11,26,42,.09); background: #fff; }
.s-err-search input  { flex: 1; border: 0; padding: 14px 16px; font-size: var(--fs-body); outline: none; color: var(--c-ink, #1f2a37); background: transparent; }
.s-err-search button { border: 0; background: var(--err-accent); color: #fff; font-weight: 700; font-size: var(--fs-lead); padding: 0 24px; cursor: pointer; }
.s-err-actions   { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px 0 4px; }
.s-err-btn       { display: inline-block; padding: 11px 22px; border-radius: 9px; font-weight: 600; text-decoration: none; background: var(--err-accent); color: #fff; }
.s-err-btn-ghost { background: #fff; color: var(--err-accent); border: 1.5px solid var(--err-accent); }
.s-err-links     { margin: 16px auto 0; font-size: var(--fs-lead); }
.s-err-links a   { color: var(--err-accent); text-decoration: none; font-weight: 600; margin: 0 5px; }
.s-err-links span{ color: var(--c-line, #b6c1cf); }

/* ═══ arc-*: ARCHIVE RECORD CURATION — shared tool family ═════════════════════
   Pulled HERE from tools.css: the Member frontend
   (mbr-archive-record-curation) uses the SAME building blocks (ONE
   input form for all tiers, no duplicated code). All rules run via --c-*
   variables and semantic status/danger colours (identical across areas) — area
   character comes from the --c-* assignments (tools.css/members.css).
   DELIBERATE EXCEPTION to the s-* naming rule: family prefix arc-* stays
   (renaming would be a pure name churn across Admin views+JS; a CSS-audit candidate). */
/* ── arc-*: Archive Record Curation (search view + sub-pages) ─────────────────
   Tool family: two-column search view (facets left, list right), status badges,
   per-result task buttons, sort/per-page bar, pager, value list (?do=values).
   Admin only — colours directly or via --c-*. */
.arc-cols { display: flex; gap: 22px; align-items: flex-start; margin-top: 26px; }   /* 1 line of breathing room to the intro box */
.arc-facets { flex: 0 0 200px; font-size: var(--fs-sm); }
.arc-facets h4 { margin: 14px 0 6px; font-size: var(--fs-xs); border-bottom: 1px solid var(--c-line); padding-bottom: 3px; color: var(--c-ink); }
.arc-fgroup:first-child h4 { margin-top: 0; }   /* only the FIRST group flush to the top edge */
.arc-facets a { display: block; color: var(--c-accent); text-decoration: none; padding: 1px 0; }
.arc-facets a:hover { text-decoration: underline; }
.arc-facets a.on { font-weight: 700; }
.arc-facets .cnt, .arc-values .cnt { color: var(--c-muted); font-size: var(--fs-tiny); margin-inline-start: 5px; }
.arc-facets .arc-more { font-size: .78rem; font-weight: 600; margin-top: 2px; }
.arc-list { flex: 1; min-width: 0; }
/* Mobile: RESULTS ON TOP (column-reverse), facet groups
   below SIDE BY SIDE with wrap (instead of one long single column). */
@media (max-width: 900px) {
    .arc-cols { flex-direction: column-reverse; }
    .arc-facets { flex: none; width: 100%; display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: flex-start; }
    .arc-fgroup { flex: 1 1 150px; min-width: 140px; max-width: 240px; }
    .arc-fgroup:first-child h4 { margin-top: 14px; }   /* in the mobile flow, same spacing as all others */
}

.arc-btn-primary { background: var(--c-accent); color: var(--c-on-accent, #fff); border: 0; border-radius: 8px; padding: 8px 18px; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }

.arc-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; color: var(--c-muted); font-size: var(--fs-sm); }
.arc-sortbar { display: flex; gap: 10px; align-items: center; }
/* Neutralise the global label rule (display:block, margin 12px): "Sort:"/"Per page:"
   sit BEFORE their pulldown on one line; this also offsets the
   top-edge misalignment against the facet bar. */
.arc-sortbar label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; white-space: nowrap; }   /* never wrap "Per page:" */
.arc-sortbar select { border: 1px solid var(--c-line); border-radius: 6px; padding: 2px 6px; background: var(--c-card); color: var(--c-ink); font-size: var(--fs-xs); }
.arc-sortbar button { border: 1px solid var(--c-line); border-radius: 6px; padding: 2px 10px; background: var(--c-card); color: var(--c-ink); font-size: var(--fs-xs); cursor: pointer; }

.arc-row { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.arc-t { font-weight: 600; color: var(--c-ink); }
.arc-meta { color: var(--c-muted); font-size: var(--fs-xs); margin: 3px 0 8px; }
/* Status badges: Draft grey · Submitted yellow · In review blue · Published green · Archived violet */
.arc-st { display: inline-block; font-size: var(--fs-2xs); font-weight: 700; padding: 1px 8px; border-radius: 10px; margin-inline-end: 6px; }
.arc-st-draft     { background: #ececec; color: #555; }
.arc-st-submitted { background: #fdf3d8; color: #8a6d1a; }
.arc-st-review    { background: #e8f0fe; color: #1d4ed8; }
.arc-st-published { background: #e5f5ec; color: #14613f; }
.arc-st-archived  { background: #f3e8fe; color: #6b21a8; }

.arc-btns a { display: inline-block; font-size: var(--fs-tiny); border: 1px solid var(--c-line); border-radius: 6px; padding: 2px 9px; margin-block: 0 4px; margin-inline: 0 4px; text-decoration: none; background: var(--c-bg); color: var(--c-accent); }
.arc-btns a:hover { background: var(--c-card); }
.arc-btns a.danger { background: #fbeeee; border-color: #e8c8c8; color: var(--c-danger, #a33); }
.arc-btns a.ghost { background: var(--c-card); color: var(--c-muted); }

.arc-pager { display: flex; gap: 12px; align-items: center; margin-top: 14px; font-size: var(--fs-sm); color: var(--c-muted); }
.arc-pager a { color: var(--c-accent); text-decoration: none; }

/* Value list (?do=values): multi-column, alphabetical. */
.arc-values-count { color: var(--c-muted); font-size: var(--fs-sm); margin: 14px 0 8px; }
.arc-values { list-style: none; margin: 0; padding: 0; columns: 3 240px; column-gap: 28px; }
.arc-values li { padding: 2px 0; break-inside: avoid; }
.arc-values a { color: var(--c-accent); text-decoration: none; }
.arc-values a:hover { text-decoration: underline; }

/* arc-*: Create overview (cards) + form building blocks. */
.arc-ov { max-width: none; }   /* full content width (like arc-form) */
.arc-ov a { display: block; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 12px 16px; margin-bottom: 10px; text-decoration: none; }
.arc-ov a:hover { background: var(--c-bg); }
.arc-ov b { color: var(--c-accent); }
.arc-ov span { display: block; color: var(--c-muted); font-size: var(--fs-sm); line-height: 1.5; margin-top: 3px; }
.arc-ov-note { color: var(--c-muted); font-size: .82rem; }

/* Full content width (the 780px cap looked like "half width" on 1920p). */
.arc-form { max-width: none; }
.arc-sec { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.arc-sec h3 { margin: 0 0 12px; font-size: var(--fs-lead); color: var(--c-ink); }
.af-row { margin-bottom: 14px; }
.af-row:last-child { margin-bottom: 4px; }
.af-row > label { display: block; font-size: .78rem; font-weight: 700; color: var(--c-ink); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.af-in { display: block; width: 100%; border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 10px; background: var(--c-bg); color: var(--c-ink); font-size: var(--fs-md); box-sizing: border-box; }
.af-ta { min-height: 88px; resize: vertical; }
.af-err { border-color: var(--c-danger, #a33); }
.af-errmsg { color: var(--c-danger, #a33); font-size: .78rem; margin: 4px 0 0; }
.af-help { font-size: var(--fs-tiny); color: var(--c-muted); margin: 4px 0 0; }
.af-cols { display: flex; gap: 16px; } .af-cols > div { flex: 1; }
@media (max-width: 700px) { .af-cols { flex-direction: column; gap: 0; } }
.arc-form-actions { margin: 4px 0 0; }
.arc-btn-secondary { display: inline-block; background: var(--c-card); color: var(--c-ink); border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 16px; font-size: var(--fs-sm); text-decoration: none; margin-inline-start: 6px; }

/* Searchable checkbox list (languages/genres/curated axes). */
.arc-checklist-filter { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--c-line); border-radius: 8px 8px 0 0; padding: 6px 10px; background: var(--c-bg); color: var(--c-ink); font-size: var(--fs-sm); border-bottom: 0; }
.arc-checklist-box { border: 1px solid var(--c-line); border-radius: 0 0 8px 8px; background: var(--c-bg); max-height: 180px; overflow-y: auto; padding: 6px 10px; columns: 2 220px; }
.arc-checklist-box label { display: block; font-size: var(--fs-sm); color: var(--c-ink); padding: 2px 0; break-inside: avoid; }
/* [hidden] MUST win against display:block (typing in the filter hides entries) — same trap as the OpenSeadragon zoom. */
.arc-checklist-box label[hidden] { display: none; }
/* Hierarchical axes: one group = a root value + its indented
   sub-values; break-inside keeps the group in ONE of the two columns. Indent
   classes per depth (display caps at 3, deeper levels reuse -3). */
.arc-checklist-grp { display: block; break-inside: avoid; }
.arc-ind-1 { padding-inline-start: 20px; }
.arc-ind-2 { padding-inline-start: 40px; }
.arc-ind-3 { padding-inline-start: 60px; }
.arc-checks label { display: inline-block; margin-inline-end: 16px; font-size: var(--fs-sm); color: var(--c-ink); }

/* Panel long-job progress (e.g. the GeoNames importer): track + fill; colour
   only via the --c-* contract, width set inline by the driving JS. */
.s-progress { background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 8px; height: 14px; overflow: hidden; }
.s-progress-bar { background: var(--c-accent); height: 100%; width: 0; transition: width .3s; }

/* Location search field (search-field mode, large axis): chips + suggestion list. */
.arc-loc { position: relative; }
.arc-loc-chips { margin-bottom: 6px; }
.arc-chip { display: inline-block; background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 14px; padding: 2px 10px; font-size: var(--fs-xs); color: var(--c-accent); margin-block: 0 6px; margin-inline: 0 6px; }
.arc-chip-x { border: 0; background: none; color: var(--c-muted); cursor: pointer; font-size: var(--fs-sm); padding-inline-start: 4px; }
.arc-loc-list { position: absolute; z-index: 30; inset-inline: 0; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.arc-loc-list button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 7px 12px; font-size: var(--fs-sm); color: var(--c-ink); cursor: pointer; }
.arc-loc-list button:hover { background: var(--c-bg); }

/* arc-*: Edit page — record card, file/preview/parts sections. */
.arc-rec { display: flex; gap: 12px; align-items: center; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.arc-rec-icon { font-size: 1.8rem; }
.arc-file-now { font-size: .88rem; color: var(--c-ink); }
.arc-file-now code { background: var(--c-bg); border-radius: 6px; padding: 1px 6px; }
.arc-upl-progress { margin-inline-start: 10px; color: var(--c-muted); font-size: .82rem; }
.arc-prev-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.arc-prev-img { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; background: var(--c-bg); border: 1px solid var(--c-line); }
.arc-parts { margin: 0 0 8px; padding-inline-start: 22px; }
.arc-parts li { padding: 4px 0; }
.arc-part-t { margin-inline-end: 8px; }
.arc-part-btn { border: 1px solid var(--c-line); border-radius: 6px; background: var(--c-bg); color: var(--c-accent); font-size: var(--fs-tiny); padding: 2px 9px; cursor: pointer; margin-inline-start: 8px; }
.arc-part-cands { list-style: none; margin: 8px 0 0; padding: 0; }
.arc-part-cands li { padding: 3px 0; }
.arc-part-cands form { display: flex; align-items: center; gap: 8px; }
.arc-part-search .af-cols { align-items: flex-end; }

/* arc-*: Review and delete surfaces. */
.arc-rv-text p { margin: 0 0 8px; font-size: var(--fs-md); color: var(--c-ink); }
.arc-rv-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.arc-rv-actions button { cursor: pointer; border: 0; }
.arc-btn-ok { display: inline-block; background: var(--c-ok, #14613f); color: #fff; border-radius: 8px; padding: 9px 18px; font-weight: 700; font-size: var(--fs-sm); }
.arc-btn-danger { display: inline-block; background: var(--c-danger, #b3261e); color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.arc-danger { background: var(--c-error-bg, #fdf3f3); border: 1px solid #e8c8c8; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.arc-danger strong { color: var(--c-danger, #8a1f1a); }
.arc-danger ul { margin: 8px 0 0; padding-inline-start: 20px; font-size: .88rem; }
.arc-del-confirm { margin: 12px 0 0; font-size: var(--fs-md); }

/* ── arc family: single-page create ──────────────────────────────────────────
   Source choice (file OR video link, video only) + progress box: on submit the
   background darkens, a centred box shows the progress (save → upload), success
   redirects to the search overview. Colourless — colours via --c-*
   (tools.css/members.css). */
.arc-src-pick { display: flex; gap: 18px; flex-wrap: wrap; margin: 0 0 12px; }
.arc-src-pick label { display: inline-flex; align-items: center; gap: 6px;
    font-size: var(--fs-md); color: var(--c-ink); white-space: nowrap; cursor: pointer; }
.arc-form [data-src-block][hidden] { display: none; }
.arc-embed-form { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--c-line); }

.arc-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55);
    display: flex; align-items: center; justify-content: center; z-index: 1000; }
.arc-modal-overlay[hidden] { display: none; }
.arc-modal { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px;
    padding: 22px 26px; min-width: 300px; max-width: min(440px, 92vw);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.arc-modal h3 { margin: 0 0 12px; font-size: var(--fs-body); color: var(--c-ink); }
.arc-modal-bar { height: 10px; border-radius: 5px; background: var(--c-bg); overflow: hidden; }
.arc-modal-fill { height: 100%; width: 0; background: var(--c-accent); transition: width .25s ease; }
.arc-modal-msg { margin: 10px 0 0; font-size: var(--fs-sm); color: var(--c-muted); }
.arc-modal-msg:empty { display: none; }

/* ── Avatar/preview-image cropper (tm-cropper) ───────────────────────────────
   Shared Admin (team avatars, curation) + Member (curation preview image) —
   moved here from tools.css, otherwise the chosen image opens
   unrestrained full-screen in the Member area. Documented naming exception to
   the s-* rule (like arc-*): markup + avatar-cropper.js use the tm names.
   Colourless — colours via --c-* (variable contract). */
/* Avatar cropper: fixed square stage, image behind it pan/zoom, round hint overlay. */
.tm-cropper { margin-top: 14px; }
.tm-cropper-stage {
    position: relative; width: min(260px, 78vw); height: min(260px, 78vw);
    overflow: hidden; border-radius: 12px; background: var(--c-bg);
    touch-action: none; cursor: grab; user-select: none;
}
.tm-cropper-stage:active { cursor: grabbing; }
.tm-cropper-stage img {
    /* left/top deliberately PHYSICAL (not inset-inline-*): avatar-cropper.js
       positions the image purely via translate() from clientX/Y deltas — one
       physical coordinate system. Dragging is a physical gesture, so the
       cropper behaves correctly under dir="rtl" exactly as-is. */
    position: absolute; top: 0; left: 0; max-width: none;
    will-change: transform; pointer-events: none; -webkit-user-drag: none;
}
.tm-cropper-ring {
    position: absolute; inset: 0; pointer-events: none; border-radius: 12px;
    /* closest-side: circle radius = half the stage edge → inscribed circle (full
       diameter = stage width). Without this, the gradient takes the diagonal
       (farthest-corner) → circle ~0.7× too small. */
    background: radial-gradient(circle closest-side at 50% 50%,
        transparent 0 97.5%, rgba(255, 255, 255, .7) 98% 99%, rgba(0, 0, 0, .42) 99.6%);
}
.tm-cropper-bar { display: flex; align-items: center; gap: 10px; width: min(260px, 78vw); margin: 12px 0 4px; }
.tm-cropper-zoom { flex: 1 1 auto; accent-color: var(--c-accent); }
.tm-cropper-zico { color: var(--c-muted); font-weight: 700; font-size: 1.1rem; line-height: 1; }

/* ══ fb-* : neutral form blocks ══════════════════════════════════════════════
   Geometry of the shared form building blocks (tools/system/view/form-blocks.php),
   used by EVERY edit form: Annotator posts and newsletters, archive records in
   the team AND the member area, later legal documents and system mail.

   Why these rules look like the arc-* ones above: they ARE those rules, copied
   under neutral names. The arc-* family stays untouched so the four archive-
   record curation views keep working exactly as they do today; when they are
   converted to these blocks (own, separately approved step), the arc-* form
   rules above go away and this block is the only one left. Until then the
   duplication is deliberate and temporary — a change to a form block belongs
   HERE, not in the arc-* rules.

   Two blocks reuse existing scripts and therefore existing behaviour, but get
   neutral class names all the same, because neither script reads class names:
   the cropper (avatar-cropper.js, data-av-*) and the text surface
   (editor-adapter.js, data-editor).

   Colourless — colours only through the --c-* contract, no hex values. ── */

/* Frame + field rows. */
.fb-sec { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.fb-sec h3 { margin: 0 0 12px; font-size: var(--fs-lead); color: var(--c-ink); }
.fb-row { margin-bottom: 14px; }
.fb-row:last-child { margin-bottom: 4px; }
.fb-row > label { display: block; font-size: .78rem; font-weight: 700; color: var(--c-ink); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .4px; }
.fb-in { display: block; width: 100%; border: 1px solid var(--c-line); border-radius: 8px; padding: 8px 10px; background: var(--c-bg); color: var(--c-ink); font-size: var(--fs-md); box-sizing: border-box; }
.fb-ta { min-height: 88px; resize: vertical; }
.fb-err { border-color: var(--c-danger, #a33); }
.fb-errmsg { color: var(--c-danger, #a33); font-size: .78rem; margin: 4px 0 0; }
.fb-help { font-size: var(--fs-tiny); color: var(--c-muted); margin: 4px 0 0; }
.fb-cols { display: flex; gap: 16px; } .fb-cols > div { flex: 1; }
@media (max-width: 700px) { .fb-cols { flex-direction: column; gap: 0; } }

/* Checklist — facet mode 'list': filter input above a scrolling box. */
.fb-checklist-filter { display: block; width: 100%; box-sizing: border-box; border: 1px solid var(--c-line); border-radius: 8px 8px 0 0; padding: 6px 10px; background: var(--c-bg); color: var(--c-ink); font-size: var(--fs-sm); border-bottom: 0; }
.fb-checklist-box { border: 1px solid var(--c-line); border-radius: 0 0 8px 8px; background: var(--c-bg); max-height: 180px; overflow-y: auto; padding: 6px 10px; columns: 2 220px; }
.fb-checklist-box label { display: block; font-size: var(--fs-sm); color: var(--c-ink); padding: 2px 0; break-inside: avoid; }
/* [hidden] MUST win against display:block — without this the filter does nothing. */
.fb-checklist-box label[hidden] { display: none; }
/* Hierarchical axes: one group = a root value + its indented sub-values;
   break-inside keeps a group inside ONE of the two columns. Indent caps at 3.
   The selector MUST carry the box class: `.fb-checklist-box label` sets the
   shorthand `padding: 2px 0`, which resets padding-inline-start AND outranks a
   bare `.fb-ind-1` (0,1,1 beats 0,1,0) — the indent would silently do nothing.
   Same trap as the [hidden] rule above. This is a real bug in the arc-* copy,
   where the hierarchy renders flat today. */
.fb-checklist-grp { display: block; break-inside: avoid; }
.fb-checklist-box label.fb-ind-1 { padding-inline-start: 20px; }
.fb-checklist-box label.fb-ind-2 { padding-inline-start: 40px; }
.fb-checklist-box label.fb-ind-3 { padding-inline-start: 60px; }
/* Plain checkbox row for small closed sets (e.g. access). */
.fb-checks label { display: inline-block; margin-inline-end: 16px; font-size: var(--fs-sm); color: var(--c-ink); }

/* Chip field — facet mode 'sqlite': chips + server suggestion list. */
.fb-vals { position: relative; }
.fb-vals-chips { margin-bottom: 6px; }
.fb-chip { display: inline-block; background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 14px; padding: 2px 10px; font-size: var(--fs-xs); color: var(--c-accent); margin-block: 0 6px; margin-inline: 0 6px; }
.fb-chip-x { border: 0; background: none; color: var(--c-muted); cursor: pointer; font-size: var(--fs-sm); padding-inline-start: 4px; }
.fb-vals-list { position: absolute; z-index: 30; inset-inline: 0; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.fb-vals-list button { display: block; width: 100%; text-align: start; border: 0; background: none; padding: 7px 12px; font-size: var(--fs-sm); color: var(--c-ink); cursor: pointer; }
.fb-vals-list button:hover { background: var(--c-bg); }

/* Preview image: the image already stored on the record, above the picker. */
.fb-prev-row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 10px; }
.fb-prev-img { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; background: var(--c-bg); border: 1px solid var(--c-line); }

/* Preview cropper: fixed square stage, image behind it pan/zoom, round hint overlay. */
.fb-crop { margin-top: 14px; }
.fb-crop-stage {
    position: relative; width: min(260px, 78vw); height: min(260px, 78vw);
    overflow: hidden; border-radius: 12px; background: var(--c-bg);
    touch-action: none; cursor: grab; user-select: none;
}
.fb-crop-stage:active { cursor: grabbing; }
.fb-crop-stage img {
    /* left/top deliberately PHYSICAL (not inset-inline-*): avatar-cropper.js
       positions the image purely via translate() from clientX/Y deltas — one
       physical coordinate system. Dragging is a physical gesture, so the
       cropper behaves correctly under dir="rtl" exactly as-is. */
    position: absolute; top: 0; left: 0; max-width: none;
    will-change: transform; pointer-events: none; -webkit-user-drag: none;
}
.fb-crop-ring {
    position: absolute; inset: 0; pointer-events: none; border-radius: 12px;
    /* closest-side: circle radius = half the stage edge → inscribed circle. */
    background: radial-gradient(circle closest-side at 50% 50%,
        transparent 0 97.5%, rgba(255, 255, 255, .7) 98% 99%, rgba(0, 0, 0, .42) 99.6%);
}
.fb-crop-bar { display: flex; align-items: center; gap: 10px; width: min(260px, 78vw); margin: 12px 0 4px; }
.fb-crop-zoom { flex: 1 1 auto; accent-color: var(--c-accent); }
.fb-crop-zico { color: var(--c-muted); font-weight: 700; font-size: 1.1rem; line-height: 1; }

/* ── s-ext-link : marks a link that leaves the archive for an external site.
   Added by tana_markdown() to whitelisted outbound links (internal links never
   get it). Colourless — the ↗ inherits the surrounding text colour. ── */
.s-ext-link::after {
    content: "\2197";                 /* north-east arrow */
    display: inline-block;
    margin-inline-start: 0.15em;
    font-size: 0.85em;
    line-height: 1;
    vertical-align: baseline;
}

/* Visually hidden but readable by screen readers — for labels a design hides
   (e.g. the full-page editor's in-flow title field). Colourless, area-neutral. */
.s-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }

/* ── s-pager : numbered page links (1 2 3 … n) inside a toolbar row — the generic,
   colourless sibling of the member-management pager (mm-pager stays its admin-only
   ancestor). Render a window array: numbers link, .cur = current page, .gap = the
   ellipsis between windows. Colour only via --c-* (accent fills the current page). ── */
.s-pager { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.s-pager a, .s-pager .cur { min-width: 28px; text-align: center; padding: 4px 7px;
    border-radius: 7px; border: 1px solid var(--c-line); text-decoration: none; }
.s-pager a { color: var(--c-ink); background: var(--c-card); }
.s-pager a:hover { border-color: var(--c-accent); color: var(--c-accent); }
.s-pager .cur { background: var(--c-accent); color: var(--c-card); border-color: var(--c-accent); font-weight: 700; }
.s-pager .gap { color: var(--c-muted); padding: 0 2px; }

/* ── s-inactive : the generic DEACTIVATED-state modifier (rows, list items, cards) —
   state styles are area-neutral, colourless s-* building blocks. VISUAL REINFORCEMENT ONLY — the
   state itself must always be carried by the markup too (a control's label/checked
   state, or aria-disabled/attribute where no control conveys it): without CSS the
   state must still be readable. ── */
.s-inactive { opacity: .55; }
