/* R2-013 / R2-030: channels an off module still holds, each with a Clear that saves at once (outside the inert preview). */
.gate-retained { grid-column: 2; margin-top: 12px; padding: 12px; border: 1px solid var(--border-default); border-radius: var(--radius-md); background: var(--clr-card-bg); }
.gate-retained-lead { margin: 0 0 8px; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-secondary); }
.gate-retained-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gate-retained-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--text-sm); }
.gate-retained-name { color: var(--text-secondary); }
.gate-retained-ch { font-weight: 600; color: var(--text); margin-right: auto; }
@media (max-width: 640px) { section.gate div.gate-card > div.gate-retained { grid-column: 1 / -1; } }
/* R2-013: the Clear control of an optional single channel picker, inside the control's right edge beside the caret. */
.picker-clear { position: absolute; right: 32px; top: 20px; transform: translateY(-50%); width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; }
.picker-clear:hover { color: var(--text); background: var(--ink-2); }
.picker-clear:focus-visible { box-shadow: 0 0 0 2px var(--border-focus); }
.picker:has(.picker-clear:not([style*="none"])) .picker-control { padding-right: 56px; }
@media (max-width: 640px) { .picker-clear { top: 26px; } }
/* R2-062: "Saves now" on a shortcut button that writes the stored config at once (Use #channel, Create a channel). */
.btn .btn-save-hint { font-size: 12px; line-height: 16px; font-weight: 500; opacity: .8; padding-left: 8px; margin-left: 8px; border-left: 1px solid currentColor; }
.gate-retained-ch.is-cleared { color: var(--text-secondary); font-weight: 400; text-decoration: line-through; }
/* R5 UX-05: the Save bar's consequence line under its title (draft / apply), and the R5 UX-06 item state word. */
.savebar .savebar-note { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-secondary); }
.item-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.item-state.is-active { color: var(--clr-success); }
.item-state-word { display: inline-flex; flex-direction: column; align-items: flex-end; }
.item-state-off { display: block; font-size: 12px; line-height: 16px; color: var(--text-secondary); font-weight: 400; }
/* R11 SCH/STK: the item's state as a sentence at the top of its editor, with its Pause / Activate button. */
.item-state-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md, 8px); font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.item-state-line-text { flex: 1 1 220px; min-width: 0; }
.item-state-line-text strong { color: var(--text); }
.item-state-line.is-active .item-state-line-text strong { color: var(--clr-success); }
.item-state-line-help { flex-basis: 100%; font-size: 12px; line-height: 16px; }
@media (max-width: 640px) { .item-state-line .btn { min-height: 44px; } }
/* ---- R5 UX-10 / UX-12 / UX-14 (errors, safe tests, access) ---- */
/* R13b (6.1): a refusal in the bar is read whole at any width: it wraps, and is never cut to one line with "…"
   ("Couldn't save: Connection 2 would create …" at 360px). A very long one scrolls inside the bar. */
