/*
* Licensed to the Apache Software Foundation (ASF) under one or more
*  contributor license agreements.  The ASF licenses this file to You
* under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.  For additional information regarding
* copyright in this work, please see the NOTICE file in the top level
* directory of this distribution.
*/

/* pressroom.css: Base CSS styles for Pressroom web UI */

/* Quiet Instrument: map Bootstrap's own root channel onto the design
   tokens. Bootstrap 5.3 reads --bs-body-bg/--bs-body-color/--bs-border-color
   (not literal white/black) for a long tail of components this file never
   themes directly -- stock modals (incl. EntryEdit.jsp's revision-diff and
   newsletter-confirm dialogs), the shortcode-insert dropdown, and the
   navbar-toggler border among them. Without this mapping those stayed
   pure white with a black border in dark mode even though every token
   resolved correctly elsewhere. pressroom-tokens.css defines --paper/--ink/
   --line (light on :root, dark under prefers-color-scheme) and loads
   before this file, so the three var() references below always resolve;
   in light mode they equal Bootstrap's own defaults, so this is a no-op
   there. */
:root {
    --bs-body-bg: var(--paper);
    --bs-body-color: var(--ink);
    --bs-border-color: var(--line);
    /* Components that read the link colour through a variable (.nav-link,
       pagination, dropdown links) follow the accent too. */
    --bs-link-color: var(--accent);
    --bs-link-hover-color: color-mix(in srgb, var(--accent) 75%, var(--ink));
    /* Native radios, checkboxes and range inputs take the accent rather than
       the browser's own blue (Members' permission radios, for one). */
    accent-color: var(--accent);
    /* Native scrollbars and pickers follow the theme (a white scrollbar
       under a dark .table-responsive otherwise). */
    color-scheme: light dark;
}

/* Links. Bootstrap paints <a> from --bs-link-color-rgb, an r,g,b triplet
   that cannot be written from a hex token, so admin links stayed Bootstrap
   blue in both modes -- 3.85:1 on the dark surface, failing AA on the 12px
   caps labels. The colour is set directly instead. These two rules come
   first on purpose: every later class-scoped link rule (.quiet-link,
   .rail-link, .section-index a, ...) wins over them. */
a {
    color: var(--accent);
}

a:hover {
    color: var(--bs-link-hover-color);
}

table {
    border:0;
}

p {
    margin: 10px 0 10px;
}

.container {
    margin: 1em;
}

/* Quiet Instrument: page title row -- 20px/600 with a bottom rule; a
   primary action nested inside the same h1.pressroom-page-title (a
   future content wave's job, none exist yet) lands on the right for free
   because the title itself is the flex container -- no JSP change needed
   when one shows up. */
.pressroom-page-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-ui);
    font-size: 20px;
    font-weight: 600;
    text-wrap: balance;
}

.pressroom-content-body {
    min-height: 30em;
}

.pressroom-column-right {
    padding-left: 1em;
    padding-right: 2em;
}

.pressroom-column-left{
    padding-left: 2em;
    padding-right: 1em;
}

/* Quiet Instrument: every .card (rail's filter/action card, the content
   card, and the ad-hoc cards elsewhere in the admin UI) gets the same
   surface/line/radius treatment instead of Bootstrap's defaults. */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* ---- Buttons: one hierarchy ----
   `.btn` carries the shared type/radius/padding for every button in the
   admin UI, no matter which Bootstrap color-variant class rides along.
   Visual treatment then narrows Bootstrap's whole rainbow of variants down
   to the three the design actually uses: primary (`.btn-primary`, one per
   screen, the recommended action), destructive (`.btn-danger`/
   `.btn-outline-danger`), and everything else -- including a bare `.btn`
   with no variant class -- as the quiet secondary treatment.

   `.btn-success` used to ride the primary bucket alongside `.btn-primary`
   here, kept only because browser ITs pinned it on the Save button. Task B2
   converted every `.btn-success` use to `.btn-primary`/`.btn-secondary` and
   updated those ITs, so the alias is gone -- `.btn-success` is no longer a
   button bucket in this admin UI. The one exception is Package A's
   `EntryEdit.jsp` (owned by a parallel worktree, not touched here): its
   Publish/Submit-for-review buttons still carry `.btn-success` and now
   render in stock, unstyled Bootstrap green until the post-merge task M1
   converts them, the same transitional gap task B1 already left on that
   file's status badges.

   Bootstrap 5 themes every button state through `--bs-btn-*` custom
   properties -- `.btn:hover`, the `:active`/`.active`/`.show` chain (which
   reaches (0,3,0) specificity, beating any plain classed color override
   here), and `.btn:disabled` all just read `var(--bs-btn-hover-bg)` /
   `var(--bs-btn-active-bg)` / `var(--bs-btn-disabled-bg)` etc. Fighting
   that with literal `:hover`/`:active` rules of our own is a losing
   specificity war (stock Bootstrap green/blue briefly flashes on
   `:active` otherwise); redefining the variables per bucket instead makes
   every one of Bootstrap's own selectors resolve to a token color, hover
   through active through disabled, in one place. */

.btn {
    --bs-btn-color: var(--ink);
    --bs-btn-bg: var(--surface);
    --bs-btn-border-color: var(--line);
    --bs-btn-hover-color: var(--ink);
    --bs-btn-hover-bg: var(--accent-quiet);
    --bs-btn-hover-border-color: var(--line);
    --bs-btn-active-color: var(--ink);
    --bs-btn-active-bg: var(--accent-quiet);
    --bs-btn-active-border-color: var(--line);
    --bs-btn-disabled-color: var(--ink);
    --bs-btn-disabled-bg: var(--surface);
    --bs-btn-disabled-border-color: var(--line);

    font-family: var(--font-ui);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius);
    padding: 8px 16px;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* The current one of a row of filter chips or tabs (Entries' status chips,
   Users' All/People/Agents). .btn-secondary and .btn-outline-secondary both
   ride the quiet .btn treatment above, so without this the chip that says
   "you are here" looked exactly like the ones that do not. */
.btn[aria-current="page"] {
    --bs-btn-bg: var(--accent-quiet);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-active-border-color: var(--accent);
}

/* Hover/active shade toward --ink, NOT toward black. In light mode --ink is
   near-black so this is the conventional "darken on hover"; in dark mode the
   accent is already the LIGHT element sitting on a near-black surface, and
   darkening it reads as the button dimming out rather than responding. Mixing
   toward --ink flips the polarity with the theme for free, which a literal
   `black` -- a light-mode assumption wearing a token expression's clothes --
   cannot do. */
.btn-primary {
    --bs-btn-color: var(--surface);
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: var(--surface);
    --bs-btn-hover-bg: color-mix(in srgb, var(--accent) 88%, var(--ink));
    --bs-btn-hover-border-color: color-mix(in srgb, var(--accent) 88%, var(--ink));
    --bs-btn-active-color: var(--surface);
    --bs-btn-active-bg: color-mix(in srgb, var(--accent) 80%, var(--ink));
    --bs-btn-active-border-color: color-mix(in srgb, var(--accent) 80%, var(--ink));
    --bs-btn-disabled-color: var(--surface);
    --bs-btn-disabled-bg: var(--accent);
    --bs-btn-disabled-border-color: var(--accent);
}

.btn-danger,
.btn-outline-danger {
    --bs-btn-color: var(--bad);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--bad);
    --bs-btn-hover-color: var(--surface);
    --bs-btn-hover-bg: var(--bad);
    --bs-btn-hover-border-color: var(--bad);
    --bs-btn-active-color: var(--surface);
    --bs-btn-active-bg: color-mix(in srgb, var(--bad) 85%, var(--ink));
    --bs-btn-active-border-color: color-mix(in srgb, var(--bad) 85%, var(--ink));
    --bs-btn-disabled-color: var(--bad);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--bad);
}

