/* Shockwave admin stylesheet, since 2.9.0 (it was inline in
   templates/admin/_layout.php until then). Tokens first, then the shared
   components (Admin\Ui), then screen-specific rules in named sections that
   go as each screen moves onto the components. The spec's Admin chrome
   section and the /admin/ui reference page describe the rules; tests/run-ui.sh
   checks the tokens' contrast and that no screen grows raw markup. */
:root {
  /* Dark greys cannot separate by fill alone: the contrast formula is
     dominated by its own constant down here, so #0B0B0B against #141414 is
     1.07:1 and a card was invisible against the page it sat on. Structure
     comes from the EDGE and from spacing instead, and the rules below group
     by whitespace rather than by painting yet another almost-identical grey.
     --muted was #777, which is 3.51:1 on --surface-2 and fails the 4.5:1
     floor for body text. Every hint on every screen was under it.
     Two floors, both checked by run-ui.sh (Ui::PAIRS): text on its ground at
     4.5:1, and a non-text edge (a control's or a panel's border) at 3:1,
     WCAG 1.4.11. Until 2.9.0 every edge was under the second: an input's
     border was 1.82:1 against the panel it sat in, so boxes read as text
     floating on a slab. --edge is the one colour that draws a box; --edge-soft
     is for a divider that is allowed to be faint (a table row, a dashed
     group line), never for a control. --border and --border-strong stay as
     aliases for rules written before 2.9.0. */
  --bg:#0B0B0B; --surface:#1A1A1A; --surface-2:#262626;
  --edge:#747474; --edge-soft:#383838;
  --border:var(--edge-soft); --border-strong:var(--edge);
  --text:#EFEFEF; --muted:#8F8F8F; --pink:#F78FCA; --lime:#C5D86D; --error:#FF6B6B; --blue:#6EA8FF;
  --font:'Outfit',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  /* The field system (Ui::field): one control height and padding, and five
     widths matched to the value a field expects. */
  --control-pad:.55rem .75rem; --control-radius:4px;
  --w-xs:6rem; --w-s:10rem; --w-m:18rem; --w-l:32rem;
  /* The editor sidebar (2.9.0) and the bottom bar under it. */
  --header-h:56px; --sidebar-w:21rem; --edit-bar-h:3.5rem;
}
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
body { background:var(--bg); color:var(--text); font-family:var(--font); font-size:.9375rem; line-height:1.6; -webkit-font-smoothing:antialiased; }
a { color:var(--pink); text-decoration:none; } a:hover { opacity:.82; }
img { display:block; max-width:100%; height:auto; }
h1 { font-size:1.5rem; font-weight:800; letter-spacing:-.02em; }
h2 { font-size:1.1rem; font-weight:700; } h3 { font-size:.9375rem; font-weight:700; }
button { cursor:pointer; font:inherit; } input,select,textarea { font:inherit; }

/* Header / top nav */
.admin-header { display:flex; align-items:center; gap:2rem; height:56px; padding:0 1.5rem; background:var(--surface); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:50; }
.admin-logo { font-weight:900; font-size:1rem; color:var(--pink); }
.admin-logo .dot { color:var(--pink); }
.admin-nav { display:flex; gap:1.5rem; margin-right:auto; }
.admin-nav a { font-size:.875rem; font-weight:500; color:var(--muted); }
.admin-nav a:hover, .admin-nav a.is-active { color:var(--text); opacity:1; }
.admin-logout { font-size:.8125rem; color:var(--muted); background:none; border:0; }
.admin-logout:hover { color:var(--text); }
.admin-main { padding:2rem 0 4rem; }
.admin-container, .wrap--wide { max-width:1100px; margin-inline:auto; padding-inline:1.5rem; }

/* Centered narrow pages (login etc.) */
.wrap { max-width:400px; margin:0 auto; padding:7vh 1.25rem; }
.wrap.wrap--wide { max-width:1100px; padding:0 1.5rem; }

.admin-page-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap; }
h1 code, td code { font-family:ui-monospace,Menlo,monospace; font-size:.8em; color:var(--muted); }

/* Cards */
/* ---- Encapsulation ----------------------------------------------------
   A region is a box: its own ground, its own edge, its own padding. Not a
   horizontal rule. A rule is a line drawn through one region pretending to
   be two, which is why the first attempt at this read as cheap and did not
   actually separate anything.
   Depth comes from stacking grounds. Page is darkest, a panel sits on it, a
   subpanel sits on the panel. Three steps is the whole vocabulary; anything
   needing a fourth is nested too deep to follow. */
.card, .admin-card, .panel { background:var(--surface); border:1px solid var(--edge); border-radius:8px; padding:1.5rem 1.75rem; margin-bottom:1.5rem; }
.admin-card h3, .panel > h3, .panel-head h2 { margin:0 0 1.25rem; color:var(--text);
                 font-size:1rem; font-weight:700; letter-spacing:-.01em; text-transform:none; }

/* A region inside a region. One step lighter, so it reads as contained
   rather than adjacent. */
.subpanel { background:var(--surface-2); border:1px solid var(--edge); border-radius:6px; padding:1.15rem 1.25rem; margin-bottom:1rem; }
.subpanel:last-child { margin-bottom:0; }
.subpanel > h4, .subpanel > .subpanel-title { display:block; margin:0 0 .9rem; color:var(--text);
                 font-size:.875rem; font-weight:700; letter-spacing:0; text-transform:none; }
.subpanel-grid { display:grid; gap:1rem; }
@media (min-width:900px) { .subpanel-grid--3 { grid-template-columns:1fr 1fr 1.2fr; } }

/* Redirect categories. Only 'auto' is marked out, because only 'auto' means
   something the engine decided on its own; everything else is a person's own
   label and gets a neutral chip rather than a colour scheme nobody chose. */
.redirect-cat { display:inline-block; padding:.1rem .45rem; border-radius:3px; font-size:.75rem;
                border:1px solid var(--border); color:var(--muted); }
.redirect-cat--auto { border-color:var(--pink); color:var(--pink); }

/* A primary action looks like one. "Add", "New" and "Go" are the whole
   point of the screens they sit on and were rendering as small grey chips. */
.btn-primary, button.btn-primary { background:var(--pink); color:#111; border:0; font-weight:700;
    padding:.6rem 1.4rem; border-radius:4px; font-size:.9375rem; }
.btn-primary:hover { opacity:.9; }

.save-panel-row { display:flex; align-items:center; gap:1.25rem; flex-wrap:wrap; }
.save-panel-row .checkbox { margin:0; }

/* A fieldset is used here for its disabled-subtree behaviour, not for a
   border, and the browser default draws a 2px light groove that read as a
   stray white box around the font families. */
fieldset { border:0; padding:0; margin:0; min-width:0; }