.savebar .headline.is-error { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.savebar .headline.is-error:not(.bar-fix) { max-height: 40vh; overflow-y: auto; }
/* UX-10: "Fix 2 fields to save" with one jump link per field; wraps instead of clipping. */
.savebar .headline.is-error.bar-fix { white-space: normal; overflow: visible; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.savebar .bar-jump { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.savebar .bar-jump-item { display: inline-block; white-space: pre; } .savebar .bar-jump-item .bar-jump { padding-right: 0; }  /* R13b: the comma sits right after its label ("Name, Price") */  /* R13b: a label and the comma after it stay together when the line wraps */
.savebar .bar-jump:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
.error-page .error-ref { margin-top: 8px; font-size: var(--text-sm); }
/* UX-14: contrast. White on #0084ff is 3.9:1, so the selected editor-mode chip is never a solid primary fill: since the
   Nov 2026 redesign it is the pill language's 16% blue tint (white on it is about 13:1 even over the lightest card),
   and the server avatar uses the pressed blue (4.9:1); in-text action links are sky blue and underlined, so colour
   isn't their only signal. */
.me-seg button[aria-checked="true"] { background: rgba(0, 132, 255, 0.16); color: #fff; }
.server-switch .guild-avatar { background: var(--clr-primary-active); }
a.mod-log-jump, button.am-rec-see { color: var(--sky); text-decoration: underline; text-underline-offset: 2px; }
/* UX-14: 44 px touch targets at phone and tablet widths. */
@media (max-width: 1023px) {
  .home-full-log { min-width: 44px; justify-content: center; }
  a.mod-log-jump, button.am-rec-see { display: inline-flex; align-items: center; min-height: 44px; }
  .state-switch { width: 44px; height: 44px; display: grid; place-items: center; }
  .rm-starters .btn.btn-sm, .rm-presets .btn.btn-sm { min-height: 44px; }
  .tags input { min-height: 44px; }
  .site-nav a.brand, .site-foot a.brand, .site-foot .foot-links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}
/* R5 WEL-1: welcome starters drawn as rendered previews, and the variable chips. */
.wel-starters { display: flex; flex-direction: column; gap: 10px; }
.wel-starter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.wel-starter { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--ink-0); min-width: 0; }
.wel-starter.is-current { border-color: var(--clr-primary); }
.wel-starter-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wel-starter-name { font-weight: 600; font-size: 13.5px; }
.wel-starter-preview { flex: 1; font-size: 13px; line-height: 1.45; color: var(--text); overflow-wrap: anywhere; }
.wel-starter .btn { align-self: flex-start; min-height: 44px; }
.wel-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.wel-chip-row { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.wel-chip { cursor: pointer; font-family: var(--font-mono, monospace); min-height: 32px; }
@media (max-width: 1023px) { .wel-chip { min-height: 44px; } }
.wel-starter-note { margin: 0; }
.wel-deleted { display: flex; gap: 8px; align-items: flex-start; grid-column: 1 / -1; }
/* R5 WEL-2: optional messages (direct message, leave message), collapsed with their own Active/Paused switch. */
.wel-optional { display: flex; flex-direction: column; }
.wel-opt { padding: 14px 20px; }
.wel-opt + .wel-opt { border-top: 1px solid var(--line-soft); }
.wel-opt-head { display: flex; align-items: center; gap: 12px; }
.wel-opt-toggle { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; text-align: left; background: none; border: 0; color: inherit; padding: 6px 0; cursor: pointer; min-height: 44px; }
.wel-opt-toggle .chev { display: inline-flex; color: var(--muted); transition: transform 150ms; }
.wel-opt-toggle .chev.open { transform: rotate(90deg); }
.wel-opt-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.wel-opt-desc { grid-column: 2; font-size: 13px; color: var(--muted); }
.wel-opt-switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.wel-opt-word { font-size: 13px; color: var(--text-secondary); min-width: 48px; text-align: right; }
.wel-opt-off { margin: 4px 0 0 24px; }
.wel-opt-body { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; padding: 12px 0 4px; }
.wel-opt-body > .fld { grid-column: 1 / -1; }
@media (max-width: 640px) { .wel-opt { padding: 12px 14px; } .wel-opt-off { margin-left: 0; } }
/* R5 LVL-2: role rewards as a level → role table. */
.lvl-rewards { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lvl-rewards .table-wrap { width: 100%; overflow: visible; }
table.data.lvl-rewards-table { width: 100%; table-layout: fixed; }
table.data.lvl-rewards-table td { vertical-align: middle; }
table.data.lvl-rewards-table .lvl-rw-level { width: 120px; }
table.data.lvl-rewards-table .lvl-rw-level .input { max-width: 100px; }
table.data.lvl-rewards-table .lvl-rw-remove { width: 72px; text-align: right; }
table.data.lvl-rewards-table .lvl-rw-remove .btn { min-width: 44px; min-height: 44px; }
table.data.lvl-rewards-table .lvl-rw-role .picker { width: 100%; max-width: none; }
.lvl-rewards > .btn { min-height: 44px; }
@media (max-width: 640px) {
  table.data.lvl-rewards-table th, table.data.lvl-rewards-table td { padding-left: 6px; padding-right: 6px; }
  table.data.lvl-rewards-table .lvl-rw-level { width: 80px; }
  table.data.lvl-rewards-table .lvl-rw-level .input { max-width: 68px; }
  table.data.lvl-rewards-table .lvl-rw-remove { width: 56px; }
}
/* R5 LVL edge: the level-up channel was deleted. */
.lvl-deleted { display: flex; gap: 8px; align-items: flex-start; grid-column: 1 / -1; }
.lvl-reset { display: flex; flex-direction: column; gap: 14px; }
/* ---- Round 5: Moderation, Auto moderation, Logging (MOD-2/3, AMD-1/2, LOG-1/3) ---- */
/* AMD edge: an action Voinly's role can't carry out, on the filter row. */
.am-perm-warn { display: flex; align-items: flex-start; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; line-height: 18px; color: var(--amber); }
.am-perm-warn .icon { flex-shrink: 0; margin-top: 2px; }
.am-perm-warn .muted { color: var(--muted); }
/* AMD-2: Test a message inside one filter. */
.am-rule-test { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.am-rule-test-row { display: flex; gap: 8px; align-items: center; }
.am-rule-test-row .input { flex: 1; min-width: 0; }
.am-rule-test-row .btn { min-height: 44px; }
.am-rule-test-out { margin: 8px 0 0; font-size: 13px; line-height: 18px; color: var(--text-2); }
.am-rule-test-out .is-match b { color: var(--amber); }
.am-rule-test-out .is-clear b { color: var(--text); }
.am-rule-test-err { color: var(--rose); }
/* AMD first screen: the filter list under the Recommended filters card. */
.am-hub-list { background: var(--clr-card-bg); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 16px 24px; }
.am-hub-list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.am-hub-list-head h3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.am-hub-list-head p { color: var(--muted); font-size: 13px; }
.am-hub-rows { list-style: none; margin: 8px 0 0; padding: 0; }
.am-hub-rows li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.am-hub-rows li:first-child { border-top: 0; }
.am-hub-name { font-weight: 600; font-size: 14px; line-height: 20px; }
.am-hub-sum { grid-column: 1; color: var(--text-2); font-size: 13px; line-height: 18px; }
.am-hub-rows .badge { grid-row: 1; grid-column: 2; justify-self: end; }
.am-hub-rows .am-perm-warn { grid-column: 1 / -1; }
.am-rec-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
@media (max-width: 640px) { .am-hub-list { padding: 14px 16px; } }
/* MOD-2: the sample case card. */
.mod-sample { margin-bottom: 18px; }
.mod-sample-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mod-sample-head h3 { font-size: 16px; line-height: 24px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
/* On a phone the title and its "Sample" badge fill the line to within a few px, so whether the badge wrapped depended on
   the font (31px of shift on the Moderation hub when Onest arrived late, MAR-12036). There the badge always takes its
   own line, so the head is the same height in every font state. */
@media (max-width: 480px) { .mod-sample-head { flex-direction: column; align-items: flex-start; } }
.mod-sample-note { color: var(--muted); font-size: 13px; line-height: 18px; margin: 0 0 12px; }
.mod-sample .dc-embed { max-width: 520px; }
.mod-sample-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin-top: 8px; }
.mod-sample-fields .wide { grid-column: 1 / -1; }
.mod-sample-fields b { display: block; font-size: 12.5px; }
.mod-sample-fields span { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
@media (max-width: 520px) { .mod-sample-fields { grid-template-columns: 1fr 1fr; } }
/* MOD-3: each DM notice text folded, with its Default text / Custom text summary. */
.mod-dm-text { width: 100%; flex-basis: 100%; grid-column: 1 / -1; box-sizing: border-box; border: 1px solid var(--line-soft); border-radius: var(--radius-md); margin: 4px 0 12px; }
.mod-dm-text > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; cursor: pointer; list-style: none; font-weight: 600; font-size: 13.5px; }
.mod-dm-text > summary::-webkit-details-marker { display: none; }
.mod-dm-text > summary .grow { flex: 1; }
.mod-dm-text > summary .mod-dm-sum { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.mod-dm-text > summary .icon { transition: transform .15s; }
.mod-dm-text[open] > summary .icon { transform: rotate(90deg); }
.mod-dm-text > .mod-dm-body { padding: 4px 12px 12px; }
/* LOG-1: the one "All logs go to" picker. */
.lg-all { display: grid; gap: 6px; padding: 16px 24px; border-top: 1px solid var(--line-soft); }
.lg-all .lbl { font-weight: 600; font-size: 14px; }
.lg-all .picker { max-width: 420px; }
.lg-all .help { color: var(--muted); font-size: 12.5px; line-height: 18px; }
.lg-all .lg-split-note { color: var(--text-2); font-size: 13px; line-height: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 640px) { .lg-all { padding: 14px 16px; } .lg-all .picker { max-width: none; } }
/* LOG-1: the per-category pickers under More settings only show once "Use a different channel" is on. */
body:has(.lg-all[data-split="0"]) .fld[data-key="messages_channel"],
body:has(.lg-all[data-split="0"]) .fld[data-key="members_channel"],
body:has(.lg-all[data-split="0"]) .fld[data-key="server_channel"],
body:has(.lg-all[data-split="0"]) .fld[data-key="voice_channel"] { display: none; }
/* ---- R5 UX-01 / UX-02 / UX-11 (r5/home): one page layout, the setup guide, progressive disclosure. ---- */
/* "Needed to work": the first block under the page head (partials/r5_layout.html). */
.r5-needed-head { margin: 4px 0 12px; scroll-margin-top: 80px; }
.r5-needed-head h2 { margin: 0; font-size: 18px; line-height: 24px; }
.r5-needed-head p { margin: 4px 0 0; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-secondary); }
.r5-needed-head:focus { outline: none; }
.r5-needed-head:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 4px; border-radius: 4px; }
/* "Preview" (UX-02): the head of a page's preview block, between "Needed to work" and "More settings". */
.r5-block-head { margin: 24px 0 12px; }
.r5-block-head h2 { margin: 0; font-size: 18px; line-height: 24px; }
.r5-block-head p { margin: 4px 0 0; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-secondary); }
/* The page-change skeleton's "Needed to work" heading (render._needed_head): the gaps above and under it are the
   loaded page's (skeletons/r5_gaps.py), so the region before it gives up its own bottom margin and the region
   after it its own top margin. */
.sk .sk-r5-head.r5-needed-head { margin: var(--nt, 4px) 0 var(--nb, 12px); }
@media (max-width: 900px) { .sk .sk-r5-head.r5-needed-head { margin: var(--ntm, var(--nt, 4px)) 0 var(--nbm, var(--nb, 12px)); } }
@media (max-width: 359px) { .sk .sk-r5-head.r5-needed-head { margin: var(--nts, var(--ntm, var(--nt, 4px))) 0 var(--nbs, var(--nbm, var(--nb, 12px))); } }
.sk .sk-region:has(+ .sk-r5-head.r5-needed-head) { margin-bottom: 0 !important; }
.sk .sk-r5-head.r5-needed-head + .sk-region { margin-top: 0 !important; }
/* The page-change skeleton's own copy of a "Preview" block's box (voinly/web/skeletons/render._plain). */
.sk-r5-box { height: var(--sk-h); }
@media (max-width: 900px) { .sk-r5-box { height: var(--sk-hm); } }
@media (max-width: 359px) { .sk-r5-box { height: var(--sk-hs); } }
/* UX-11: a long "Needed to work" block numbers its sections as steps (partials/disclosure.html page_first_view). */
.sec-rail h3[data-r5-step]::before { content: attr(data-r5-step); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-3); color: var(--text-secondary); font: 700 12px/1 var(--font-ui); flex-shrink: 0; }
/* "Commands": the last block, collapsed; its head says how many commands it holds. */
details.cmd-board > summary.board-head { list-style: none; cursor: pointer; min-height: 44px; user-select: none; }
details.cmd-board > summary.board-head::-webkit-details-marker { display: none; }
details.cmd-board > summary.board-head::marker { content: ""; }
details.cmd-board > summary.board-head h2 { flex: 0 1 auto; }
details.cmd-board > summary.board-head .r5-count { flex: 1; font-size: var(--text-sm); color: var(--text-secondary); }
details.cmd-board > summary.board-head:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
.r5-chev { color: var(--text-tertiary); transition: transform 120ms var(--ease-smooth); flex: none; }
details[open] > summary .r5-chev { transform: rotate(180deg); }
.r5-cmd-note { margin: 0 0 8px; }
/* "More settings": the one-line summary of saved values that differ from the defaults (UX-11). */
.disclosure-card > .disclosure-head { flex-wrap: wrap; row-gap: 0; }
.disclosure-card > .disclosure-head:has(.disclosure-summary) { padding-top: 8px; padding-bottom: 8px; }
/* X-09: with a one-line summary the closed head stays at its 52px (8 + 20 title row + 16 line + 8), so the line
   that appears after a Save (app.js vl-saved) never pushes the page down; the 28px chevron overhangs its row. */
.disclosure-card > .disclosure-head:has(.disclosure-summary) .disclosure-chev { margin-block: -4px; }
.disclosure-head .disclosure-title { flex: 1 1 auto; }
.disclosure-summary { order: 9; flex: 1 0 100%; font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--text-secondary); font-weight: 400; overflow-wrap: anywhere; }
/* R12 WEL: the "Too long to save" line under a message editor. */
.msg-editor > .me-too-long { margin-top: var(--space-2); }
/* R12 BOT: the link after the summary line that opens More settings on the setting it names. */
.disclosure-saved { order: 10; flex: 1 0 100%; font-size: var(--text-xs); line-height: var(--lh-xs); color: var(--text-tertiary); font-weight: 400; overflow-wrap: anywhere; }
.disclosure-saved .r5-show { padding: 0 var(--space-1); border: 0; background: transparent; color: var(--text-primary); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.disclosure-saved .r5-show:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
@media (pointer: coarse) { .disclosure-saved .r5-show { display: inline-flex; align-items: center; min-height: 44px; } }
/* "Advanced": advanced editors (Components V2) inside a message editor (UX-11). */
.r5-advanced { margin-bottom: 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
.r5-advanced > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; cursor: pointer; list-style: none; font-weight: 600; font-size: var(--text-sm); user-select: none; }
.r5-advanced > summary::-webkit-details-marker { display: none; }
.r5-advanced > summary::marker { content: ""; }
.r5-advanced > summary:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.r5-advanced-note { flex: 1; font-weight: 400; color: var(--text-secondary); }
.r5-advanced[open] > .ed-layout { padding: 0 12px 12px; }
/* Home: the setup guide's second module link ("Keep it safe" covers two) and its ready-made setups. */
.home-step-mods { margin-top: 4px; font-size: var(--text-sm); line-height: var(--lh-sm); }
.home-step-mods a { color: var(--sky); }
.r5-guide-presets { padding: 16px; border-top: 1px solid var(--border-subtle); }
.r5-guide-presets .home-presets-title { margin: 0 0 4px; font-size: var(--text-md, 15px); }
#setup-guide-title:focus { outline: none; }
/* UX-02, one filled primary per screen: while the turn-on gate holds the screen's primary button ("Turn on …"),
   the editable draft under it draws its own primary buttons as secondary ones. Dialogs keep theirs. */
.page-body[data-off] .btn-primary:not(:disabled):not(:where(.modal-wrap, .modal-backdrop, [role=dialog]) *) { --btn-bg: var(--clr-secondary-btn); --btn-fg: var(--text-primary); --btn-bd: var(--border-default); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.page-body[data-off] .btn-primary:not(:disabled):not(:where(.modal-wrap, .modal-backdrop, [role=dialog]) *):hover { --btn-bg: var(--clr-secondary-btn-hover); }
/* Round 5 UX-03: the shared channel picker's "Voinly can't post here" line under the control, and its Suggested row. */
.picker-warn { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--amber); }
.picker-warn .icon { flex: none; margin-top: 4px; }
.picker-warn a { color: var(--text); text-decoration: underline; white-space: nowrap; }
.picker-opt .sug { margin-left: auto; flex: none; display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--radius-sm); background: var(--clr-primary-soft); color: var(--sky); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.picker-opt .sug + .warn { margin-left: 0; }
/* Round 5 UX-04: a role Voinly can't give is listed, dimmed and unpickable, with how to fix it under the row. */
.picker-opt.off { cursor: not-allowed; }
/* R13b: the line above the list of a role picker that only reads roles (its tagged rows can still be picked). */
.picker-note { padding: 8px 12px; font-size: var(--text-xxs); line-height: var(--lh-xxs); color: var(--muted); border-bottom: 1px solid var(--line); }
.picker-opt-note { padding: 0 12px 8px 32px; margin-top: -4px; font-size: var(--text-xxs); line-height: var(--lh-xxs); color: var(--muted); }
.picker-opt-fix { padding: 0 12px 8px 32px; font-size: var(--text-xxs); line-height: var(--lh-xxs); }
/* R13 UX-04: a list under 320px wide (a phone, a narrow column) gives the role name the row and puts the
   "Above Voinly's role" tag on a line of its own under it, so neither is cut. */
.picker-menu.narrow .picker-opt { flex-wrap: wrap; row-gap: 0; }
.picker-menu.narrow .picker-opt .opt-name { max-width: calc(100% - 20px); }
.picker-menu.narrow .picker-opt .warn { margin-left: 20px; padding: 0; }
.picker-menu.narrow .picker-opt .check { margin-left: auto; }
.chip.chip-warn { box-shadow: inset 0 0 0 1px var(--amber); }
/* UX-07: the one posted state of a posted thing (Draft, Posted in #x, Changes not posted, Removed). The words carry
   the state; the tone only repeats it. */
.badge.post-state { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* RRM-1: the role menu builder's numbered steps. */
.rm-step-head { align-items: center; flex-wrap: wrap; }
.rm-step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink-3); color: var(--text-secondary); font: 700 12.5px/1 var(--font-ui); flex-shrink: 0; }
.rm-step.is-done .rm-step-n { background: var(--clr-primary-soft); color: var(--text-primary); }
.rm-step-head .rm-step-state { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.rm-step.is-done .rm-step-head .rm-step-state { color: var(--text-primary); }
.rm-sub { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 20px 0 10px; }
.rm-sub h5 { margin: 0; font-size: 13.5px; font-weight: 700; }
.rm-sub span { color: var(--muted); font-size: 13px; }
.rm-rename { height: 32px; max-width: 320px; font-weight: 700; }
.rm-post-why { color: var(--text-secondary); font-size: 12.5px; }
.rm-foot .grow { flex-wrap: wrap; }
/* WCH: blocks that still hold sample text, listed before Post (WCH-3). */
.wc-samples { grid-column: 1 / -1; }
.wc-samples ul { margin: 4px 0 0; padding-left: 18px; }
.wc-samples button { padding: 0; border: 0; background: none; color: var(--clr-primary); font: inherit; text-decoration: underline; cursor: pointer; min-height: 24px; }
.vc-head .post-dot { flex-shrink: 0; }
/* UX-08: a module whose service isn't connected: view-only badge and the Home notice that offers to turn it on. */
.avail-badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--radius-full); background: var(--amber-soft); color: var(--clr-warning); font: 600 12.5px/1 var(--font-ui); white-space: nowrap; }
.avail-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.avail-ready .grow { flex: 1 1 240px; }
.avail-ready .btn { min-height: 44px; }
/* ---- R6 module entries ------------------------------------------------------------------------------------- */
/* WEL-2: the welcome message's own Active/Paused switch in its section head; UX-11: its two numbered steps. */
.wel-join-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wel-join-head h3 { margin: 0; }
.wel-step { margin: 4px 0 -6px; }
.wel-step-head { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; font-weight: 700; }
.wel-step-head[data-r5-step]::before { content: attr(data-r5-step); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink-3); color: var(--text-secondary); font: 700 12px/1 var(--font-ui); flex-shrink: 0; }
/* WCH-1: the block outline: drag handle and row number before each row's title + type. */
.vc-head-drag { cursor: grab; touch-action: none; flex-shrink: 0; }
.vc-head-drag:active { cursor: grabbing; }
.vc-num { flex-shrink: 0; min-width: 18px; color: var(--text-secondary); font: 600 13px/1 var(--font-ui); text-align: right; }
/* AMD-2: the "Test a message" box on every filter row, open or closed. */
.am-rule-test--row { margin: 0; padding: 10px 16px 12px; border-top: 1px solid var(--line-soft); }
.am-rule-test--row .am-rule-test-out { margin-top: 6px; }
@media (max-width: 640px) { .am-rule-test--row { padding: 10px 12px 12px; } .vc-num { display: none; } }
.am-hub-test { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
.am-hub-test-open { align-self: flex-start; min-height: 44px; margin: -6px 0; padding-left: 0; color: var(--text-secondary); }
.am-hub-test .am-rule-test-out { margin: 0; }
/* ---- Round 6 shell (UX-14): skip link, focus ring, widths and touch targets. ---- */
/* "Skip to main content": the first stop for Tab on every page, off screen until it has focus. */
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10000; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius-md); background: var(--ink-1); color: var(--text-primary); font-weight: 600; text-decoration: none; box-shadow: var(--shadow-md); transform: translateY(calc(-100% - 16px)); }
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 2px solid var(--border-focus); outline-offset: 2px; }
/* The main region takes focus from the skip link; the region itself draws no ring (its first control does). */
#main:focus { outline: none; }
/* UX-10: the reference code of a server failure, under the bar's one-line reason, never clipped. */
.savebar .bar-ref { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-secondary); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Touch targets: on a coarse pointer (a phone, a tablet at any width) every shared control is at least 44 px. The
   width rules above cover phones; these cover a touch screen wider than 1023 px and the cases those rules miss. */