.btn-link {
    --bs-btn-color: var(--accent);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--accent);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--accent);
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-color: var(--ink-soft);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: transparent;
}

.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
    opacity: .5;
    cursor: default;
    pointer-events: none;
}

/* Bootstrap's own `.btn:focus-visible` sets `outline: 0` with higher
   specificity than the global `:focus-visible` rule in pressroom-tokens.css,
   so buttons need their own ring restored here. Color/background on this
   state still come from the `--bs-btn-hover-*` vars above (Bootstrap's
   `.btn:focus-visible` rule reuses them), so only the ring itself needs
   restating. */
.btn:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    box-shadow: none;
}

/* ---- Forms ---- */

label,
.form-label,
.col-form-label {
    font-family: var(--font-ui);
    color: var(--ink);
}

.form-label,
.col-form-label {
    font-size: 14.5px;
    font-weight: 600;
}

/* `background` (the shorthand) resets every longhand it doesn't mention --
   including background-image, which is how Bootstrap paints the .form-select
   caret (`--bs-form-select-bg-img`, appearance:none so there's no native
   arrow to fall back on). Using the shorthand here silently deleted the
   caret on every <select> in the admin UI. background-color only. */
.form-control,
.form-select {
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    font-family: var(--font-ui);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--surface);
    border-color: var(--focus);
    color: var(--ink);
    box-shadow: none;
}

.form-text {
    color: var(--ink-soft);
    font-size: 12px;
}

/* A readonly field is still a field, but it is not somewhere you can type:
   dropping it to --paper (the page ground) rather than --surface says so
   without a disabled look. Four JSPs were carrying this as an inline style
   apiece before the consistency pass. */
.form-control[readonly] {
    background: var(--paper);
}

/* .control is the wrapper the older forms put round a button row. It had no
   rule at all -- the same silent no-op `formrow` was -- so every caller was
   padding it with a Bootstrap utility instead. */
.control {
    margin-top: 12px;
}

/* Bootstrap's stock yellow on the surface is about 1.6:1 and has no dark
   value; --warn reads in both modes (WeblogConfig's custom-domain note). */
.text-warning {
    color: var(--warn) !important;
}

/* Plain text whose line breaks are the writer's (a comment body). */
.pre-wrap {
    white-space: pre-wrap;
}

/* Bootstrap's muted grey is not a token; the quiet register is --ink-soft. */
.text-muted {
    color: var(--ink-soft) !important;
}

.text-danger {
    color: var(--bad) !important;
}

.form-control.is-invalid,
.is-invalid:not(.form-select) {
    border-color: var(--bad);
    background-image: none;
}

/* Bootstrap composites a select's background-image from two layers:
   var(--bs-form-select-bg-img) (the caret) and var(--bs-form-select-bg-icon)
   (a warning icon, set only on .is-invalid). Blanking background-image
   outright -- as the rule above does for text inputs -- would erase the
   caret too, the same bug just fixed globally for plain selects, so
   .form-select is excluded from that bare .is-invalid selector above and
   handled here instead. */
.form-select.is-invalid {
    border-color: var(--bad);
}

/* Suppress only the icon variable, keeping the caret. Bootstrap sets
   --bs-form-select-bg-icon at specificity (0,4,0) via
   ".form-select.is-invalid:not([multiple]):not([size])" (plus a
   [size="1"] sibling selector for an explicit single-row select) --
   matching that specificity exactly here means pressroom.css's later position
   in the cascade decides the winner. Verified empirically against the real
   bootstrap.css in headless Chrome: computed background-image keeps the
   caret url and drops the icon. */
.form-select.is-invalid:not([multiple]):not([size]),
.form-select.is-invalid:not([multiple])[size="1"] {
    --bs-form-select-bg-icon: none;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: var(--bad);
    box-shadow: none;
}

/* ---- Checkboxes & radios ----
   29 uses across the admin UI, none previously themed -- every checkbox and
   radio stayed pure white with a stock-blue check/dot regardless of mode.
   Bootstrap paints the unchecked box through --bs-form-check-bg (read by its
   own background-color declaration) and borders every .form-check-input
   through --bs-border-color, which the :root mapping above already points
   at --line, so only the background var needs restating here. The checked
   state hardcodes background-color/border-color (#0d6efd) directly on
   `.form-check-input:checked`, so that needs an explicit override rather
   than a variable; the checkmark/radio-dot glyph itself is Bootstrap's own
   white SVG (--bs-form-check-bg-image) and stays legible unchanged against
   --accent. Focus follows the same border-color/box-shadow:none convention
   as .form-control:focus/.form-select:focus above -- the ring itself comes
   from pressroom-tokens.css's global :focus-visible rule. */
