/* Qizmit theme layer: (1) one consistent, refined look for the views loaded into the page (lists, details, edit forms, dialogs, buttons),
   (2) a dark theme. Loaded AFTER ~/qizmit so it wins ties. Dark is the CSS-level default (2026-10-01: so a navigation never flashes white); light is the original palette (purple #8F12C4) and stays the default CHOICE for new visitors - the server writes data-theme="light" on <html> unless the qz-theme cookie says dark;
   dark = the Sovereign-reader palette with the same purple as its accent. The switch is <html data-theme="light|dark"> (js/qizmit/qizmit.theme.js,
   stored as the user's "Theme" trait). Everything below is written against tokens, so tuning a colour is a one-line change.
   Scope: page chrome + .phoenixViewWrapper (the generated views) + the admin dashboard. Site-specific looks from site traits are left alone. */

:root[data-theme="light"] {
  --qz-accent: #8F12C4;            /* fills: buttons, header rules, active tab (same purple as ever) */
  --qz-accent-strong: #6B008A;
  --qz-accent-ink: #ffffff;        /* text on an accent fill */
  --qz-accent-text: #8F12C4;       /* accent used as TEXT (headings, links) - lightened in dark for contrast */
  --qz-accent-soft: #f4e8fa;       /* tinted background: hover rows, selected */
  /* second accent: goldenrod (the compass star / lamp in the Qizmit art). Purple stays the brand colour for fills and buttons; gold marks
     "where you are" (current nav item, rules under titles, admin-only fields, menu icons). #DAA520 is too pale to read as text on white,
     so gold-as-text has its own darker value in light. */
  --qz-gold: #DAA520;              /* fills, rules, underlines */
  --qz-gold-strong: #B8860B;       /* hover / pressed */
  --qz-gold-ink: #1b1640;          /* text on a gold fill (deep navy from the art) */
  --qz-gold-text: #8A6508;         /* gold used as TEXT or a thin icon - 5:1 on white */
  --qz-gold-soft: #fbf3dc;         /* tinted background */
  /* silver = icons + the header gradient; blue (the BlueVeil header blue) = left-menu text, view titles and legends */
  --qz-silver: #C0C7D1;            /* fills, gradients */
  --qz-silver-text: #7A8598;       /* icons / glyphs (3.5:1 on white) */
  --qz-blue: #3A66DD;
  --qz-blue-soft: #e8eefc;
  --qz-page: #f2f0f6;             /* the area behind the page card (was a flat grey) */
  --qz-surface: #ffffff;           /* cards, tables, content */
  --qz-raised: #f7f5fa;            /* header bars, zebra stripes, inputs' hover */
  --qz-header: #f5f5f5;
  --qz-menu: #5577AA;              /* the left menu (unchanged in light) */
  --qz-menu-ink: #f5f5f5;
  --qz-text: #1f1c26;
  --qz-muted: #6a6478;
  --qz-line: #e2dde9;
  --qz-link: #1837DF;
  --qz-ok: #1d6b3c; --qz-ok-bg: #e2f3e8;
  --qz-warn: #8a5a08; --qz-warn-bg: #fbeed0;
  --qz-bad: #b3261e; --qz-bad-bg: #fbe4e2;
  --qz-radius: 8px;
  --qz-shadow: 0 1px 2px rgba(31, 28, 38, .06), 0 6px 20px rgba(31, 28, 38, .07);
  --qz-focus: 0 0 0 3px rgba(143, 18, 196, .28);
}
:root, :root:not([data-theme="light"]) {   /* the CSS-level DEFAULT is dark: anything not explicitly light (an unthemed page, the instant before a script runs) is dark, never a white flash */
  --qz-accent: #8F12C4;
  --qz-accent-strong: #A93BDB;
  --qz-accent-ink: #ffffff;
  --qz-accent-text: #CC7BF0;
  --qz-accent-soft: #2a1f3a;
  --qz-gold: #DAA520;
  --qz-gold-strong: #F0C040;
  --qz-gold-ink: #1b1640;
  --qz-gold-text: #E8B93A;         /* reads well on #181C29 */
  --qz-gold-soft: #2e2611;
  --qz-silver: #B8C0CF;
  --qz-silver-text: #B8C0CF;
  --qz-blue: #8FA6FF;
  --qz-blue-soft: #1c2440;
  --qz-page: #0b0d14;
  --qz-surface: #181C29;
  --qz-raised: #202638;
  --qz-header: #0D0F17;
  --qz-menu: #131726;
  --qz-menu-ink: #E4E9FF;
  --qz-text: #F1F1FA;
  --qz-muted: #A8B4E0;
  --qz-line: #2C344A;
  --qz-link: #8FA6FF;
  --qz-ok: #6fd59a; --qz-ok-bg: #12301f;
  --qz-warn: #f0c674; --qz-warn-bg: #3a2f14;
  --qz-bad: #ff8f8f; --qz-bad-bg: #3d1c20;
  --qz-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --qz-focus: 0 0 0 3px rgba(204, 123, 240, .35);
  color-scheme: dark;
}

/* ---- page chrome ---------------------------------------------------------------------------------------------------------------------- */
body.qizmitBody { background: var(--qz-page); color: var(--qz-text); }
#dTopDiv { background-color: var(--qz-header) !important; }      /* the header carries an inline colour */
#dTopDiv, #_qLoginWelcome { color: var(--qz-text); }
#_qLoginWelcome { background: var(--qz-header); }
#_qBodyWrapper { background: var(--qz-surface); color: var(--qz-text); }
#_qStaticMenu, #_qContentAdGutter { background: var(--qz-menu); color: var(--qz-menu-ink); }
#_qStaticMenu a, #_qStaticMenu a:visited { color: var(--qz-menu-ink); }
#_qFooter { background: var(--qz-header); color: var(--qz-muted); }
:root:not([data-theme="light"]) a { color: var(--qz-link); }
:root:not([data-theme="light"]) #_qFooter a, :root:not([data-theme="light"]) .qizmitNavigationItem { background-color: transparent; }
:root:not([data-theme="light"]) #_qFooter a, :root:not([data-theme="light"]) #_qLoginWelcome a { color: var(--qz-link); }
:root:not([data-theme="light"]) #_qLoginWelcome { color: var(--qz-text); }
:root:not([data-theme="light"]) .qizmitBodyWrapper, :root:not([data-theme="light"]) #_qContentDiv { background: var(--qz-surface); }
:root:not([data-theme="light"]) .qizmitAdgutterSitesDiv, :root:not([data-theme="light"]) .qizmitAdGutter { color: var(--qz-menu-ink); }
:root:not([data-theme="light"]) hr { border-color: var(--qz-line); }