@media (pointer: coarse) {
  /* !important: an accessibility floor on touch screens, above the many page rules that size these controls. */
  .btn, .input, .select, .picker-control, .seg-tab, [role=tab], .choice-chips button, .segmented button,
  .page-actions > summary, .tags input { min-height: 44px !important; }
  .state-switch { width: 44px; height: 44px; display: grid; place-items: center; }
  /* Verification's method row stays one row on a phone (adv.css), at the touch height. */
  .sec-body .fld[data-key="method"] .segmented button { min-height: 44px; }
  a.badge, .bar-jump, .site-toc a, .cmd-cats a, .proof a { display: inline-flex; align-items: center; min-height: 44px; }
  .nav-search input { min-height: 44px; }
  .shot-tabs button { min-height: 44px; }
  .site-nav a.brand, .site-foot a.brand, .site-foot .foot-links a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}
/* The dashboard shell and the smaller shared controls on a touch screen of any width (a 1280 px tablet included). */
@media (pointer: coarse) {
  .sidebar-row, .group-header, #nav-q, .fetch-roles-button, .command-list-link, .user-btn, .home-group-header, a.tab,
  button.chip, .ach-chip, .au-chip, .board-chip, .wc-samples button { min-height: 44px; }
  .crumb-guild, .home-full-log, button.am-rec-see, a.mod-log-jump, .site-nav a, .site-nav .links a, .setup-items a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px !important; min-width: 44px !important; }
  .btn.btn-ghost { min-width: 44px; }
  .color-input .swatches button { width: 44px; height: 44px; }
  /* The landing page's own rule sets these tabs to 36 px after this file loads; the extra class wins. */
  .public .shot-tabs button { min-height: 44px; }
}
/* R6 UX-02: the page actions menu under the turn-on button while the module is off. */
.gate-page-actions { display: flex; justify-content: flex-end; margin-top: 4px; }