.form-check-input {
    --bs-form-check-bg: var(--surface);
    border-color: var(--line);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:focus {
    border-color: var(--focus);
    box-shadow: none;
}

/* Quiet Instrument: labels-above layout for the two long settings forms
   (WeblogConfig.jsp, GlobalConfig.jsp). Both use Bootstrap's
   `row mb-3 > label.col-sm-3 + div.col-sm-9` grid for every field; adding
   `.form-stacked` to the <form> element converts those rows to block flow
   without touching a single field. */
.form-stacked .row.mb-3 {
    display: block;
    margin-right: 0;
    margin-left: 0;
}

.form-stacked .row.mb-3 > .col-sm-3,
.form-stacked .row.mb-3 > .col-sm-9,
.form-stacked .row.mb-3 > .offset-sm-3 {
    display: block;
    width: auto;
    max-width: none;
    flex: none;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
}

/* Any label-column element, not only <label>: Weblog settings' read-only
   "Blog URL" is a <span> and sat indented by the column's own padding. */
.form-stacked .row.mb-3 > .col-sm-3 {
    padding-top: 0;
    margin-bottom: 4px;
}

/* ---- Top bar ---- */

.pressroom-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.pressroom-topbar .navbar-brand,
.pressroom-topbar .nav-link {
    color: var(--ink);
}

.pressroom-topbar .nav-link:hover,
.pressroom-topbar .nav-link:focus {
    color: var(--accent);
}

.pressroom-topbar .navbar-toggler {
    border-color: var(--line);
}

/* ---- Top bar: weblog switcher (task B10) ----
   Only rendered when populateCommonModel found two or more weblogs for the
   signed-in user; a one-weblog session's top bar carries none of this. */
.weblog-switcher {
    margin-left: 16px;
}

.weblog-switcher .dropdown-item .data {
    margin-left: 8px;
    font-size: 12px;
    color: var(--ink-soft);
}

.weblog-switcher .dropdown-item.active {
    background: var(--accent-quiet);
    color: var(--ink);
}

/* The phone-width Menu button that unfolds the rail and sidebar (the
   layouts' #adminRailColumn); hidden from md up by .d-md-none. */
.rail-toggle {
    margin-bottom: 12px;
}

/* ---- The rail: context header + tool groups ---- */

.rail {
    display: block;
    width: 232px;
    max-width: 100%;
    margin-bottom: 16px;
}

.rail-context {
    padding: 4px 4px 16px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.rail-context-name {
    font-family: var(--font-ui);
    font-size: 14.5px;
    font-weight: 600;
}

.rail-context-name a {
    color: var(--ink);
    text-decoration: none;
}

.rail-context-name a:hover {
    color: var(--accent);
}

.rail-context-handle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-family: var(--font-data);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
}

.rail-status-dot {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: var(--good);
}

.rail-group {
    margin-bottom: 16px;
}

.rail-group-label {
    padding: 0 4px 4px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.rail-link {
    display: block;
    padding: 6px 10px;
    margin: 0 -4px;
    border-left: 2px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: 14.5px;
    color: var(--ink);
    text-decoration: none;
}

.rail-link:hover {
    background: var(--accent-quiet);
    color: var(--ink);
}

.rail-active {
    border-left: 2px solid var(--accent);
    background: var(--accent-quiet);
    font-weight: 600;
}

/* ---- Footer: the colophon, two quiet lines ---- */

.colophon {
    font-family: var(--font-ui);
    font-size: 12px;
    color: var(--ink-soft);
}

.colophon p {
    margin: 0;
}

.colophon a {
    color: inherit;
}

/* The clauses are spans so the separator is CSS, not template logic: any
   clause may be absent and the dots still land only between neighbours. */
.colophon-meta span + span::before {
    content: "\00b7";
    margin: 0 0.5em;
}

.date-form {
    margin: 10px;
}

/* The one-line orientation sentence under a page title. Used on ~15 admin
   screens and, until now, styled NOWHERE -- so it rendered as body prose at
   full ink and full size, competing with the title above it. Same quiet
   register as p.pagetip below it, which sits one level further down. */
p.subtitle {
    color: var(--ink-soft);
    font-size: 14.5px;
    margin: 0 0 1em;
}

/* page tips - instructional text below page subtitle */

p.pagetip {
    color: var(--ink-soft);
    font-size: 14.5px;
    margin-top: 0;
    margin-bottom: 1em;
}

/* main menu */

/* The icon/label gap used to be a hardcoded &nbsp; in MainMenu.jsp -- a
   non-breaking space is content, and it does not scale with the type. */
/* Doubled class: beats .section-head (which the h2 also carries, for the
   Routes marker) wherever the two rules sit in this file. The name is a
   name to pick, at weight 600 in ink -- not a 12px caps label. */
.mm_weblog_name.section-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-family: var(--font-ui);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--ink);
}

.mm_weblog_name a {
    color: var(--ink);
    text-decoration: none;
}

.mm_weblog_name a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.mm_weblog_name .data {
    font-size: 12px;
    font-weight: 400;
    color: var(--ink-soft);
}

.mm_subtable_label {
    width: 8em;
    font-weight: bold; 
}

/* .card already sets --surface/--line/radius; this second, later rule used
   to force a literal white background here too, which -- exactly like the
   sign-in body rule above -- fought dark mode on every "Your weblogs" card. */
.yourWeblogBox {
    background: var(--surface);
    padding: 1em;
}

table.mm_table td {
    padding: 0.3em;
}

table.mm_table_actions td {
    padding: 0.1em;
}

/* edit entry page */

/* Quiet Instrument: card/section headers label quietly instead of
   dominating -- the caps-label type role from design-system.md's type
   scale (12px, .08em tracking, uppercase, 600 weight, --ink-soft) instead
   of Bootstrap's/the browser's oversized h3/h4 defaults. This targets the
   header text itself regardless of what markup rides inside a
   .card-header: plain text, or a heading carrying .section-head
   (MediaFileAdd, TemplateEdit -- h4.card-title until task B11's
   heading-level sweep, h3 until the fit-and-finish one put every card and
   section heading one level under the layout's h1; EntryEdit/EntryEditor's
   own panels are all .editor-box/.editor-drawer now, the newsletter and revisions boxes and
   the Summary drawer included, and the Plugins card was deleted with the
   plugin it held), or h2.setup-section-title (Setup.jsp) -- so any heading
   dropped into a card header inherits the quiet treatment instead of
   reintroducing its element's own default size. .section-head is the same role applied to
   WeblogConfig.jsp's and GlobalConfig.jsp's un-carded "display group"
   headers, which shouted just as loudly with no card to blame. */