.qzThemeToggle {                       /* the light/dark switch, top right beside the greeting */
  float: right; margin-left: 10px; width: 30px; height: 30px; line-height: 28px; padding: 0; text-align: center; cursor: pointer;
  font-size: 1rem; border: 1px solid var(--qz-line); border-radius: 50%; background: var(--qz-surface); color: var(--qz-silver-text);
}
.qzThemeToggle:hover { background: var(--qz-accent-soft); }
.qzThemeToggle:focus-visible { outline: none; box-shadow: var(--qz-focus); }

/* ---- the view card ---------------------------------------------------------------------------------------------------------------------- */
#_qContents .phoenixViewWrapper {
  background: var(--qz-surface); color: var(--qz-text); border: 1px solid var(--qz-line); border-radius: 10px;
  padding: 14px 18px 18px; margin: 4px 0 18px; box-shadow: var(--qz-shadow); font-size: 0.9375rem; line-height: 1.45; box-sizing: border-box;
}
#_qContents legend.legendHeader, #_qContents .legendHeader .fullwidth, #_qContents table.qizmitHeaderTable, #_qContents tr.qizmitTableHeader, #_qContents tr.qizmitTableHeader > td { background: transparent; }
#_qContents fieldset.fullwidthpadded { border: 0; margin: 0; padding: 0; min-width: 0; }
#_qContents legend.legendHeader { padding: 0; width: 100%; }

/* view titles: one style for "Sites", "Site", "Edit Site" ... */
#_qContents table.qizmitHeaderTable { border-collapse: collapse; width: 100%; }
#_qContents tr.qizmitTableHeader { color: var(--qz-blue); font-size: 1.3em; font-weight: 600; }
/* the line under a view title (owner 2026-10-10): ONE thin line across the whole row. It used to be a 2px gradient painted on every cell, so it restarted and faded in each column. */
#_qContents tr.qizmitTableHeader > td { padding: 2px 4px 12px; border-bottom: 0; vertical-align: middle; background-image: none; }
#_qContents table.qizmitHeaderTable > tbody > tr.qizmitTableHeader, #_qContents table.qizmitHeaderTable > tr.qizmitTableHeader { border-bottom: 1px solid var(--qz-blue); }
#_qContents .qizmitListObjectLinkColumn span { cursor: pointer; }
#_qContents .qizmitTableHeaderButtonColumn { text-align: right; white-space: nowrap; }

/* icon buttons - the same glyph style everywhere (png bars are swapped for Font Awesome by qizmit.theme.js) */
.qizmitimgbutton, span.qizmitimgbutton {
  display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; font-size: 0.9375rem; margin: 0 1px; border-radius: 6px;
  color: var(--qz-muted); cursor: pointer; vertical-align: middle; float: none; transition: background .12s, color .12s;
}
img.qizmitimgbutton { width: 22px; height: 22px; padding: 4px; }
.qizmitimgbutton:hover { background: var(--qz-accent-soft); color: var(--qz-accent-text); }
.qizmitimgbutton:focus-visible { outline: none; box-shadow: var(--qz-focus); }
:root:not([data-theme="light"]) img.qizmitimgbutton { filter: invert(.85); }
#_qContents .fa-trash-alt.qizmitimgbutton:hover { background: var(--qz-bad-bg); color: var(--qz-bad); }
#_qContents .fa-plus-square.qizmitimgbutton { color: var(--qz-accent-text); font-size: 1.125rem; }

/* ---- lists ---------------------------------------------------------------------------------------------------------------------------- */
#_qContents tr.qizmitListRow, #_qContents tr.bvevenrow, #_qContents tr.bvoddrow { background: transparent; color: var(--qz-text); }
/* row separators (owner 2026-10-10): ONE hairline per row, drawn on the row, not 1px on every cell - per-cell borders snapped to different pixels at fractional row heights and read as a faint gradient across the columns */
#_qContents tr.qizmitListRow > td { padding: 3px 8px; border-bottom: 0; vertical-align: middle; }
/* 2026-10-11: the legacy global ".display-field { height: 32px; width: 66%; float: right }" applied inside list cells, so a wrapped value (a message, a name) ran out of its fixed box and overprinted the next row. Inside a list row the value just takes the cell. */
#_qContents tr.qizmitListRow .display-field { height: auto; width: auto; float: none; display: block; overflow-wrap: anywhere; }
#_qContents tr.qizmitListRow { border-bottom: 1px solid color-mix(in srgb, var(--qz-line) 65%, transparent); }
/* the friendly empty state of a list (QzListPolish.empty) */
#_qContents td.qzEmptyHappy { text-align: center; padding: 34px 12px 30px; color: var(--qz-muted); }
#_qContents td.qzEmptyHappy svg.qzSmiley { display: block; margin: 0 auto 10px; color: var(--qz-accent-text, var(--qz-accent, #8F12C4)); }
#_qContents td.qzEmptyHappy b { display: block; font-size: 1.15rem; color: var(--qz-text); margin-bottom: 4px; }
#_qContents tr.qizmitListRow.bvoddrow { background: var(--qz-raised); }
#_qContents tr.qizmitListRow:hover { background: var(--qz-accent-soft); }
#_qContents tr.qizmitListRow table.fullwidth, #_qContents tr.qizmitListRow table.fullwidth tr { background: transparent; }
#_qContents tr.qizmitListRow table.fullwidth td { padding: 0; border: 0; }
#_qContents .blueveilobjectlink { color: var(--qz-text); cursor: pointer; border-radius: 4px; }
#_qContents td.blueveilobjectlink:hover, #_qContents div.blueveilobjectlink:hover { background: transparent; color: var(--qz-accent-text); text-decoration: underline; }
#_qContents .qizmitListImgButtonColumn { width: 36px; text-align: center; }