/* ---- R7 messages and automation (MSG-2, ARS-1, AUT, RCN) ---- */
/* ARS-1: paused (draft) triggers the tester matched; they never reply until activated. */
.ar-result.paused { margin-top: 8px; padding: 11px 13px; border-radius: 10px; font-size: 13.5px; display: flex; gap: 10px;
                    align-items: flex-start; background: var(--amber-soft); border: 1px solid rgba(250, 151, 46, .25); }
.ar-result.paused > .icon { color: var(--clr-warning); flex-shrink: 0; }
.ar-result.paused p { margin: 0; }
.ar-result.paused p + p { margin-top: 4px; }
/* AUT: the live one-sentence summary of the open automation. */
.au-live { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
           background: var(--ink-1); border: 1px solid var(--line-soft); color: var(--text); font-size: 14px; line-height: 1.5; }
.au-live > .icon { color: var(--muted); flex-shrink: 0; margin-top: 3px; }
/* AUT: Simulate. */
.au-sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin-top: 10px; }
.au-sim-grid .fld { margin: 0; }
.au-sim-grid .au-sim-roles { grid-column: 1 / -1; }
.au-sim-out { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--ink-1); border: 1px solid var(--line-soft); }
.au-sim-steps, .au-sim-acts { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.au-sim-acts { margin-top: 6px; padding-left: 4px; counter-reset: au-sim; }
.au-sim-acts li { counter-increment: au-sim; font-size: 14px; }
.au-sim-acts li::before { content: counter(au-sim) ". "; color: var(--muted); font-weight: 600; }
.au-sim-acts li.fail { color: var(--text-2); }
.au-sim-steps li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 14px; }
.au-sim-mark { display: inline-block; min-width: 40px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; text-align: center; }
.au-sim-steps li.pass .au-sim-mark { background: rgba(0, 132, 255, .14); color: var(--clr-primary); }
.au-sim-steps li.fail .au-sim-mark { background: rgba(255, 107, 127, .12); color: var(--rose); }
.au-sim-why { flex-basis: 100%; color: var(--text-2); font-size: 13px; padding-left: 50px; }
.au-sim-acts .au-sim-why { padding-left: 16px; display: block; }
.au-sim-verdict { margin: 12px 0 0; font-size: 14px; }
.au-sim-out .fld-help { margin-top: 8px; }
@media (max-width: 640px) { .au-sim-why { padding-left: 0; } }
/* ---- R7 utils: REM ambiguous dates, TRN language picker, AFK nickname preview, INF/SRC example replies,
   INV leaderboard preview, RSS newest items. ---- */