.card-header,
.section-head {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.card-header {
    padding: 8px 16px;
}

.card-header h2,
.card-header h3,
.card-header h4,
.card-header .card-title {
    margin: 0;
    padding: 0;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
}

.card-header a {
    color: inherit;
    text-decoration: none;
}

.section-head {
    margin: 32px 0 12px;
}

.section-head:first-child {
    margin-top: 0;
}

/* The same demotion, for the one place headings still arrive at their
   element's own size. pressroom.css deliberately has no global h1-h6 reset --
   .pressroom-page-title owns 20px and everything else was expected to opt in --
   but "opt in" only ever happened inside .card-header, so a bare <h3>/<h4>
   elsewhere rendered at Bootstrap's fluid default: 24-28px, i.e. LARGER than
   the page title it sits beneath. Modal titles are the one survivor -- BS5
   emits h4.modal-title/h3 inside .modal-header, which is not a .card-header,
   so all eleven admin dialogs opened at 24-28px. (Task B6: the sidebar tiles
   -- EntriesSidebar, MediaFileSidebar, MainMenuSidebar, CategoriesSidebar,
   TemplatesSidebar -- used to be the other half of this rule; they no longer
   emit <h3> at all, having moved to .sidebar-label below, so the
   .pressroom-column-left .card-body selector this rule used to carry for them
   is gone too.) Same six declarations as .card-header/.section-head above. */
.modal-header h3,
.modal-header .modal-title {
    margin: 0 0 8px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* Task B7: one modal shape. The title above is the caps-label; the body text
   is ordinary reading copy at the same size/color as everywhere else in the
   admin UI (Bootstrap's own default is 1rem/16px at full --ink, which is not
   one of this file's five sizes and does not match the rest of a modal's own
   surrounding page). Footer button ORDER (cancel/dismiss first, the
   primary-or-destructive action last) is a markup convention enforced by
   JspConsistencyTest, not something CSS can fix -- Bootstrap's
   .modal-footer packs flex children left-to-right in DOM order. */
.modal-body {
    font-size: 14.5px;
    color: var(--ink);
}

/* Task B6: the sidebar tiles on the rail's own grammar -- a caps-label per
   logical block instead of a Bootstrap card with h3/hr section markup. The
   wrapper is <aside id="adminSidebar"> now (see tiles-tabbedpage.jsp /
   tiles-mainmenupage.jsp), not .card/.card-body, so .sidebar-group draws its
   own separator instead of relying on the old ".card-body hr" reset that
   used to turn <hr size="1" noshade> into a token-colored line -- there is
   no <hr> left anywhere in a sidebar tile for that rule to catch. */
.sidebar {
    padding: 12px 0 0;
}

.sidebar-group {
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}

.sidebar-label {
    margin: 0 0 8px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* MediaFileSidebar's "Add Media File" link used to bold itself with an
   inline style="font-weight:bold" when it was the current action -- weight
   600, not the browser's 700 "bold", is this app's one emphasis value. */
.sidebar-current-action {
    font-weight: 600;
}

/* Collapse-toggle chevron: BS3's Glyphicons Halflings font is gone, so this is a
   pure-CSS caret that flips with BS5's .collapsed class on the trigger link. */
.card-header a:after {
    content: "";
    display: inline-block;
    float: right;
    /* Vertically centred against the caps-label line the header now is --
       the old fixed 6px offset was tuned for the un-styled h4 line box. */
    margin-top: 4px;
    border-top: 5px solid var(--ink-soft);
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    transition: transform 0.2s ease-in-out;
}
.card-header a.collapsed:after {
    transform: rotate(-90deg);
}

/* ---- Entry editor: writing surface + publish rail ----
   The approved card is docs/design/editor/editor-writing-surface.html. The
   main column carries title/permalink/editor; a 252px rail carries Publish,
   Organize, the SEO drawer, and (below the form, but in the same grid
   column) the newsletter and revisions boxes and the quiet delete link --
   all .editor-box/.rail-group-label, the same shape as the boxes inside the
   form, so the rail reads as one continuous column rather than boxes then
   cards then a link. The form itself is display:contents so those boxes --
   which hold their own <form>s and cannot nest inside #entry -- still place
   into the rail's column. */

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 252px;
    /* The rail stacks its own boxes 14px apart (.editor-rail's gap below),
       so a uniform 26px gap here put a visible 26px seam between the rail
       and .editor-rail-extra in the middle of an otherwise 14px stack. The
       column gutter and the row rhythm are different measurements. */
    column-gap: 26px;
    row-gap: 14px;
    align-items: start;
}

.editor-form {
    display: contents;
}

.editor-main {
    grid-column: 1;
    grid-row: 1 / span 3;
    min-width: 0;
}

.editor-rail {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.editor-rail-extra {
    grid-column: 2;
    margin: 0;
}

/* A revision's note sits under its revision's row, in the tip register,
   with no rule between the two (Bootstrap rules each cell's bottom). */
#entryRevisionsTable tr:has(+ .revision-note-row) > td {
    border-bottom-width: 0;
}

#entryRevisionsTable td.revision-note {
    color: var(--ink-soft);
    padding-top: 0;
}

@media (max-width: 760px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
    /* order: the writing surface (title, body) comes before the publish
       rail on a phone, not a screen and a half below it. */
    .editor-main {
        grid-column: 1;
        grid-row: auto;
        order: -1;
    }
    /* grid-row: auto as well: the rail's desktop grid-row: 1 would
       otherwise pin it above the writing surface whatever its order. */
    .editor-rail,
    .editor-rail-extra {
        grid-column: 1;
        grid-row: auto;
    }
}

/* The title is layout hierarchy, not emphasis: the one large element on the
   page, capped at 26px. Everything else stays on the type scale -- emphasis
   is weight, never size. Plex Sans at 600, not the card's Plex Serif: no
   @font-face for the serif ships, so it fell back to Georgia/Times. */
.editor-title {
    width: 100%;
    padding: 0;
    border: none;
    background: transparent;
    font-family: var(--font-ui);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--ink);
}

.editor-title::placeholder {
    color: var(--ink-soft);
    opacity: .5;
}

.editor-permalink {
    margin: 6px 0 16px;
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--ink-soft);
    overflow-wrap: anywhere;
}

.editor-permalink a {
    color: var(--ink-soft);
    text-decoration: none;
}

.editor-permalink a:hover {
    color: var(--accent);
}

.editor-permalink-copy {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--accent);
    cursor: pointer;
}

.editor-permalink-copy.copied {
    color: var(--good);
}

/* The page editor's address line: the weblog's own root as a quiet prefix
   and the slug as the only thing an author types, on the same 12px mono
   line the entry permalink uses. Borderless except for a rule under the
   editable half, so the row reads as text with one field in it rather than
   as a form row with a label. */
.editor-slug-prefix {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--ink-soft);
}

.editor-permalink .editor-slug {
    min-width: 12em;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--ink);
}

.editor-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.editor-box .rail-group-label {
    padding: 0 0 10px;
}

.editor-statusrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.editor-when {
    font-family: var(--font-data);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
}

