/* ABOUTME: Dark mode styles for all Writeback pages. Activated by */
/* data-theme="dark" on <html>, toggled via header icon or OS preference. */

/* Special Elite — typewriter brand font for the page banner. */
@font-face {
    font-family: "Special Elite";
    src: url("/static/fonts/SpecialElite-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Asap — default UI font for the entire app. Variable font with both
   wdth (75-125) and wght (100-900) axes — letting us tune the weight
   slightly under the conventional 400 for a lighter, more elegant feel. */
@font-face {
    font-family: "Asap";
    src: url("/static/fonts/Asap-Variable.woff2") format("woff2-variations"),
         url("/static/fonts/Asap-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 75% 125%;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Asap";
    src: url("/static/fonts/Asap-Italic-Variable.woff2") format("woff2-variations"),
         url("/static/fonts/Asap-Italic-Variable.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 75% 125%;
    font-style: italic;
    font-display: swap;
}

/* Liberation Serif — default font for document body content (when the
   submitted document does not specify its own font). */
@font-face {
    font-family: "Liberation Serif";
    src: url("/static/fonts/LiberationSerif-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Serif";
    src: url("/static/fonts/LiberationSerif-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Serif";
    src: url("/static/fonts/LiberationSerif-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Serif";
    src: url("/static/fonts/LiberationSerif-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Meslo LG L — monospaced (Menlo lookalike) for code, pre, kbd, and the
   invite-URL input. */
@font-face {
    font-family: "Meslo LG L";
    src: url("/static/fonts/MesloLGL-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Meslo LG L";
    src: url("/static/fonts/MesloLGL-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Meslo LG L";
    src: url("/static/fonts/MesloLGL-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Meslo LG L";
    src: url("/static/fonts/MesloLGL-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Liberation Sans / Mono — Word's Arial/Helvetica/Courier substitutes.
   Loaded here so #15's docx-fidelity Lua filter, which emits
   `font-family: 'Liberation Sans', sans-serif` etc. as inline CSS on
   rendered submissions, resolves to the bundled woff2 rather than
   falling back to system fonts. */
@font-face {
    font-family: "Liberation Sans";
    src: url("/static/fonts/LiberationSans-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Sans";
    src: url("/static/fonts/LiberationSans-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Sans";
    src: url("/static/fonts/LiberationSans-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Sans";
    src: url("/static/fonts/LiberationSans-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Mono";
    src: url("/static/fonts/LiberationMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Mono";
    src: url("/static/fonts/LiberationMono-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Mono";
    src: url("/static/fonts/LiberationMono-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Liberation Mono";
    src: url("/static/fonts/LiberationMono-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Carlito / Caladea — metric-compatible substitutes for Word's Calibri
   and Cambria respectively. The docx-fidelity Lua filter maps those
   Word fonts onto Carlito/Caladea so the on-screen layout stays close
   to Word's rendering even though the original font isn't licensed for
   web use. */
@font-face {
    font-family: "Carlito";
    src: url("/static/fonts/Carlito-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Carlito";
    src: url("/static/fonts/Carlito-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Carlito";
    src: url("/static/fonts/Carlito-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Carlito";
    src: url("/static/fonts/Carlito-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Caladea";
    src: url("/static/fonts/Caladea-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Caladea";
    src: url("/static/fonts/Caladea-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Caladea";
    src: url("/static/fonts/Caladea-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Caladea";
    src: url("/static/fonts/Caladea-BoldItalic.woff2") format("woff2");
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

/* Default UI font for the entire app. Asap variable, weight 300 — thinner
   than the conventional 400 for a lighter, more elegant feel. The
   `html body` selector (specificity 2) beats per-template inline
   `body { font-family: ... }` rules (specificity 1) so individual
   templates don't need to be edited. */
html body {
    font-family: "Asap", system-ui, -apple-system, sans-serif;
    font-weight: 300;
    font-size: 95%;
    font-stretch: 105%;
}
/* With body at 300, the default 700 "bold" looks too flat against the
   thinner base in places where bold is meant to emphasise within UI
   chrome. Set strong/b to 600 so emphasis reads clearly without going
   to harsh display weight. */
html body strong,
html body b {
    font-weight: 600;
}
/* Form elements do not inherit font-family from their parent by browser
   default — they fall back to platform system fonts. Force them to inherit
   so reviewer textareas, search inputs, dropdowns, and buttons all render
   in Asap. Per-template `.foo textarea` rules with class-level specificity
   would otherwise win, so this base-style reset uses !important. The
   monospace invite-URL input is restored to Meslo via its own !important
   rule below. */
input,
textarea,
select,
button {
    font-family: inherit !important;
}
/* Document body content + annotation quote excerpts use Liberation Serif
   so they read as continuous with the source document. Written comment
   bodies (.feedback-text, .comment-text) intentionally inherit the default
   Asap so the displayed comments match the font the reviewer typed them in.
   Submitted documents that specify their own font override .doc-content via
   inline style. */
html body .doc-content,
html body .feedback-excerpt,
html body .comment-excerpt,
html body blockquote {
    font-family: "Liberation Serif", Georgia, serif;
}
/* Monospaced contexts: code, pre, kbd, and inputs typed as monospace
   (the invite URL share box). The form-element reset above applies
   `font-family: inherit !important` to all inputs, so this rule must
   also use !important to win for the invite-box input. */
html body pre,
html body code,
html body kbd,
html body samp {
    font-family: "Meslo LG L", Menlo, Consolas, "Courier New", monospace;
}
html body .invite-box input[type="text"],
html body input[type="datetime-local"],
html body input[type="date"],
html body input[type="time"] {
    font-family: "Meslo LG L", Menlo, Consolas, "Courier New", monospace !important;
}
html body input[type="datetime-local"],
html body input[type="date"],
html body input[type="time"] {
    font-size: 0.85rem !important;
}

/* Theme is forced per interface via data-theme on <html> in each template.
   These rules pin the OS-level colour-scheme so scrollbars and form controls
   match without JavaScript. */
html[data-theme="dark"] {
    color-scheme: dark;
}
html[data-theme="light"] {
    color-scheme: light;
}

/* Reviewer (light) interface: paper-cream background (Solarized base3
   #f5f4f0) on both html and body so it covers the full viewport even on
   pages with a narrow centred body. The [data-theme="light"] body selector
   outweighs per-template inline body { ... } styles by specificity, so
   individual templates don't need any class additions. */
html[data-theme="light"], [data-theme="light"] body {
    background: #f5f4f0;
}
/* Admin (dark) interface: pin html background too so narrow centred body
   layouts don't expose the user-agent default white in the side margins.
   #192041 — midpoint between the original neutral navy #1a1a2e and the
   richer Tailwind blue-950 #172554. Warmer/bluer than neutral navy but
   not so saturated that it competes with the #2563eb brand banner. */
html[data-theme="dark"] {
    background: #192041;
}

/* Document body content (review view, my-comments, registration preview,
   admin preview) — paper-like container, Liberation Serif, with line and
   paragraph spacing tuned to read well for both prose and poetry.
   Submitted documents that specify their own font override the font-family
   via inline style or class. */
.doc-content {
    font-family: "Liberation Serif", Georgia, serif;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1rem 0;
    font-size: 1.2rem;
    line-height: 1.3em;
}
/* Paragraph spacing tuned to read well for both prose and poetry.
   Pandoc emits each Shift+Enter line as its own <p>, so 1em browser
   defaults make verse feel airy. 0.5rem collapsed gap gives compact
   line-to-line spacing while stanza-break paragraphs (injected NBSP
   from the docx preprocessor) still produce a visibly larger gap
   from their own line-box height. */
.doc-content p {
    margin: 0.5em 0;
}

[data-theme="dark"] body {
    background: #192041;
    color: #e0e0e0;
}
[data-theme="dark"] a { color: #7cacf8; }
[data-theme="dark"] a:visited { color: #a88fd8; }
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 { color: #f0f0f0; }

/* Form inputs */
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
    background: #2a2a3e;
    color: #e0e0e0;
    border: 1px solid #444;
}
[data-theme="dark"] input[readonly] {
    background: #252538;
    color: #bbb;
}
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
}
[data-theme="dark"] input[type="datetime-local"]::-webkit-datetime-edit {
    color: #e0e0e0;
}
[data-theme="dark"]:root {
    color-scheme: dark;
}

/* Tables */
/* Tables — keep header and hover row in the same warm blue family as the
   #192041 page bg and #222a4f session-card bg. The previous neutral navy
   (#2a2a3e / #252538) was a light-mode carryover and looked grey on the
   warmer surroundings. */
[data-theme="dark"] th { background: #475569; color: #fff; font-weight: 600; }
[data-theme="dark"] td { border-bottom-color: #2e3866; }
[data-theme="dark"] tr:hover { background: #2c3768; }

/* Dashboard session-card boxes default to a white background; override
   to a dark surface in dark mode. The card bg sits one tint lighter than
   the page bg #192041 so cards are clearly distinct, and the border is
   pulled from the same blue family but bright enough to be prominent
   rather than blending into the card. */
[data-theme="dark"] .session-card {
    background: #222a4f !important;
    border-color: #4a5a8e !important;
    border-width: 1.5px !important;
    color: #e0e0e0 !important;
}
[data-theme="dark"] .session-card:hover {
    border-color: #6a82c0 !important;
    box-shadow: 0 1px 6px rgba(74, 90, 142, 0.35) !important;
}
[data-theme="dark"] .session-meta { color: #94a3b8 !important; }

/* Buttons — primary. Tailwind blue-700 #1d4ed8 fill for buttons that have
   no inline background (red destructive / grey revert buttons keep their
   own colours via inline styles, which beat this rule on specificity).
   Delineation comes from a 1px translucent-white outline rather than a
   fixed blue border so it works on any button colour without clashing. */
[data-theme="dark"] button, [data-theme="dark"] .actions a {
    background: #1d4ed8;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 600;
}
[data-theme="dark"] button:hover, [data-theme="dark"] .actions a:hover {
    background: #2563eb;
    border-color: rgba(255, 255, 255, 0.45);
}
[data-theme="dark"] button.revert {
    background: #555 !important;
}
[data-theme="dark"] button:disabled {
    background: #444 !important;
    color: #888 !important;
}

/* State badges — per-state dark mode overrides. The previous generic
   #2a2a5e fallback collapsed all states to one navy pill, which on the
   warm #192041/#222a4f card bg looked like a smudge. Each state now has
   its own saturated dark-mode pill in the same family as its light-mode
   colour, but bright enough to clearly punch out from the card. */
[data-theme="dark"] .state-setup            { background: #374151 !important; color: #d1d5db !important; }
[data-theme="dark"] .state-registration_open { background: #0c4a6e !important; color: #7dd3fc !important; }
[data-theme="dark"] .state-review_open      { background: #14532d !important; color: #86efac !important; }
[data-theme="dark"] .state-in_session       { background: #78350f !important; color: #fcd34d !important; }
[data-theme="dark"] .state-moderation       { background: #831843 !important; color: #f9a8d4 !important; }
[data-theme="dark"] .state-released         { background: #4338ca !important; color: #c7d2fe !important; }
[data-theme="dark"] .state-archived         { background: #374151 !important; color: #9ca3af !important; }

/* "moderated" badge — amber pill on the registrations / submissions tables.
   Light mode is cream-on-brown; dark mode is muted brown-on-deep-brown so the
   pill reads as a subtle annotation rather than a glowing alert. */
[data-theme="dark"] .badge-moderated {
    background: #3a2a14 !important;
    color: #d4a85c !important;
}

/* Invite box */
[data-theme="dark"] .invite-box {
    background: #252e58 !important;
    border: 2px solid #6a82c0 !important;
    box-shadow: 0 0 0 1px rgba(106, 130, 192, 0.15) !important;
}
/* The invite URL input itself — no general input[type=text] dark override
   exists, so without this it shows browser default white on white. */
[data-theme="dark"] .invite-box input[type="text"] {
    background: #1e2550 !important;
    color: #cbd5e1 !important;
    border: 1px solid #3a4480 !important;
}
/* The helper text inside the invite box ("Share this URL...") is inline-styled
   #555 in the template — barely readable on the dark surface. Bump to a light
   slate. */
[data-theme="dark"] .invite-box p {
    color: #cbd5e1 !important;
}
/* The "Copied to clipboard" feedback is inline-styled #16a34a — dark green
   on dark navy is invisible. Brighten to a vivid mint. */
[data-theme="dark"] #copy-feedback {
    color: #86efac !important;
}

/* Error / banner */
[data-theme="dark"] .error {
    background: #3e1a1a !important;
    color: #f8a0a0 !important;
}
[data-theme="dark"] .banner {
    background: #3e3218 !important;
    border-color: #6b5a2a !important;
    color: #e0d0a0 !important;
}

/* Meta text */
[data-theme="dark"] .meta, [data-theme="dark"] .empty { color: #999 !important; }

/* Document content (review view) */
[data-theme="dark"] .doc-content {
    background: #252538;
    border-color: #3a3a4e;
    color: #ddd;
}
/* Admin preview override: when an admin previews a participant's submission
   from inside the dark admin chrome, the document itself should look like
   paper (cream) — not the dark surface. The preview-paper class is added by
   the inline preview render in internal/approval/handlers.go. For SVG docs
   with their own background, the SVG image overlays the cream wrapper
   naturally; for SVGs with transparent backgrounds, cream shows through. */
[data-theme="dark"] .doc-content.preview-paper {
    background: #f5f4f0 !important;
    color: #1a1a2e !important;
    border: 1px solid #6a5a3a !important;
}

/* Quoted text excerpt in moderation view (HTML annotations) */
[data-theme="dark"] .feedback-excerpt {
    background: #252538 !important;
    border-left-color: #4a4a5e !important;
    color: #c0c0c0 !important;
}

/* Feedback item card */
[data-theme="dark"] .feedback-item {
    background: #1f1f33;
    border-color: #3a3a4e !important;
}
[data-theme="dark"] .feedback-item.removed {
    background: #1a1a2a !important;
}

/* Crop wrapper preserves the SVG's own background; no override. */

/* Reject / un-reject icon buttons — transparent background by default,
   coloured glyph, soft tinted hover. Overrides the generic dark button rule. */
[data-theme="dark"] .reject-toggle {
    background: transparent !important;
    border-color: transparent !important;
}
[data-theme="dark"] .reject-toggle.reject {
    color: #f87171 !important;
}
[data-theme="dark"] .reject-toggle.reject:hover {
    background: #3e1a1a !important;
    border-color: #7f1d1d !important;
}
[data-theme="dark"] .reject-toggle.unreject {
    color: #4ade80 !important;
}
[data-theme="dark"] .reject-toggle.unreject:hover {
    background: #14301c !important;
    border-color: #166534 !important;
}

/* Annotation bands */
[data-theme="dark"] .ann-sentence:hover { background: rgba(120, 160, 255, 0.15); }

/* Checkboxes */
[data-theme="dark"] .checkbox { color: #ccc; }
[data-theme="dark"] input[type="checkbox"] {
    accent-color: #7cacf8;
}

/* Code elements */
[data-theme="dark"] code {
    background: #2a2a3e;
    color: #c0c0c0;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    width: 1.8rem;
    height: 1.8rem;
    font-size: 1rem;
    cursor: pointer;
    z-index: 9999;
    line-height: 1;
    padding: 0;
    color: #fff;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.15) !important;
}

/* Banner dark mode — keep the bright #2563eb brand blue from light mode.
   Against a dark page background it pops as a clear brand bar rather than
   blending into the navigation chrome. */
[data-theme="dark"] #wb-banner {
    background: #2563eb !important;
}

/* Auth pages: centred card layout for login + registration landing.
   Reviewer-side (register_landing) inherits the cream page background via
   [data-theme="light"]; admin-side (login.html) inherits the dark page
   background via [data-theme="dark"]. No explicit background here — the
   card itself sits on the page with a subtle shadow. */
body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin: 0;
    padding-top: 6rem;
    padding-bottom: 4rem;
    font-family: system-ui, sans-serif;
}
body.auth-page .auth-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 24px rgba(30, 60, 120, 0.12);
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 26rem;
    box-sizing: border-box;
}
body.auth-page .auth-card h1 {
    margin: 0 0 1.25rem 0;
    font-size: 1.5rem;
    color: #1e3a8a;
    text-align: center;
}
body.auth-page .auth-card label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}
body.auth-page .auth-card input[type="email"] {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.4rem;
    box-sizing: border-box;
    margin-bottom: 1rem;
}
body.auth-page .auth-card input[type="email"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
body.auth-page .auth-card button {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
    font-weight: 600;
}
body.auth-page .auth-card button:hover {
    background: #1d4ed8;
}
body.auth-page .auth-card .message {
    padding: 0.75rem 1rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    border-radius: 0.4rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
body.auth-page .auth-card .message.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
body.auth-page .auth-card .helper {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 1rem 0;
    text-align: center;
}

/* Dark mode auth pages */
[data-theme="dark"] body.auth-page {
    background: #1a1a2e;
}
[data-theme="dark"] body.auth-page .auth-card {
    background: #252538;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] body.auth-page .auth-card h1 {
    color: #93c5fd;
}
[data-theme="dark"] body.auth-page .auth-card input[type="email"] {
    background: #2a2a3e;
    color: #e0e0e0;
    border-color: #3a3a4e;
}
[data-theme="dark"] body.auth-page .auth-card input[type="email"]:focus {
    border-color: #7cacf8;
    box-shadow: 0 0 0 3px rgba(124, 172, 248, 0.15);
}
[data-theme="dark"] body.auth-page .auth-card .message {
    background: #14301c;
    border-color: #166534;
    color: #86efac;
}
[data-theme="dark"] body.auth-page .auth-card .message.error {
    background: #3e1a1a;
    border-color: #7f1d1d;
    color: #fca5a5;
}
[data-theme="dark"] body.auth-page .auth-card .helper {
    color: #94a3b8;
}

/* ---------------------------------------------------------------------- */
/* #93 Phase A — page-scoped styles migrated from per-template <style>    */
/* blocks. Scoped by body class so each page's bespoke styling can be     */
/* consolidated into shared classes in later phases without collisions.   */
/* ---------------------------------------------------------------------- */

/* ---------------------------------------------------------------------- */
/* #103 — shared utility classes consolidated from per-page body scopes.  */
/* These appear on multiple pages with identical styling. Keep here so a  */
/* new page picks them up by simply using the class — no body-scope dup.  */
/* ---------------------------------------------------------------------- */

/* Back link — used on every admin sub-page header to return to parent. */
.back {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Error / validation message banner. */
.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

/* "Nothing to show here" empty-state placeholder. */
.empty {
    color: #777;
    font-style: italic;
}

/* Shared text-page page-frame layout (48rem centred column). */
body.text-page {
    max-width: 48rem;
    margin: 2rem auto;
    padding: 0 1rem;
    color: #1a1a1a;
}
body.text-page.text-page--narrow {
    max-width: 32rem;
    margin: 4rem auto;
}
/* body.text-page .back rule consolidated into global .back (see #103). */

/* Info icon with hover tooltip — used in group settings and elsewhere. */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    font-size: 0.65rem;
    font-weight: 700;
    font-style: normal;
    cursor: help;
    vertical-align: middle;
    margin-left: 0.35rem;
    position: relative;
    user-select: none;
    line-height: 1;
}
.info-icon .info-text {
    display: none;
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2937;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 400;
    padding: 0.4rem 0.65rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.15);
}
.info-icon:hover .info-text,
.info-icon:focus .info-text {
    display: block;
}

/* /guide/* pages — TOC + body markdown rendering. */
body.guide-page {
    line-height: 1.7;
}
body.guide-page h1 {
    font-size: 1.5rem;
    font-weight: normal;
    margin-bottom: 0.5rem;
}
body.guide-page h2 {
    font-size: 1.2rem;
    margin-top: 2rem;
    border-bottom: 0.0625rem solid #e5e7eb;
    padding-bottom: 0.25rem;
}
body.guide-page h3 {
    font-size: 1rem;
    margin-top: 1.5rem;
    color: #555;
}
body.guide-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
body.guide-page th,
body.guide-page td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 0.0625rem solid #e5e7eb;
    font-size: 0.9rem;
}
body.guide-page th {
    background: #f3f4f6;
}
body.guide-page code {
    background: #f3f4f6;
    padding: 0.1rem 0.3rem;
    border-radius: 0.2rem;
    font-size: 0.9em;
}
body.guide-page a {
    color: #2563eb;
}

/* Admin submission preview page. */
body.admin-preview-page h1 {
    font-size: 1.3rem;
    font-weight: normal;
}
body.admin-preview-page .doc-content img {
    max-width: 100%;
}
body.admin-preview-page .preview-paper {
    margin: 0.5rem 0;
}
body.admin-preview-page .actions {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
}
body.admin-preview-page .actions button {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    color: #fff;
}
body.admin-preview-page .btn-approve {
    background: #16a34a;
}
body.admin-preview-page .btn-reject {
    background: #dc2626;
}

/* Admin group settings page. */
/* admin-group-settings: .back, .error consolidated into global rules (#103). */
body.admin-group-settings-page h1 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
body.admin-group-settings-page label {
    display: block;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}
body.admin-group-settings-page input[type="text"],
body.admin-group-settings-page textarea {
    width: 100%;
    padding: 0.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    border: 0.0625rem solid #d1d5db;
    border-radius: 0.25rem;
    box-sizing: border-box;
}
body.admin-group-settings-page textarea {
    min-height: 8rem;
    resize: vertical;
}
body.admin-group-settings-page .actions {
    margin-top: 1.5rem;
}
body.admin-group-settings-page .actions button {
    padding: 0.5rem 1.25rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Admin dashboard / Convener's desk. */
body.admin-dashboard-page h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
body.admin-dashboard-page h2 { font-size: 1.15rem; margin-top: 2rem; color: #333; }
body.admin-dashboard-page .meta { color: #555; font-size: 0.9rem; margin-bottom: 1rem; }
body.admin-dashboard-page .actions { margin: 1rem 0; }
body.admin-dashboard-page .actions a {
    display: inline-block; padding: 0.4rem 0.9rem; margin-right: 0.5rem;
    background: #2563eb; color: white; text-decoration: none;
    border-radius: 0.25rem; font-size: 0.9rem;
}
body.admin-dashboard-page .session-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; margin: 0.5rem 0;
    border: 0.0625rem solid #e5e7eb; border-radius: 0.5rem;
    background: white; cursor: pointer; text-decoration: none; color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
body.admin-dashboard-page .session-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 0.0625rem 0.25rem rgba(37,99,235,0.08);
}
body.admin-dashboard-page .session-card.past { opacity: 0.5; }
body.admin-dashboard-page .session-info { display: flex; flex-direction: column; gap: 0.15rem; }
body.admin-dashboard-page .session-title { font-weight: 600; font-size: 0.95rem; }
body.admin-dashboard-page .session-title .session-tz {
    color: #9ca3af; font-size: 0.8rem; font-weight: 400;
}
body.admin-dashboard-page .session-meta { font-size: 0.8rem; color: #666; }
body.admin-dashboard-page .state-badge {
    display: inline-block; padding: 0.15rem 0.5rem; border-radius: 0.25rem;
    font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
body.admin-dashboard-page .state-setup { background: #f3f4f6; color: #374151; }
body.admin-dashboard-page .state-registration_open { background: #dbeafe; color: #1e40af; }
body.admin-dashboard-page .state-review_open { background: #dcfce7; color: #166534; }
body.admin-dashboard-page .state-in_session { background: #fef3c7; color: #92400e; }
body.admin-dashboard-page .state-moderation { background: #fce7f3; color: #9d174d; }
body.admin-dashboard-page .state-released { background: #e0e7ff; color: #3730a3; }
body.admin-dashboard-page .state-archived { background: #f3f4f6; color: #6b7280; }
body.admin-dashboard-page .pending-badge {
    background: #fef3c7; color: #92400e; font-size: 0.75rem;
    padding: 0.1rem 0.4rem; border-radius: 0.25rem; font-weight: 600;
}
/* admin-dashboard .empty consolidated into global .empty (#103). */
body.admin-dashboard-page .group-section {
    margin-top: 1.5rem; padding-top: 1rem;
    border-top: 0.0625rem solid #e5e7eb;
}
body.admin-dashboard-page .group-section:first-of-type {
    border-top: none; padding-top: 0;
}
body.admin-dashboard-page .group-header {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 0.75rem; margin-bottom: 0.5rem;
}
body.admin-dashboard-page .group-name {
    margin: 0; font-size: 1.2rem; font-weight: 700;
    color: #111; flex: 1; min-width: 10rem;
}
body.admin-dashboard-page .group-admin-link {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.75rem; background: transparent;
    color: #2563eb; text-decoration: none; font-size: 0.9rem;
    border: 0.0625rem solid #bfdbfe; border-radius: 0.25rem;
}
body.admin-dashboard-page .group-admin-link:hover { background: #eff6ff; }
body.admin-dashboard-page .gear-icon { font-size: 1.25rem; line-height: 1; }
body.admin-dashboard-page .new-session-link {
    display: inline-block; padding: 0.3rem 0.75rem;
    background: #2563eb; color: #fff; text-decoration: none;
    border-radius: 0.25rem; font-size: 0.85rem;
}
body.admin-dashboard-page .new-session-link:hover { background: #1d4ed8; }
body.admin-dashboard-page .sessions { display: flex; flex-direction: column; }

/* My-comments reviewer preview page. */
body.my-comments-page h1 { font-size: 1.3rem; color: #555; }
body.my-comments-page .comment-card {
    background: #fff;
    border: 0.09375rem solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    box-shadow: 0 0.0625rem 0.1875rem rgba(15, 23, 42, 0.05);
}
body.my-comments-page .comment-excerpt {
    background: #f3f4f6;
    border-left: 0.1875rem solid #94a3b8;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    font-style: italic;
    color: #4b5563;
    font-size: 0.95rem;
}
body.my-comments-page .comment-excerpt--crop {
    padding: 0;
    border-left: none;
}
body.my-comments-page .comment-excerpt--crop img {
    width: 100%;
    display: block;
    border-radius: 0.25rem;
}
body.my-comments-page .comment-text { line-height: 1.6; }
body.my-comments-page .comment-kind {
    font-size: 0.8rem; color: #9ca3af; text-transform: uppercase;
    margin-bottom: 0.25rem;
}
body.my-comments-page .no-comments {
    color: #6b7280; font-style: italic; margin: 2rem 0;
}
body.my-comments-page .btn-bar {
    display: flex; justify-content: space-evenly; margin: 1.5rem 0;
}
body.my-comments-page .nav-btn {
    padding: 0.4rem 1rem; font-size: 0.9rem; border: none;
    border-radius: 0.25rem; cursor: pointer; background: #2563eb;
    color: white; text-decoration: none;
    display: inline-flex; align-items: center;
}
body.my-comments-page .closing-note {
    background: #eff6ff; border: 0.0625rem solid #bfdbfe;
    border-radius: 0.5rem; padding: 1rem 1.25rem; margin: 2rem 0 1rem;
    font-size: 1.05rem; font-weight: bold; line-height: 1.6;
    color: #1e3a5f; text-align: center;
}

/* Review portal — own page-frame (40rem, soft-grey background). */
body.review-portal-page *,
body.review-portal-page *::before,
body.review-portal-page *::after { box-sizing: border-box; }
body.review-portal-page {
    max-width: 40rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    color: #1a1a1a;
    background: #fafafa;
    line-height: 1.6;
}
body.review-portal-page h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 0.25rem;
    color: #111;
}
body.review-portal-page .subtitle {
    color: #555; font-size: 0.95rem; margin: 0 0 1.75rem;
}
body.review-portal-page .submission {
    padding: 1rem 1.25rem;
    background: white;
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.15s, box-shadow 0.15s;
}
body.review-portal-page .submission:hover {
    border-color: #bfdbfe;
    box-shadow: 0 0.0625rem 0.25rem rgba(37, 99, 235, 0.08);
}
body.review-portal-page .submission a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}
body.review-portal-page .submission a:hover { text-decoration: underline; }
body.review-portal-page .progress {
    font-size: 0.8rem; color: #9ca3af;
    white-space: nowrap; text-transform: lowercase;
}
body.review-portal-page .progress.feedback-recorded {
    color: #16a34a; font-weight: 500;
}
body.review-portal-page .word-count {
    font-size: 0.8rem; color: #9ca3af;
    margin-left: 0.75rem; white-space: nowrap;
}
body.review-portal-page .word-count-over {
    color: #dc2626; font-weight: 600;
}
body.review-portal-page .info-box {
    background: #eff6ff;
    border: 0.0625rem solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.75rem 0 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #1e3a5f;
}
body.review-portal-page .info-box p { margin: 0 0 0.4rem; }
body.review-portal-page .info-box ul { margin: 0; padding-left: 1.25rem; }
body.review-portal-page .info-box li { margin: 0.15rem 0; }
body.review-portal-page .deadline {
    text-align: center;
    color: #dc2626;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 1.5rem 0 0;
}
/* review-portal page overrides global .empty for its slightly lighter
   colour and the extra top/bottom margin its layout calls for. */
body.review-portal-page .empty {
    color: #888;
    margin: 2rem 0;
}
body.review-portal-page .readonly-banner {
    background: #fef3c7;
    border: 0.0625rem solid #fde68a;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}
body.review-portal-page .session-date-line {
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 1.5rem 0 0;
}

/* Text-page width variants beyond the default 48rem. */
body.text-page.text-page--wide { max-width: 56rem; }
body.text-page.text-page--form { max-width: 40rem; }

/* File-icon link (admin moderation, release, session-detail). */
.file-icon-link {
    color: #6b7280;
    text-decoration: none;
    vertical-align: middle;
}
.file-icon-link svg { vertical-align: middle; }
.file-icon-link--inline { margin-left: 0.4rem; font-size: 0.7em; }
.file-icon-row {
    margin: 0.5rem 0;
}
.file-icon-row a {
    color: #6b7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
}

/* Read-only italic note appearing on admin moderation in non-moderation state. */
.readonly-note {
    font-size: 0.9rem;
    color: #777;
    font-style: italic;
}

/* Admin moderation page. */
body.admin-moderation-page h1 { font-size: 1.5rem; font-weight: normal; margin-bottom: 0.25rem; }
body.admin-moderation-page h2 {
    font-size: 1.2rem; font-weight: normal; margin-top: 2rem;
    border-bottom: 0.0625rem solid #e5e7eb; padding-bottom: 0.25rem;
}
body.admin-moderation-page h3 { font-size: 1rem; margin-top: 1.25rem; color: #555; }
/* admin-moderation .back consolidated into global .back (#103). */
body.admin-moderation-page .feedback-item {
    position: relative;
    background: #fff;
    border: 0.09375rem solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 0.0625rem 0.1875rem rgba(15, 23, 42, 0.05);
}
body.admin-moderation-page .reject-toggle {
    position: absolute;
    top: 0.5rem; right: 0.5rem;
    width: 1.6rem; height: 1.6rem; line-height: 1.4rem;
    text-align: center; padding: 0;
    font-size: 0.9rem; font-weight: 700;
    cursor: pointer; border-radius: 0.3rem;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
body.admin-moderation-page .reject-toggle.reject {
    background: #fef2f2;
    color: #b91c1c;
    border: 0.0625rem solid #fecaca;
}
body.admin-moderation-page .reject-toggle.reject:hover {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}
body.admin-moderation-page .reject-toggle.unreject {
    background: #f0fdf4;
    color: #15803d;
    border: 0.0625rem solid #bbf7d0;
}
body.admin-moderation-page .reject-toggle.unreject:hover {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}
body.admin-moderation-page form.reject-form {
    position: absolute; top: 0; right: 0; margin: 0;
}
body.admin-moderation-page .feedback-item.removed {
    background: #f9fafb; opacity: 0.7;
}
body.admin-moderation-page .feedback-item.removed .feedback-text {
    text-decoration: line-through;
    color: #9ca3af;
}
body.admin-moderation-page .kind-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    background: #e0e7ff;
    color: #3730a3;
    text-transform: uppercase;
    margin-right: 0.5rem;
}
body.admin-moderation-page .removed-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    background: #fee2e2;
    color: #991b1b;
    margin-left: 0.5rem;
}
body.admin-moderation-page .feedback-excerpt {
    background: #f3f4f6;
    border-left: 0.1875rem solid #94a3b8;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-style: italic;
    color: #4b5563;
    font-size: 0.95rem;
}
body.admin-moderation-page .feedback-text { line-height: 1.6; }
body.admin-moderation-page .feedback-text p { margin: 0.25rem 0; }
body.admin-moderation-page form.inline { display: inline; }
body.admin-moderation-page form.inline button {
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    border: 0.0625rem solid #d1d5db;
    border-radius: 0.25rem;
    background: white;
}
body.admin-moderation-page form.inline button.remove-btn { color: #dc2626; }
body.admin-moderation-page form.inline button.unremove-btn { color: #16a34a; }
body.admin-moderation-page .bulk-remove { margin-top: 0.5rem; }
body.admin-moderation-page .bulk-remove button {
    padding: 0.3rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    border: 0.0625rem solid #fca5a5;
    border-radius: 0.25rem;
    background: #fef2f2;
    color: #dc2626;
}
body.admin-moderation-page .crop-image {
    max-width: 100%;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

/* Review pages (HTML + SVG) — share most layout and components. */
body.review-page { max-width: 48rem; margin: 2rem auto; padding: 0 1rem; }
body.review-page h1 { font-size: 1.3rem; color: #555; }
body.review-page .feedback-section { margin-top: 2rem; }
body.review-page .feedback-section h2 { font-size: 1.1rem; }
body.review-page .feedback-section textarea {
    width: 100%;
    height: 15rem;
    padding: 0.75rem;
    font-size: 1rem;
    font-family: "Asap", system-ui, sans-serif;
    border: 0.0625rem solid #ddd;
    border-radius: 0.25rem;
    box-sizing: border-box;
}
body.review-page .readonly-banner {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}
body.review-page .review-btn-bar {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1rem 0;
}
body.review-page .review-btn-bar--bottom { margin-top: 2rem; }
body.review-page .review-btn-bar button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    min-height: 2.75rem;
}
body.review-page .btn-back { background: #2563eb; color: white; }
body.review-page .btn-preview { background: #16a34a; color: white; }
body.review-page .btn-preview:disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

/* "You are reviewing" callout — shared between HTML and SVG review pages. */
body.review-page .callout--reviewing {
    background: #eff6ff;
    border: 0.1875rem solid #2563eb;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 0.75rem 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #1e3a5f;
    box-shadow: 0 0.125rem 0.375rem rgba(37, 99, 235, 0.12);
}
body.review-page .callout--reviewing__heading { font-size: 1.05rem; }
body.review-page .callout--reviewing__list {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}
body.review-page .callout--reviewing__close { margin: 0; }

/* SVG review page additions. */
body.review-page--svg .svg-page {
    background: #fff;
    border: 0.0625rem solid #ddd;
    border-radius: 0.5rem;
    margin: 1rem 0;
    overflow: hidden;
    position: relative;
}
body.review-page--svg .svg-page img {
    width: 100%;
    display: block;
}
body.review-page--svg .svg-page-heading {
    color: #555;
    font-size: 0.9rem;
    margin: 1.5rem 0 0.25rem;
}
body.review-page--svg .empty-pages {
    color: #888;
    font-style: italic;
    margin: 2rem 0;
}

/* Admin release page. */
body.admin-release-page h1 { font-size: 1.5rem; font-weight: normal; }
body.admin-release-page table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
body.admin-release-page th,
body.admin-release-page td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 0.0625rem solid #e5e7eb;
    font-size: 0.9rem;
}
body.admin-release-page th { background: #f3f4f6; }
body.admin-release-page .status-no-feedback { color: #777; font-style: italic; }
body.admin-release-page .status-ready { color: #2563eb; }
body.admin-release-page .status-sent { color: #16a34a; }
body.admin-release-page .status-failed { color: #dc2626; font-weight: 600; }
body.admin-release-page .status-generating { color: #2563eb; }
body.admin-release-page .release-form {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fef3c7;
    border: 0.0625rem solid #fcd34d;
    border-radius: 0.5rem;
}
body.admin-release-page .release-form button {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}
body.admin-release-page .release-form button[disabled] {
    opacity: 0.7;
    cursor: wait;
}
body.admin-release-page .release-form .moderation-confirm {
    margin-bottom: 1rem;
}
body.admin-release-page .release-form .moderation-confirm label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
    cursor: pointer;
}
body.admin-release-page .release-form .moderation-confirm input[type="checkbox"] {
    margin-top: 0.2rem;
}
body.admin-release-page .release-form .bcc-row[hidden] {
    display: none;
}
body.admin-release-page .release-form .bcc-row:not([hidden]) {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
body.admin-release-page .release-form .bcc-row label {
    font-size: 0.9rem;
    color: #4b5563;
}
body.admin-release-page .release-form .bcc-row input[type="email"] {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    border: 0.0625rem solid #cbd5e1;
    border-radius: 0.25rem;
    min-width: 16rem;
}
body.admin-release-page form.retry { display: inline; }
body.admin-release-page form.retry button {
    padding: 0.2rem 0.5rem;
    background: #94a3b8;
    color: #fff;
    border: none;
    border-radius: 0.2rem;
    cursor: pointer;
    font-size: 0.8rem;
}
body.admin-release-page form.regen-form {
    display: inline;
    margin-left: 0.4rem;
}
body.admin-release-page .regen-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: #94a3b8;
    color: #fff;
    border: none;
    border-radius: 0.2rem;
    cursor: pointer;
}
body.admin-release-page form.archive-form { margin-top: 2rem; }
body.admin-release-page .btn-archive {
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    background: #6b7280;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}
body.admin-release-page .purge-note {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 0.0625rem solid #e5e7eb;
    font-size: 0.9rem;
    color: #dc2626;
    font-weight: 600;
    text-align: center;
}
body.admin-release-page .advanced-release {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border: 0.0625rem solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}
body.admin-release-page .advanced-release summary {
    cursor: pointer;
    color: #4b5563;
}
body.admin-release-page .advanced-release p {
    margin: 0.75rem 0;
    color: #4b5563;
}
body.admin-release-page .advanced-release button {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    background: #94a3b8;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}

/* Generic spinner used on release page + session detail. */
@keyframes wb-spin { to { transform: rotate(360deg); } }
.wb-spinner {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-left: 0.5em;
    vertical-align: -0.1em;
    border: 0.125rem solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: wb-spin 0.7s linear infinite;
}

/* Banner — shared header bar across every page. */
.wb-banner {
    position: fixed; top: 0; left: 0; right: 0;
    height: 2.8rem; background: #2563eb;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 1rem; z-index: 9998;
}
.wb-banner__left {
    min-width: 0; flex: 1;
    display: flex; align-items: center; gap: 0.75rem;
}
.wb-banner__back {
    color: #fff; text-decoration: none; font-size: 1.3rem;
    opacity: 0.85; padding: 0 0.25rem;
}
.wb-banner-centre {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%); white-space: nowrap;
}
@media (max-width: 40rem) {
    .wb-banner-centre { display: none !important; }
}
.wb-banner__group {
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.wb-banner__group-name {
    font-family: 'Special Elite', cursive;
    font-size: 1.15rem; font-weight: 400;
    letter-spacing: 0.03em; color: #fff;
}
.wb-banner__group-settings {
    color: #fff; text-decoration: none; line-height: 1;
}
.wb-banner__group-settings-gear { font-size: 1.15rem; }
.wb-banner__group-link {
    color: #fff; text-decoration: none;
}
.wb-banner__logo-link { text-decoration: none; }
.wb-banner__logo-first {
    font-family: 'Special Elite', cursive;
    font-size: 1.6rem; line-height: 1; color: #f0f0f0;
}
.wb-banner__logo-rest {
    font-family: 'Special Elite', cursive;
    font-size: 1.6rem; line-height: 1; color: #8a9bae;
}
.wb-banner__right {
    display: flex; gap: 0.5rem; align-items: center;
}
.wb-about-menu { position: relative; }
.wb-about-btn,
.wb-banner__logout-btn {
    background: transparent;
    border: 0.0625rem solid rgba(255, 255, 255, 0.4);
    color: #fff;
    border-radius: 0.25rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1;
}
.wb-about-dropdown {
    display: none;
    position: absolute; right: 0; top: 2rem;
    background: #fff;
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.25rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.12);
    min-width: 12rem;
    z-index: 9999;
}
.wb-about-dropdown a {
    display: block;
    padding: 0.5rem 0.85rem;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.85rem;
    border-bottom: 0.0625rem solid #f3f4f6;
}
.wb-about-dropdown a:last-child { border-bottom: none; }
.wb-banner__logout-form { margin: 0; }
.wb-banner__spacer { height: 2.8rem; }

/* Admin session create form. */
body.admin-session-new-page h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
body.admin-session-new-page label {
    display: block; margin-top: 1rem; font-weight: 600;
}
body.admin-session-new-page input[type="datetime-local"] {
    width: 50%; min-width: 14rem;
    padding: 0.5rem; font-size: 1rem; box-sizing: border-box;
}
body.admin-session-new-page select {
    width: 100%; padding: 0.5rem; font-size: 1rem; box-sizing: border-box;
}
body.admin-session-new-page .checkbox {
    margin-top: 0.5rem; font-weight: normal;
}
body.admin-session-new-page button[type="submit"] {
    display: block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}
/* admin-session-new: .back and .error consolidated into globals (#103). */
body.admin-session-new-page .single-group-line {
    font-size: 1rem; margin: 1rem 0 0;
}
body.admin-session-new-page .single-group-line label {
    display: inline; margin-top: 0; font-weight: 600;
}
body.admin-session-new-page .tz-label {
    font-weight: normal; color: #777; font-size: 0.85rem;
}
body.admin-session-new-page .cap-row {
    display: flex; align-items: center; gap: 0.5rem;
}
body.admin-session-new-page .cap-row--first { margin-top: 1rem; }
body.admin-session-new-page .cap-row--later { margin-top: 0.75rem; }
body.admin-session-new-page .cap-row .checkbox {
    margin: 0; white-space: nowrap;
}
body.admin-session-new-page .cap-input {
    width: 4rem; padding: 0.4rem; font-size: 1rem; text-align: center;
}
body.admin-session-new-page .cap-input--disabled {
    opacity: 0.4; pointer-events: none;
}
body.admin-session-new-page .meeting-link-label { margin-top: 1.5rem; }
body.admin-session-new-page .meeting-link-input {
    width: 100%; padding: 0.5rem; font-size: 1rem; box-sizing: border-box;
}
body.admin-session-new-page .word-count-label { margin-top: 1.5rem; }
body.admin-session-new-page .field-hint {
    font-size: 0.85rem; color: #666; margin: 0 0 0.25rem 0;
}
body.admin-session-new-page .count-input {
    width: 8rem; padding: 0.5rem; font-size: 1rem;
}

/* Registration form. */
body.register-form-page {
    max-width: 48rem;
    margin: 2rem auto;
    padding: 0 1rem;
    color: #1a1a1a;
}
body.register-form-page h1 { font-size: 1.5rem; }
body.register-form-page label { font-weight: 600; }
body.register-form-page input[type="text"],
body.register-form-page select {
    width: 100%; padding: 0.5rem; font-size: 1rem; box-sizing: border-box;
}
body.register-form-page .upload-area {
    border: 0.125rem dashed #999;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin: 1rem 0;
}
body.register-form-page .upload-area.dragover {
    border-color: #2563eb; background: #eff6ff;
}
body.register-form-page .upload-area.uploading {
    opacity: 0.6; pointer-events: none;
}
body.register-form-page .upload-area.done {
    border-color: #16a34a; border-style: solid;
}
body.register-form-page .upload-area p { margin: 0.5rem 0; color: #666; }
body.register-form-page .upload-area .browse-btn {
    color: #2563eb; text-decoration: underline; cursor: pointer;
}
body.register-form-page #preview-area {
    margin: 1.5rem 0;
    border: 0.0625rem solid #ddd;
    border-radius: 0.5rem;
    padding: 1rem;
    display: none;
}
body.register-form-page #preview-area h2 {
    font-size: 1.1rem; color: #666; margin-top: 0;
}
body.register-form-page #preview-area .preview-content {
    max-height: 60vh; overflow-y: auto;
}
body.register-form-page #preview-area .preview-content img { max-width: 100%; }
body.register-form-page #submit-area {
    display: none;
    margin-top: 1.5rem;
    text-align: center;
}
body.register-form-page button[type="submit"] {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}
body.register-form-page button[type="submit"]:hover { background: #1d4ed8; }
/* register-form .error overrides the global .error visuals — softer
   pink background and no red text. The participant-facing error tone
   is deliberately less alarming than the admin pages. */
body.register-form-page .error {
    background: #f4e8e8;
    color: inherit;
    margin: 1rem 0;
}
body.register-form-page .status {
    padding: 0.5rem;
    color: #666;
    font-style: italic;
}
body.register-form-page #word-count-indicator {
    margin: 0.5rem 0 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.9rem;
    color: #4b5563;
    background: #f9fafb;
}
body.register-form-page #word-count-indicator.over-grace {
    color: #991b1b;
    background: #fee2e2;
    border: 0.0625rem solid #fecaca;
    font-weight: 600;
}
body.register-form-page #word-count-indicator .word-count-number {
    font-variant-numeric: tabular-nums;
}
body.register-form-page #word-count-indicator.over-grace .word-count-number {
    color: #dc2626;
}
body.register-form-page #word-count-indicator .word-count-warning {
    margin-top: 0.25rem; font-weight: 500;
}
body.register-form-page .line-count-row { margin-top: 0.25rem; }

body.register-form-page .session-line {
    margin: 0.5rem 0 0.5rem; color: #4b5563; font-size: 0.95rem;
}
body.register-form-page .deadline-line {
    margin: 0.5rem 0 1rem;
    padding: 0.5rem 0.75rem;
    background: #fef3c7;
    border: 0.0625rem solid #fcd34d;
    border-radius: 0.25rem;
    font-size: 0.95rem;
    color: #92400e;
}
body.register-form-page .group-description {
    margin: 1rem 0 1.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-left: 0.1875rem solid #6b7280;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}
body.register-form-page .form-field { margin-bottom: 1rem; }
body.register-form-page .title-input {
    width: 100%; padding: 0.5rem; font-size: 1rem; box-sizing: border-box;
}
body.register-form-page .field-error {
    display: none;
    color: #dc2626;
    font-size: 0.85rem;
    margin: 0.25rem 0 0;
}
body.register-form-page .field-error--visible { display: block; }
body.register-form-page .existing-submission-warning {
    background: #fef3c7;
    border: 0.0625rem solid #fde68a;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #92400e;
}
body.register-form-page #coc-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
body.register-form-page #coc-modal.visible { display: flex; }
body.register-form-page .coc-modal__body {
    background: #fff;
    max-width: 40rem;
    max-height: 80vh;
    overflow-y: auto;
    margin: 2rem;
    padding: 1.5rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.2);
    position: relative;
}
body.register-form-page .coc-modal__close {
    position: absolute;
    top: 0.75rem; right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    line-height: 1;
}
body.register-form-page .coc-modal__title { font-size: 1.1rem; margin-top: 0; }
body.register-form-page .coc-content { line-height: 1.7; }
body.register-form-page #coc-checkbox-area {
    margin: 1rem 0; text-align: center;
}
body.register-form-page #coc-checkbox-area label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
    cursor: pointer;
    font-size: 0.95rem;
}
body.register-form-page #coc-checkbox-area a { color: #2563eb; }
body.register-form-page #coc-error {
    display: none;
    color: #dc2626;
    font-size: 0.85rem;
    margin: 0.35rem 0 0;
}
body.register-form-page .platform-disclaimer {
    margin: 0.75rem 0;
    padding: 0.75rem;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}
body.register-form-page .platform-disclaimer p { margin: 0; }
body.register-form-page #convert-area {
    display: none;
    margin-top: 1.5rem;
    text-align: center;
}
body.register-form-page #convert-toggle {
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}
body.register-form-page #convert-explainer {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    text-align: left;
}
body.register-form-page #convert-explainer-text { margin: 0 0 0.75rem; }
body.register-form-page .convert-explainer__actions {
    display: flex; gap: 0.75rem; justify-content: center;
}
body.register-form-page .btn-convert {
    padding: 0.5rem 1rem;
    background: #6b7280;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}
body.register-form-page .btn-convert-cancel {
    padding: 0.5rem 1rem;
    background: none;
    border: 0.0625rem solid #999;
    color: #666;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}
body.register-form-page .purge-note {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 0.0625rem solid #e5e7eb;
    font-size: 0.9rem;
    color: #dc2626;
    font-weight: 600;
    text-align: center;
}
body.register-form-page .submit-row {
    text-align: center;
}
body.register-form-page .post-upload-actions {
    text-align: center;
}
body.register-form-page .post-upload-actions .btn-remove {
    background: none;
    border: 0.0625rem solid #999;
    color: #666;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}
body.register-form-page .preview-page {
    width: 100%;
    margin: 0.5rem 0;
    border: 0.0625rem solid #eee;
}

/* Admin session detail page. */
body.admin-session-detail-page h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
body.admin-session-detail-page h2 { font-size: 1.15rem; margin-top: 2rem; }
body.admin-session-detail-page .session-tz-inline {
    color: #9ca3af; font-size: 0.75rem; font-weight: 400;
}
body.admin-session-detail-page .meta { color: #555; font-size: 0.9rem; }
body.admin-session-detail-page .meta .session-tz-inline {
    font-size: 0.8rem;
}
body.admin-session-detail-page .state-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 0.25rem;
    font-size: 0.85rem;
}
body.admin-session-detail-page .invite-box {
    background: #f8fafc;
    border: 0.0625rem solid #e5e7eb;
    padding: 0.75rem;
    border-radius: 0.25rem;
    margin: 1rem 0;
    cursor: pointer;
}
body.admin-session-detail-page .invite-box input {
    width: 100%; padding: 0.4rem;
    font-family: monospace; font-size: 0.85rem;
}
body.admin-session-detail-page .invite-box__hint {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #555;
}
body.admin-session-detail-page .invite-box__row {
    display: flex; align-items: center; gap: 0.5rem;
}
body.admin-session-detail-page .invite-box__row input { flex: 1; }
body.admin-session-detail-page .invite-box__copy {
    font-size: 1.3rem;
    cursor: pointer;
    user-select: none;
}
body.admin-session-detail-page .invite-box__feedback {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: #16a34a;
    opacity: 0;
    transition: opacity 0.3s;
}
body.admin-session-detail-page .invite-box__feedback.visible { opacity: 1; }
body.admin-session-detail-page .transitions {
    margin: 1rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
body.admin-session-detail-page .transitions button {
    padding: 0.5rem 1rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
}
body.admin-session-detail-page .transitions button.revert {
    background: #6b7280; font-size: 0.8rem;
}
body.admin-session-detail-page .transitions button[disabled] {
    background: #94a3b8;
    cursor: not-allowed;
    opacity: 0.7;
}
body.admin-session-detail-page .transitions .cannot-invite-reason {
    font-size: 0.85rem;
    color: #991b1b;
}
body.admin-session-detail-page .transitions .btn-archive-confirm {
    background: #dc2626;
}
body.admin-session-detail-page .release-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.9rem;
}
body.admin-session-detail-page .no-transitions-note { margin-top: 0.5rem; }
body.admin-session-detail-page table { width: 100%; border-collapse: collapse; }
body.admin-session-detail-page th,
body.admin-session-detail-page td {
    padding: 0.4rem 0.6rem;
    text-align: left;
    border-bottom: 0.0625rem solid #e5e7eb;
    font-size: 0.9rem;
}
body.admin-session-detail-page th { background: #f3f4f6; }
/* admin-session-detail: .empty, .error, .back consolidated into globals (#103). */
body.admin-session-detail-page .badge-moderated {
    cursor: help;
    margin-left: 0.25rem;
    font-size: 0.95rem;
    line-height: 1;
}
body.admin-session-detail-page .approve-all-row {
    margin: 0.5rem 0 1rem;
}
body.admin-session-detail-page .btn-approve-all {
    padding: 0.4rem 0.8rem;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.85rem;
}
body.admin-session-detail-page .name-rejected {
    color: #9ca3af; text-decoration: line-through;
}
body.admin-session-detail-page .row-btn {
    padding: 0.15rem 0.4rem;
    color: #fff;
    border: none;
    border-radius: 0.2rem;
    cursor: pointer;
    font-size: 0.75rem;
    margin-left: 0.4rem;
}
body.admin-session-detail-page .row-btn--approve { background: #16a34a; margin-left: 0.4rem; }
body.admin-session-detail-page .row-btn--reject { background: #dc2626; margin-left: 0; }
body.admin-session-detail-page .row-btn--neutral { background: #94a3b8; }
body.admin-session-detail-page .row-btn-form { display: inline; }
body.admin-session-detail-page .check-mark {
    color: #16a34a; font-weight: 600;
}
body.admin-session-detail-page .word-count-over,
body.admin-session-detail-page .line-count-over {
    color: #dc2626; font-weight: 600;
}
body.admin-session-detail-page .session-settings { margin: 0.5rem 0; }
body.admin-session-detail-page .session-settings:not([open]) {
    border: none; background: transparent;
}
body.admin-session-detail-page .session-settings[open] {
    border: 0.0625rem solid #e5e7eb;
    border-radius: 0.25rem;
    background: #fff;
}
body.admin-session-detail-page .session-settings > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.25rem 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 400;
    font-size: 0.85rem;
    color: #9ca3af;
    user-select: none;
    transition: color 0.15s;
}
body.admin-session-detail-page .session-settings > summary:hover { color: #2563eb; }
body.admin-session-detail-page .session-settings > summary::-webkit-details-marker {
    display: none;
}
body.admin-session-detail-page .session-settings > summary .gear {
    font-size: 1rem; line-height: 1;
}
body.admin-session-detail-page .session-settings > summary .chevron {
    color: #d1d5db; transition: transform 0.15s; font-size: 0.7rem;
}
body.admin-session-detail-page .session-settings[open] > summary {
    color: #374151; font-weight: 600; padding: 0.6rem 0.85rem;
}
body.admin-session-detail-page .session-settings[open] > summary .chevron {
    transform: rotate(90deg); color: #6b7280;
}
body.admin-session-detail-page .session-settings > form {
    padding: 0 1rem 1rem;
    margin: 0.75rem 0 1rem;
}
body.admin-session-detail-page .session-settings-field-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
body.admin-session-detail-page .meeting-link-row {
    display: flex; align-items: center; gap: 0.5rem;
}
body.admin-session-detail-page .meeting-link-row input[type="url"] {
    flex: 1; padding: 0.4rem; font-size: 0.9rem;
}
body.admin-session-detail-page .meeting-link-row input[disabled] {
    background: #f3f4f6; color: #6b7280;
}
body.admin-session-detail-page .save-link-checkbox {
    margin-top: 0.5rem; font-weight: normal;
}
body.admin-session-detail-page .count-grid {
    display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1rem;
}
body.admin-session-detail-page .count-grid input[type="number"] {
    width: 8rem; padding: 0.4rem; font-size: 0.9rem;
}
body.admin-session-detail-page .count-grid input[disabled] {
    background: #f3f4f6; color: #6b7280;
}
body.admin-session-detail-page .count-grid .field-hint {
    font-size: 0.8rem; color: #666; margin-top: 0.25rem;
}
body.admin-session-detail-page .save-settings-row { margin-top: 0.75rem; }
body.admin-session-detail-page .btn-save-settings {
    padding: 0.4rem 0.8rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.85rem;
}
body.admin-session-detail-page .warning-pill {
    margin: 1rem 0;
    padding: 0.6rem 0.9rem;
    background: #fef3c7;
    border: 0.0625rem solid #fcd34d;
    border-radius: 0.5rem;
    color: #92400e;
    font-size: 0.9rem;
}
body.admin-session-detail-page .advanced-release {
    margin-top: 1rem;
    padding: 0.6rem 0.9rem;
    background: #f3f4f6;
    border: 0.0625rem solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    max-width: 36rem;
}
body.admin-session-detail-page .advanced-release summary {
    cursor: pointer; color: #4b5563;
}
body.admin-session-detail-page .advanced-release p {
    margin: 0.6rem 0; color: #4b5563;
}
body.admin-session-detail-page .advanced-release button {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    background: #94a3b8;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}