/* ---- detail + edit: label / value rows -------------------------------------------------------------------------------------------------- */
#_qContents .qizmitProperty.bvContainer, #_qContents .qizmitAdminProperty.bvContainer {
  display: grid; grid-template-columns: minmax(130px, 28%) 1fr; gap: 4px 16px; align-items: center;
  padding: 8px 4px; border-bottom: 1px solid var(--qz-line); background: transparent; font-style: normal;
}
#_qContents .qizmitProperty.bvContainer *, #_qContents .qizmitAdminProperty.bvContainer * { font-style: normal; }
#_qContents .qizmitAdminProperty.bvContainer { background: var(--qz-gold-soft); box-shadow: inset 3px 0 0 var(--qz-gold); }   /* admin-only fields: marked, not shouted */
#_qContents .qizmitAdminProperty.bvContainer:hover { background: var(--qz-raised); }
#_qContents .bvContainer .display-label, #_qContents .bvContainer .editor-label {
  float: none; width: auto; height: auto; color: var(--qz-muted); font-size: .92em; font-weight: 600;
}
#_qContents .bvContainer .display-field, #_qContents .bvContainer .editor-field {
  float: none; width: auto; height: auto; min-height: 24px; color: var(--qz-text); overflow-wrap: anywhere;
}
#_qContents .qizmitProperty:hover { background: var(--qz-raised); }

/* section links under a detail ("Traits >", "Access Tokens >" ...) */
#_qContents .phoenixViewWrapper > .fullwidth a, #_qContents .qizmitSectionHeader, #_qContents [class*="_bv"], #_qContents .spacerDiv + div, #_qContents .legendHeader { color: var(--qz-blue); }

/* ---- legends, sub-headings and sections (2026-09-25 evening) --------------------------------------------------------------------------------- */
/* One rule for every <legend>/<fieldset> the generators emit (fullwidthpadded, legendHeader, listLegendHeader, adminRole, dossierRole ...): the fieldset draws nothing, the legend is a
   heading with a few pixels of room. CSS-only on purpose: the XSLT templates keep emitting the same classes, so regenerating the views cannot undo this. */
#_qContents fieldset, .adminHeaderDiv fieldset { border: 0; margin: 0 0 8px; padding: 0; min-width: 0; }
#_qContents legend, .adminHeaderDiv legend { display: block; float: none; width: 100%; box-sizing: border-box; padding: 3px 2px 6px; margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--qz-blue); }
#_qContents legend.listLegendHeader { background: transparent; border-radius: 0; padding-left: 2px; }
#_qContents legend.dossierRole, .adminHeaderDiv legend.adminRole, #_qContents legend.adminRole {
  background: var(--qz-raised); color: var(--qz-blue); border: 1px solid var(--qz-line); border-left: 3px solid var(--qz-blue); border-radius: 8px;
  padding: 7px 12px; margin: 6px 0; font-style: normal; font-size: .95rem; font-weight: 600; cursor: default;
}
.adminHeaderDiv legend.adminRole *, #_qContents legend.dossierRole * { font-style: normal; }
.adminHeaderDiv legend.qizmitAdminNamespaceLegend { cursor: pointer; }
.adminHeaderDiv legend.qizmitAdminNamespaceLegend::before { content: "\25B8"; display: inline-block; width: 1.1em; color: var(--qz-silver-text); }
.adminHeaderDiv legend.qizmitAdminNamespaceLegend:hover { background: var(--qz-blue-soft); }
#tKnownTypes td { padding: 2px 0; }
#tKnownTypes fieldset { margin-bottom: 12px; }

/* collapsed sub-sections under a detail ("Traits >", "Access Tokens >" ...): a quiet row you can click, not bare purple text */
#_qContents div > span.legendHeader {
  display: flex; align-items: center; padding: 7px 12px; margin: 4px 0; border: 1px solid var(--qz-line); border-radius: 8px; background: var(--qz-raised);
  color: var(--qz-blue); font-size: .95rem; font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s;
}
#_qContents div > span.legendHeader:hover { background: var(--qz-blue-soft); border-color: var(--qz-blue); color: var(--qz-blue); }
/* the same sections once opened: the section card sits inside the view card, so it loses the outer shadow and gets a thinner frame */
#_qContents .phoenixViewWrapper .phoenixViewWrapper { box-shadow: none; margin: 8px 0; padding: 8px 12px 10px; background: var(--qz-surface); }
#_qContents .phoenixViewWrapper .phoenixViewWrapper tr.qizmitTableHeader { font-size: 1.05rem; }
#_qContents .phoenixViewWrapper .phoenixViewWrapper tr.qizmitTableHeader > td { padding-bottom: 6px; border-bottom: 0; background-image: none; }
#_qContents .phoenixViewWrapper .phoenixViewWrapper table.qizmitHeaderTable > tbody > tr.qizmitTableHeader, #_qContents .phoenixViewWrapper .phoenixViewWrapper table.qizmitHeaderTable > tr.qizmitTableHeader { border-bottom: 1px solid color-mix(in srgb, var(--qz-line) 65%, transparent); }
#_qContents legend.qizmitListTraitsLegend, #_qContents legend.qizmitTokenListLegend, #_qContents legend.qizmitChainLegend { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 2px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--qz-line); }
#_qContents legend.qizmitListTraitsLegend span, #_qContents legend.qizmitTokenListLegend span { float: none; width: auto; }
#_qContents legend .fa-plus-square { color: var(--qz-accent-text); cursor: pointer; }
#_qContents [class*="_bv"] fieldset { color: var(--qz-muted); font-size: .92rem; }
#_qContents [class*="_bv"] fieldset legend { color: var(--qz-blue); }
#_qContents td[colspan="100"] { color: var(--qz-muted); text-align: center; padding: 10px 8px; }
#_qContents td[colspan="100"] .fa-exclamation-triangle { color: var(--qz-muted); opacity: .6; }
.sectionBreak { height: 4px; }