.editor-dt {
    width: 100%;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    font-family: var(--font-data);
    font-size: 14.5px;
    color: var(--ink);
}

.editor-tz {
    margin: 4px 0 12px;
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--ink-soft);
}

.editor-btnrow {
    display: flex;
    gap: 8px;
}

.editor-btnrow .btn {
    flex: 1;
    padding-left: 0;
    padding-right: 0;
}

.editor-preview-link {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: var(--font-ui);
    font-size: 14.5px;
    color: var(--ink-soft);
    text-decoration: underline;
    cursor: pointer;
}

.editor-preview-link:hover {
    color: var(--accent);
}

.editor-quiet-check {
    margin-top: 10px;
    font-size: 14.5px;
    color: var(--ink-soft);
}

.editor-field-label {
    display: block;
    margin: 10px 0 4px;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* The page editor's strand Parts panel: a numbered list of rows in the rail,
   each a title over its status pill and the row-action buttons. The number is
   a CSS counter, so it follows the rows as they move (a part's place is
   computed from order, never stored as typed). */
.strand-parts-list {
    counter-reset: strand-part;
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.strand-part {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 6px 0;
    border-top: 1px solid var(--line);
    cursor: grab;
}

.strand-part:first-child {
    border-top: 0;
}

.strand-part::before {
    counter-increment: strand-part;
    content: counter(strand-part) ".";
    font-family: var(--font-data);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
}

.strand-part-title {
    flex: 1 1 0;
    min-width: 0;
    font-size: 14.5px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.strand-part-actions {
    margin-left: auto;
    white-space: nowrap;
}

.strand-part.is-dragging {
    opacity: .5;
}

/* The Pages screen's reorder controls: the grip is the drag affordance, the
   buttons the keyboard route. The Save order form sits beside "New page" and
   shows only once the rows differ from the loaded order. */
.page-row.is-dragging {
    opacity: .5;
}

.page-order-handle {
    cursor: grab;
    color: var(--ink-soft);
    margin-right: 4px;
}

.pages-order-form {
    display: inline-block;
    margin: 0 0 0 8px;
}

/* The SEO card's Google-result preview. These lived in a page-local <style>
   in EntryEdit.jsp until the consistency pass; they are on the scale (16 /
   12 mono / 14.5) rather than the shrunken proportions of a real SERP,
   because the hierarchy reads perfectly well from weight and color and a
   support tier below 12px is exactly what the scale refuses to have. */
.seo-snippet-title {
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
}

.seo-snippet-url {
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--ink-soft);
}

.seo-snippet-description {
    font-family: var(--font-ui);
    font-size: 14.5px;
    color: var(--ink-soft);
}

/* Drawer toggles: accent 600 with a caret that turns when open. Same
   collapse mechanics as the old accordion cards, quieter dress. */
.editor-drawer {
    display: block;
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.editor-drawer::after {
    content: "\203A";
    float: right;
    transition: transform 0.2s ease-in-out;
}

.editor-drawer:not(.collapsed)::after {
    transform: rotate(90deg);
}

.editor-drawer-body {
    padding-top: 10px;
}

/* The Summary drawer sits in the main column, directly under the editor's
   own status line -- unlike the SEO drawer, which is inside an .editor-box
   in the rail and inherits that box's own top padding. */
.editor-main > .editor-drawer {
    margin: 14px 0 0;
}

/* Quiet destructive action: a text link, not a red button. Shared -- the
   entry editor's rail and the weblog-settings rail both end with one, and
   naming it .editor-* while a settings page used it was the smell. */
.delete-link {
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    font-family: var(--font-ui);
    font-size: 14.5px;
    color: var(--ink-soft);
    text-decoration: underline;
    cursor: pointer;
}

.delete-link:hover {
    color: var(--bad);
}

/* Anything image-shaped inside the rail (SEO thumbnails) stays inside the
   252px column. */
.editor-rail img {
    max-width: 100%;
}

/* Draft recovery: an offer, not an alarm. One line above the title, in the
   same register as .empty-state ("invitations, not shrugs") -- accent-quiet
   ground, no icon, no modal, no red. Hidden until pressroom-draft.js has
   something to offer. */

.draft-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 10px 14px;
    background: var(--accent-quiet);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--ink);
}

.draft-bar[hidden] {
    display: none;
}

.draft-bar-text {
    margin-right: 4px;
}

.draft-bar-sep {
    color: var(--ink-soft);
}

.draft-bar-restore,
.draft-bar-discard {
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    cursor: pointer;
}

.draft-bar-restore {
    font-weight: 600;
    color: var(--accent);
}

.draft-bar-discard {
    color: var(--ink-soft);
}

.draft-bar-restore:hover,
.draft-bar-discard:hover {
    text-decoration: underline;
}

.draft-bar-restore:focus-visible,
.draft-bar-discard:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* ---- Settings with a rail ----
   Built to docs/design/forms/settings-with-rail.html: the editor's two-column
   shape applied to a long settings form. Nine display groups is more than
   anyone holds in their head while scrolling, and Save used to sit below all
   of them. */
.settings-grid {
    /* The first group's caps label is the column's first child, which
       .section-head:first-child pulls flush to the top: without this it sat
       hard against the intro paragraph above the form. */
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 252px;
    gap: 24px;
    align-items: start;
}

.settings-rail {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 16px;
}

.rail-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
}

.section-index {
    display: flex;
    flex-direction: column;
}

.section-index a {
    margin-left: -10px;
    padding: 5px 0 5px 10px;
    border-left: 2px solid transparent;
    color: var(--ink);
    text-decoration: none;
}

.section-index a:hover {
    background: color-mix(in srgb, var(--ink) 4%, var(--surface));
}

/* The spine again -- same 2px inset accent rule the nav rail uses to say
   "you are here". Nothing else in the index is colored. */
.section-index a.is-current {
    border-left-color: var(--accent);
    background: var(--accent-quiet);
    font-weight: 600;
}

@media (max-width: 900px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-rail {
        position: static;
    }

    /* Single column: the rail falls below every field, where a jump list
       to the sections above it no longer helps. Save stays. */
    .settings-rail-index {
        display: none;
    }
}

/* ---- Main menu: one quiet row per weblog ----
   Rows separated by a rule rather than boxed as cards: this is a list to pick
   from, and eight cards read as eight competing objects. One primary action
   sits in the strip; everything else beside it is a quiet link. */
.weblog-row {
    padding: 16px 0;
    border-top: 1px solid var(--line);
}

.weblog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    margin-top: 8px;
}