/* Notices */
.msg, .admin-notice { padding:.75rem 1rem; font-size:.875rem; font-weight:500; margin-bottom:1.25rem; border-radius:3px; }
.msg--notice, .admin-notice--success { background:rgba(197,216,109,.1); border:1px solid var(--lime); color:var(--lime); }
.msg--warning, .admin-notice--warning { background:rgba(247,143,202,.08); border:1px solid var(--accent-pink, #F78FCA); color:var(--accent-pink, #F78FCA); }
.msg--warning em, .msg--warning strong { color:inherit; }
/* Consent is a checkbox beside its label, not a labelled input above one. */
.cms-form .field--consent { display:flex; align-items:flex-start; gap:.6rem; }
.cms-form .field--consent input { width:auto; margin:.2rem 0 0; flex:0 0 auto; }
.cms-form .field--consent span { font-weight:400; }
.msg--error, .admin-notice--error { background:rgba(255,107,107,.1); border:1px solid var(--error); color:var(--error); }
.msg--warn { background:rgba(247,143,202,.08); border:1px solid var(--pink); color:var(--pink); }
.msg ul { margin:.4rem 0 0 1.1rem; }

/* Forms. One control: the same ground, edge, padding, and radius for every
   text-like input, textarea, and select, so boxes are the same size wherever
   they sit (2.9.0). A screen's own rules may set a width, never a padding. */
label { display:block; font-size:.8125rem; font-weight:600; margin:.9rem 0 .35rem; }
input[type=text],input[type=email],input[type=password],input[type=number],input[type=date],input[type=url],input[type=time],input[type=datetime-local],input[type=search],textarea,select {
  width:100%; background:var(--bg); border:1px solid var(--edge); color:var(--text);
  padding:var(--control-pad); font-size:.9375rem; border-radius:var(--control-radius); appearance:none; min-height:2.5rem; }
select { background-image:linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:calc(100% - 1.1rem) 50%, calc(100% - .75rem) 50%; background-size:.35rem .35rem; background-repeat:no-repeat; padding-right:2rem; }
textarea { resize:vertical; min-height:80px; line-height:1.5; }
input:focus,textarea:focus,select:focus { outline:2px solid var(--pink); outline-offset:1px; border-color:var(--pink); }
input::placeholder, textarea::placeholder { color:var(--muted); opacity:1; }
label.inline { display:inline-flex; flex-direction:column; margin-right:1rem; }
/* A checklist of fields (Show for each entry, Listing shows): one row per
   field, box before its name, wrapping into columns. */
.binding-display { display:flex; flex-wrap:wrap; gap:.4rem 1.5rem; margin:.25rem 0 1rem; }
.binding-display label.inline { flex-direction:row; align-items:center; gap:.45rem; margin:0; white-space:nowrap; font-weight:400; }
.binding-display label.inline input[type="checkbox"] { width:auto; min-width:0; margin:0; }
/* min-width is a floor, not a preference: it wins over any width an author
   sets later and is how a field escapes its container. Capped so it can
   still shrink when there is genuinely no room. */
label.inline input, label.inline select { width:auto; min-width:min(8.5rem, 100%); max-width:100%; }
.checkbox { display:flex; align-items:center; gap:.5rem; font-size:.875rem; }
.checkbox input { width:16px; height:16px; accent-color:var(--pink); }
.hint, .admin-field-hint { font-size:.8125rem; color:var(--muted); font-weight:400; line-height:1.5; }

/* Buttons */
button, .btn-admin-primary { margin-top:1rem; padding:.55rem 1.2rem; background:var(--pink); color:#0B0B0B; font-weight:700; font-size:.875rem; border:none; border-radius:3px; }
button:hover { background:#f5a8d4; }
button.link { margin:0; padding:0; background:none; color:var(--muted); font-weight:600; }
button.link:hover { color:var(--text); }
.btn-secondary, .btn-admin-secondary { background:transparent; border:1px solid var(--edge); color:var(--text); }
.btn-secondary:hover { border-color:var(--text); background:transparent; }
.btn-small { margin:0; padding:.35rem .7rem; font-size:.8125rem; background:var(--surface-2); color:var(--text); border:1px solid var(--edge); border-radius:var(--control-radius); font-weight:600; }
.btn-small:hover { border-color:var(--text); background:var(--surface-2); }
.btn-small.btn-danger { color:var(--error); }
.btn-small--ghost { background:transparent; }
.admin-header-actions { display:inline-flex; gap:.5rem; align-items:center; }
.link-danger { background:none; border:0; color:var(--error); font-size:.8125rem; font-weight:600; margin:0; padding:0; }

/* Tables */
table.list, .admin-table { width:100%; border-collapse:collapse; font-size:.875rem; }
table.list th, .admin-table th { text-align:left; padding:.6rem .75rem; font-size:.8125rem; font-weight:700; letter-spacing:.02em; color:var(--muted); border-bottom:1px solid var(--edge); font-family:var(--font); }
table.list td, .admin-table td { padding:.7rem .75rem; border-bottom:1px solid var(--border); vertical-align:middle; }
table.list tr:hover td { background:var(--surface); }
.muted { color:var(--muted); }
.status-draft { color:var(--muted); }

/* Tabs */
.admin-tabs { display:flex; gap:0; margin-bottom:1.5rem; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.admin-tab { padding:.6rem 1.2rem; font-size:.875rem; font-weight:600; color:var(--muted); border:0; border-bottom:2px solid transparent; margin-bottom:-1px; background:none; border-radius:0; margin-top:0; }
.admin-tab:hover { color:var(--text); background:none; }
.admin-tab.is-active { color:var(--pink); border-bottom-color:var(--pink); background:none; }
.tab-panel { display:none; } .tab-panel.is-active { display:block; }
.admin-pager { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1.2rem; }
.admin-pager a.pager-link { font-weight:600; }
.admin-pager .pager-link.is-disabled { color:var(--muted); opacity:.4; }
.admin-pager .pager-status { font-size:.8rem; color:var(--muted); }
.settings-subtabs { display:flex; gap:.4rem; margin:0 0 1.4rem; flex-wrap:wrap; }
.settings-subtab { padding:.35rem .9rem; font-size:.8rem; font-weight:600; color:var(--muted); background:var(--surface-2); border:1px solid var(--border); border-radius:4px; margin:0; }
.settings-subtab:hover { color:var(--text); border-color:var(--text); background:var(--surface-2); }
.settings-subtab.is-active { color:var(--blue); border-color:var(--blue); background:none; }
a.settings-subtab { text-decoration:none; display:inline-block; }
.stack-preview { margin:.5rem 0 0; padding-left:1.25rem; }
.stack-preview li { padding:.3rem 0; border-bottom:1px solid var(--border); font-size:.875rem; }
.stack-preview li:last-child { border-bottom:0; }
.stack-preview .badge { display:inline-block; font-size:.8125rem; font-weight:700; letter-spacing:.02em; padding:.1rem .45rem; border-radius:3px; background:rgba(197,216,109,.15); color:var(--lime); margin:0 .35rem; }
.subtab-panel { display:none; } .subtab-panel.is-active { display:block; }

/* Settings grids */
.field-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem 1.5rem; }

/* Media */
.media-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:1.1rem; }
.media-card { background:var(--surface); border:1px solid var(--border); border-radius:4px; overflow:hidden; }
.media-thumb { aspect-ratio:16/9; background:var(--surface-2); }
.media-thumb img { width:100%; height:100%; object-fit:cover; }
.media-info { padding:.6rem; }
.media-name { font-size:.8125rem; color:var(--muted); word-break:break-all; }
.media-dims { font-size:.8125rem; color:var(--muted); }
.media-info form { margin:.4rem 0 0; } .media-info input { padding:.3rem .45rem; font-size:.8rem; }
.upload-form { display:flex; gap:1rem; align-items:center; flex-wrap:wrap; margin-top:.8rem; }
.upload-form input[type=file] { color:var(--muted); font-size:.85rem; background:none; border:0; padding:0; }
.upload-form button { margin-top:0; }

/* A dialog for a one-off task, such as the Google Maps setup (2.2.0). */
dialog.admin-dialog { max-width: 42rem; border: 1px solid #ccc; border-radius: 6px; padding: 1.5rem 1.75rem; }
dialog.admin-dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog.admin-dialog ol { padding-left: 1.25rem; }
dialog.admin-dialog li { margin-bottom: .5rem; }

/* Shared sections on a location page (2.3.0). */
.section-tag--shared { background: #eef3fb; color: #24497a; }
.section-card--shared.is-hidden-here { opacity: .6; }
.unshare-panel { border-left: 4px solid #b5651d; }

/* Media picker: a native dialog on the ui-dialog component (2.10.4), its files as buttons. */
dialog#media-picker { max-width:760px; width:calc(100% - 2rem); max-height:85vh; overflow:auto; }
.picker-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:.7rem; }
.picker-item { display:block; width:100%; margin:0; padding:0; font:inherit; text-align:left; border:1px solid var(--border); border-radius:4px; overflow:hidden; cursor:pointer; background:var(--surface-2); color:inherit; }
.picker-item:hover, .picker-item:focus-visible { border-color:var(--pink); outline:none; }
.picker-item img { width:100%; aspect-ratio:1; object-fit:cover; }
.picker-item span { display:block; font-size:.8125rem; color:var(--muted); padding:.3rem; word-break:break-all; }

/* Block editor (dark) */
h2 { margin:1.5rem 0 .6rem; }
.toolbar { display:flex; gap:.6rem; align-items:center; margin:.3rem 0 1rem; }
/* A block is a region too, and there can be a dozen on a page, so it has to
   be possible to see where one ends and the next begins at a glance. Its own
   ground, a real edge, and space between them rather than a hairline. */
/* The editor's tree, since 1.18.1. Sections are panels: a clear border,
   their own ground, and room between them. Blocks inside are lighter cards
   with a coloured left edge, so a section is never mistaken for a block.
   Both arrive closed; the header row is the toggle and the drag handle, and
   everything else sits behind its settings or more-actions icon. */
.section-card { background:var(--surface); border:1px solid var(--border-strong); border-radius:8px; margin:0 0 1.75rem; }
.section-card .section-card { margin:0 0 1rem; }
.section-card.dragging, .block-card.dragging { opacity:.45; }
/* A location page's locked section, since 2.1.0. */
.section-card--locked { border-style:dashed; background:var(--surface-2, var(--surface)); }
.section-card--locked .section-body { padding:.75rem 1rem 1rem; }
.section-card--locked .locked-blocks { margin:.4rem 0 0; padding-left:1.1rem; color:var(--muted); font-size:.875rem; }
.section-tag--locked { color:var(--text); border-color:var(--border-strong); }
.section-head { display:flex; align-items:center; gap:1rem; padding:.9rem 1.1rem; cursor:pointer; }
.section-head:focus-visible, .block-card > .block-head:focus-visible { outline:2px solid var(--pink); outline-offset:-2px; }
.section-name { flex:1; min-width:0; font-size:1.15rem; font-weight:700; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.section-name.is-unnamed { color:var(--muted); font-weight:600; }
.section-meta { display:flex; align-items:center; gap:.7rem; flex:none; color:var(--muted); font-size:.8rem; }
.section-tag, .block-arch { font-size:.8125rem; font-weight:700; letter-spacing:.02em; color:var(--muted); border:1px solid var(--edge); border-radius:20px; padding:.1rem .6rem; white-space:nowrap; }
.section-count { white-space:nowrap; }
.chevron { font-size:.75rem; color:var(--muted); transition:transform .12s; }
.collapsed > .section-head .chevron, .collapsed > .block-head .chevron { transform:rotate(-90deg); }
.icon-btn { margin:0; padding:.15rem .4rem; background:none; color:var(--muted); border:1px solid transparent; border-radius:3px; font-size:1rem; line-height:1; font-weight:400; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color:var(--text); border-color:var(--border); background:var(--surface-2); }
.menu-wrap { position:relative; display:inline-flex; }
.menu-pop { position:absolute; top:calc(100% + .3rem); right:0; z-index:20; display:flex; flex-direction:column; min-width:16rem; padding:.3rem; background:var(--surface-2); border:1px solid var(--border-strong); border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,.4); }
.menu-pop[hidden] { display:none; }
.menu-pop button { margin:0; padding:.45rem .7rem; background:none; color:var(--text); border:0; border-radius:3px; text-align:left; font-weight:400; font-size:.85rem; }
.menu-pop button:hover:not(:disabled), .menu-pop button:focus-visible { background:var(--surface); }
.menu-pop button:disabled { color:var(--muted); opacity:.5; cursor:default; }
.menu-pop button.is-danger { color:var(--error); }
.section-settings { border-top:1px solid var(--border); padding:1rem 1.1rem; font-size:.85rem; }
.section-settings[hidden] { display:none; }
.section-settings-row { display:grid; gap:.6rem 1rem; grid-template-columns:repeat(auto-fit, minmax(12rem, 1fr)); margin-bottom:.9rem; }
.section-settings label { margin:0; color:var(--muted); font-size:.8125rem; }
.section-settings label .hint { display:inline; margin:0; }
.section-bg .image-controls { display:flex; flex-wrap:wrap; gap:.4rem .8rem; align-items:center; }
.section-bg label.inline { display:flex; align-items:center; gap:.35rem; margin:0; }
.section-body { border-top:1px solid var(--border); padding:1rem 1.1rem 1.1rem; }
.collapsed > .section-body { display:none; }
.section-items { min-height:2.5rem; }
.section-items:empty::after { content:"Empty section: add a block, or drag one here."; display:block; padding:.6rem; color:var(--muted); font-size:.85rem; }
.section-foot { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin-top:1rem; }
.section-foot .add-block-picker--inline { flex-basis:100%; margin:.2rem 0 0; }
.section-foot button:disabled { opacity:.35; cursor:default; }
.add-section-bar { margin-top:1rem; }
.block-card { border:1px solid var(--edge); border-left:3px solid var(--pink); border-radius:6px; margin:0 0 .75rem; background:var(--surface-2); }
.section-items > .block-card:last-child { margin-bottom:0; }
.block-head { display:flex; align-items:center; gap:.5rem; padding:.7rem .9rem; background:var(--surface); }
.block-card > .block-head { background:transparent; gap:.75rem; padding:.6rem .8rem; cursor:pointer; }
.block-card.collapsed .block-body { display:none; }
.block-card:not(.collapsed) > .block-head { border-bottom:1px solid var(--border); }
.block-css[hidden] { display:none; }
.block-body { padding:1.15rem 1.25rem; }
/* Inside a block the fields are dense on purpose: a block is one thing being
   configured, not a page of forms. The defaults are tuned for a settings
   screen and left a lot of air in here. */
.block-body label { margin:.65rem 0 .25rem; }
.block-body .field-wrap { margin:0 0 .5rem; }
.block-body .field-wrap:last-child { margin-bottom:0; }
.block-body .field-group { margin:.75rem 0 0; padding-top:.75rem; }
.block-body .subfield { margin:.45rem 0; }
.block-body .group-label { margin:0 0 .35rem; }
.block-body .hint { margin-top:.2rem; }
.block-body .picker-grid, .block-body .field-grid { gap:.6rem 1rem; }
.block-flag { font-size:.8125rem; font-weight:700; letter-spacing:.02em; color:var(--pink); border:1px solid var(--pink); border-radius:20px; padding:.1rem .6rem; white-space:nowrap; }
.block-flag[hidden] { display:none; }
.block-note-field { display:block; margin:0 0 .6rem; }
.block-summary { flex:1; min-width:0; color:var(--muted); font-size:.85rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.spacer { flex:1; } .block-controls { display:flex; gap:1rem; flex-wrap:wrap; }
.field-group { border-top:1px dashed var(--border); margin-top:.9rem; padding-top:.7rem; }
.group-label { display:block; font-weight:700; color:var(--text); font-size:.8125rem; letter-spacing:.02em; text-transform:none; margin:.2rem 0 .5rem; }
.subfield { margin:.6rem 0; }
/* Entry field types since 2.1.0: opening hours, link lists, conditional fields. */
.hours-grid { border-collapse:collapse; }
.hours-grid th { text-align:left; font-weight:600; font-size:.875rem; padding:.25rem .75rem .25rem 0; white-space:nowrap; }
.hours-grid td { padding:.25rem .5rem .25rem 0; vertical-align:middle; }
.hours-grid .checkbox { margin:0; }
.hours-ranges { display:flex; flex-wrap:wrap; gap:.4rem .75rem; align-items:center; }
.hours-range { display:inline-flex; gap:.35rem; align-items:center; font-size:.875rem; }
.hours-range input { width:auto; }
.link-list-row { display:flex; flex-wrap:wrap; gap:.5rem; align-items:flex-end; margin-bottom:.4rem; }
.link-list-row label { flex:1 1 12rem; margin:0; }
/* Entries fields (2.8.0): the chosen entries as an ordered list of chips. */
.entry-chips-edit { list-style:none; margin:0 0 .5rem; padding:0; display:flex; flex-direction:column; gap:.3rem; }
.entry-chip-edit { display:flex; align-items:center; gap:.4rem; padding:.3rem .6rem; border:1px solid var(--border); border-radius:1em; background:var(--surface, #fff); font-size:.875rem; }
.entry-chip-title { flex:1; min-width:0; }
.entry-chip-edit .btn-small { margin:0; }
.entries-add select { width:auto; max-width:100%; }
/* Catalogue rows (2.4.0): variations, an option set's or a modifier list's
   options. A header row names the columns; inputs carry the same names as
   aria-labels. */
.price-row { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin-bottom:.4rem; }
.price-row > input[type=text] { flex:1 1 9rem; margin:0; min-width:0; }
.price-row > input.money-input, .money-input { flex:0 1 7rem; max-width:8rem; }
.price-row--head { margin-bottom:.15rem; font-size:.8125rem; color:var(--muted); }
.price-row-head { flex:1 1 9rem; }
.price-row-head--money, .price-row-head--check, .price-row-head--flag { flex:0 1 7rem; }
.price-row-static { flex:1 1 9rem; font-weight:600; }
.price-row-check { margin:0; white-space:nowrap; }
.money-field { display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:flex-end; }
.money-field .group-label { flex:1 1 100%; }
.field-cond[hidden] { display:none; }
.image-field { display:flex; gap:.75rem; align-items:flex-start; }
/* contain, not cover: a preview exists to show the whole mark, and a wide
   wordmark centre-cropped into a square shows the gap in the middle of the
   logo and reads as an empty box. */
.image-field .thumb { width:60px; height:60px; object-fit:contain; border:1px solid var(--border); border-radius:3px; background:var(--surface-2); flex:none; }
.image-field .image-controls { flex:1; }
.rich .ql-toolbar { background:var(--surface-2); border-color:var(--border); border-radius:3px 3px 0 0; }
.rich .ql-container { background:var(--bg); border-color:var(--border); min-height:160px; border-radius:0 0 3px 3px; font-family:var(--font); }
.rich .ql-editor { color:var(--text); } .rich .ql-stroke { stroke:var(--muted)!important; } .rich .ql-fill { fill:var(--muted)!important; } .rich .ql-picker-label { color:var(--muted)!important; }
.rich.mounted textarea { display:none; }
.list-row { border:1px solid var(--border); border-radius:3px; padding:.7rem; margin:.45rem 0; background:var(--surface-2); }
/* The list block's items, since 2.0.1: collapsible cards, fields in two
   columns (heading and icon, then the description across both, then image
   and button), every field's label on the same line and every control the
   width of its column. One column on a narrow screen. */
.list-field--compact .list-row { padding:0; background:var(--surface); }
.list-row-head { display:flex; align-items:center; gap:.6rem; padding:.5rem .75rem; cursor:pointer; }
.list-row-head:focus-visible { outline:2px solid var(--pink); outline-offset:-2px; }
.list-row:not(.collapsed) > .list-row-head { border-bottom:1px solid var(--border); }
.list-row.collapsed > .list-row-body { display:none; }
.list-row.collapsed > .list-row-head .chevron { transform:rotate(-90deg); }
.list-row-summary { flex:1; min-width:0; font-size:.85rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.list-row-summary.is-empty { color:var(--muted); font-style:italic; }
.list-row-body { padding:.75rem; }
.list-row-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:.75rem 1rem; align-items:start; }
.list-item-field--heading { order:1; } .list-item-field--icon { order:2; }
.list-item-field--description { order:3; grid-column:1 / -1; }
.list-item-field--image { order:4; } .list-item-field--cta { order:5; }
.block-body .list-row-grid .field-wrap { margin:0; }
.list-row-grid label, .list-row-grid .subfield > .group-label { display:block; font-size:.8125rem; font-weight:600; margin:0 0 .3rem; }
.list-row-grid .subfield { margin:0; }
.list-row-grid label.inline { display:flex; flex-direction:column; margin:0 0 .45rem; font-weight:400; }
.list-row-grid label.inline input, .list-row-grid label.inline select { width:100%; min-width:0; }
.list-row-grid textarea.inline-text { min-height:0; }
.list-row-grid .image-field .image-controls button { margin-top:0; }
.list-row-body > .add-element-row { margin:.75rem 0 0; }
.list-row-body > .js-remove-item { margin-top:.75rem; }
@media (max-width:640px) { .list-row-grid { grid-template-columns:minmax(0, 1fr); } }
.req { color:var(--error); }
.add-block { display:flex; gap:.5rem; align-items:center; margin:.5rem 0 1.5rem; } .add-block select { width:auto; }
.save-bar { display:flex; align-items:center; gap:1.2rem; border-top:1px solid var(--border); padding-top:1.1rem; } .save-bar button { margin:0; }

/* Media picker: the uploader row and its status line. */
.picker-head { display:flex; align-items:center; gap:1rem; margin:0 0 .75rem; }
.picker-upload { margin:0; cursor:pointer; }
.picker-status { margin:0 0 .75rem; font-size:.9rem; color:var(--muted); }
.picker-status.is-error { color:var(--error); }

/* Row actions: an inline form must not break the table cell's flow. */
.row-actions { display:flex; align-items:center; gap:.75rem; }
.row-actions form { margin:0; }
.btn-link { background:none; border:0; padding:0; margin:0; font:inherit;
  cursor:pointer; text-decoration:underline; }
.btn-link.btn-danger { color:#ff6b6b; }

/* Updates screen. */
.update-log { margin:.5rem 0 0; padding-left:1.1rem; list-style:disc; font-size:.9rem; line-height:1.7; }
/* pre-wrap was turning the template's own newlines into blank lines, which
   is where the large empty gaps in this box came from. The content is a
   list; it does not need whitespace preserved. */
.update-notes { margin:1rem 0 0; padding:1.15rem 1.25rem; background:var(--surface-2);
  border:1px solid var(--border); border-radius:6px; font-size:.9rem; }
.update-notes h4 { margin:0 0 .6rem; font-size:.875rem; font-weight:700; color:var(--text); }
.update-notes ul { margin:0; padding-left:1.1rem; line-height:1.7; }
.update-version { font-size:1.35rem; font-weight:700; margin:0 0 .35rem; letter-spacing:-.01em; }
.path-list { margin:.4rem 0 0; padding:0; list-style:none; font-size:.85rem; line-height:1.9; }
.path-list code { font-family:ui-monospace,monospace; }

/* Terms screen: one term per line, indented by depth. */
.term-list { display:flex; flex-direction:column; gap:.4rem; margin:.75rem 0; }
.term-row { display:flex; align-items:center; gap:.4rem; }
.term-row[data-depth="1"] { margin-left:1.75rem; }
.term-row[data-depth="2"] { margin-left:3.5rem; }
.term-row[data-depth="3"] { margin-left:5.25rem; }
.term-row[data-depth="4"] { margin-left:7rem; }
.term-form, .term-reassign { display:flex; align-items:center; gap:.4rem; margin:0; }
.term-form { flex:1 1 auto; padding:.35rem .5rem; background:var(--bg);
  border:1px solid var(--border); border-radius:3px; }
.term-row input[type=text], .term-row input[type=number], .term-row select {
  margin:0; padding:.4rem .55rem; font-size:.9rem; min-width:0; }
.term-row .term-label  { flex:2 1 0; }
.term-row .term-slug   { flex:2 1 0; font-family:ui-monospace,monospace; font-size:.85rem; }
.term-row .term-desc   { flex:4 1 0; }
.term-row .term-parent { flex:0 0 11rem; }
.term-row .term-order  { flex:0 0 4.5rem; }
.term-row .term-count  { flex:0 0 auto; min-width:2rem; text-align:center;
  font-size:.8rem; color:var(--text-muted, #888); }
.term-row button { margin:0; flex:0 0 auto; }
.term-row--new { margin-top:.75rem; padding:.35rem .5rem; background:var(--bg);
  border:1px dashed var(--border); border-radius:3px; }
.btn-danger { color:#ff6b6b; border-color:#ff6b6b; }
@media (max-width: 900px) {
  .term-form { flex-wrap:wrap; }
  .term-row .term-label, .term-row .term-slug { flex:1 1 100%; }
}

/* Form builder: one field is one line. Same rule as the menu editor, and
   the reason both existed unstyled is that neither shipped with its CSS. */
.field-row { display:flex; align-items:center; gap:.4rem; padding:.35rem .5rem; margin-bottom:.4rem;
  background:var(--bg); border:1px solid var(--border); border-radius:3px; }
.field-row input[type=text], .field-row select { margin:0; padding:.4rem .55rem; font-size:.9rem; min-width:0; }
.field-row > input[type=text]:first-child { flex:3 1 0; }
.field-row .key-input  { flex:2 1 0; }
.field-row .type-input { flex:0 0 8.5rem; }
.field-row .opts-input { flex:3 1 0; }
.field-row .inline-req { flex:0 0 auto; display:flex; align-items:center; gap:.3rem;
  margin:0; white-space:nowrap; font-size:.85rem; }
.field-row .inline-req input { width:auto; margin:0; flex:0 0 auto; }
.field-row .js-row-remove { flex:0 0 auto; margin:0; padding:.3rem .5rem; line-height:1; }
/* Reordering. The pair keeps a fixed width whether or not either button is
   disabled, so controls never shift under the pointer as rows are moved. */
.field-row .row-move { flex:0 0 auto; display:flex; gap:.2rem; }
.field-row .row-move button { margin:0; padding:.3rem .45rem; line-height:1; }
.field-row .row-move button:disabled { opacity:.3; cursor:default; }
/* Options only mean anything for the choice type; the JS dims it otherwise. */
.field-row .opts-input[style*="opacity"] { transition:opacity .15s ease; }
@media (max-width: 900px) {
  .field-row { flex-wrap:wrap; }
  .field-row > input[type=text]:first-child, .field-row .key-input,
  .field-row .opts-input { flex:1 1 100%; }
}

/* Header & Footer (2.10.5): a region panel's actions on one line, and a menu
   item set under the one above it drawn indented, so the tree reads at a
   glance (the Level select says which it is; the screen's script keeps the
   class in step). */
.ui-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; margin:.75rem 0 0; }
.ui-actions form { margin:0; }
.ui-repeater-row.is-sub { margin-left:2rem; border-left:3px solid var(--pink); }
.meta { color:var(--muted); font-size:.9rem; margin-top:1rem; }

.action-col { min-width:0; background:var(--surface-2); border:1px solid var(--edge);
              border-radius:6px; padding:1.15rem 1.25rem; }
.action-col .group-label { margin:0 0 .9rem; }
.action-col label { margin:.5rem 0 .3rem; }
.action-col label:first-of-type { margin-top:0; }
.action-col--publish { display:flex; flex-direction:column; }
.btn-go { margin-top:1.1rem; align-self:flex-start; padding:.6rem 1.6rem; font-size:.9375rem; }
/* The featured image, last in the working column (2.9.0): FieldRenderer's
   image field with its own label, as a panel of its own in the page editor
   and a field group at the foot of the entry editor's card. */
.panel--image .subfield { margin:0; }
.editor-image .subfield { margin:0; }


/* Responsive. There was one breakpoint in the whole admin, on the action
   bar, so every two-column grid and every wide table kept its desktop shape
   on a phone and pushed the page sideways. Nothing here changes the desktop
   layout. */
@media (max-width:760px) {
  .admin-container, .wrap--wide, .wrap.wrap--wide { padding-inline:1rem; }
  .card, .admin-card { padding:1.25rem 1.1rem; }
  .field-grid { grid-template-columns:1fr; }
  .admin-header { gap:1rem; padding:0 1rem; overflow-x:auto; }
  .admin-nav { gap:1rem; }
  .admin-tabs, .settings-subtabs { overflow-x:auto; }
}
/* A wide table scrolls inside its own box rather than widening the page. */
.table-scroll, .admin-card > table.list, .card > table.list { display:block; max-width:100%; overflow-x:auto; }
.admin-card > table.list, .card > table.list { white-space:nowrap; }

/* The content box (title, excerpt, body) is the primary work area, so it
   gets more room to breathe than a standard card. */
.card--content { padding:2rem 2.25rem; }
.card--content > label:first-child { margin-top:0; }
.card--content #entry-title { font-size:1.15rem; font-weight:700; padding:.7rem .85rem; }
/* The content card is where a post is actually written, so its rich text
   and plain textareas get real room rather than a peek-hole. Scales with the
   viewport, with a floor for short screens and a ceiling so the action box
   does not vanish above the fold on a large one. */
.card--content .rich .ql-container { min-height:clamp(360px, 52vh, 720px); }
.card--content textarea { min-height:clamp(200px, 28vh, 420px); }

/* Progressive disclosure: collapsed optional fields and their add chips. */
.field-wrap.is-collapsed { display:none; }
.add-element-row { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; margin:.7rem 0 .2rem; }
.add-element-row .add-lead { font-size:.8125rem; letter-spacing:.02em; color:var(--muted); margin-inline-end:.15rem; }
.add-chip { font-size:.8125rem; padding:.25em .75em; border:1px dashed var(--edge); border-radius:1em; background:transparent; color:var(--text); cursor:pointer; line-height:1.4; }
.add-chip:hover { border-style:solid; border-color:var(--accent, #1a1a1a); }
.add-chip[hidden], .add-element-row[hidden] { display:none; }
/* Reversing the chip: a revealed optional field can be put back. The control
   is quiet until the field is hovered or the control itself is focused, so it
   never competes with the field's own label. */
.field-wrap[data-optional="1"] { position:relative; padding-inline-end:1.4rem; }
.remove-element { position:absolute; inset-block-start:0; inset-inline-end:0; inline-size:1.15rem; block-size:1.15rem; padding:0; display:flex; align-items:center; justify-content:center; border:0; border-radius:50%; background:transparent; color:var(--muted); font-size:.95rem; line-height:1; cursor:pointer; opacity:0; transition:opacity .12s, color .12s, background .12s; }
.field-wrap[data-optional="1"]:hover .remove-element, .remove-element:focus-visible { opacity:1; }
.remove-element:hover { color:var(--fg); background:var(--surface-2); }
/* Blocks panel: a bordered workspace so blocks read as a distinct zone. */
.blocks-panel { border:1px solid var(--edge); border-radius:6px; background:var(--surface-2); padding:1rem; margin:1.5rem 0; }
.blocks-panel-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.2rem; }
.blocks-panel-head h2 { margin:0; font-size:1.05rem; }
.blocks-panel-head .toolbar { display:flex; gap:.4rem; }
.blocks-hint { margin:.1rem 0 .9rem; }
.blocks-panel .block-card { background:var(--surface-2); }
.blocks-panel .add-block { display:block; margin:.6rem 0 0; }
/* Add-a-block: an unmistakable dashed add affordance. */
/* Branding, Typography: the styles each Google family downloads (1.19.0). */
.font-styles-title { margin:1.25rem 0 .3rem; }
.font-styles { border:1px solid var(--border); border-radius:6px; padding:.8rem 1rem; margin:0 0 1rem; }
.font-styles legend { font-weight:700; padding:0 .3rem; }
.font-styles .font-status { margin:.1rem 0 .5rem; }
.font-style-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(12rem, 1fr)); gap:.2rem 1rem; }
.font-notices { margin:0; padding-left:1.1rem; }
/* Uploaded fonts (2.5.0): the families on the site, and a row per file to upload. */
.font-faces { margin:.2rem 0 0; padding-left:1.1rem; }
.font-upload-rows { display:grid; gap:.6rem; margin:.4rem 0 .8rem; }
.font-upload-row { display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap:.4rem 1rem; align-items:end; }
.font-upload-row label { display:block; }
@media (max-width: 640px) { .font-upload-row { grid-template-columns:1fr; } }
/* Reviews add-on (1.20.0): the picking list. */
.review-picker { list-style:none; margin:0 0 1rem; padding:0; display:grid; gap:.6rem; }
.review-pick { border:1px solid var(--border); border-radius:6px; padding:.7rem .9rem; background:var(--surface-2); }
.review-pick.is-shown { border-left:3px solid var(--pink); }
.review-pick-head { display:flex; flex-wrap:wrap; gap:.4rem 1rem; align-items:center; }
.review-pick-choice { margin-left:auto; display:flex; gap:.8rem; }
.review-pick-choice .checkbox { margin:0; }
.review-pick-text { margin:.5rem 0 0; white-space:pre-line; }
.add-block-picker { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.add-block-picker select { width:auto; }
.add-block-picker--inline { margin:.6rem .2rem 0; padding:.5rem .6rem; border:1px solid var(--border); border-radius:6px; background:var(--surface); }
/* Settings box (SEO etc.): a titled configuration box below the working area. */
.settings-box { border:1px solid var(--edge); border-radius:6px; background:var(--surface); margin:1.25rem 0; overflow:hidden; }
.settings-box > .block-head { background:var(--surface-2); }
.settings-box > .block-body { padding:.85rem; }

/* ==== Shared components (Admin\Ui), since 2.9.0 ==========================
   Every rule here is what the /admin/ui reference page shows. A screen that
   has moved onto the components uses these and nothing above in its named
   section; the ratchet in tests/run-ui.sh keeps it that way. */

/* Field: label, control, hint, and error in one unit, the width matched to
   the value (xs, s, m, l, full). A select sizes to its longest option. */
.ui-field { display:block; margin:0 0 1rem; min-width:0; }
.ui-field > .ui-label { display:block; font-size:.8125rem; font-weight:600; margin:0 0 .35rem; }
.ui-field > .ui-label .ui-req { color:var(--muted); font-weight:400; }
.ui-field > .ui-hint, .ui-field > .ui-error { display:block; margin:.35rem 0 0; font-size:.8125rem; line-height:1.5; }
.ui-field > .ui-hint { color:var(--muted); }
.ui-field > .ui-error { color:var(--error); }
.ui-field.has-error > input, .ui-field.has-error > select, .ui-field.has-error > textarea { border-color:var(--error); }
.ui-field.w-xs > input, .ui-field.w-xs > select { width:var(--w-xs); max-width:100%; }
.ui-field.w-s > input, .ui-field.w-s > select { width:var(--w-s); max-width:100%; }
.ui-field.w-m > input, .ui-field.w-m > select { width:var(--w-m); max-width:100%; }
.ui-field.w-l > input, .ui-field.w-l > select { width:var(--w-l); max-width:100%; }
.ui-field.w-full > input, .ui-field.w-full > select, .ui-field.w-full > textarea { width:100%; }
.ui-field > select { width:auto; max-width:100%; }
/* Inside a block the fields are dense (see .block-body above), and a list
   item's columns are filled by their controls. */
.block-body .ui-field { margin:0 0 .6rem; }
.block-body .ui-field:last-child { margin-bottom:0; }
.list-row-grid .ui-field { margin:0; }
.list-row-grid .ui-field > input, .list-row-grid .ui-field > select { width:100%; }
.action-col label.ui-check { margin:0 0 .4rem; }
.action-col label.ui-label { margin:0 0 .35rem; }
/* Row: related fields share a line and wrap when there is no room. */
.ui-row { display:flex; flex-wrap:wrap; gap:0 1.25rem; align-items:flex-start; }
.ui-row > .ui-field { flex:0 1 auto; }
.ui-row > .ui-field.w-full { flex:1 1 100%; }
.ui-row > .field-cond { flex:0 1 auto; } /* a conditional field (show_if) on a row keeps its width */
.ui-row > label { flex:0 1 auto; margin:0 0 1rem; } /* a choice not yet on Ui::select sits on the row too */
/* Checkbox and radio rows. */
.ui-check { display:flex; align-items:flex-start; gap:.55rem; font-size:.9375rem; font-weight:400; margin:0 0 .6rem; cursor:pointer; }
.ui-check > input { width:1.05rem; height:1.05rem; min-height:0; margin:.2rem 0 0; accent-color:var(--pink); flex:none; }
.ui-check > .ui-hint { display:block; color:var(--muted); font-size:.8125rem; }
/* What a toggle controls (Ui::checkbox controls): indented beneath it, dimmed and disabled while it is off. */
.ui-dependant { margin:0 0 .6rem 1.6rem; }
.ui-dependant.is-off { opacity:.55; }
/* A colour (Ui::field type color, a repeater's color column): the swatch beside the hex box. */
.ui-colour { display:inline-flex; align-items:center; gap:.5rem; max-width:100%; }
.ui-colour > input[type=color] { width:2.6rem; height:2.2rem; min-height:0; padding:2px; margin:0; background:var(--bg); border:1px solid var(--edge); border-radius:var(--control-radius); flex:none; cursor:pointer; }
.ui-colour > input[type=text] { width:var(--w-s); margin:0; font-family:ui-monospace,monospace; }
.ui-repeater-row > .ui-colour > input[type=text] { width:100%; min-width:0; }
.ui-repeater-row > output { font-family:ui-monospace,monospace; font-size:.8125rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* Fields in a table's cells (a fixed grid such as the type levels): the column heading names them. */
.ui-table td > .ui-field { margin:0; }
.ui-table td > .ui-field > input, .ui-table td > .ui-field > select { margin:0; }
.ui-radios { border:0; padding:0; margin:0 0 1rem; min-width:0; }
.ui-radios > legend { font-size:.8125rem; font-weight:600; margin:0 0 .45rem; padding:0; }
/* Panel and subpanel: the only grouping surfaces, each with a real heading. */
.ui-panel { background:var(--surface); border:1px solid var(--edge); border-radius:8px; padding:1.5rem 1.75rem; margin:0 0 1.5rem; }
.ui-panel > .ui-panel-title { margin:0 0 1.25rem; font-size:1rem; font-weight:700; letter-spacing:-.01em; }
.ui-subpanel { background:var(--surface-2); border:1px solid var(--edge); border-radius:6px; padding:1.15rem 1.25rem; margin:0 0 1rem; }
.ui-subpanel:last-child { margin-bottom:0; }
.ui-subpanel > .ui-subpanel-title { margin:0 0 .9rem; font-size:.875rem; font-weight:700; }
.ui-fieldset { border:0; padding:0; margin:0 0 1rem; min-width:0; }
.ui-fieldset > legend { font-size:.8125rem; font-weight:700; padding:0; margin:0 0 .6rem; }
/* Advanced: a native disclosure, last in its panel, open when it holds a value. */
details.ui-advanced { border-top:1px solid var(--edge-soft); margin-top:1rem; padding-top:.75rem; }
details.ui-advanced > summary { cursor:pointer; font-size:.875rem; font-weight:600; color:var(--muted); list-style:none; }
details.ui-advanced > summary::before { content:'\25B8'; display:inline-block; width:1.1rem; transition:transform .12s; }
details.ui-advanced[open] > summary::before { transform:rotate(90deg); }
details.ui-advanced > summary::-webkit-details-marker { display:none; }
details.ui-advanced > .ui-advanced-body { padding-top:.75rem; }
/* Save result: one message area, its state from what the handler did. */
.notice { padding:.8rem 1rem; font-size:.875rem; font-weight:500; margin:0 0 1.25rem; border-radius:4px; border:1px solid; }
.notice--success { background:rgba(197,216,109,.1); border-color:var(--lime); color:var(--lime); }
.notice--warning { background:rgba(247,143,202,.08); border-color:var(--pink); color:var(--pink); }
.notice--error { background:rgba(255,107,107,.1); border-color:var(--error); color:var(--error); }
.notice--neutral { background:var(--surface-2); border-color:var(--edge); color:var(--text); }
.notice ul { margin:.4rem 0 0 1.1rem; }
.notice strong { color:inherit; }
/* Buttons: primary, secondary, danger, link; one class each. */
.ui-btn { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; margin:0; padding:.55rem 1.2rem; min-height:2.5rem; font-size:.9375rem; font-weight:700; border-radius:var(--control-radius); border:1px solid transparent; cursor:pointer; }
.ui-btn--primary { background:var(--pink); color:#111; }
.ui-btn--primary:hover { background:#f5a8d4; }
.ui-btn--secondary { background:transparent; border-color:var(--edge); color:var(--text); }
.ui-btn--secondary:hover { border-color:var(--text); background:transparent; }
.ui-btn--danger { background:transparent; border-color:var(--error); color:var(--error); }
.ui-btn--danger:hover { background:rgba(255,107,107,.1); }
.ui-btn--link { background:none; border:0; padding:0; min-height:0; color:var(--pink); font-weight:600; }
.ui-btn:disabled { opacity:.5; cursor:default; }
/* Page header: the back link above, the h1 and the primary action on one line. */
.ui-page-header { margin:0 0 1.5rem; }
.ui-page-header .ui-back { display:block; font-size:.875rem; color:var(--muted); margin:0 0 .35rem; }
.ui-page-header .ui-page-header-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; }
.ui-page-header h1 { margin:0; }
/* Image: a thumbnail, Choose from library, Clear, and alt text. */
.ui-image { display:flex; gap:.75rem; align-items:flex-start; }
.ui-image > .ui-image-thumb { width:60px; height:60px; object-fit:contain; border:1px solid var(--edge); border-radius:var(--control-radius); background:var(--surface-2); flex:none; }
.ui-image > .ui-image-controls { flex:1; min-width:0; }
.ui-image .ui-image-actions { display:flex; gap:.5rem; margin-top:.4rem; }
/* Repeater: real column headers, one grid for the header and every row. */
.ui-repeater { margin:0 0 1rem; }
.ui-repeater-head, .ui-repeater-row { display:grid; gap:.5rem; align-items:center; grid-template-columns:var(--repeater-cols, 1fr auto); }
.ui-repeater-head { font-size:.8125rem; color:var(--muted); font-weight:600; padding:0 0 .35rem; }
.ui-repeater-row { padding:.45rem .5rem; margin:0 0 .4rem; background:var(--bg); border:1px solid var(--edge); border-radius:var(--control-radius); }
.ui-repeater-row > input, .ui-repeater-row > select { margin:0; min-width:0; }
.ui-repeater-row > .ui-check { margin:0; font-size:.875rem; }
.ui-repeater-row > .ui-check > span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); } /* the column header names it; the aria-label names the row */
.ui-repeater-row > input.is-idle { opacity:.45; } /* a column the row's type leaves alone */
.ui-repeater-actions { display:flex; gap:.25rem; }
.ui-repeater-empty { color:var(--muted); font-size:.875rem; padding:.5rem 0; }
@media (max-width:760px) {
  .ui-repeater-head { display:none; }
  .ui-repeater-row { grid-template-columns:1fr; }
}
/* Dialog: native, labelled by its heading. */
dialog.ui-dialog { max-width:40rem; background:var(--surface); color:var(--text); border:1px solid var(--edge); border-radius:8px; padding:1.5rem 1.75rem; }
dialog.ui-dialog::backdrop { background:rgba(0,0,0,.6); }
dialog.ui-dialog > h2 { margin:0 0 1rem; }
dialog.ui-dialog ol { padding-left:1.25rem; }
dialog.ui-dialog li { margin-bottom:.5rem; }
/* The Google Maps setup dialog's test map: a point until the test grows it (2.10.2). */
.maps-test-box { width:1px; height:1px; overflow:hidden; }
/* Tabs as links: the current one carries aria-current. */
.ui-tabs { display:flex; gap:0; margin:0 0 1.5rem; border-bottom:1px solid var(--edge-soft); flex-wrap:wrap; }
.ui-tabs > a { padding:.6rem 1.2rem; font-size:.875rem; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-1px; }
.ui-tabs > a:hover { color:var(--text); opacity:1; }
.ui-tabs > a[aria-current] { color:var(--pink); border-bottom-color:var(--pink); }
/* List table. */
table.ui-table { width:100%; border-collapse:collapse; font-size:.875rem; }
table.ui-table th { text-align:left; padding:.6rem .75rem; font-size:.8125rem; font-weight:700; color:var(--muted); border-bottom:1px solid var(--edge); }
table.ui-table td { padding:.7rem .75rem; border-bottom:1px solid var(--edge-soft); vertical-align:middle; }
table.ui-table .ui-table-empty { color:var(--muted); }
/* A button in a row is compact (2.10.1), and a row's action forms sit inline. */
table.ui-table .ui-btn { padding:.3rem .8rem; min-height:0; font-size:.8125rem; }
table.ui-table .row-actions form { margin:0; }
.ui-pill { display:inline-block; font-size:.8125rem; font-weight:600; padding:.1rem .6rem; border-radius:20px; border:1px solid var(--edge); color:var(--muted); }
.ui-pill--live { color:var(--lime); border-color:var(--lime); }
.ui-pill--scheduled { color:var(--blue); border-color:var(--blue); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ==== The editor: a working column and a sticky sidebar (2.9.0) ==========
   The spec's three zones stand: the action box commits and locates, the
   working area is the content, the settings boxes configure. At 1100px and
   up the action box (Publish alone) is a column on the right that stays in
   view and scrolls within itself when it is taller than the viewport; below,
   it stacks above the content, and the edit bar at the foot of the screen
   carries the state, one Go, and the link. The record's details are a row
   under the title and the featured image is last in the working column. */
.editor { display:grid; grid-template-columns:minmax(0, 1fr); gap:0 2rem; align-items:start; }
.editor-main { min-width:0; order:0; }
/* Under 1100px the sidebar is no box of its own: its column becomes a grid
   item before the content. */
.editor-side { display:contents; }
.editor-side > .action-col { order:-1; margin:0 0 1.5rem; }
.editor-side .action-col .group-label { margin:0 0 .9rem; }
/* Publish: state, date, Go, then the link to what the state produces. */
.action-col--publish .btn-go { margin-top:1rem; align-self:stretch; }
.action-col--publish .ui-check { margin-bottom:.4rem; }
.action-col--publish .js-schedule-at { margin:.5rem 0 0; }
.action-link { display:block; margin:.9rem 0 0; font-size:.9375rem; font-weight:600; }
.action-link .hint { display:block; font-weight:400; }
/* The details row under the title: identity as short fields side by side,
   the taxonomy fieldsets on a row of their own beneath. */
.editor-details { margin-top:.25rem; }
.editor-details .ui-row > .ui-field { margin-bottom:.75rem; }
.editor-details .ui-row > .ui-fieldset { flex:0 1 auto; margin:0 0 .5rem; }
.editor-details .ui-fieldset > .ui-check { margin:0 0 .35rem; }
.card--content .editor-details { margin:.25rem 0 1.25rem; }
.card--content .editor-details .ui-field > input, .card--content .editor-details .ui-field > select { font-size:.9375rem; }
/* The edit bar under 1100px. */
.edit-bar { position:fixed; left:0; right:0; bottom:0; z-index:40; display:flex; align-items:center; gap:1rem; min-height:var(--edit-bar-h); padding:.5rem 1rem calc(.5rem + env(safe-area-inset-bottom)); background:var(--surface); border-top:1px solid var(--edge); }
.edit-bar .edit-bar-state { font-size:.875rem; color:var(--muted); }
.edit-bar .edit-bar-state strong { color:var(--text); }
.edit-bar .action-link { margin:0; font-size:.875rem; }
.edit-bar .spacer { flex:1; }
.edit-bar .btn-go { margin:0; padding:.5rem 1.4rem; }
.edit-bar[hidden] { display:none; }
.has-edit-bar { padding-bottom:calc(var(--edit-bar-h) + 1.5rem + env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: no-preference) { .edit-bar { transition:transform .15s; } .edit-bar.is-away { transform:translateY(110%); } }
@media (prefers-reduced-motion: reduce) { .edit-bar.is-away { display:none; } }
@media (min-width:1100px) {
  .editor { grid-template-columns:minmax(0, 1fr) var(--sidebar-w); }
  .editor-side { display:block; min-width:0; position:sticky; top:calc(var(--header-h) + 1rem); max-height:calc(100vh - var(--header-h) - 1.5rem); overflow-y:auto; overscroll-behavior:contain; padding-right:.1rem; }
  .editor-side > .action-col { margin:0; }
  .edit-bar { display:none; }
  .has-edit-bar { padding-bottom:0; }
}
/* The wide page editor and entry editor take the sidebar's width in stride. */
.wrap--editor { max-width:1400px; }

/* ==== The reference page (/admin/ui, staff only) ========================= */
.ui-ref-nav { display:flex; flex-wrap:wrap; gap:.4rem 1rem; margin:0 0 1.5rem; font-size:.875rem; }
.ui-ref-sample { margin:0 0 1.5rem; }
.ui-ref-sample > .ui-ref-call { display:block; font-family:ui-monospace,Menlo,monospace; font-size:.8125rem; color:var(--muted); margin:0 0 .5rem; white-space:pre-wrap; }
.ui-ref-tokens { display:grid; gap:.5rem; grid-template-columns:repeat(auto-fill, minmax(14rem, 1fr)); }
.ui-ref-token { padding:.75rem 1rem; border-radius:var(--control-radius); border:1px solid var(--edge); font-size:.875rem; }
.ui-ref-token code { font-family:ui-monospace,Menlo,monospace; font-size:.8125rem; }
.ui-ref-token.is-fail { outline:2px solid var(--error); }