/* admin "Admin functions": the task links as tidy chips */
#adminTab-functions br { display: none; }
#adminTab-functions fieldset > a { display: inline-block; margin: 0 6px 6px 0; padding: 6px 12px; border: 1px solid var(--qz-line); border-radius: 8px; background: var(--qz-raised); color: var(--qz-text); text-decoration: none; font-size: .92rem; }
#adminTab-functions fieldset > a:hover { background: var(--qz-accent-soft); border-color: var(--qz-accent); color: var(--qz-accent-text); }
#adminTab-functions fieldset > a b { color: var(--qz-accent-text); }
#adminTab-functions fieldset > input[type="button"] { margin: 0 0 6px; }

/* ---- forms ---------------------------------------------------------------------------------------------------------------------------- */
#_qContents input[type="text"], #_qContents input[type="password"], #_qContents input[type="email"], #_qContents input[type="number"],
#_qContents input[type="date"], #_qContents input[type="datetime-local"], #_qContents input:not([type]), #_qContents select, #_qContents textarea {
  box-sizing: border-box; max-width: 100%; padding: 6px 9px; font: inherit; color: var(--qz-text); background: var(--qz-surface);
  border: 1px solid var(--qz-line); border-radius: 6px; transition: border-color .12s, box-shadow .12s;
}
#_qContents input[type="text"], #_qContents input[type="password"], #_qContents input[type="email"], #_qContents select, #_qContents textarea { width: 100%; }
#_qContents input:focus, #_qContents select:focus, #_qContents textarea:focus { outline: none; border-color: var(--qz-accent); box-shadow: var(--qz-focus); }
#_qContents input[type="checkbox"] { accent-color: var(--qz-accent); width: 16px; height: 16px; vertical-align: middle; }
:root:not([data-theme="light"]) #_qContents input, :root:not([data-theme="light"]) #_qContents select, :root:not([data-theme="light"]) #_qContents textarea { color-scheme: dark; }
#_qContents ::placeholder { color: var(--qz-muted); opacity: .8; }

/* buttons (real <button>/<input type=button> and the qizmitbutton classes) */
#_qContents input[type="button"], #_qContents input[type="submit"], #_qContents button:not([role="tab"]), .qizmitbutton, .qizmitbuttoneven, .qizmitbuttonodd,
.qizmitbuttonevenadmin, .qizmitbuttonoddadmin {
  background: var(--qz-accent); color: var(--qz-accent-ink); border: 0; border-radius: 6px; padding: 6px 14px; height: auto; font: inherit; font-size: .95em;
  font-weight: 600; cursor: pointer; display: inline-block; transition: background .12s, box-shadow .12s;
}
#_qContents input[type="button"]:hover, #_qContents input[type="submit"]:hover, #_qContents button:not([role="tab"]):hover, .qizmitbutton:hover { background: var(--qz-accent-strong); }
#_qContents input[type="button"]:focus-visible, #_qContents button:focus-visible { outline: none; box-shadow: var(--qz-focus); }