.weblog-actions > * {
    white-space: nowrap;
}

/* ---- Site directory: the public root while no weblog fronts the site ---- */
.site-directory li {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.site-directory-name {
    font-weight: 600;
    text-decoration: none;
}

.site-directory-name:hover {
    text-decoration: underline;
}

.site-directory-tagline {
    margin-top: 2px;
    color: var(--ink-soft);
}

/* ---- Theme chooser: a grid of cards ----
   Replaces a one-line <select> beside a single ajax-fetched thumbnail. A
   theme is a look, so every option shows its own preview picture and you
   compare them side by side rather than one at a time.

   Each card is a <label> wrapping a real, visible radio: the whole card is
   the hit target, the browser does the grouping and the keyboard handling,
   and the control that says which one is chosen is the one the form posts.
   :has(input:checked) puts the accent frame on the chosen card. */
.theme-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.theme-card {
    display: block;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.theme-card:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-quiet);
}

/* The card is a label, so it is not focusable itself -- the ring has to come
   from the radio inside it. */
.theme-card:focus-within {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.theme-card-thumb {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
}

.theme-card-name {
    display: block;
    font-weight: 600;
}

.theme-card-radio {
    margin-right: 6px;
}

.theme-card-desc {
    display: block;
    font-size: 12px;
    color: var(--ink-soft);
}

/* ---- A native disclosure for the optional half of a form ----
   <details>/<summary>, not a Bootstrap collapse: no JS, no aria wiring to get
   wrong, and the browser keeps the open/closed state. The summary carries the
   rail's caps-label class for its type, PLUS the same accent color, weight
   and rotating chevron as .editor-drawer (EntryEdit's SEO drawer toggle) --
   one disclosure look for the whole admin UI, not two. The native marker
   triangle is suppressed in favor of that chevron. */
.editor-details {
    margin-bottom: 16px;
}

.editor-details > summary {
    display: block;
    cursor: pointer;
    padding-bottom: 8px;
    color: var(--accent);
    font-weight: 600;
    list-style: none;
}

.editor-details > summary::-webkit-details-marker {
    display: none;
}

.editor-details > summary::after {
    content: "\203A";
    float: right;
    transition: transform 0.2s ease-in-out;
}

.editor-details[open] > summary::after {
    transform: rotate(90deg);
}

/* ---- Tables: table.pressroomtable ----
   Bootstrap 5 themes tables through --bs-table-* custom properties, the
   same mechanism .btn uses above: .table's own rules read
   var(--bs-table-border-color)/-color/-bg/-striped-*, so retheming happens
   by redefining those variables rather than fighting cell-level color/
   border rules (and rather than winning a specificity fight with
   .table-striped, which every one of these tables also carries and which
   is left in place, unrenamed). The quiet card calls for plain --line row
   borders and a single hover tint, not zebra banding, so the striped
   variant is pointed at the same background as a plain row -- neutralized,
   not removed. */
table.pressroomtable {
    --bs-table-color: var(--ink);
    --bs-table-bg: var(--surface);
    --bs-table-border-color: var(--line);
    --bs-table-striped-color: var(--ink);
    --bs-table-striped-bg: var(--surface);
}

/* Header row: caps-label per the type scale (12px/600, .08em tracking,
   uppercase, --ink-soft). The literal class "pressroomtable" is reused
   inconsistently across these tables -- sometimes on the header <th>s
   (Entries/Pages/Submissions/Members), sometimes on body <td>s
   (Members.jsp's data cells) -- so trusting the class would caps-label
   real data. None of these tables declare a <thead>, so the header row is
   always the first <tr> of the table's own (implicit) <tbody>; targeting
   that structurally is correct everywhere the class is not. */
table.pressroomtable > tbody > tr:first-child > th,
table.pressroomtable > tbody > tr:first-child > td {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-align: left;
}

table.pressroomtable > tbody > tr:hover > * {
    background: var(--accent-quiet);
}

/* Additive utility -- opt a date/count/slug cell into the mono/tabular
   data face without renaming or removing anything it already carries.
   JSPs that want it add class="data" alongside the cell's existing
   attributes.

   time.data is the same face for the element <rc:date> emits (task B5).
   It has to be named separately rather than folded into a bare .data:
   the tag renders a <time class="data"> INSIDE a <td class="data">, and
   also inside a <span> in the status pill and the entry-meta line, none
   of which the td.data selector reaches. */
td.data,
span.data,
time.data {
    font-family: var(--font-data);
    font-variant-numeric: tabular-nums;
}

/* A word standing where a value would be ("Never") inside a data cell:
   the UI face, quiet, not mono. */
.data-none {
    font-family: var(--font-ui);
    color: var(--ink-soft);
}

/* "2026-10-23 04:44" is one value: at 16px mono a narrow column broke it
   into three lines (Entries' Published/Updated, API tokens' Created and
   Last used). */
time.data {
    white-space: nowrap;
}

/* Comments moderation: the Entry column (4th) is context, the Comment column
   is the content. An uncapped entry title took ~300px at 1280 and squeezed
   short comments onto several lines; it is cut with an ellipsis instead
   (the full title stays in the link's text for readers and screen readers). */
#commentsModerationForm table.pressroomtable td:nth-child(4) a {
    display: inline-block;
    max-width: 16em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* ---- Row actions: one pattern on every list ----
   Edit and delete are icon buttons (each with an aria-label naming the row)
   in one unlabelled, right-aligned last column: Categories, Pages and
   Businesses each used to do this a different way (labelled columns, red
   text links, outline buttons). The icons sit at --ink-soft so a column of
   them stays quiet; hover says what they do. Callers: <td class="row-actions">
   holding .row-action links/buttons, .row-action-danger on delete. */
.row-actions {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

.row-action {
    display: inline-block;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    line-height: 1.4;
    text-decoration: none;
}

.row-action + .row-action,
.row-action + form,
form + .row-action {
    margin-left: 8px;
}

.row-actions form {
    display: inline;
}

.row-action:hover,
.row-action:focus-visible {
    color: var(--accent);
}

.row-action-danger:hover,
.row-action-danger:focus-visible {
    color: var(--bad);
}

/* The primary "New ..." action of a list screen: one small button above the
   table, in the card, on every list (Pages, Categories, Businesses, Users). */
.list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

/* Pages renders the strip around a guarded button (JspConsistencyTest pins
   that shape), so an empty list leaves it holding no element. */
.list-actions:not(:has(*)) {
    display: none;
}

/* ---- Entries list rows (task B5) ----
   The title is the row's primary target, so it carries the weight -- 600,
   not a larger size: emphasis in this system is weight, never size. Under
   it sits one quiet metadata line, the anchor in the mono data face plus a
   secondary link to the published page for rows that have one. */
.entry-title {
    font-weight: 600;
}

.entry-meta {
    font-size: 12px;
    color: var(--ink-soft);
}

/* "Pinned" on a pinned post's row: in words, a shade above the line it sits in. */
.entry-pinned {
    color: var(--ink);
}

/* A link that must be reachable without competing with the title above it:
   underlined so it still reads as a link at --ink-soft, which on its own is
   too quiet to announce one. */
.quiet-link {
    color: var(--ink-soft);
    text-decoration: underline;
}

/* ---- Empty states: invitations, not shrugs ----
   Same shape everywhere a list has nothing in it: one 600/16px title line,
   one --ink-soft sentence, at most one primary-button action -- icon-free,
   per the design spec's "empty states as invitations" signature move. */
/* Pages.jsp/Submissions.jsp render their empty state as the lone <tr> in
   an otherwise-empty table body, which makes its <td> the tbody's
   first-child -- the same structural hook the table header rule above
   uses for its caps-label/tracking treatment. Reset those inherited
   properties here (rather than trusting every future caller to remember)
   so the invitation reads as normal prose regardless of which table, if
   any, it's nested inside. */
.empty-state {
    padding: 32px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-weight: 450;
    text-transform: none;
    letter-spacing: normal;
}

.empty-state-title {
    margin: 0 0 8px;
    font-family: var(--font-ui);
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

.empty-state-body {
    margin: 0 0 16px;
    font-family: var(--font-ui);
    font-size: 14.5px;
    font-weight: 450;
    color: var(--ink-soft);
}

/* No action button in this instance (e.g. Inquiries: messages arrive from
   readers, there's nothing for an admin to create) -- the sentence becomes
   the last element and shouldn't carry trailing space. */
.empty-state-body:last-child {
    margin-bottom: 0;
}

/* entries page */

/* ---- Status pills (components-pills card, task B1) ---- */
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--ink); border: 1px solid transparent; white-space: nowrap; }
.status-pill .status-when { font-family: var(--font-data); font-weight: 450; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.status-pill.status-published { background: color-mix(in srgb, var(--good) 18%, var(--surface)); border-color: color-mix(in srgb, var(--good) 45%, var(--surface)); }
.status-pill.status-draft { background: color-mix(in srgb, var(--warn) 18%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 45%, var(--surface)); }
.status-pill.status-pending { background: var(--accent-quiet); border-color: color-mix(in srgb, var(--accent) 40%, var(--surface)); }
.status-pill.status-scheduled { background: var(--paper); border-color: var(--line); }
.status-pill.status-trashed { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--surface)); }
.status-pill.status-hidden { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--surface)); }
.status-pill.status-unsaved { background: var(--paper); border-color: var(--line); color: var(--ink-soft); }
.status-pill.status-enabled { background: color-mix(in srgb, var(--good) 18%, var(--surface)); border-color: color-mix(in srgb, var(--good) 45%, var(--surface)); }
.status-pill.status-disabled { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); border-color: color-mix(in srgb, var(--bad) 35%, var(--surface)); }
/* A pill that is also a link (Main Menu's "N awaiting approval"): the pill
   is the affordance, so no underline; hover deepens the border. */