.rm-ambig .when { font-size: 16px; }
.rm-ambig-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.rm-ambig-list li + li { margin-top: 2px; }
.lang-pick { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lang-pick-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.lang-pick-chip { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--ink-2); border: 1px solid var(--line-soft); font-size: 13px; }
.lang-pick-x { display: inline-grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.lang-pick-x:hover, .lang-pick-x:focus-visible { color: var(--text); background: var(--ink-4); }
.lang-pick-empty { font-size: 13px; }
.lang-pick-pop { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: min(320px, 100%); padding: 8px; border-radius: var(--r-md); background: var(--ink-1); border: 1px solid var(--line-soft); box-shadow: 0 12px 32px rgba(0, 0, 0, .35); }
.lang-pick-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 240px; overflow-y: auto; }
.lang-pick-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; }
.lang-pick-list li.active { background: var(--ink-3); }
.lang-pick-list li.lang-pick-none { cursor: default; }
.afk-nick-prev { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); font-size: 13px; min-width: 0; }
.afk-nick-prev-head { font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.afk-nick-prev-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; overflow-wrap: anywhere; }
.afk-nick-prev-row strong { font-family: var(--font-code); font-weight: 600; }
/* R11 APP: the appeal form sample under the questions (components/appeals_form_preview.html). */
.apf-preview { margin-top: 8px; min-width: 0; }
.apf-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.apf-title { font-weight: 600; color: var(--text-primary); }
.apf-form { margin-top: 8px; padding: 16px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); min-width: 0; overflow-wrap: anywhere; }
.apf-intro { color: var(--text-2); font-size: var(--text-sm); line-height: var(--lh-sm); white-space: pre-line; margin: 0 0 4px; }
.apf-q { margin-top: 12px; }
.apf-q-label { font-weight: 600; font-size: var(--text-sm); margin-bottom: 4px; }
.apf-opt { color: var(--muted); font-weight: 500; }
.apf-q-box { min-height: 36px; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--line-soft); background: var(--ink-1, transparent); color: var(--muted); font-size: var(--text-sm); }
.apf-q-box.long { min-height: 72px; }
.apf-empty { color: var(--muted); font-size: var(--text-sm); margin: 8px 0 0; }
.apf-send { display: inline-block; margin-top: 16px; padding: 8px 16px; border-radius: var(--r-md); background: var(--fill-primary); color: #fff; font-weight: 600; font-size: var(--text-sm); opacity: .7; }
/* R11 AFK: the long name in the nickname preview is a sample, and says so. */
.afk-nick-prev-tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line-soft); border-radius: 999px; padding: 0 8px; }
/* R11 BOT: "1 changed: Prefix" on the bar, each name a link to its field. */
.savebar .savebar-note.bar-changed { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 8px; color: var(--text-primary); }
.cmd-example { margin-top: 6px; }
.cmd-example > summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 12.5px; color: var(--text-2); list-style: none; }
.cmd-example > summary::-webkit-details-marker { display: none; }
.cmd-example[open] > summary { color: var(--text); }
.cmd-ex-embed { margin-top: 6px; max-width: 420px; padding: 10px 12px; border-radius: 6px; background: var(--ink-2); border-left: 4px solid var(--clr-primary); font-size: 13px; color: var(--text); }
.cmd-ex-title { font-weight: 700; margin-bottom: 4px; }
.cmd-ex-desc { white-space: pre-line; color: var(--text-2); margin-bottom: 6px; }
.cmd-ex-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px 12px; }
.cmd-ex-field.wide { grid-column: 1 / -1; }
.cmd-ex-fname { font-weight: 600; font-size: 12px; }
.cmd-ex-fval { color: var(--text-2); overflow-wrap: anywhere; }
.cmd-ex-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.cmd-ex-note { margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.iv-prev { margin-bottom: 20px; }
.iv-prev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.iv-prev-head h3 { margin: 0; font-size: 15px; }
.iv-prev-embed { max-width: 520px; padding: 12px 14px; border-radius: 6px; background: var(--ink-2); border-left: 4px solid var(--clr-primary); font-size: 13.5px; }
.iv-prev-title { font-weight: 700; margin-bottom: 6px; }
.iv-prev-rows { list-style: none; margin: 0; padding: 0; }
.iv-prev-rows li { overflow-wrap: anywhere; }
.iv-prev-name { color: var(--clr-primary); }
.soc-recent { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--ink-2); border: 1px solid var(--line-soft); font-size: 13px; }
.soc-recent-head { font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.soc-recent ol { margin: 0 0 6px; padding-left: 18px; }
.soc-recent li { overflow-wrap: anywhere; }
.soc-recent li + li { margin-top: 2px; }
@media (pointer: coarse) {
  .lang-pick-x { width: 44px; height: 44px; }
  .lang-pick-chip { height: auto; }
  .lang-pick-list li, .cmd-example > summary { min-height: 44px; align-items: center; }
}
/* ---- R7 settings pages (ERR, CBT, BOT) ---- */
/* ERR: one Error log entry reads what failed, why, next step (with its fix link), count and reference. */
.errlog-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.errlog-filter .fld-label { margin: 0; }
.errlog-filter .select { width: auto; min-width: 200px; max-width: 100%; }
.errlist .errlog-entry { align-items: flex-start; padding: 16px 18px; gap: 12px; }
.errlog-entry .errlog-icon { color: var(--rose); margin-top: 2px; flex: none; }
.errlog-entry .errlog-body { flex: 1; min-width: 0; }
.errlog-entry .errlog-what { font-weight: 600; overflow-wrap: anywhere; }
.errlog-facts { margin: 6px 0 0; display: grid; gap: 3px; }
.errlog-facts > div { display: flex; gap: 6px; flex-wrap: wrap; font-size: var(--text-sm); line-height: var(--lh-sm); }
.errlog-facts dt { color: var(--text-secondary); font-weight: 600; min-width: 72px; }
.errlog-facts dd { margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.errlog-entry .errlog-meta { margin-top: 8px; overflow-wrap: anywhere; }
/* R11 ERR: an entry whose fix is still missing leads with the fix; an entry opened from Home's error line is marked. */
.errlog-open { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-primary); }
.errlog-open .icon { color: var(--amber); flex: none; }
.errlog-open > span { flex: 1 1 220px; min-width: 0; }
.errlog-anchor { position: absolute; }
.errlog-entry:target { box-shadow: inset 3px 0 0 var(--clr-primary); background: color-mix(in srgb, var(--clr-primary) 7%, transparent); scroll-margin-top: 96px; }
@media (max-width: 640px) {
  .errlist .errlog-entry { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 6px 10px; padding: 14px; }
  .errlog-entry > .btn { grid-column: 2; justify-self: start; }
  .errlog-facts > div { display: block; }
  .errlog-facts dt { min-width: 0; }
}
/* BOT: the time zone consequence line can name several schedules; it wraps and never pushes the buttons off-screen. */
.savebar .savebar-note.tz-impact { display: block; color: var(--text-primary, inherit); overflow-wrap: anywhere; max-height: 4.5em; overflow-y: auto; }
/* R9 BOT: the schedules an unsaved time zone change moves, listed under the field. */
.tz-moves { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border-subtle, var(--line)); border-left: 3px solid var(--clr-primary); border-radius: var(--radius-md, 8px); max-width: 520px; }
.tz-moves-head { font-weight: 600; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-primary, var(--text)); }
.tz-moves ul { margin: 6px 0 0; padding-left: 18px; font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--text-primary, var(--text)); overflow-wrap: anywhere; }
.tz-moves .fld-help { margin-top: var(--space-2); }
/* R13b: every item that moves has its own line; a long list scrolls inside the box instead of pushing Save away. */
.tz-moves ul { max-height: 15.5em; overflow-y: auto; }
/* CBT: the setup's state line (Not set up / Checking… / Connected) and the line about Voinly's own bot. */
.cb-setup-state { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border, rgba(255,255,255,.08)); border-radius: 10px; margin-bottom: 8px; }
.cb-setup-state > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cb-setup-main { margin: 0 0 12px; }