#_qContents .qizmitNoneAvailableDiv { color: var(--qz-muted); padding: 16px 4px; }
.bvAlertBar { background: var(--qz-accent); color: #fff; border-radius: var(--qz-radius); padding: 6px 12px; }
[id$="ValidationSummary"] { color: var(--qz-bad); }

/* ---- dialogs (shadowbox) + jQuery UI ---------------------------------------------------------------------------------------------------- */
:root:not([data-theme="light"]) #sb-wrapper-inner, :root:not([data-theme="light"]) #sb-body, :root:not([data-theme="light"]) .qizmitShadowBox { background: var(--qz-surface); color: var(--qz-text); }
:root:not([data-theme="light"]) .ui-widget-content, :root:not([data-theme="light"]) .ui-dialog { background: var(--qz-surface); color: var(--qz-text); border-color: var(--qz-line); }
:root:not([data-theme="light"]) .ui-widget-header { background: var(--qz-raised); color: var(--qz-text); border-color: var(--qz-line); }

/* ---- admin dashboard (admin/dashboard.css uses its own literals - map them to the tokens) --------------------------------------------- */
.adminTabs { border-bottom-color: var(--qz-gold); }
:root:not([data-theme="light"]) .adminTabs button { background: var(--qz-raised); color: var(--qz-text); border-color: var(--qz-line); }
:root:not([data-theme="light"]) .adminTabs button:hover { background: var(--qz-accent-soft); }
:root:not([data-theme="light"]) .adminTabs button[aria-selected="true"] { background: var(--qz-accent); color: #fff; border-color: var(--qz-accent); }
:root:not([data-theme="light"]) .dash-card { background: var(--qz-surface); color: var(--qz-text); border-color: var(--qz-line); box-shadow: var(--qz-shadow); }
:root:not([data-theme="light"]) .dash-attention { background: var(--qz-bad-bg); color: var(--qz-text); border-color: var(--qz-bad); }
:root:not([data-theme="light"]) .dash-chip { background: var(--qz-raised); color: var(--qz-text); }
:root:not([data-theme="light"]) .dash-bar { background: var(--qz-raised); }
:root:not([data-theme="light"]) .dash-section, :root:not([data-theme="light"]) .dash-sub, :root:not([data-theme="light"]) .dash-meta { color: var(--qz-muted); }

/* ---- chrome refinement (2026-09-25): header, top navigation, side menus, footer -------------------------------------------------------------- */
/* header: one slim accent line instead of the purple+black double rule; the greeting becomes a chip */
#dTopDiv > div:nth-child(1) { height: 3px !important; top: 61px !important; background: linear-gradient(90deg, var(--qz-accent) 0%, var(--qz-accent) 60%, var(--qz-silver) 100%) !important; }
#dTopDiv > div:nth-child(2) { display: none; }
#dTopDiv { box-shadow: 0 1px 0 var(--qz-line); }
#dTopDiv .dossierUserWelcome, #dTopDiv #userWelcome { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; padding: 4px 6px 4px 14px; border: 1px solid var(--qz-line); border-radius: 999px; background: var(--qz-surface); color: var(--qz-text); font-size: .92rem; }
#dTopDiv #userWelcome a { color: var(--qz-accent-text); text-decoration: none; font-weight: 600; }
#dTopDiv #userWelcome a:hover { text-decoration: underline; }
#dTopDiv #userWelcome .width128 { display: none; }
#dTopDiv .dossierLogoutImage { display: none; }                                  /* replaced by the icon button below (qizmit.theme.js) */
.qzLogout { width: 30px; height: 30px; line-height: 28px; text-align: center; border-radius: 50%; border: 0; cursor: pointer; color: var(--qz-muted); background: transparent; }
.qzLogout:hover { background: var(--qz-accent-soft); color: var(--qz-accent-text); }
button.qzThemeToggle { float: right; margin: 15px 12px 0 8px; width: 32px; height: 32px; line-height: 30px; padding: 0; border-radius: 50%; border: 1px solid var(--qz-line); background: var(--qz-surface); color: var(--qz-silver-text); font-size: 0.9375rem; cursor: pointer; }
button.qzThemeToggle:hover { background: var(--qz-accent-soft); }
button.qzThemeToggle.inChip { float: none; margin: 0; width: 30px; height: 30px; line-height: 28px; border: 0; background: transparent; color: var(--qz-muted); }
button.qzThemeToggle.inChip:hover { background: var(--qz-accent-soft); color: var(--qz-accent-text); }

/* top navigation bar of the Dossier layout (superfish): flat, one line, accent underline for the current section */
ul.dossierNavMenu { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 !important; padding: 0 12px !important; width: 100% !important; box-sizing: border-box; background: var(--qz-surface); border-bottom: 1px solid var(--qz-line); }
ul.dossierNavMenu > li.dossierNavMenuItem { float: none !important; width: auto !important; min-width: 0; background: transparent !important; border-radius: 0 !important; position: relative; }
ul.dossierNavMenu > li.dossierNavMenuItem > a { display: block; padding: 13px 18px; color: var(--qz-text) !important; text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
ul.dossierNavMenu > li.dossierNavMenuItem:hover > a, ul.dossierNavMenu > li.dossierNavMenuItem.sfHover > a { color: var(--qz-accent-text) !important; background: var(--qz-accent-soft); }
ul.dossierNavMenu > li.dossierNavMenuItem.current > a { border-bottom-color: var(--qz-gold); color: var(--qz-accent-text) !important; }
ul.dossierNavMenu > li#overflowNavItem { margin-left: auto; text-align: right !important; background: transparent !important; }
ul.dossierNavMenu > li#overflowNavItem > a { background: var(--qz-accent); color: #fff !important; border-radius: 8px; margin: 6px 0; padding: 7px 16px; border-bottom: 0; }
ul.dossierNavMenu > li#overflowNavItem > a span { font-style: normal !important; }
ul.dossierNavMenu ul, ul.dossierNavMenu .sf-mega { background: var(--qz-surface) !important; border: 1px solid var(--qz-line); border-radius: 10px; box-shadow: var(--qz-shadow); padding: 6px; margin-top: 4px; }
ul.dossierNavMenu ul li a, ul.dossierNavMenu .sf-mega a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--qz-text) !important; text-decoration: none; background: transparent !important; }
ul.dossierNavMenu ul li a:hover, ul.dossierNavMenu .sf-mega a:hover { background: var(--qz-accent-soft) !important; color: var(--qz-accent-text) !important; }
ul.dossierNavMenu .sf-mega ul { list-style: none; padding: 0; border: 0; box-shadow: none; }

/* side menus (Dossier's right column, the admin pages' left column): a clean list instead of blue slab + underlined links */
#_qStaticMenu, #_qMenuDiv { background: transparent !important; box-shadow: none; }
#_qStaticMenu.qizmitStaticMenu, #_qContentAdGutter.qizmitStaticMenu { background: var(--qz-surface) !important; margin-top: 10px; border: 1px solid var(--qz-line); border-radius: 12px; padding: 8px !important; box-sizing: border-box; }
#_qStaticMenu .qizmitMenuItem, #_qStaticMenu .qizmitStaticMenuItem { display: flex; align-items: center; gap: 10px; padding: 9px 12px; margin: 1px 0; border-radius: 8px; color: var(--qz-blue) !important; cursor: pointer; font-size: .95rem; text-decoration: none; }
#_qStaticMenu .qizmitMenuItem a, #_qStaticMenu .qizmitStaticMenuItem a { color: inherit !important; text-decoration: none !important; }
#_qStaticMenu .qizmitMenuItem:hover, #_qStaticMenu .qizmitStaticMenuItem:hover { background: var(--qz-blue-soft); color: var(--qz-blue) !important; }
#_qStaticMenu .qizmitMenuItem i.qzMenuIcon { width: 18px; text-align: center; color: var(--qz-silver-text); font-size: .95em; }
#_qStaticMenu .qizmitMenuItem:empty, #_qStaticMenu .qizmitMenuItem.qzSpacer { height: 1px; padding: 0; margin: 8px 6px; background: var(--qz-line); }
#_qStaticMenu .dossierPurchaseCreditsMenuItem { font-weight: 600; }
.qizmitAdGutterSitesHeader { margin: 14px 10px 4px !important; padding: 0 !important; border: 0 !important; background: transparent !important; text-align: left !important; font-size: .72rem !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--qz-muted) !important; }
.qizmitAdgutterSitesDiv { padding: 0 10px 6px; font-size: .9rem; }
.qizmitAdgutterSitesDiv a { color: var(--qz-blue) !important; text-decoration: none; }
.qizmitAdgutterSitesDiv a:hover { text-decoration: underline; }
.dossierAliceDiv { margin-top: 10px; padding: 10px; border-radius: 10px; background: var(--qz-raised); border: 1px solid var(--qz-line); }
.dossierAliceDiv #question { display: flex; gap: 6px; }
.dossierAliceDiv input[type="text"] { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--qz-line); border-radius: 8px; background: var(--qz-surface); color: var(--qz-text); font: inherit; }
.dossierAliceDiv input[type="button"] { padding: 7px 14px; border: 0; border-radius: 8px; background: var(--qz-accent); color: #fff; font-weight: 600; cursor: pointer; }
.dossierAliceDiv .qizmitanswers { margin-top: 8px; color: var(--qz-text); }

/* Dossier page frame: content + right column as a grid; nothing pinned to a pixel width.
   (Note: _PageTop leaves #dTopDiv open - `<div class="clear"/>` is not a closed element in HTML - so the whole page is a child of #dTopDiv; select the article by what it contains, not by its parent.) */
article:has(> #_qMenuWrapper) { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; padding: 14px 20px 0; max-width: 1400px; margin: 0 auto; box-sizing: border-box; }
article:has(> #_qMenuWrapper) > #_qContentDiv.dossierContent { width: auto !important; float: none !important; grid-column: 1; }
article:has(> #_qMenuWrapper) > #_qMenuWrapper { grid-column: 2; align-self: start; margin-top: 8px; float: none !important; width: auto !important; }
article:has(> #_qMenuWrapper) > .clear { display: none; }
article:has(> #_qMenuWrapper) > footer, article:has(> #_qMenuWrapper) > #shadowbox { grid-column: 1 / -1; }
.dossierContent #_qBodyWrapper, .dossierContent .qizmitContentWrapper, .dossierContent #_qContents { background: transparent !important; width: auto !important; }
.dossierContent #_qContents { padding: 16px 4px; }
.dossierContent #_qContentBody { background: transparent; }

/* footer */
footer.footer, #_qFooter { background: transparent !important; border-top: 1px solid var(--qz-line); color: var(--qz-muted) !important; padding: 14px 0; font-size: .85rem; text-align: center; }
footer.footer a, #_qFooter a { color: var(--qz-muted) !important; text-decoration: none; margin: 0 6px; }
footer.footer a:hover, #_qFooter a:hover { color: var(--qz-accent-text) !important; text-decoration: underline; }
footer.footer *, #_qFooter * { background: transparent !important; }
footer.footer #_qFooter, footer.footer > * { border-top: 0 !important; }

@media (max-width: 960px) {
  article:has(> #_qMenuWrapper) { grid-template-columns: 1fr; padding-top: 10px; }
  article:has(> #_qMenuWrapper) > #_qMenuWrapper { grid-column: 1; grid-row: 2; }
}

article:has(> #_qMenuWrapper) #_qContentDiv, article:has(> #_qMenuWrapper) #_qContentBody, article:has(> #_qMenuWrapper) .qizmitBodyWrapper, article:has(> #_qMenuWrapper) #_qBodyWrapper { background: transparent !important; }
@media (max-width: 560px) {
  #dTopDiv img[src*="qizmit_redo_1"] { width: 130px !important; }
  #dTopDiv #userWelcome { max-width: 62vw; padding-left: 10px; font-size: .85rem; }
}
/* 2026-10-01: the header's sign-in boxes made the bar ~600px wide on a phone (sideways scrolling). Phones get just the two buttons (Sign in opens the sign-in page, see QzLoginClick in _PageTop.cshtml), and the alert bar fits the screen. */
@media (max-width: 640px) {
  #dTopDiv #loginForm .qizmitLoginTable td:nth-child(-n+4) { display: none; }
  #dTopDiv #loginForm .qizmitLoginTable { width: auto; margin: 6px 6px 0 0; }
  #dTopDiv #dLoginDiv { max-width: 55%; }
  #dTopDiv #dAlertDiv { left: 8px !important; width: calc(100% - 16px) !important; top: 64px !important; }
  html, body { overflow-x: hidden; }
  /* the (hidden) modal box is a fixed 600px wide and was the real source of the 600px document width on a phone */
  #shadowbox, #boxWrapper, #_box, #_modalButtons, .qizmitShadowBox, .qizmitShadowBoxWrapper, .qizmitShadowBoxInside, .qizmitShadowBoxButtonsDiv, .dossierShadowBoxWrapper, .dossierShadowBoxInside, .dossierShadowBoxButtonsDiv { max-width: 100vw !important; box-sizing: border-box; }
}
@media (max-width: 720px) {
  #_qContents .qizmitProperty.bvContainer { grid-template-columns: 1fr; }
  #_qContents .phoenixViewWrapper { padding: 10px 10px 14px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* the "Qizmit sites" gutter wrapper had its own white fill, a bright bar inside the dark menu card; the card behind it already carries the surface colour */
.qizmitAdGutterWrapper { background: transparent; }

/* ---- public landing (Default.cshtml) + splash board (Splash.cshtml): the Qizmit Digital Services art as a hero (2026-09-25) --------------------------------- */
#dBottomWrapper.qzPublic { background-color: var(--qz-page) !important; }
#_qContents:has(#dBottomWrapper.qzPublic) { background-color: var(--qz-page) !important; }      /* _LayoutNew wraps the page in an inline #5577AA that showed through above the hero */
.qzHero { max-width: 1400px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.qzHero picture, .qzHero img { display: block; width: 100%; height: auto; }
.qzHero .qzHeroFrame {
  border-radius: 16px; overflow: hidden; line-height: 0; background: #1b1640;                       /* navy from the art shows while it loads */
  border: 1px solid var(--qz-gold); box-shadow: var(--qz-shadow), 0 0 0 4px var(--qz-gold-soft);
}
@media (max-width: 720px) { .qzHero { padding: 0 8px; } .qzHero .qzHeroFrame { border-radius: 10px; } }

/* ---- 2026-10-01: the alert bar as a toast ------------------------------------------------------------------------------------------------------------------
   One look everywhere (every layout includes _AlertBar.cshtml): fixed under the header, centred, red for errors, green otherwise, dismissable. The old bar was an
   inline strip crammed into the header's 32px. ShowAlert() sets .is-error / .is-ok and hides it again after a few seconds; jQuery's show()/hide() still own display. */
#_qAlertBar { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 3000; box-sizing: border-box; width: max-content; max-width: min(640px, calc(100vw - 24px));
  padding: 12px 44px 12px 16px; border-radius: 12px; border: 1px solid var(--qz-line); background: var(--qz-surface); color: var(--qz-text);
  box-shadow: var(--qz-shadow), 0 10px 30px rgba(0, 0, 0, .18); font-size: .95rem; line-height: 1.4; cursor: pointer; text-align: left; }
#_qAlertBar.is-error { background: var(--qz-bad-bg); color: var(--qz-bad); border-color: var(--qz-bad); }
#_qAlertBar.is-ok { background: var(--qz-ok-bg); color: var(--qz-ok); border-color: var(--qz-ok); }
#_qAlertBar .qizmitAlertBar { display: block !important; background: transparent !important; color: inherit !important; font-size: inherit !important; }
#_qAlertBar .qzAlertClose { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.3rem; line-height: 1; cursor: pointer; opacity: .7; }
#_qAlertBar .qzAlertClose:hover, #_qAlertBar .qzAlertClose:focus-visible { opacity: 1; background: rgba(0, 0, 0, .08); outline: none; }
@media (max-width: 640px) { #_qAlertBar { top: 70px; } }

/* ---- site magnification control (js/qizmit/qizmit.magnify.js): "+ [magnifier] -" just left of the login / user panel ---- */
.qzMag { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--qz-line); border-radius: 999px; background: var(--qz-surface); color: var(--qz-text); box-shadow: var(--qz-shadow); }
.qzMag.qzMagFloat { float: right; margin: 15px 10px 0 0; position: relative; z-index: 3; }
.qzMag button { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--qz-text); font: inherit; font-size: 1.05rem; font-weight: 700; line-height: 1; cursor: pointer; }
.qzMag button:hover:not(:disabled), .qzMag button:focus-visible { background: var(--qz-accent-soft); color: var(--qz-accent-text); outline: none; }
.qzMag button:disabled { opacity: .35; cursor: default; }
.qzMag .qzMagIcon { color: var(--qz-silver-text); font-size: .85rem; }
@media (max-width: 640px) { .qzMag.qzMagFloat { margin: 17px 6px 0 0; } .qzMag button { width: 24px; height: 24px; } }
/* the old header alert strip (#dAlertDiv: absolute, half the header wide, z-index 100) sat on top of the header controls and swallowed their clicks; the toast inside it is fixed-position and keeps its own clicks */
#dAlertDiv { pointer-events: none; }
#dAlertDiv #_qAlertBar { pointer-events: auto; }
/* the site-wide button styling (purple slabs) must not reach the magnification buttons */
.qzMag > button { width: 26px !important; height: 26px !important; min-width: 0 !important; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 50% !important; background: transparent !important; color: var(--qz-text) !important; box-shadow: none !important; line-height: 1 !important; }
.qzMag > button:hover:not(:disabled), .qzMag > button:focus-visible { background: var(--qz-accent-soft) !important; color: var(--qz-accent-text) !important; }
.qzMag > .qzMagIcon { color: var(--qz-silver-text) !important; }
/* phones, signed in: logo + text-size control + greeting chip must all fit the 64px bar. The chip drops its "Hello," / "!" (font-size 0 hides the bare text, the name link and the icons are restored) */
@media (max-width: 560px) {
  #dTopDiv #userWelcome { font-size: 0 !important; gap: 4px; max-width: none; padding-left: 8px; }
  #dTopDiv #userWelcome a.email { font-size: .85rem; }
  #dTopDiv #userWelcome button, #dTopDiv #userWelcome .qzThemeToggle, #dTopDiv #userWelcome .qzLogout { font-size: 1rem; }
}
@media (max-width: 560px) { .qzMag > button { width: 22px !important; height: 22px !important; font-size: .95rem !important; } .qzMag.qzMagFloat { margin-right: 4px; } }

/* ---- Clock (js/qizmit/qizmit.clock.js, 2026-10-08): date/time + zone in the header, left of the text-size control; click = account time zone setting ---- */
.qzClock { display: inline-flex; align-items: center; gap: 7px; height: 32px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--qz-line); border-radius: 999px; background: var(--qz-surface); color: var(--qz-text) !important; font-size: .8rem; line-height: 1; white-space: nowrap; text-decoration: none !important; box-shadow: var(--qz-shadow); cursor: pointer; }
.qzClock:hover, .qzClock:focus-visible { background: var(--qz-accent-soft); color: var(--qz-accent-text) !important; outline: none; }
.qzClock.qzClockFloat { float: right; margin: 15px 10px 0 0; position: relative; z-index: 3; }
.qzClock .qzClockDate { color: var(--qz-silver-text); }
.qzClock .qzClockTime { font-weight: 700; font-variant-numeric: tabular-nums; }
.qzClock .qzClockZone { color: var(--qz-accent-text); font-weight: 700; }
.vtTopRow .qzClock .qzClockDate { display: none; }          /* portal header: logo + brand + switcher + nav + clock + text size + login only just fit, so no date there (it is in the tooltip) */
@media (max-width: 820px) { .qzClock .qzClockDate { display: none; } }
@media (max-width: 560px) { .qzClock { height: 28px; padding: 0 8px; gap: 5px; font-size: .72rem; } .qzClock.qzClockFloat { margin: 17px 4px 0 0; } }
@media (max-width: 400px) { .qzClock .qzClockZone { display: none; } }
/* alert pages: "Now 14:32 UTC" beside UTC alert times, only for people whose zone is not UTC */
.qzUtcNow { display: inline-block; margin-left: .5rem; padding: 1px 8px; border: 1px solid var(--qz-line); border-radius: 999px; background: var(--qz-surface); color: var(--qz-silver-text); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qzUtcNow[hidden] { display: none; }

/* The edit / details / delete buttons of lists and chains (js/qizmit/qizmit.ui.js swaps the old bitmaps for Font Awesome icons, 2026-10-09) */
.qzIconBtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 1px 2px; border-radius: 7px; font-size: 15px; line-height: 1; cursor: pointer; color: var(--qz-muted, #6a6478); transition: background .12s, color .12s; user-select: none; vertical-align: middle; }
.qzIconBtn:hover, .qzIconBtn:focus-visible { background: var(--qz-accent-soft, #f4e8fa); outline: none; }
.qzIconBtn.qzIconEdit { color: var(--qz-accent-text, #8F12C4); }
.qzIconBtn.qzIconDetails { color: var(--qz-link, #1837DF); }
.qzIconBtn.qzIconDelete { color: var(--qz-bad, #b3261e); }
.qzIconBtn.qzIconDelete:hover, .qzIconBtn.qzIconDelete:focus-visible { background: var(--qz-bad-bg, #fbe4e2); }
/* a compact list (QzListPolish compact): a status board, not a form */
#_qContents table.qzCompact { font-size: 0.72rem; }
#_qContents table.qzCompact tr.qizmitTableHeader { font-size: 1.1em; }
#_qContents table.qzCompact td.qzEmptyHappy { font-size: 1rem; }
#_qContents .qzCountdown { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
/* the heart before a collection's name on its page (qizmit.shortcuts.js): small, with a few pixels before the name */
#_qContents .qzHeart { margin: 0 5px 0 0; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--qz-muted, #6a6478) !important; cursor: pointer; vertical-align: middle; line-height: 1; display: inline-flex; align-items: center; }
#_qContents .qzHeart svg { width: 18px; height: 18px; display: block; }
#_qContents .qzHeart:hover, #_qContents .qzHeart:focus-visible { color: #d6336c !important; outline: none; }
#_qContents .qzHeart.on { color: #d6336c !important; }
/* create / edit / details / delete views: the action icons (owner 2026-10-10). TOP: 24px, in the pillar's colour, in a header tall enough that the hover background no longer overlaps the rule under the title;
   BOTTOM: centred, 32px. The icons are Font Awesome glyphs swapped in for the old PNGs by qizmit.theme.js. */
#_qContents legend.qizmitTableHeader { min-height: 46px; line-height: 40px; padding: 0 0 6px; box-sizing: border-box; }   /* a <legend> does not lay out as flex: the buttons float right */
#_qContents legend.qizmitTableHeader .qizmitCreateViewButtonsSpan { float: right; display: inline-flex; justify-content: flex-end; align-items: center; gap: 2px; width: auto; line-height: 1; margin-top: 6px; }
#_qContents .qizmitCreateViewButtonsSpan .qizmitimgbutton { width: 28px; height: 28px; line-height: 28px; font-size: 20px; margin: 0; color: var(--qz-blue); }
#_qContents .qizmitCreateViewButtonsSpan .qizmitimgbutton:hover, #_qContents .qizmitCreateViewButtonsSpan .qizmitimgbutton:focus-visible { background: var(--qz-blue-soft, var(--qz-accent-soft)); color: var(--qz-blue); }
#_qContents fieldset > div:has(> .qizmitimgbutton) { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 16px; }
#_qContents fieldset > div:has(> .qizmitimgbutton) > .qizmitimgbutton { width: 42px; height: 42px; line-height: 42px; font-size: 28px; margin: 0; color: var(--qz-blue); }
#_qContents fieldset > div:has(> .qizmitimgbutton) > .qizmitimgbutton:hover, #_qContents fieldset > div:has(> .qizmitimgbutton) > .qizmitimgbutton:focus-visible { background: var(--qz-blue-soft, var(--qz-accent-soft)); color: var(--qz-blue); }
/* registration / account rows (owner 2026-10-10): the old rows were 27px tall with floated halves, so the taller modern inputs overflowed and the "Confirm Password" field slid under the next item. Label and field are now a two-column grid that grows with its content. */
#_qContents li.qizmitRegistrationEmailItem, #_qContents li.qizmitRegistrationPasswordItem, #_qContents li.qizmitRegistrationUserNameItem { height: auto; display: grid; grid-template-columns: minmax(8rem, 1fr) minmax(0, 1.4fr); gap: 4px 14px; align-items: center; margin: 0 0 10px; }
#_qContents li.qizmitRegistrationEmailItem > div, #_qContents li.qizmitRegistrationPasswordItem > div, #_qContents li.qizmitRegistrationUserNameItem > div { float: none; width: auto; height: auto; }
#_qContents li.qizmitRegistrationEmailItem input, #_qContents li.qizmitRegistrationPasswordItem input, #_qContents li.qizmitRegistrationUserNameItem input { width: 100%; box-sizing: border-box; }
#_qContents li.qizmitRegistrationSpacerItem { height: 4px; }
#_qContents .qizmitRegistrationEmailDiv .field-validation-error, #_qContents .qizmitRegistrationPasswordDiv .field-validation-error { display: block; font-size: .85rem; color: var(--qz-bad, #b3261e); }
@media (max-width: 560px) { #_qContents li.qizmitRegistrationEmailItem, #_qContents li.qizmitRegistrationPasswordItem, #_qContents li.qizmitRegistrationUserNameItem { grid-template-columns: 1fr; } }