a.status-pill { text-decoration: none; }
a.status-pill:hover { color: var(--ink); border-color: var(--accent); }

/* ---- Selection bar (task B3) ----
   One shared bar for every list that offers bulk actions (Entries,
   Submissions, MediaFileView): hidden until pressroom.js's delegated checkbox
   handler finds at least one row checked in the form it names via
   data-selection-bar, then shows a caps-label count plus the action buttons.
   Trash is deliberately excluded -- see CLAUDE.md's Trash section; it has no
   bulk restore/delete handlers to drive one. */
.selection-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.selection-bar[hidden] {
    display: none;
}

.selection-count {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* categories */

#feedback-area {
    float: left;
}

#category-in-use {
    background-color: color-mix(in srgb, var(--bad) 15%, var(--surface));
    border: 1px solid var(--bad);
    padding: 10px;
    border-radius: 5px;
}

/* sign-in */

/* Quiet Instrument: pressroom-tokens.css already sets `body { background:
   var(--paper); }` -- this second, later-in-cascade `body` rule used to force
   a literal white background on every page regardless of token or
   prefers-color-scheme (same specificity, later wins), which broke dark mode
   admin-wide, not just on the sign-in page it was written for. Deleted
   rather than tokened: the token rule already does the job. */

.form-signin {
    max-width: 330px;
    padding: 15px;
    margin: 0 auto;
}
.form-signin .form-control {
    position: relative;
    height: auto;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 10px;
    font-size: 16px;
}
.form-signin .form-control:focus {
    z-index: 2;
}
.form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* Replaces inline style="..." attributes that had accumulated on four
   admin screens. Each is a single spacing or sizing decision that belongs
   with the rest of the design system rather than in the markup. */
.install-page {
    margin-top: 5em;
}

.handle-preview {
    color: var(--accent);
}

/* min(): a plain 30em overrode .img-fluid's 100% cap, so the preview
   overflowed a 390px screen. */
.theme-thumb {
    max-width: min(30em, 100%);
}

/* Maintenance: one bordered row per operation, so the three long-running
   actions read as three choices instead of one paragraph with buttons in it. */
.maintenance-op {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.maintenance-op p {
    margin: 0 0 10px;
    color: var(--ink-soft);
    font-size: 14.5px;
}

/* Sticky footer styles */

html {
    position: relative;
    min-height: 100%;
}
body {
    margin-bottom: 60px;
}
.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    min-height: 60px;
    overflow-wrap: anywhere;
    background-color: var(--paper);
    border-top: 1px solid var(--line);
    padding: 1.5em;
    text-align: center;
}

/* media files */

.align-images {
    display:inline;
    float:left;
    margin:5px;
    list-style-type:none;
    width:140px;
    height:160px;
    border: 1px solid var(--line);
    text-align: center;
}

#sortByMenu {
    width: 15em;
}

#viewDirectoryMenu {
    width: 15em;
}

#moveTargetMenu {
    width: 15em;
}

.mediaObject {
    width:120px;
    height:120px;
    margin-top: 10px;
    margin-left: 10px;
}

.mediaObjectInfo {
    font-size: 12px;
}

.highlight {
    border: 3px solid var(--accent);
}

span.button {
    height:15px;
    width:15px;
    float:right;
}