/* Custom bot plan card (billing). Primary blue for the choice and the action; the success green only for "Active". */
.cb-plan-buy, .cb-plan-active { display: flex; flex-direction: column; gap: 12px; }
.cb-plan-status { display: flex; align-items: center; gap: 8px; }
.cb-plan-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--clr-success); flex: none; }
.cb-plan-dot.warn { background: var(--clr-warning, #f59e0b); }
.cb-plan-ended { margin: 0; color: var(--text-secondary); }
.cb-plan-choice { align-self: flex-start; }
.cb-plan-reason { margin: 4px 0 0; }
/* R13b: at phone width an item's "Module is off, so nothing runs" badge sat beside the title and squeezed the name to
   a sliver (a YouTube channel read "'"). It goes on its own line under the title, and the name keeps the row. */
@media (max-width: 640px) {
  .list-item-head:has(> [data-li-module-off]:not([style*="display: none"]):not([x-cloak])) { flex-wrap: wrap; row-gap: 4px; }
  .list-item-head:has(> [data-li-module-off]:not([style*="display: none"]):not([x-cloak]))::after { content: ""; order: 8; flex-basis: 100%; height: 0; }
  .list-item-head > [data-li-module-off] { order: 9; margin-left: 24px; max-width: calc(100% - 24px); white-space: normal; height: auto; }
}

/* R13c §5.1: the template editor's own bar (.tplm-bar) is a Fix-N bar like the page's: its Save is the page bar's
   primary blue (it was the success green), a held-back Save looks held back, and the Fix line wraps with its jump
   links. A bar's Save takes its enabled or held-back look in the frame its state changes (no 150 ms fade from grey). */
.tplm-bar .btn-success { --btn-bg: var(--fill-primary); --btn-fg: #fff; }
.tplm-bar .btn-success:hover { --btn-bg: var(--fill-primary-hover); }
.tplm-bar .btn-success:active { --btn-bg: var(--fill-primary-active); }
.savebar .btn-success, .tplm-bar .btn-success { transition: none; }
.tplm-bar .btn.btn-success[disabled]:not(.btn-ghost):not(.btn-outline) {
  --btn-bg: var(--clr-btn-disabled-bg) !important; --btn-fg: var(--text-placeholder);
  pointer-events: auto; cursor: not-allowed; transform: none;
}
.tplm .tplm-bar .headline.is-error { font-size: var(--text-sm); line-height: var(--lh-sm); color: var(--clr-danger-text); }
.tplm .tplm-bar .headline.is-error.bar-fix { white-space: normal; overflow: visible; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.tplm-bar .bar-jump { min-height: 44px; padding: 0 4px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.tplm-bar .bar-jump-item { display: inline-block; white-space: pre; } .tplm-bar .bar-jump-item .bar-jump { padding-right: 0; }
.tplm-bar .bar-jump:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: 4px; }
/* R13c: a bar that has shown a Fix line keeps no entry fade until it hides (bar-instant, module.html), so a Fix line
   gone within the 200 ms entry does not play the rest of it (the bar was drawn at 0.9). The template editor's bar is
   there at once while it carries a Fix line. */
.savebar.show.bar-instant { animation-duration: 0s !important; }
@media (prefers-reduced-motion: no-preference) {
  .savebar.show.bar-instant.shake { animation-duration: 0s, 380ms !important; }
}
.tplm .tplm-bar.show.has-err:not(.shake) { transition: none; }
/* R13c: a field reached with a jump link (a mouse press on the bar's link draws no :focus-visible ring on a script's
   focus) shows the same ring as a keyboard focus, and a focus that scrolls the page keeps the field clear of the
   sticky top bar. */
.vl-jump-ring:focus { outline: 2px solid var(--border-focus); outline-offset: 2px; }
html:has(.topbar) { scroll-padding-top: calc(var(--topbar-height, 50px) + 12px); }