/* "Not described yet" on an image in the media grid. A marker, not a scold:
   --warn on a quiet ground, lowercase, no icon. It says where the work is and
   stops there. */

.media-alt-missing {
    display: inline-block;
    margin-top: 2px;
    padding: 1px 6px;
    border-radius: var(--radius);
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--warn);
    font-family: var(--font-ui);
    font-size: 11px;
    letter-spacing: 0.02em;
}

/* MediaFileAdd.jsp's bulk-upload drop zone: a dashed --line border on
   --paper at rest, --accent while a drag is over it (#mediaDropZone.media-
   dropzone-active, toggled by the page's own drag handlers). */

.media-dropzone {
    padding: 24px;
    text-align: center;
    background: var(--paper);
    border: 2px dashed var(--line);
    border-radius: var(--radius);
}

.media-dropzone-active {
    border-color: var(--accent);
    background: var(--accent-quiet);
}

.media-dropzone-hint {
    margin: 0;
    color: var(--ink-soft);
}

.media-chosen {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    text-align: left;
}

.media-chosen li {
    padding: 2px 0;
    font-family: var(--font-data);
    font-size: 13px;
    color: var(--ink);
}

.media-chosen li.media-chosen-total {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--line);
    font-family: var(--font-ui);
    color: var(--ink-soft);
}

.sortByMenu, .viewDirectoryMenu {
    display: inline;
}

#imageGrid {
    display: block;
    overflow: auto;
    margin: 1em 0 1em 0;
}

#imageGrid > div > ul {
    padding-left:0;
}


/* theme edit */

.row-display-flex {
    display: flex;
}
.row-display-flex > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

#sharedChooser, #customChooser {
    height: 13em;
}

/* Quiet Instrument: the legacy multi-row search select (UserAdmin.jsp's
   #userList) gets its native browser highlight retoned. Plain
   `background-color` on `option:checked` is ignored by most engines for a
   real native selection highlight; the linear-gradient trick (a
   "background image" rather than a flat color) is the standard workaround
   and paints identically to a solid fill. */
#userList option:checked {
    background: linear-gradient(0deg, var(--accent-quiet) 0%, var(--accent-quiet) 100%);
    color: var(--ink);
}

/* Quiet Instrument: ThemeEdit.jsp's shared/custom chooser cards used to
   set an inline `background: #bfb` (selected) / `background: white`
   (unselected) via jQuery .css() -- both hardcoded and, for the "white"
   reset, another dark-mode-breaking literal. The JS now toggles this class
   instead. */
.chooser-selected {
    background: var(--accent-quiet);
}

/* Quiet Instrument: GlobalConfig.jsp's live numeric-validation highlight
   used to set inline `background: #FBB` (invalid) / `background: white`
   (valid) via jQuery .css() -- same dark-mode hazard as the chooser above.
   The JS now toggles this class instead of writing colors directly. */
.field-invalid-highlight {
    background: color-mix(in srgb, var(--bad) 20%, var(--surface));
}

/* Quiet Instrument: flash messages (tiles/messages.jsp, #messages/#errors --
   ids pinned, restyled only) and the theme-change notices on ThemeEdit.jsp
   ride Bootstrap's alert-* classes. Bootstrap 5.3 themes .alert-* entirely
   through --bs-alert-* custom properties (no !important), so -- like .btn
   and table.pressroomtable above -- redefining those variables here is enough;
   a later same-specificity rule wins the cascade tie without a specificity
   fight. */
.alert-success {
    --bs-alert-bg: color-mix(in srgb, var(--good) 15%, var(--surface));
    --bs-alert-border-color: color-mix(in srgb, var(--good) 45%, var(--surface));
    --bs-alert-color: var(--ink);
}
.alert-info {
    --bs-alert-bg: var(--accent-quiet);
    --bs-alert-border-color: color-mix(in srgb, var(--accent) 40%, var(--surface));
    --bs-alert-color: var(--ink);
}
.alert-warning {
    --bs-alert-bg: color-mix(in srgb, var(--warn) 15%, var(--surface));
    --bs-alert-border-color: color-mix(in srgb, var(--warn) 45%, var(--surface));
    --bs-alert-color: var(--ink);
}
.alert-danger {
    --bs-alert-bg: color-mix(in srgb, var(--bad) 15%, var(--surface));
    --bs-alert-border-color: color-mix(in srgb, var(--bad) 45%, var(--surface));
    --bs-alert-color: var(--ink);
}

/* Flash messages render as a list even when there is only one of them, so
   the markup is the same shape whether one thing or five things happened.
   Bullets would read as a checklist rather than a confirmation. Moved here
   from an inline <style> block in tiles/messages.jsp -- that block was
   re-emitted on every admin page render. */
.alert ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}




/* ---- Blog traffic ------------------------------------------------------
   Server-drawn: the chart is inline SVG, so there is no script and no inline
   style on the page. Colours are the design tokens, so dark mode follows. */
.traffic-period { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.traffic-period-link { padding: 3px 12px; font-size: 12px; color: var(--ink); text-decoration: none; border-right: 1px solid var(--line); }
.traffic-period-link:last-child { border-right: 0; }
.traffic-period-link.on { background: var(--ink); color: var(--surface); }
.traffic-notice { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; margin-bottom: 12px; background: var(--accent-quiet); }
.traffic-notice-stale, .traffic-notice-notRegistered { border-color: var(--warn); }
.traffic-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.traffic-tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; background: var(--surface); }
.traffic-tile-label { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.traffic-tile-value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.traffic-tile-change { font-size: 11px; color: var(--ink-soft); }
.traffic-tile-change.up, .traffic-table td.up { color: var(--good); }
.traffic-tile-change.dn, .traffic-table td.dn { color: var(--bad); }
.traffic-chart { width: 100%; height: 150px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: var(--surface); }
.traffic-bar { fill: var(--accent); }
.traffic-baseline { stroke: var(--line); }
.traffic-axis { font-size: 11px; fill: var(--ink-soft); }
.traffic-tabs { display: flex; flex-wrap: wrap; gap: 14px; border-bottom: 1px solid var(--line); margin: 4px 0 10px; font-size: 13px; }
.traffic-tab { padding: 4px 0; color: var(--ink-soft); text-decoration: none; }
.traffic-tab.on { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--ink); }
.traffic-table th.n, .traffic-table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.traffic-group th { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.traffic-empty { color: var(--ink-soft); }
.traffic-fresh { font-size: 12px; color: var(--ink-soft); margin-top: 12px; }
.traffic-fresh .quiet-link { margin-left: 8px; }
