/* The admin's stylesheet: Material You — a tonal palette generated from
 * Ghost's brand pink (#FF1A75), light + dark schemes, and M3 component
 * styles.
 *
 * Served from the binary by `admin_asset`, cached `immutable` behind a
 * content hash in the query string (see `admin_css_hash`), and linked from
 * the page shell in `lib.rs`. It was inlined into every page until
 * 2026-11-13; at 130 KB that was the largest part of most admin responses.
 *
 * Layout is the shared chrome — .shell, .card, .rows .row, .field, .chip,
 * .btn, .ic/.tint-*. A module's own rules go in one block at the end of its
 * section, opened by a comment naming the module and using a class prefix
 * nobody else uses. Never edit a shared rule to suit one module.
 * See docs/module-pattern.md.
 */
/* Serve Bengali glyphs even when the browser has no Bengali system font. */
@font-face {
  font-family: 'Noto Sans Bengali';
  src: url('./noto-sans-bengali-v33.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0980-09FF, U+200C-200D;
}

:root {
  color-scheme: light;
  --primary: #984059; --on-primary: #fff;
  --primary-container: #FFD9E0; --on-primary-container: #3E071D;
  --secondary-container: #FADDE1; --on-secondary-container: #2B151A;
  --tertiary-container: #FBDEA7; --on-tertiary-container: #291800;
  --error: #BA1A1A; --error-container: #FFDAD6; --on-error-container: #410002;
  --surface: #FFF8F8; --on-surface: #201A1B; --on-surface-variant: #514347;
  --sc-lowest: #FFFFFF; --sc-low: #FAEFF1; --sc: #F4EAEC; --sc-high: #EFDFE3; --sc-highest: #E9DBDF;
  /* The outline is a tint of its own variant rather than M3's solid grey, so
     a border picks up whatever it is drawn over — the glass panels, the
     tonal fields — instead of laying a neutral line across them. (Declared
     after the variant only to read in order: custom properties resolve at
     computed-value time, so the order inside the block does not matter.) */
  --outline-variant: #D7C3C7;
  --outline: color-mix(in srgb, var(--outline-variant) 58%, transparent);
  --inverse-surface: #352F30; --inverse-on-surface: #F9EDEF;
  --blue-bg: #D8E2FF; --blue-fg: #001A41;
  --green-bg: #C4EED0; --green-fg: #0C3D24;
  --amber-bg: #FFDF9E; --amber-fg: #483000;
  --purple-bg: #EADDFF; --purple-fg: #21005D;
  --pink-bg: #FFD9E0; --pink-fg: #3E071D;
  --teal-bg: #BEE9F2; --teal-fg: #0A495B;
  --red-bg: #FFDAD6; --red-fg: #410002;
  --slate-bg: #E0E2EC; --slate-fg: #1B1C22;
  --font: 'Noto Sans Bengali', 'Outfit', 'Google Sans', 'Product Sans', system-ui, -apple-system, sans-serif;
  /* Editorial serif for headlines. Fraunces is a variable face with an
     optical-size axis, so a 15px card title and a 30px hero title are drawn
     with different contrast rather than the same outline scaled. */
  --display: 'Noto Sans Bengali', 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --mono: 'Noto Sans Bengali', 'Roboto Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.2,0,0,1);
  --dur: .18s;
  --shadow-1: 0 1px 2px rgba(0,0,0,.08), 0 1px 3px 1px rgba(0,0,0,.04);
  --shadow-2: 0 1px 2px rgba(0,0,0,.1), 0 2px 6px 2px rgba(0,0,0,.05);
  /* ---- glass ----
     Material 3 says what a surface *means* (tonal elevation); these say what
     it is made of. A glass surface is a translucent tint, a blur that
     saturates what shows through it, a hairline edge, and a specular highlight
     along its top — Apple's material, drawn in this palette rather than in
     grey, so the pink the admin is built from keeps coming through it.
     Used by the rail and the dashboard; everything else still takes the solid
     `--sc-*` surfaces. */
  --glass: color-mix(in srgb, #fff 62%, transparent);
  --glass-strong: color-mix(in srgb, #fff 80%, transparent);
  --glass-film: color-mix(in srgb, #fff 55%, transparent);
  --glass-stroke: color-mix(in srgb, var(--outline-variant) 58%, transparent);
  /* Hover and press on glass. NOT `--glass-film`: a white film over a pane
     that is already 80% white is invisible, which is exactly what happened to
     every hover state in the rail. What reads on light glass is a tint of the
     palette's own colour; what reads on dark glass is the white film. One
     pair of names, so a control does not have to know which it is on. */
  --glass-hover: color-mix(in srgb, var(--primary) 13%, transparent);
  --glass-press: color-mix(in srgb, var(--primary) 20%, transparent);
  /* Hover on something that is NOT a target (a plain row whose only
     controls are its buttons). Barely there: enough to track the pointer
     along a list, never enough to read as "this whole row is clickable". */
  --hover-quiet: color-mix(in srgb, var(--primary) 4%, transparent);
  /* What a pane of glass resolves to once it is composited, as a solid
     colour. A floating label punches a notch in its field's outline by
     painting over it, so the notch has to be the colour of what is behind
     the field — and on glass that is neither `--sc-lowest` nor `--surface`.
     Getting it wrong is invisible in light mode and a dark sticker behind
     every label in dark mode. */
  --notch: color-mix(in srgb, #fff 62%, var(--sc-low));
  --glass-edge: rgba(255,255,255,.85);
  --glass-blur: saturate(185%) blur(22px);
  --glass-shadow: 0 1px 1px rgba(62,7,29,.04), 0 10px 30px -14px rgba(62,7,29,.22);
  --glass-shadow-lift: 0 1px 1px rgba(62,7,29,.05), 0 18px 42px -16px rgba(62,7,29,.28);
}
/* The dark scheme rides a class on <html> rather than the OS media query, so
   the Appearance switcher can force it — `system` is the media query resolved
   into the same class by the head script before first paint. */
html.dark {
  color-scheme: dark;
  --primary: #FFB1C8; --on-primary: #5E1133;
  --primary-container: #7B294B; --on-primary-container: #FFD9E0;
  --secondary-container: #5B4149; --on-secondary-container: #FFD9DE;
  --tertiary-container: #6B5300; --on-tertiary-container: #FFE396;
  --error: #FFB4AB; --error-container: #93000A; --on-error-container: #FFDAD6;
  --surface: #171214; --on-surface: #ECE0E3; --on-surface-variant: #D0C2C6;
  --sc-lowest: #120E10; --sc-low: #1F1A1C; --sc: #241F21; --sc-high: #2F292B; --sc-highest: #3A3436;
  --outline: #998D91; --outline-variant: #4B3F42;
  --inverse-surface: #ECE0E3; --inverse-on-surface: #352F30;
  --blue-bg: #1F3E75; --blue-fg: #AECBFF;
  --green-bg: #173B23; --green-fg: #9CD8AA;
  --amber-bg: #54420A; --amber-fg: #F1CE7F;
  --purple-bg: #4A3085; --purple-fg: #D0BCFF;
  --pink-bg: #672739; --pink-fg: #FFB1C8;
  --teal-bg: #0C4A58; --teal-fg: #8FD8EA;
  --red-bg: #6A1B16; --red-fg: #FFB4AB;
  --slate-bg: #2C2F36; --slate-fg: #C6CAD8;
  --shadow-1: 0 1px 2px rgba(0,0,0,.5); --shadow-2: 0 2px 8px rgba(0,0,0,.55);
  /* Dark glass is the same material with the light behind it taken away: the
     tint goes to a thin white film over a dark surface rather than inverting
     to black, which is what keeps it reading as glass and not as a hole. */
  --glass: color-mix(in srgb, #fff 7%, color-mix(in srgb, var(--sc-low) 72%, transparent));
  --glass-strong: color-mix(in srgb, #fff 9%, color-mix(in srgb, var(--sc) 82%, transparent));
  --glass-film: color-mix(in srgb, #fff 8%, transparent);
  --glass-stroke: color-mix(in srgb, #fff 12%, transparent);
  --glass-hover: color-mix(in srgb, #fff 11%, transparent);
  --glass-press: color-mix(in srgb, #fff 18%, transparent);
  --hover-quiet: color-mix(in srgb, #fff 3%, transparent);
  --notch: color-mix(in srgb, #fff 7%, var(--sc));
  --glass-edge: rgba(255,255,255,.16);
  --glass-shadow: 0 1px 1px rgba(0,0,0,.4), 0 14px 34px -16px rgba(0,0,0,.7);
  --glass-shadow-lift: 0 1px 1px rgba(0,0,0,.45), 0 22px 48px -18px rgba(0,0,0,.8);
}
/* One switch, one repaint: while the class flips, colours and shadows ease
   instead of snapping. The class is gone again within two frames — its own
   transition removing itself from the equation — so it costs nothing later. */
html.theme-switching, html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after {
  transition: background-color .22s var(--ease), background-position .22s var(--ease), background-size .22s var(--ease),
    border-color .22s var(--ease), box-shadow .22s var(--ease), color .22s var(--ease),
    fill .22s var(--ease), stroke .22s var(--ease), opacity .22s var(--ease) !important;
}
* { box-sizing: border-box; }
html { scrollbar-color: var(--outline-variant) transparent; }
body { font-family: var(--font); margin: 0; background: var(--surface); color: var(--on-surface);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { background: var(--primary-container); color: var(--on-primary-container); }
a { color: inherit; }
svg.i { width: 22px; height: 22px; flex: none; display: block; }

/* ---- shell: nav rail + content ----
   The rail is a 246px column with the same proportions as the Click
   dashboard's sidebar: generous top padding, the brand given real room
   beneath it, pill-shaped tabs. It is sticky and never scrolls itself — the
   nav list inside it does — so the appearance popover in its foot can reach
   past its edge instead of growing the rail a scrollbar. */
.shell { display: flex; min-height: 100vh; --rail-w: 246px; position: relative; isolation: isolate; }
/* The light the glass has to refract. Without something coloured behind it, a
   blurred translucent panel over a flat surface is just a slightly different
   flat surface — the blur has nothing to do. Three soft tonal fields, fixed so
   they do not travel with the scroll, at an opacity that reads as a tint
   rather than as a picture. */
.shell::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 620px at 6% -6%, color-mix(in srgb, var(--primary-container) 72%, transparent), transparent 70%),
    radial-gradient(780px 560px at 94% 2%, color-mix(in srgb, var(--purple-bg) 48%, transparent), transparent 72%),
    radial-gradient(1000px 700px at 70% 102%, color-mix(in srgb, var(--teal-bg) 34%, transparent), transparent 72%);
  opacity: .55; }
html.dark .shell::before { opacity: .38; }
.rail { width: var(--rail-w); flex: none; padding: 28px 14px 14px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 30;
  /* ---- the rail is DEEP in both schemes ----
     Its colour is the vuuut family's own. The click (:8082) and pro (:8080)
     landings paint the same four-corner aurora over `--surface` — pink
     #FED7E4 top-left, peach #FFE8DD top-right, lilac #F2E8F8 bottom-right,
     blue #E8EEF8 bottom-left — and the rail is that aurora taken several
     stops deeper: the same hues at a fifth of the lightness, run top to
     bottom down the column (rose → plum → indigo) instead of corner to
     corner. Navigation is chrome; chrome recedes, and against a light page
     the way it recedes is by being the deep object the page sits beside.

     This is done by re-declaring the DARK SCHEME'S TOKENS on `.rail` rather
     than by hand-colouring its parts. Every descendant — nav labels, the
     brand, the tinted icon squares, the account pane, the appearance popover —
     already reads `--on-surface`, `--*-bg`, `--glass-*`, so scoping the dark
     palette here flips all of them at once and keeps `html.dark` a no-op on
     this column. Hand-colouring instead means tracking ~20 descendants, and
     the ones you forget (the `--glass-film` account pane, the `--glass-strong`
     popover) come out as white stickers on a black rail.

     The rail is also near-opaque (~96%), which is not decoration:
     `.shell::before` puts its brightest tonal field at the top-left, directly
     behind this column, and `saturate(185%)` boosts it — at 62–80% the
     backdrop, not the tint, decided the rail's value, and it photographed
     *lighter* than the content it is supposed to sit behind. */
  --primary: #FFB1C8; --on-primary: #5E1133;
  --primary-container: #7B294B; --on-primary-container: #FFD9E0;
  /* Back to the dark scheme's own pair. The light container lived here while
     the selected tab was a pale pink lozenge; the tab is glass now, so
     nothing in this column should be carrying a light-scheme surface. */
  --secondary-container: #5B4149; --on-secondary-container: #FFD9DE;
  --tertiary-container: #6B5300; --on-tertiary-container: #FFE396;
  --error: #FFB4AB; --error-container: #93000A; --on-error-container: #FFDAD6;
  --on-surface: #ECE0E3; --on-surface-variant: #D0C2C6;
  --sc-lowest: #120E10; --sc-low: #1F1A1C; --sc: #241F21; --sc-high: #2F292B; --sc-highest: #3A3436;
  --outline: #998D91; --outline-variant: #4B3F42;
  --blue-bg: #1F3E75; --blue-fg: #AECBFF;
  --green-bg: #173B23; --green-fg: #9CD8AA;
  --amber-bg: #54420A; --amber-fg: #F1CE7F;
  --purple-bg: #4A3085; --purple-fg: #D0BCFF;
  --pink-bg: #672739; --pink-fg: #FFB1C8;
  --teal-bg: #0C4A58; --teal-fg: #8FD8EA;
  --red-bg: #6A1B16; --red-fg: #FFB4AB;
  --slate-bg: #2C2F36; --slate-fg: #C6CAD8;
  --glass: color-mix(in srgb, #fff 7%, color-mix(in srgb, var(--sc-low) 72%, transparent));
  --glass-strong: color-mix(in srgb, #fff 9%, color-mix(in srgb, var(--sc) 82%, transparent));
  --glass-film: color-mix(in srgb, #fff 8%, transparent);
  --glass-stroke: color-mix(in srgb, #fff 12%, transparent);
  --glass-hover: color-mix(in srgb, #fff 11%, transparent);
  --glass-press: color-mix(in srgb, #fff 18%, transparent);
  --hover-quiet: color-mix(in srgb, #fff 3%, transparent);
  --glass-edge: rgba(255,255,255,.16);
  /* The aurora, deepened: #FED7E4 → #4E1B33, #F2E8F8 → #331C3C,
     #E8EEF8 → #1E2340. Same hues, a fifth of the lightness. */
  --rail-1: #4E1B33; --rail-2: #331C3C; --rail-3: #1E2340;
  color: var(--on-surface);
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--rail-1) 96%, transparent),
    color-mix(in srgb, var(--rail-2) 97%, transparent) 54%,
    color-mix(in srgb, var(--rail-3) 98%, transparent));
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-stroke); }
/* On a dark page the page itself is already near-black, and the rail still has
   to be the darker of the two — so the same three hues go down again rather
   than the column going lighter than the content it fronts. */
html.dark .rail { --rail-1: #180A12; --rail-2: #110A15; --rail-3: #0B0D18; }
/* The specular edge: a glass panel catches the light along the side it is lit
   from, and that one highlight is most of what separates this from a tinted
   rectangle. */
.rail::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, var(--glass-edge), transparent 42%); }
.rail .nav-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin; scrollbar-color: var(--outline-variant) transparent;
  margin: 0 -6px; padding: 0 6px; }
/* One mark only: a logo, else the site name, else the admin icon. Whichever
   lands here gets the whole slot, so it can run much larger than it could
   beside a label. The 40px beneath is what separates it from the first tab,
   so the column reads as masthead, then navigation, rather than one list. */
.brand { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-height: 64px;
  padding: 10px 12px; margin: 0 0 20px; color: inherit; text-decoration: none; border-radius: 16px; }
/* ---- the rail's search box ----
   Between the brand and the first nav item: the one control that reaches
   every screen, above the list of screens. It is a button drawn as a field —
   the real input is the one in the modal — so it takes the nav items' pill
   shape at a quieter weight, and reads as a thing to click rather than a row
   to navigate to. */
.rail-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 18px;
  padding: 9px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--on-surface-variant); text-align: left;
  background: var(--glass-film); border: 1px solid var(--glass-stroke);
  box-shadow: inset 0 1px 0 var(--glass-edge);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.rail-search:hover { background: var(--glass-hover); color: var(--on-surface); }
.rail-search:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.rail-search svg.i { width: 18px; height: 18px; flex: none; }
.rail-search-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The shortcut, shown because a key nobody knows about is not a shortcut. */
.rail-search-key { flex: none; font-family: var(--mono); font-size: 10px; line-height: 1;
  padding: 3px 6px; border-radius: 6px; color: var(--on-surface-variant);
  background: color-mix(in srgb, #fff 10%, transparent);
  border: 1px solid var(--glass-stroke); }
.brand:hover { background: var(--glass-hover); box-shadow: inset 0 1px 0 var(--glass-edge); }
.brand:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.brand .brand-logo { display: block; max-width: 100%; }
.brand .brand-logo img { display: block; max-width: 100%; width: auto; height: auto;
  max-height: 56px; object-fit: contain; }
/* The platform's tile: an italic serif `v` on a rounded square with one
   corner squared off, the arrow riding its top-right — the Click
   dashboard's mark, drawn at this rail's scale. */
.brand-mark { font-family: Georgia, 'Iowan Old Style', serif; font-style: italic; font-weight: 400;
  width: 40px; height: 43px; border-radius: 14px 14px 14px 4px; display: grid; place-items: center;
  background: linear-gradient(160deg, color-mix(in srgb, #fff 22%, var(--primary)), var(--primary) 62%,
    color-mix(in srgb, #000 12%, var(--primary)));
  color: var(--on-primary); font-size: 37px; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 18px -10px rgba(62,7,29,.7);
  position: relative; flex: none; }
.brand-mark span { position: absolute; font-family: var(--font); font-style: normal; font-weight: 600;
  font-size: 16px; line-height: 1; right: 3px; top: 2px; }
/* The wordmark and its sub-label at the Click dashboard's scale: a tight,
   heavy name with a tiny tracked-out caption in the accent beneath it. */
.brand .brand-name { min-width: 0; color: inherit; text-align: left; }
.brand b { font-size: 26px; font-weight: 650; letter-spacing: -1.2px; display: block; line-height: 1; }
.brand .tag { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 4px; color: var(--primary); margin: 5px 0 0 2px; line-height: 1.5;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tabs: 44px pills, which is the Click sidebar's row, and a 4px rhythm
   between them so the selected one reads as a shape, not a stripe. */
.nav-item { display: flex; align-items: center; gap: 14px; padding: 9px 14px; margin: 4px 0; border-radius: 999px;
  text-decoration: none; color: var(--on-surface-variant); font-size: 13.5px; font-weight: 500;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); position: relative; }
.nav-item:hover { background: var(--glass-hover); color: var(--on-surface);
  box-shadow: inset 0 1px 0 var(--glass-edge); }
/* The selected tab is the one solid object in the rail: a tinted lozenge with
   a lit top edge and a shadow under it, so it reads as sitting on the glass
   rather than being painted into it. */
.nav-item.active { color: var(--on-secondary-container); font-weight: 600;
  background: linear-gradient(180deg,
    color-mix(in srgb, #fff 26%, var(--secondary-container)), var(--secondary-container));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 16px -10px rgba(62,7,29,.55); }
/* The rail's selected tab is the same MATERIAL as its hover, not a different
   object: a pale pink lozenge on a deep plum column was the one opaque,
   high-chroma shape in the rail and it read as a sticker stuck over the
   navigation. This is the hover film carried further — roughly twice its
   white, falling off down the lozenge, closed with a hairline ring and a lit
   top edge so it still sits in front of the column.
   Hover is a flat 11% white; selected opens at 22% and keeps the ring, which
   is enough to tell the two apart without changing substance.
   `.rail` and `html.dark` both, since the rail is dark in either scheme. */
.rail .nav-item.active, html.dark .nav-item.active {
  color: var(--on-surface);
  background: linear-gradient(180deg,
    color-mix(in srgb, #fff 22%, transparent),
    color-mix(in srgb, #fff 13%, transparent));
  box-shadow: inset 0 1px 0 var(--glass-edge),
    inset 0 0 0 1px var(--glass-stroke),
    0 6px 16px -12px rgba(0,0,0,.75); }
/* The leading square keeps its tint, so the selected row is still the one
   with a lit edge on its glyph. */
.rail .nav-item.active .ic { box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
.nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-item .nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The rail runs at its own, tighter scale: the tinted squares elsewhere in
   the admin lead 56px-tall list rows, where 40px is right, but as navigation
   they only have to read at a glance. 26px inside a 9px-padded pill makes
   the 44px row. */
.rail .ic { width: 26px; height: 26px; border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.14); }
/* Same reason: the 55%-white lit edge belongs on a pale tint, and every tint
   in this column is now a dark one. */
.rail .ic { box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.rail .ic svg { width: 16px; height: 16px; }
/* The tinted square that leads a row. The lit top edge is what makes it an
   object sitting on the glass rather than a swatch painted into it. */
.ic { width: 40px; height: 40px; border-radius: 15px; display: grid; place-items: center; flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.12); }
html.dark .ic { box-shadow: inset 0 1px 0 rgba(255,255,255,.1); }
.ic svg { width: 21px; height: 21px; }
.tint-blue { background: var(--blue-bg); color: var(--blue-fg); }
.tint-green { background: var(--green-bg); color: var(--green-fg); }
.tint-amber { background: var(--amber-bg); color: var(--amber-fg); }
.tint-purple { background: var(--purple-bg); color: var(--purple-fg); }
.tint-pink { background: var(--pink-bg); color: var(--pink-fg); }
.tint-teal { background: var(--teal-bg); color: var(--teal-fg); }
.tint-red { background: var(--red-bg); color: var(--red-fg); }
.tint-slate { background: var(--slate-bg); color: var(--slate-fg); }
/* The account block is its own pane of glass, floated inside the rail rather
   than divided off it by a rule: the hairline was doing the work of a shape,
   and a shape is what says "this is you, and these are your controls". */
.rail-foot { margin-top: auto; padding: 8px; border-radius: 20px;
  background: var(--glass-film); border: 1px solid var(--glass-stroke);
  box-shadow: inset 0 1px 0 var(--glass-edge); }
/* 6px, not 8, and 30px buttons: the pane the foot sits in costs the row 20px
   of width, and the first thing that loses is the name — "Ada Lovel…" where
   "Ada Lovelace" fitted before. */
.who { display: flex; align-items: center; gap: 6px; padding: 2px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; color: var(--on-primary);
  background: linear-gradient(160deg, color-mix(in srgb, #fff 24%, var(--primary)), var(--primary));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; object-fit: cover; }
.who b { font-size: 13px; font-weight: 600; display: block; line-height: 1.2; }
/* The name and the address, not the avatar — which is a span too, and sits
   in the same block. Catching it here left the initial 11px and painted in
   the muted text colour, which on the primary disc is all but invisible. */
.who span:not(.avatar) { font-size: 11px; color: var(--on-surface-variant); }
.rail .icon-btn { width: 30px; height: 30px; border-radius: 999px;
  transition: background var(--dur) var(--ease); }
.rail .icon-btn:hover { background: var(--glass-hover); }
.rail .icon-btn svg.i { width: 18px; height: 18px; }
/* the account block is a link to your own profile; keep it looking like the
   block it replaced, and keep long names/emails from pushing out the rail */
.who-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  color: inherit; text-decoration: none; border-radius: 999px; padding: 4px; margin: -4px;
  transition: background var(--dur) var(--ease); }
.who-link:hover { background: var(--glass-hover); }
.who-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.who-link > div { min-width: 0; }
/* Clipping applies to the two lines of text. The avatar is excluded because
   it is not text: `display: block` would override the grid that centres the
   initial in its disc, and drop the letter into the top-left corner. */
.who-link b, .who-link span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* ---- appearance (night shift) ----
   Ghost's own switcher lives in the account menu and offers Dark, Light and
   System. Here it is a sun/moon button beside sign-out: the rail has no
   account dropdown of its own, but the choice it offers is the same three,
   kept per user in the accessibility JSON. */
.rail-foot { position: relative; }
.theme-menu > summary { list-style: none; }
.theme-menu > summary::-webkit-details-marker { display: none; }
/* the button shows the resolved scheme, not the preference: System on a dark
   OS is a moon, and only flipping the class flips the glyph */
.theme-menu > summary .t-moon { display: none; }
html.dark .theme-menu > summary .t-moon { display: block; }
html.dark .theme-menu > summary .t-sun { display: none; }
/* the popover anchors to the rail foot — the whole row, not the 32px button —
   so it spans the rail's width and opens upward from its foot; the icon rail
   gives it a fixed width instead, since 80px holds no menu */
.theme-menu .pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); z-index: 45;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); border-radius: 18px;
  box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); padding: 6px; }
.theme-menu .pop-title { margin: 6px 12px 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--on-surface-variant); }
/* .menu-item elsewhere is an <a>; as a button it needs the chrome stripped */
.theme-menu .menu-item { width: 100%; border: none; background: none; font: inherit; text-align: left;
  cursor: pointer; }
/* the leading glyph only — the check rides in .ck, whose transparent color
   is what hides it on the unchosen rows */
.theme-menu .menu-item > svg.i { width: 17px; height: 17px; color: var(--on-surface-variant); }
.theme-menu .menu-item.on > svg.i { color: inherit; }

/* Content runs to 1500px — the Click dashboard's measure — with a gutter
   that grows with the viewport, so a 27" display gets a wide, evenly
   framed page rather than an 1120px column marooned in blank surface. */
.main { flex: 1; min-width: 0; }
.content { --gutter: clamp(24px, 3vw, 48px); max-width: 1500px; margin: 0 auto; padding: 0 var(--gutter) 64px; }

/* ---- Tools: a hub of cards related to the module cards but not the same.
   A module is somewhere you go; a tool is something already set up on the
   site, so each card leads with its icon and a corner arrow and ends on a
   live line of state, under a hairline. Five across and small: a tool is a
   thing you already know by name, so the card only has to be findable. ---- */
.tool-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.tool-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 13px 13px 0;
  border-radius: 18px; background: var(--glass); color: var(--on-surface); text-decoration: none;
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.tool-card:hover { background: var(--glass-strong); transform: translateY(-2px);
  box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
@media (prefers-reduced-motion: reduce) { .tool-card:hover { transform: none; } }
.tool-card:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
.tool-top { display: flex; align-items: center; justify-content: space-between; }
.tool-card .ic { width: 32px; height: 32px; border-radius: 11px; }
.tool-card .ic svg { width: 17px; height: 17px; }
.tool-go { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  color: var(--on-surface-variant); transform: rotate(-45deg);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease); }
.tool-go svg { width: 15px; height: 15px; }
.tool-card:hover .tool-go { background: var(--glass-hover); color: var(--primary); transform: rotate(0); }
.tool-text h2 { margin: 0 0 3px; font-size: 14px; font-weight: 600; letter-spacing: -.1px; }
.tool-text p { margin: 0; color: var(--on-surface-variant); font-size: 12px; line-height: 1.45;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.tool-state { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 8px 0 10px;
  border-top: 1px solid var(--glass-stroke); font-size: 11.5px; font-weight: 500; color: var(--on-surface-variant);
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-state i, .rt-live i { flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: color-mix(in srgb, var(--on-surface-variant) 45%, transparent); }
.tool-state.on i, .rt-live.on i { background: #2E9D5B; box-shadow: 0 0 0 3px color-mix(in srgb, #2E9D5B 22%, transparent); }
@media (max-width: 1320px) { .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; } }

/* ---- Redirects and Routes editors ---- */
.test-result { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px;
  border-radius: 14px; background: color-mix(in srgb, var(--on-surface) 4%, transparent); }
.test-result.hit { background: color-mix(in srgb, #2E9D5B 10%, transparent); }
.test-result .ic { width: 32px; height: 32px; border-radius: 10px; flex: none; }
.test-result .ic svg { width: 17px; height: 17px; }
.test-result b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.test-result span:not(.ic) { font-size: 13.5px; color: var(--on-surface-variant); line-height: 1.5; }
.test-result code, .rt-live code, .rt-title code { font-size: .92em; padding: 1px 5px; border-radius: 6px;
  background: color-mix(in srgb, var(--on-surface) 7%, transparent); color: var(--on-surface); }

.rx-card { padding: 6px 0 0; }
.rx-row { display: grid; grid-template-columns: 26px 168px minmax(0, 1fr) 18px minmax(0, 1fr) 76px auto;
  gap: 10px; align-items: end; padding: 12px 16px; position: relative; transition: background .15s var(--ease); }
.rx-row + .rx-row { border-top: 1px solid var(--glass-stroke); }
.rx-row:hover { background: var(--hover-quiet); }
.rx-row.rx-hit { background: color-mix(in srgb, #2E9D5B 12%, transparent);
  box-shadow: inset 3px 0 0 #2E9D5B; }
.rx-row.rx-moved, .rt-card.rx-moved { animation: rx-flash .6s var(--ease); }
@keyframes rx-flash { from { background: var(--glass-hover); } }
.rx-num, .rt-num { align-self: center; justify-self: center; font-size: 12px; font-weight: 700;
  color: var(--on-surface-variant); font-variant-numeric: tabular-nums; }
.rx-num { margin-top: 18px; }
.rx-cell { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.rx-lbl { font-size: 11.5px; font-weight: 600; color: var(--on-surface-variant); padding-left: 2px; }
.rx-row:not(:first-child) .rx-lbl { display: none; }
.rx-row:not(:first-child) .rx-num, .rx-row:not(:first-child) .rx-arrow,
.rx-row:not(:first-child) .rx-kind, .rx-row:not(:first-child) .rx-tools { margin-top: 0; }
.rx-in { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; font: inherit; font-size: 14px;
  color: var(--on-surface); background: color-mix(in srgb, var(--sc-lowest) 70%, transparent);
  border: 1px solid var(--outline-variant); transition: border-color .15s var(--ease); }
.rx-in.mono { font-family: var(--mono); font-size: 13px; }
.rx-in:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
select.rx-in { appearance: none; cursor: pointer; padding-right: 10px; }
.rx-arrow { align-self: end; height: 40px; display: grid; place-items: center; color: var(--on-surface-variant); }
.rx-arrow svg { width: 18px; height: 18px; }
.rx-kind { align-self: end; height: 40px; justify-content: center; border-radius: 10px; font-size: 12px;
  background: color-mix(in srgb, var(--on-surface) 6%, transparent); color: var(--on-surface-variant); cursor: help; }
.rx-kind.pat { background: var(--purple-bg); color: var(--purple-fg); }
.rx-tools { display: flex; align-items: center; gap: 2px; align-self: end; height: 40px; }
.rx-tools .icon-btn { width: 34px; height: 34px; }
.rx-tools .icon-btn svg { width: 18px; height: 18px; }
.rx-row:first-child .rx-tools, .rx-row:first-child .rx-kind, .rx-row:first-child .rx-arrow { margin-top: 0; }
.rx-empty { display: flex; gap: 14px; align-items: center; padding: 18px 20px; }
.rx-empty .ic { width: 36px; height: 36px; border-radius: 12px; flex: none; }
.rx-empty b { display: block; font-size: 14.5px; }
.rx-empty span:not(.ic) { font-size: 13px; color: var(--on-surface-variant); }
.rx-list:has([data-row]) > .rx-empty, .rt-list:has([data-row]) > .rx-empty { display: none; }
.rx-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px 14px;
  border-top: 1px solid var(--glass-stroke); }
.file-view { margin-top: 14px; }
.file-view summary { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px;
  font-weight: 500; color: var(--primary); list-style: none; }
.file-view summary::-webkit-details-marker { display: none; }
.file-view summary svg { width: 17px; height: 17px; }
.file-view pre { margin: 10px 0 0; padding: 14px 16px; max-height: 360px; overflow: auto; border-radius: 14px;
  font: 12.5px/1.6 var(--mono); background: color-mix(in srgb, var(--on-surface) 5%, transparent);
  border: 1px solid var(--glass-stroke); white-space: pre; }

.rt-list { display: flex; flex-direction: column; gap: 12px; }
.rt-list > .rx-empty { border-radius: 22px; background: var(--glass); border: 1px dashed var(--outline-variant); }
.rt-card { padding: 14px 18px 12px; border-radius: 22px; background: var(--glass);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }
.rt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; min-width: 0; }
.rt-num { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--on-surface) 7%, transparent); }
.rt-title { flex: 1; min-width: 0; font-size: 13.5px; color: var(--on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-head .rx-tools { height: auto; }
.rt-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; }
.rt-grid .field { margin-bottom: 12px; }
.rt-live { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; padding-top: 10px;
  border-top: 1px solid var(--glass-stroke); font-size: 12.8px; color: var(--on-surface-variant); }
.rt-add { margin: 10px 0 0; }
.rt-tax { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.rt-tax .field { margin-bottom: 12px; }
.switch-line { display: flex; gap: 12px; align-items: center; cursor: pointer; margin-bottom: 12px; }
.switch-line input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.switch-line b { display: block; font-size: 14.5px; font-weight: 600; }
.switch-line .muted { display: block; }
@media (max-width: 1100px) { .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .rx-row { grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; }
  .rx-row .rx-cell, .rx-row .rx-status-cell { grid-column: 2 / 4; }
  .rx-row .rx-lbl { display: block !important; }
  .rx-arrow { display: none; }
  .rx-num { grid-row: 1; margin-top: 0; }
  .rx-kind { grid-column: 2; justify-self: start; padding: 0 12px; height: 32px; }
  .rx-tools { grid-column: 3; height: 32px; }
}
@media (max-width: 640px) { .rt-grid, .rt-tax { grid-template-columns: minmax(0, 1fr); } }

/* ---- Settings → Backups ---- */
.bk-sched-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.bk-head { display: flex; align-items: center; gap: 12px; }
.bk-head > span:first-child { flex: none; }
.bk-meter { display: flex; gap: 3px; flex: 1; max-width: 220px; }
.bk-meter i { flex: 1; height: 6px; border-radius: 3px;
  background: color-mix(in srgb, var(--on-surface-variant) 18%, transparent); }
.bk-meter i.on { background: var(--primary); }
.bk-count { font-weight: 600; letter-spacing: 0; text-transform: none; font-size: 12px; }
.bk-actions { flex-wrap: wrap; gap: 12px; }
.bk-actions form { margin: 0; }
.bk-upload { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto !important; }
.bk-row .title { display: flex !important; align-items: center; gap: 8px; flex-wrap: wrap; white-space: normal !important; }
.bk-row .title .chip { height: 22px; font-size: 11.5px; padding: 0 9px; }
.bk-row .detail { white-space: normal; }
.bk-row .trailing { display: flex; align-items: center; gap: 6px; }
.bk-row .trailing form { margin: 0; }
@media (max-width: 760px) {
  .bk-row { flex-wrap: wrap; }
  .bk-row .trailing { width: 100%; justify-content: flex-end; }
  .bk-upload { margin-left: 0 !important; }
}

/* ---- forms: the builder's field cards, and a response's answers ---- */
.fb-list { display: grid; gap: 12px; }
.fb-field { background: var(--sc-lowest); border-radius: 24px; padding: 16px 20px 6px; }
.fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.fb-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 600; background: var(--amber-bg); color: var(--amber-fg); }
.fb-kind { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; }
.fb-tools { display: flex; gap: 2px; margin-left: auto; }
.fb-tools .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.fb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; }
.fb-grid .wide { grid-column: 1 / -1; }
.fb-required { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 14.5px; }
.fb-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.fb-url { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fb-empty { padding: 22px; text-align: center; color: var(--on-surface-variant); background: var(--sc-lowest);
  border-radius: 24px; }
@media (max-width: 700px) { .fb-grid { grid-template-columns: minmax(0, 1fr); } }
.fm-answer { padding: 12px 0; }
.fm-answer + .fm-answer { border-top: 1px solid var(--outline-variant); }
.fm-answer:first-child { padding-top: 0; }
.fm-q { font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  color: var(--on-surface-variant); margin-bottom: 4px; }
/* pre-wrap keeps a visitor's own line breaks; the text itself is escaped */
.fm-a { font-size: 15.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
/* the form card inside the editor */
.vfc { font-family: var(--font); padding: 18px 20px; border-radius: 16px; background: var(--sc-low, var(--sc-lowest));
  border: 1px solid var(--outline-variant); color: var(--on-surface); }
.vfc-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.vfc-head svg { width: 20px; height: 20px; flex: none; color: var(--amber-fg); }
.vfc-head .vfc-closed { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: var(--amber-bg); color: var(--amber-fg); }
.vfc select { width: 100%; height: 42px; padding: 0 12px; font: inherit; font-size: 14.5px; color: var(--on-surface);
  background: var(--sc-lowest); border: 1px solid var(--outline); border-radius: 10px; }
.vfc-preview { display: grid; gap: 10px; margin-top: 14px; pointer-events: none; }
.vfc-preview .vfc-label { font-size: 12.5px; font-weight: 600; color: var(--on-surface-variant); margin-bottom: 4px; }
.vfc-preview .vfc-box { height: 36px; border-radius: 8px; border: 1px solid var(--outline-variant); background: var(--sc-lowest); }
.vfc-preview .vfc-box.tall { height: 72px; }
.vfc-preview .vfc-button { justify-self: start; padding: 8px 18px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  background: var(--primary); color: var(--on-primary); }
.vfc-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--on-surface-variant); }
.vfc-note a { color: var(--primary); }

/* ---- page head (sticky top app bar per page) ----
   No `backdrop-filter` here, deliberately (user's call, 2026-11-19). It is the
   one place in this admin where the filter earned nothing: the header is
   opaque where the title sits, so there is nothing to see through and nothing
   to blur, while the filter still cost a compositor pass on every scroll of
   every screen and clipped itself to a rectangle the width of the text column.
   The scrim does the whole job on its own — opaque under the title, thinning
   over the last fifth — and the two masks keep it from drawing edges. */
.page-head { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 22px calc(var(--gutter, 24px) + 4px) 16px;
  margin: 0 calc(var(--gutter, 24px) * -1) 8px;
  /* Opaque where the title is, thinning only over the last fifth. A scrim has
     to hide what passes under it — at 88% the section heading scrolling
     through stayed legible straight across the greeting, which is worse than
     no frost: two sentences on top of each other. */
  /* Opaque for three quarters of the height, then out. With the blur gone
     there is nothing smearing what passes underneath, so the scrim has to be
     solid for the whole band the text occupies — at 58% the section heading
     scrolling through still ghosted beside the date. */
  background: linear-gradient(180deg,
    var(--surface) 0 76%,
    color-mix(in srgb, var(--surface) 82%, transparent) 90%,
    color-mix(in srgb, var(--surface) 40%, transparent));
  /* Two masks intersected, which is what removes the rectangle: fade the last
     14px of the height, and fade 28px at each side. Both fades land in the
     gutter and the padding, never on a glyph. Chrome and Safari spell the
     compositing differently; both keywords mean "keep where the two overlap". */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent),
    linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(180deg, #000 calc(100% - 14px), transparent),
    linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: 0; }
.page-head .sub { margin: 2px 0 0; font-size: 13.5px; color: var(--on-surface-variant); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* ---- groups + cards + rows ----
   These are the admin's material, and since 2026-11-19 that material is
   glass: a translucent tint over the ambient field `.shell::before` paints, a
   hairline edge, and a specular highlight along the top. It began on the
   dashboard and now belongs to every screen, so it lives here on the shared
   primitives rather than behind a page's own class.
   Where the blur goes is a judgement about cost, not taste: the big
   containers (`.card`, `.tile`) filter their backdrop, while small repeated
   tiles — a dozen module cards in a grid — take the tint and the edge
   without it. A 220px card over a soft gradient looks the same blurred or
   not, and a dozen backdrop filters on one screen is real work for the
   compositor. */
/* Section headings as M3 overlines: small, tracked out, uppercase. They label
   what is beneath them instead of competing with the titles inside it. */
.section { font-size: 11.5px; font-weight: 700; color: var(--on-surface-variant);
  padding: 26px 8px 11px; letter-spacing: .1em; text-transform: uppercase; }
/* A section that heads a whole gallery rather than a card or two: sized as
   a heading, in the text colour, so the two theme collections read as the
   page's main divisions. */
.section.big { font-size: 20px; font-weight: 700; color: var(--on-surface); letter-spacing: -.2px;
  padding: 28px 16px 12px; text-transform: none; }
.card { background: var(--glass); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); border-radius: 26px; margin-bottom: 14px; overflow: hidden;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }
.card.padded { padding: 20px; }
.rows .row { display: flex; align-items: center; gap: 16px; padding: 13px 20px; position: relative;
  text-decoration: none; color: inherit; transition: background .15s var(--ease); }
.rows .row + .row::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; height: 1px;
  background: var(--glass-stroke); }
/* Only a row that IS a link gets the full state layer; a <div> row is not a
   target (its buttons are), so it gets the quiet tint and no press. */
.rows .row:hover { background: var(--hover-quiet); }
.rows a.row:hover, .rows label.row:hover { background: var(--glass-hover); }
.rows a.row:active, .rows label.row:active { background: var(--glass-press); }
.rows .row .body { flex: 1; min-width: 0; }
/* Title over detail, each clipped to the body's width. They used to be plain
   inline spans, so a long value (a post's slug, say) ran past the body box
   and straight through the date, status chip and delete button to its right —
   ellipsis only applies to a block-level box with a width to overflow. */
.rows .row .title { display: block; font-size: 15.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .row .detail { display: block; font-size: 13px; color: var(--on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows .row .detail code { font-family: var(--mono); font-size: 12px; }
.trailing { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.chev { color: var(--on-surface-variant); opacity: .7; }

/* ---- chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 12px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.chip.published { background: var(--green-bg); color: var(--green-fg); }
.chip.draft { background: var(--amber-bg); color: var(--amber-fg); }
.chip.scheduled { background: var(--blue-bg); color: var(--blue-fg); }
.chip.sent { background: var(--purple-bg); color: var(--purple-fg); }
.chip.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.chip.error { background: var(--red-bg); color: var(--red-fg); }

/* ---- filter chips (tag toggles) ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { position: relative; display: inline-flex; align-items: center; gap: 0; height: 32px;
  border: 1px solid var(--outline); border-radius: 8px; padding: 0 14px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--on-surface-variant); user-select: none;
  transition: all .15s var(--ease); }
.fchip:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.fchip input { position: absolute; opacity: 0; pointer-events: none; }
.fchip .ck { width: 0; overflow: hidden; transition: width .2s var(--ease), margin .2s var(--ease); display: flex; }
.fchip .ck svg { width: 17px; height: 17px; }
.fchip:has(input:checked) { background: var(--secondary-container); border-color: transparent;
  color: var(--on-secondary-container); font-weight: 600; }
.fchip:has(input:checked) .ck { width: 19px; margin-right: 4px; }
.fchip:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px;
  padding: 0 24px; border-radius: 999px; border: none; background: var(--primary); color: var(--on-primary);
  font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: .1px; text-decoration: none;
  cursor: pointer; transition: box-shadow .15s var(--ease), transform .1s var(--ease), background .15s var(--ease); }
.btn:hover { box-shadow: var(--shadow-1); }
.btn:active { transform: scale(.97); }
.btn svg.i { width: 18px; height: 18px; }
.btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.btn.outlined { background: transparent; border: 1px solid var(--outline); color: var(--primary); }
.btn.text { background: transparent; color: var(--primary); padding: 0 14px; }
.btn.text:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); box-shadow: none; }
.btn.text.danger { color: var(--error); }
.btn.text.danger:hover { background: color-mix(in srgb, var(--error) 10%, transparent); }
.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; }
.btn.small { height: 34px; padding: 0 16px; font-size: 13px; }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent;
  color: var(--on-surface-variant); display: inline-grid; place-items: center; cursor: pointer; flex: none;
  transition: background .15s var(--ease), color .15s var(--ease); text-decoration: none; }
.icon-btn:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); color: var(--on-surface); }
.icon-btn:active { background: color-mix(in srgb, var(--on-surface) 12%, transparent); }
.icon-btn.danger:hover { background: var(--error-container); color: var(--on-error-container); }
.icon-btn svg.i { width: 20px; height: 20px; }

/* ---- file picker ----
   A bare `<input type=file>` draws the operating system's button, the one
   control in the admin that belongs to no design system and looks like it.
   The input stays — it carries the file and the form posts without script —
   and only its two halves are restyled: the box around it, and the button
   itself through `::file-selector-button`. The label on that button and the
   "no file chosen" text beside it are the browser's and cannot be changed
   from CSS, which is the one thing this cannot fix.

   Those two halves are centred with `line-height` and `vertical-align`, not
   with flexbox: they live in the input's shadow tree, which takes no part in
   a flex container declared out here, so `align-items` silently does nothing
   and both sit a few pixels high. The line height is the content box — 42px
   less the two 1px borders. */
.filefield { flex: 1; min-width: 200px; max-width: 420px; height: 42px; box-sizing: border-box;
  display: block; line-height: 40px; padding: 0 12px 0 5px; border: 1px dashed var(--outline);
  border-radius: 12px; background: transparent; color: var(--on-surface-variant);
  font-family: inherit; font-size: 13px; cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease); }
.filefield:hover { border-color: var(--primary); background: color-mix(in srgb, var(--on-surface) 4%, transparent); }
.filefield:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.filefield::file-selector-button { appearance: none; -webkit-appearance: none; height: 32px;
  vertical-align: middle; margin: 0 12px 0 0; padding: 0 16px; border: none; border-radius: 999px;
  background: var(--secondary-container); color: var(--on-secondary-container);
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: .1px; cursor: pointer;
  transition: background .15s var(--ease); }
.filefield:hover::file-selector-button { background: color-mix(in srgb, var(--on-secondary-container) 8%, var(--secondary-container)); }

/* ---- text fields (M3 outlined, floating label) ---- */
.field { position: relative; display: block; margin-bottom: 14px; }
.field input, .field textarea, .field select { width: 100%; font-family: inherit; font-size: 15px;
  color: var(--on-surface); background: transparent; border: 1px solid var(--outline);
  border-radius: 12px; padding: 22px 14px 6px; outline: none; caret-color: var(--primary);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
/* Dark fields take the same treatment the light `--outline` now has: a tint
   of the outline variant rather than a solid line. The dark scheme's
   `--outline` is #998D91, a light grey, and on a near-black card that drew a
   hard bright rectangle around every input — the opposite of the light side,
   where the border settles into the surface. Scoped to the field controls
   rather than changed on the token, so buttons, segmented controls and chips
   keep the outline they are drawn with.
   `:not(:focus)` is load-bearing, not decoration. `html.dark .field input`
   scores (0,2,2) against `.field input:focus`'s (0,2,1), so without it this
   rule outranks the focus state wherever it is written in the file and a
   focused field in dark mode would keep the quiet border instead of taking
   the `--primary` one. Excluding the focused case lets the focus rule win on
   the only elements it cares about. */
html.dark .field input:not(:focus),
html.dark .field textarea:not(:focus),
html.dark .field select:not(:focus) {
  border-color: color-mix(in srgb, var(--outline-variant) 58%, transparent); }
.field textarea { resize: vertical; min-height: 96px; }
.field textarea.code, .field input.code { font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.field > span { position: absolute; left: 11px; top: 15px; font-size: 15px; color: var(--on-surface-variant);
  padding: 0 5px; pointer-events: none; transition: all .15s var(--ease); background: var(--notch); }
/* ---- focus: quieter, but still unmistakable ----
   This was the full `--primary` on the border AND a 1px inset ring of the
   same colour, which is a doubled 2px line at full chroma — next to the
   blended resting border it landed like a shout. What replaces it keeps the
   line single and lets a soft halo do the rest of the work: a tint of the
   primary for the border, and a 3px ring at about a seventh of its strength
   bleeding outwards.
   The alphas are picked to stay above the 3:1 a focus indicator needs, not
   by eye — 72% of #984059 on white is ~3.6:1, and 65% of #FFB1C8 on the dark
   card is ~4.7:1. "Polite" is the weight and the spread, not the visibility.
   The halo is an OUTER shadow, so a field at the very edge of a clipping
   container can have it cropped; every field here sits inside a padded card,
   and the border alone still carries the state if it ever is. */
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: color-mix(in srgb, var(--primary) 72%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent); }
/* Dark runs a touch softer on both counts: the dark scheme's primary is a
   bright pink that glows against a near-black card where the light scheme's
   wine simply sits there. */
html.dark .field input:focus,
html.dark .field textarea:focus,
html.dark .field select:focus {
  border-color: color-mix(in srgb, var(--primary) 65%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent); }
/* Asked of the field, not of the input's next sibling. `input + span` is the
   obvious way to write a floating label and it breaks in the wild: password
   managers inject their own button directly after the input they offer to
   fill, which puts an element between the input and its label and leaves the
   label sitting on top of the value. `:has()` does not care where in the
   field the control is. */
/* A field with a real placeholder floats its label straight away. Most
   fields here carry `placeholder=" "` purely to drive `:placeholder-shown`,
   and for those the label correctly rests over an empty box — but where the
   placeholder is an actual hint ("partials/thing.hbs"), leaving the label at
   rest prints the two on top of each other. */
.field:focus-within > span,
.field:has(input:not(:placeholder-shown)) > span,
.field:has(textarea:not(:placeholder-shown)) > span,
.field:has(input[placeholder]:not([placeholder=" "]):not([placeholder=""])) > span,
.field.fixed > span, .field:has(textarea) > span { top: -8px; font-size: 12px; font-weight: 600; color: var(--primary);
  background: var(--notch); border-radius: 4px; }
.field:has(textarea.code) > span { background: var(--notch); }
.field select { appearance: none; cursor: pointer; padding-right: 40px; }
.field .car { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--on-surface-variant); width: 20px; height: 20px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid2 .field { margin-bottom: 14px; }
.nav-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* ---- switch (M3) ---- */
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { width: 52px; height: 32px; border-radius: 16px; background: var(--sc-highest);
  box-shadow: inset 0 0 0 2px var(--outline); transition: all .2s var(--ease); display: flex; align-items: center; }
.switch .thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--outline);
  margin-left: 6px; transition: all .2s var(--ease); }
.switch input:checked ~ .track { background: var(--primary); box-shadow: none; }
.switch input:checked ~ .track .thumb { width: 24px; height: 24px; background: var(--on-primary); margin-left: auto; margin-right: 6px; }
.switch input:focus-visible ~ .track { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---- settings toggle row (label + supporting text + switch) ----
   Global so pages outside the editor rail get the same list-item shape;
   the rail keeps its own, tighter scale below. */
.toggle-row { display: flex; align-items: center; gap: 14px; min-height: 48px; }
.toggle-row .label { flex: 1; min-width: 0; }
.toggle-row .label b { display: block; font-size: 14.5px; font-weight: 500; }
.toggle-row .label span { display: block; font-size: 12.5px; line-height: 1.4; color: var(--on-surface-variant); }

/* ---- M3 segmented button ----
   Connected outlined segments; the selected segment inverts to the
   secondary container and reveals a leading check. */
.seg { display: inline-flex; align-items: stretch; height: 40px; border: 1px solid var(--outline);
  border-radius: 999px; overflow: hidden; flex: none; background: var(--sc-lowest); }
.seg > label { display: inline-flex; align-items: center; gap: 0; padding: 0 16px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--on-surface-variant); user-select: none;
  border-left: 1px solid var(--outline); transition: background .15s var(--ease), color .15s var(--ease); }
.seg > label:first-of-type { border-left: none; }
.seg > label:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg .ck { width: 0; overflow: hidden; display: flex; transition: width .2s var(--ease), margin .2s var(--ease); }
.seg .ck svg { width: 17px; height: 17px; }
.seg label:has(input:checked) { background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 600; }
.seg label:has(input:checked) .ck { width: 19px; margin-right: 6px; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: -3px; }

/* ---- a field and the button that submits it, on one line ----
   The fields carry 14px of bottom margin for stacked forms, and in a flex row
   that margin is part of the item: `align-items: flex-end` then lines the
   button up with the *margin's* edge, leaving it sitting 14px below the input
   it belongs to. Dropping the margin is what makes the two bottom edges
   actually meet; the row's own gap still spaces things when it wraps. */
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; }

/* ---- compact trailing controls for settings rows ----
   A row already states what the setting is, on the left. The control beside
   it is the value alone: one line, vertically centred, no floating label and
   none of the 22px of head room a label would need. `.field` is the opposite
   — a label *is* its header — so it belongs in a row's body, never here. */
.selbox, .textbox { position: relative; display: inline-flex; flex: none; }
.selbox select, .textbox input { height: 40px; min-width: 150px; max-width: 240px;
  border: 1px solid var(--outline); border-radius: 12px; background: transparent; color: var(--on-surface);
  font-family: inherit; font-size: 13.5px; font-weight: 500; outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.selbox select { appearance: none; -webkit-appearance: none; padding: 0 38px 0 16px; cursor: pointer; }
.textbox { flex: 1; }
.textbox input { width: 100%; padding: 0 14px; }
.selbox select:hover, .textbox input:hover { background: color-mix(in srgb, var(--on-surface) 5%, transparent); }
.selbox select:focus, .textbox input:focus { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.textbox input:focus { background: transparent; }
.selbox .car { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--on-surface-variant); width: 20px; height: 20px; }

/* ---- colour swatch chips ---- */
.swatches { display: inline-flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.swatch { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px;
  border: 1px solid var(--outline); border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--on-surface-variant); user-select: none; background: var(--sc-lowest);
  transition: background .15s var(--ease), color .15s var(--ease); }
.swatch:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.swatch input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.swatch .dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-surface) 18%, transparent); }
/* "no colour" reads as the classic transparent checkerboard */
.swatch .dot.none { background: conic-gradient(var(--sc-highest) 25%, transparent 0 50%, var(--sc-highest) 0 75%, transparent 0) 0 0/10px 10px; }
.swatch:has(input:checked) { background: var(--secondary-container); color: var(--on-secondary-container);
  border-color: transparent; font-weight: 600; box-shadow: inset 0 0 0 1px var(--outline); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
/* The custom chip's dot is the native picker itself, so one click both
   selects the mode and opens the colour picker. */
.swatch.custom { padding: 0 14px 0 6px; }
.swatch.custom input[type=color] { position: static; opacity: 1; pointer-events: auto; width: 28px; height: 28px;
  border: none; border-radius: 50%; background: none; padding: 0; cursor: pointer; flex: none; }
.swatch.custom input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
.swatch.custom input[type=color]::-webkit-color-swatch { border-radius: 50%; border: none; }
.swatch.custom:has(input[type=radio]:checked) input[type=color] { outline: 2px solid var(--on-secondary-container); outline-offset: 1px; }
/* Colour rows sit their chips on a second line under the label, where the
   hint and the chips can never fight for the same width. */
.swatches.under { margin-top: 10px; justify-content: flex-start; }

/* Settings pages: supporting lines are allowed to wrap — an ellipsized
   explanation reads as broken, while list pages want the clip. */
.settings .rows .row .detail { white-space: normal; overflow: visible; text-overflow: clip; }
.settings .rows .row .title { white-space: normal; overflow: visible; }
/* Controls that fell out of the trailing slot on a narrow screen line up
   under the text instead of hanging at the card's edge. Keyed to the same
   639px as the row-wrapping itself: above it the trailing is still on the
   row's own line and must not be indented. */
@media (max-width: 639px) {
  .settings .rows .row .trailing { padding-left: 52px; }
  .swatches.under { padding-left: 0; }
}

/* ---- banners, hints, code ---- */
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 14px 18px;
  font-size: 14px; margin-bottom: 12px; }
.banner svg.i { width: 20px; height: 20px; margin-top: 1px; flex: none; }
/* the message is one flex item: without this wrapper every <code> or
   <strong> inside it becomes its own flex item and the sentence breaks
   into columns */
.banner > .msg { flex: 1; min-width: 0; }
.banner.ok { background: var(--green-bg); color: var(--green-fg); }
.banner.error { background: var(--red-bg); color: var(--red-fg); }
.banner.info { background: var(--blue-bg); color: var(--blue-fg); }
code { font-family: var(--mono); }
.key { display: inline-flex; align-items: center; gap: 8px; background: var(--sc);
  border-radius: 8px; padding: 5px 6px 5px 12px; font-family: var(--mono); font-size: 12.5px; }
.key button { border: none; background: transparent; color: inherit; opacity: .6; cursor: pointer;
  display: grid; place-items: center; border-radius: 6px; padding: 3px; }
.key button:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.key button svg { width: 15px; height: 15px; }
.muted { color: var(--on-surface-variant); font-size: 13px; }

/* ---- Portal links reference ----
   A label column against a copyable value, repeated. The value wraps rather
   than scrolls: a tier signup URL carries a 24-character id, and a link the
   publisher cannot read in full is a link they cannot check. */
.plinks h3 { margin: 22px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--on-surface-variant);
  border-bottom: 1px solid var(--outline-variant); padding-bottom: 6px; }
.plinks h3:first-of-type { margin-top: 4px; }
.plink { display: flex; align-items: center; gap: 16px; padding: 5px 0; flex-wrap: wrap; }
.plink > .name { flex: none; width: 190px; font-size: 13.5px; font-weight: 500; }
.plink > .key { flex: 1; min-width: 240px; word-break: break-all; }
.plink > .key code { flex: 1; }
@media (max-width: 720px) { .plink > .name { width: 100%; } }

/* ---- signup form preview ----
   The frame is given the height the embed asks for, so what is shown is the
   same box the snippet produces on someone else's page. */
.sf-preview { width: 100%; height: 380px; border: 1px solid var(--outline-variant);
  border-radius: 14px; background: var(--sc-lowest); display: block; }
.sf-preview.minimal { height: 110px; }

/* ---- underline tabs ----
   Two radios drive the panels through `:has()`, so switching tabs costs no
   script and survives a page that has not finished loading. The radios
   themselves are never submitted: they sit outside the forms in the panels. */
.mtabs > input[name="mtab"] { position: absolute; opacity: 0; pointer-events: none; }
.mtab-bar { display: flex; gap: 4px; border-bottom: 1px solid var(--outline-variant);
  margin-bottom: 4px; }
.mtab-bar label { padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--on-surface-variant); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s var(--ease), border-color .15s var(--ease); }
.mtab-bar label:hover { color: var(--on-surface); }
.mtabs:has(#mtab-import:checked) label[for="mtab-import"],
.mtabs:has(#mtab-export:checked) label[for="mtab-export"] { color: var(--primary); border-bottom-color: var(--primary); }
.mtabs:has(#mtab-import:checked) [data-tab="export"],
.mtabs:has(#mtab-export:checked) [data-tab="import"] { display: none; }
.mtabs > input:focus-visible + input + .mtab-bar label[for="mtab-import"],
.mtabs > input + input:focus-visible + .mtab-bar label[for="mtab-export"] { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

/* ---- export component picker ----
   The checkbox chips carry two lines each, so they get their own grid rather
   than the inline row `.fchip` is shaped for. */
.expgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.fchip.exp { height: auto; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  text-align: left; gap: 0; }
.fchip.exp .ck { margin-top: 2px; }
.fchip.exp:has(input:checked) .ck { width: 19px; margin-right: 10px; }
.fchip.exp .expl { display: block; min-width: 0; }
.fchip.exp .expl b { display: block; font-size: 14px; font-weight: 600; }
.fchip.exp .expl span { display: block; font-size: 12.5px; line-height: 1.45; font-weight: 400;
  color: var(--on-surface-variant); white-space: normal; margin-top: 2px; }
.fchip.exp:has(input:checked) .expl span { color: inherit; opacity: .8; }

/* ---- file explorer ----
   A tree of <details> elements. `--d` is the row's depth, and the single
   padding rule below is what turns it into indentation, so nesting costs no
   extra markup. The disclosure triangle is suppressed in favour of the
   chevron, which rotates with the open state. */
.ftree { padding: 6px; max-height: 60vh; overflow: auto; font-size: 13px; }
.ftree summary, .ftree .frow { display: flex; align-items: center; gap: 7px;
  padding: 5px 8px 5px calc(8px + var(--d, 0) * 13px); border-radius: 8px;
  color: var(--on-surface); text-decoration: none; cursor: pointer;
  white-space: nowrap; overflow: hidden; }
.ftree summary { list-style: none; font-weight: 500; }
.ftree summary::-webkit-details-marker { display: none; }
.ftree summary:hover, .ftree .frow:hover { background: color-mix(in srgb, var(--on-surface) 7%, transparent); }
.ftree .frow.active { background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 600; }
.ftree .fname { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 12.5px; }
.ftree .fic { flex: none; display: flex; color: var(--on-surface-variant); }
.ftree .fic svg { width: 16px; height: 16px; }
.ftree .frow.active .fic { color: inherit; }
.ftree .tw { flex: none; display: flex; color: var(--on-surface-variant);
  transition: transform .15s var(--ease); }
.ftree .tw svg { width: 16px; height: 16px; }
.ftree details[open] > summary > .tw { transform: rotate(90deg); }
.ftree .chip { margin-left: auto; flex: none; }

/* ---- code editor ----
   A highlighted <pre> sitting exactly under a transparent <textarea>, with a
   line-number gutter beside them. The textarea keeps every native editing
   behaviour — caret, selection, undo, spellcheck off, IME — and the layer
   below only paints. The two must agree on font, size, line-height, padding,
   tab-size and white-space to the pixel, or the text drifts apart as you
   type; that is what the shared `.ced-layer` rule is for. */
.ced { border: 1px solid var(--outline); border-radius: 12px; overflow: hidden;
  background: var(--sc-lowest); }
.ced-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--sc); border-bottom: 1px solid var(--outline-variant);
  font-family: var(--mono); font-size: 12.5px; color: var(--on-surface-variant); }
.ced-bar .lang { margin-left: auto; text-transform: uppercase; letter-spacing: .06em;
  font-size: 11px; font-weight: 600; background: var(--sc-high); border-radius: 999px; padding: 2px 9px; }
/* The gutter, the highlight layer and the textarea are all held to the one
   height the script works out from the line count (`--ced-h`), clamped
   between a usable minimum and a share of the viewport. Letting the gutter
   size itself is what left a tall blank column beside a long file: its one
   div per line ran to the full line count and stretched the flex row, while
   the text beside it stayed at its own fixed height. */
.ced-body { display: flex; align-items: stretch; position: relative; }
.ced-gut { flex: none; padding: 12px 10px 12px 14px; text-align: right; user-select: none;
  background: var(--sc-low); color: var(--on-surface-variant); opacity: .65;
  border-right: 1px solid var(--outline-variant); overflow: hidden;
  height: var(--ced-h, 420px); box-sizing: border-box;
  font-family: var(--mono); font-size: 13px; line-height: 1.6; }
.ced-wrap { position: relative; flex: 1; min-width: 0; }
.ced-layer { margin: 0; padding: 12px 14px; font-family: var(--mono); font-size: 13px;
  line-height: 1.6; tab-size: 2; white-space: pre; overflow: auto;
  border: 0; width: 100%; height: var(--ced-h, 420px); box-sizing: border-box; }
.ced-wrap .ced-hl { position: absolute; inset: 0; pointer-events: none; color: var(--on-surface); }
.ced-wrap textarea.ced-in { position: relative; display: block; resize: none;
  background: transparent; color: transparent; caret-color: var(--primary);
  outline: none; -webkit-text-fill-color: transparent; }
.ced-wrap textarea.ced-in::selection { background: var(--primary-container);
  -webkit-text-fill-color: transparent; }
.ced:focus-within { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }

/* Token colours. Hue carries the meaning, so they are held apart in lightness
   too — a reviewer reading this in grayscale still sees structure. */
.tok-com { color: #6E7A8A; font-style: italic; }
.tok-str { color: #B2522F; }
.tok-key { color: #8A3FA8; font-weight: 600; }
.tok-num { color: #1F6F5C; }
.tok-tag { color: #9B2A4A; }
.tok-atr { color: #7A5C12; }
.tok-mus { color: #1D5FA8; font-weight: 600; }
.tok-sel { color: #9B2A4A; }
.tok-prp { color: #1D5FA8; }
.tok-hed { color: #9B2A4A; font-weight: 700; }
html.dark .tok-com { color: #8A95A6; }
html.dark .tok-str { color: #F0A67F; }
html.dark .tok-key { color: #DDA7F0; }
html.dark .tok-num { color: #7FD8BE; }
html.dark .tok-tag { color: #FF9FB6; }
html.dark .tok-atr { color: #E7C77A; }
html.dark .tok-mus { color: #9FC4FF; }
html.dark .tok-sel { color: #FF9FB6; }
html.dark .tok-prp { color: #9FC4FF; }
html.dark .tok-hed { color: #FF9FB6; }

/* ---- analytics: stat tiles + chart ---- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.tile { background: var(--glass); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); border-radius: 26px; padding: 18px 20px 20px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tile:hover { transform: translateY(-2px);
  box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
@media (prefers-reduced-motion: reduce) { .tile:hover { transform: none; } }
.tile .label { font-size: 11.5px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--on-surface-variant); }
.tile .value { font-size: 30px; font-weight: 600; font-variant-numeric: proportional-nums;
  line-height: 1.25; margin-top: 2px; }
.tile .delta { font-size: 12.5px; color: var(--on-surface-variant); }
.chart text { font-family: var(--font); fill: var(--on-surface-variant); font-size: 11px; }
.chart .bar { transition: opacity .12s var(--ease); }
.chart g:hover .bar { opacity: .75; }
.range-tabs { display: inline-flex; background: var(--sc); border-radius: 999px; padding: 4px; gap: 4px; }
/* `flex: none` and `nowrap` together are what keep these pills pill-shaped.
   As flex items they shrink by default, so on a phone the row squeezed each
   one until its label broke over two lines — "30 days" stacked inside a pill
   grown twice as tall as the rest of the group. They keep their natural
   width and the group scrolls instead. */
.range-tabs a { padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  color: var(--on-surface-variant); text-decoration: none; flex: none; white-space: nowrap; }
.range-tabs a.active { background: var(--secondary-container); color: var(--on-secondary-container); }
@media (max-width: 919px) { .tiles { grid-template-columns: 1fr 1fr; } }

/* Period-over-period change on a tile. The direction is carried by the arrow
   and by the words beside it; the colour only agrees with them. Green on a
   rise would be a judgement, not a reading, on any metric where up is bad —
   these are visitors and members, where it is not. */
.tile .delta-move { font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.tile .delta-move .arrow { font-size: 13px; line-height: 1; }
.tile .delta-move.up { color: var(--green-fg); }
.tile .delta-move.down { color: var(--error); }
.tile .delta-vs, .tile .delta-flat { color: var(--on-surface-variant); }
/* The live counter and the membership line, under the tiles rather than
   inside one: they belong to the page, not to any single figure. */
.live-note { margin: -4px 0 4px; font-size: 13px; color: var(--on-surface-variant); }

/* ---- analytics: breakdown tables ----
   The readable twin of every chart on the page. A bar sits behind the name as
   a magnitude cue and the figures stay exact beside it, so a row is scannable
   at a glance and precise on inspection. */
.breakdown { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.breakdown caption { text-align: left; }
.breakdown thead th { font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--on-surface-variant); opacity: .75;
  padding: 0 0 10px; text-align: right; white-space: nowrap; }
.breakdown thead th:first-child { text-align: left; }
.breakdown tbody th { font-weight: 500; text-align: left; position: relative;
  padding: 9px 12px 9px 0; display: flex; align-items: center; gap: 10px; }
.breakdown tbody td { text-align: right; padding: 9px 0 9px 18px; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--on-surface-variant); }
.breakdown tbody td:last-child { color: var(--on-surface-variant); opacity: .75; }
.breakdown tbody tr { border-top: 1px solid var(--outline-variant); }
.breakdown tbody tr:first-child { border-top: 0; }
.bd-lead { flex: none; font-size: 17px; line-height: 1; display: inline-flex;
  align-items: center; gap: 8px; }
.bd-lead:empty { display: none; }
/* The row's own colour class, the same one the map paints that country, so a
   row and a shape can be matched up in either direction. */
.bd-lead .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bd-name { min-width: 0; display: flex; flex-direction: column; }
.bd-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-detail { font-size: 12px; color: var(--on-surface-variant); }
/* The bar is behind the row's own name, filling from the left to the row's
   share of the busiest row. Absolute so it never pushes the text around. */
.bd-bar { position: absolute; left: -8px; top: 3px; bottom: 3px; z-index: 0;
  width: calc((100% + 8px) * var(--share)); border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 10%, transparent); pointer-events: none; }
.breakdown tbody th > :not(.bd-bar) { position: relative; z-index: 1; }
.bd-scroll { overflow-x: auto; }
.bd-empty { margin: 4px 0 0; font-size: 13px; color: var(--on-surface-variant); }
.bd-hint { margin: 0 0 14px; font-size: 13px; color: var(--on-surface-variant); }
.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; }

/* ---- analytics: the locations choropleth ----
   One hue, light to dark, mixed from the admin's own accent into the card it
   sits on. Written as a mix rather than five hexes so it follows the theme and
   inverts correctly in dark mode, where "near zero" recedes toward a dark
   surface instead of a light one. The five steps were validated against both
   surfaces: monotone lightness, visible gaps, and a light end that still
   clears 2:1 against the card. Five classes, because past about seven the
   adjacent ones stop being tellable apart. */
/* The ramp is declared on the whole card, not just the figure: the table's
   row swatches are the same five classes and have to resolve them too. */
.locations { --b0: color-mix(in srgb, var(--primary) 45%, var(--sc-lowest));
  --b1: color-mix(in srgb, var(--primary) 59%, var(--sc-lowest));
  --b2: color-mix(in srgb, var(--primary) 73%, var(--sc-lowest));
  --b3: color-mix(in srgb, var(--primary) 86%, var(--sc-lowest));
  --b4: var(--primary);
  /* A country nobody visited is a different statement from a quiet one, so it
     is a neutral off the surface rather than a sixth step of the ramp. */
  --b-none: color-mix(in srgb, var(--on-surface) 7%, var(--sc-lowest)); }
.locations .sw.b0 { background: var(--b0); } .locations .sw.b1 { background: var(--b1); }
.locations .sw.b2 { background: var(--b2); } .locations .sw.b3 { background: var(--b3); }
.locations .sw.b4 { background: var(--b4); } .locations .sw.none { background: var(--b-none); }
.worldmap { margin: 0 0 18px; }
.map-frame { min-height: 180px; display: flex; align-items: center; justify-content: center; }
.map-pending { margin: 0; font-size: 13px; color: var(--on-surface-variant); }
.worldmap.failed { display: none; }
.map-svg { width: 100%; height: auto; display: block; }
/* A hairline of the card's own surface between neighbours — the gap does the
   separating, never a drawn border. */
.map-svg .c { fill: var(--b-none); stroke: var(--sc-lowest); stroke-width: .2;
  transition: fill .12s var(--ease); }
.map-svg .c.b0 { fill: var(--b0); } .map-svg .c.b1 { fill: var(--b1); }
.map-svg .c.b2 { fill: var(--b2); } .map-svg .c.b3 { fill: var(--b3); }
.map-svg .c.b4 { fill: var(--b4); }
.map-svg .c:not(.none):hover { stroke: var(--on-surface); stroke-width: .4; }
.map-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-top: 12px; font-size: 11.5px; color: var(--on-surface-variant); }
.map-legend .sw { width: 22px; height: 10px; border-radius: 2px; flex: none; }
.map-legend .lg-gap { width: 14px; }
@media (max-width: 599px) { .map-legend .lg-label { font-size: 11px; } }

/* ---- the social web ----
   The fediverse screens. A feed is a column of cards rather than the dense
   rows the rest of the admin uses: a note is something to read, not a record
   to scan, and it needs the room its own text asks for. */
.sw-profile { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.sw-profile-main { flex: 1; min-width: 200px; }
.sw-profile-main > b { font-size: 19px; display: block; line-height: 1.3; }
.sw-profile-end { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sw-stats { display: flex; gap: 16px; margin-top: 6px; font-size: 13px;
  color: var(--on-surface-variant); flex-wrap: wrap; }
.sw-stats b { color: var(--on-surface); font-variant-numeric: tabular-nums; }
.sw-bio { margin: 10px 0 0; font-size: 13.5px; color: var(--on-surface-variant);
  max-width: 60ch; white-space: pre-wrap; }
.sw-handle { font-size: 13px; color: var(--on-surface-variant); display: block; }

/* a note */
.sw-note { margin-bottom: 12px; }
.sw-note-head { display: flex; align-items: center; gap: 12px; }
.sw-who { display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: inherit; min-width: 0; flex: 1; border-radius: 12px; }
.sw-who:hover .sw-names b { text-decoration: underline; }
.sw-names { min-width: 0; }
.sw-names b { font-size: 14.5px; font-weight: 600; display: block; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-names .sw-handle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-time, .sw-since { font-size: 12.5px; color: var(--on-surface-variant); white-space: nowrap; }
.sw-replyto { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px;
  font-size: 12.5px; color: var(--on-surface-variant); text-decoration: none; }
.sw-replyto svg.i { width: 14px; height: 14px; transform: rotate(180deg); }
.sw-replyto:hover { text-decoration: underline; }
/* The body is the point of the card, so it gets reading measure and keeps the
   line breaks the author wrote. */
.sw-text { margin: 12px 0 0; font-size: 15px; line-height: 1.55; white-space: pre-wrap;
  overflow-wrap: anywhere; max-width: 68ch; }
.sw-note-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent); }
.sw-counts { display: flex; gap: 16px; }
.sw-count { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  color: var(--on-surface-variant); text-decoration: none;
  font-variant-numeric: tabular-nums; }
.sw-count svg.i { width: 15px; height: 15px; }
a.sw-count:hover { color: var(--on-surface); }
.sw-actions { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.sw-act { display: inline-flex; }
.sw-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: none; border-radius: 999px; background: transparent; color: var(--on-surface-variant);
  font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: background .15s var(--ease), color .15s var(--ease); }
.sw-btn:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  color: var(--on-surface); }
.sw-btn svg.i { width: 16px; height: 16px; }
/* An interaction that is already standing reads as done rather than offered. */
.sw-btn.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.sw-btn.danger { color: var(--error); }
.sw-btn.danger:hover { background: var(--error-container); color: var(--on-error-container); }

/* composing */
.sw-composer { margin-bottom: 16px; }
.sw-composer-foot { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.sw-composer-foot .muted { margin: 0; font-size: 12.5px; }
.sw-composer-foot .btn { margin-left: auto; }

/* lists of people */
.sw-row { gap: 14px; }
.sw-row-end { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: flex-end; }
.sw-notification.unread { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.sw-said { font-weight: 400; color: var(--on-surface-variant); }
.sw-quote { white-space: pre-wrap; overflow-wrap: anywhere; }
.sw-markread { display: flex; justify-content: flex-end; margin-bottom: 10px; }

/* finding somebody */
.sw-search { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.sw-search .field { flex: 1; min-width: 220px; }
.sw-found { background: var(--sc-low); border-radius: 20px; padding: 18px 20px; margin-bottom: 16px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.sw-found-end { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sw-found .sw-bio { flex-basis: 100%; margin: 0; }
.sw-search-miss { margin: 0 0 16px; font-size: 13.5px; color: var(--error); }

/* explore: suggestion cards, two or three across depending on the room */
.sw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.sw-suggest { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sw-reason { margin: 0; font-size: 12.5px; color: var(--on-surface-variant); }
.sw-suggest .sw-bio { margin: 0; font-size: 13px; }
.sw-suggest-end { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: center; }
.sw-section-note { margin: -6px 0 12px; padding: 0 16px; font-size: 12.5px;
  color: var(--on-surface-variant); }
.sw-pager { display: flex; gap: 8px; justify-content: center; margin: 18px 0 4px; }
.sw-back { margin: 0 0 14px; font-size: 13px; }
.sw-back a { display: inline-flex; align-items: center; gap: 4px; color: var(--on-surface-variant);
  text-decoration: none; }
.sw-back svg.i { width: 15px; height: 15px; transform: rotate(180deg); }
.sw-back a:hover { text-decoration: underline; }
.seg-bar.sub { margin-top: -4px; }
@media (max-width: 599px) {
  .sw-actions { margin-left: 0; width: 100%; }
  .sw-note-foot { gap: 8px; }
}

/* ---- meta data: search and social card previews ----
   Mirrors what Ghost shows above each group of fields: a mock search result,
   and a mock post carrying the card. The shapes are Ghost's; the surfaces and
   type are this admin's own. */
.seo-prev { background: var(--sc); border-radius: 20px; padding: 18px 20px 20px; margin-bottom: 12px; }
.seo-prev .cap { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; color: var(--on-surface-variant); margin-bottom: 12px; }
/* Both sheets are held to roughly the width the real thing gets, so the
   1.91:1 card image reads as a thumbnail rather than filling the page. */
.seo-prev .sheet { background: var(--sc-lowest); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow-1); max-width: 620px; margin: 0 auto; }
.seo-prev.social .sheet { max-width: 480px; }
/* search result */
.seo-prev .site { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.seo-prev .favicon { width: 28px; height: 28px; border-radius: 999px; flex: none;
  background: var(--secondary-container) center/contain no-repeat; }
.seo-prev .host { font-size: 13.5px; line-height: 1.25; }
.seo-prev .addr { font-size: 12px; color: var(--on-surface-variant); word-break: break-all; }
.seo-prev .g-title { display: block; font-size: 19px; line-height: 1.3; color: #1a0dab; margin-bottom: 2px; }
.seo-prev .g-desc { font-size: 13.5px; color: var(--on-surface-variant); }
/* social post */
.seo-prev .who { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.seo-prev .who .avatar { width: 40px; height: 40px; border-radius: 999px; flex: none;
  background: var(--secondary-container) center/cover no-repeat; }
.seo-prev .who .name { font-weight: 600; font-size: 14.5px; line-height: 1.2; }
.seo-prev .who .when { font-size: 13px; color: var(--on-surface-variant); }
.seo-prev .bar { height: 11px; border-radius: 999px; background: var(--outline-variant); margin-bottom: 8px; }
.seo-prev .bar.short { width: 60%; margin-bottom: 14px; }
.seo-prev .card-mock { border: 1px solid var(--outline-variant); border-radius: 14px; overflow: hidden; }
.seo-prev .card-mock .shot { display: block; aspect-ratio: 1.91 / 1; background: var(--sc); }
.seo-prev .card-mock .shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.seo-prev .card-mock .shot.empty { display: grid; place-items: center;
  font-size: 13px; color: var(--on-surface-variant); }
.seo-prev .card-mock .body { padding: 12px 14px; border-top: 1px solid var(--outline-variant); }
.seo-prev .card-mock .body .t { display: block; font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.seo-prev .card-mock .body .d { display: block; font-size: 13px; color: var(--on-surface-variant);
  margin-top: 3px; line-height: 1.4; }
.seo-prev .card-mock .body .u { display: block; font-size: 12px; color: var(--on-surface-variant);
  margin-top: 6px; text-transform: lowercase; }

/* ---- themes: the official theme gallery ---- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 12px; }
/* The thumbnails are Ghost's own marketplace screenshots, 600x750, served
   back by the admin itself so they can carry a long cache header. The box
   keeps its height whether or not the image arrives, so a missing thumbnail
   leaves a tinted panel rather than collapsing the card. */
.gallery .shot { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--sc); border-bottom: 1px solid var(--outline-variant); }
.gallery .shot img { display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: top center; }
.gallery .shot::after { content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--on-surface) 6%, transparent); }
/* Same lift as a module card: the card is a destination (Preview, Install,
   Activate), so it answers the pointer the way the dashboard modules do. */
.gallery .card { transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease); }
.gallery .card:hover { background: var(--glass-strong); transform: translateY(-2px);
  box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
@media (prefers-reduced-motion: reduce) { .gallery .card:hover { transform: none; } }
/* Each card enters with `.rise`; its `both` fill would keep owning
   `transform` after the entrance and pin the card in place on hover. */
.gallery .card.rise { animation-fill-mode: backwards; }
.gallery .meta { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.gallery .meta .body { flex: 1; min-width: 0; }
.gallery .meta .title { display: block; font-size: 15px; font-weight: 600; }
.gallery .meta .detail { display: block; font-size: 12.5px; color: var(--on-surface-variant); }
.gallery .actions { display: flex; align-items: center; gap: 8px; padding: 0 16px 14px; }
.gallery .actions form { display: contents; }
.gallery .actions .btn { flex: 1; }
/* Premium cards, four to a line. The store's screenshots are landscape crops
   of a homepage, so the box is 4:3 rather than the marketplace's 4:5, and
   the price rides on the picture the way it does on the store. */
.gallery.premium { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery.premium .card { border-radius: 20px; }
.gallery.premium .shot { aspect-ratio: 4 / 3; }
.gallery .shot .price { position: absolute; top: 10px; right: 10px; z-index: 1; height: 24px; padding: 0 10px;
  display: inline-flex; align-items: center; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--sc-lowest); color: var(--on-surface);
  box-shadow: 0 1px 3px color-mix(in srgb, #000 22%, transparent); }
.gallery .shot .price.free { background: var(--primary); color: var(--on-primary); }
.gallery.premium .meta { padding: 12px 14px 10px; align-items: flex-start; }
.gallery.premium .meta .title { font-size: 14.5px; }
.gallery.premium .meta .detail { font-size: 12px; line-height: 1.4; margin-top: 2px; }
/* Pinned to the bottom, so a two-line pitch next to a three-line one does
   not leave the buttons of one row at different heights. */
.gallery.premium .card { display: flex; flex-direction: column; }
.gallery.premium .actions { margin-top: auto; gap: 6px; padding: 0 14px 14px; }
.gallery.premium .actions .btn { height: 32px; padding: 0 8px; font-size: 12.5px; white-space: nowrap; }
/* Free themes: the same card a size further down, six to a line, so eighteen
   of them take three rows. Padding and type shrink with the card so the
   name and both buttons still fit. */
.gallery.compact { grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery.compact .card { border-radius: 16px; }
.gallery.compact .meta { padding: 9px 10px 7px; }
.gallery.compact .meta .title { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13.5px; }
.gallery.compact .meta .title .chip { height: 18px; padding: 0 7px; font-size: 10.5px; font-weight: 500; }
.gallery.compact .meta .detail { font-size: 11.5px; }
.gallery.compact .actions { gap: 5px; padding: 0 10px 10px; }
.gallery.compact .actions .btn { height: 28px; padding: 0 4px; font-size: 12px; white-space: nowrap; }
/* Each step down drops one column, keeping the cards near the same size
   rather than letting them balloon back to the old portraits. */
@media (max-width: 1200px) { .gallery.compact { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1000px) { .gallery.premium { grid-template-columns: repeat(3, 1fr); } .gallery.compact { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 719px) { .gallery.premium { grid-template-columns: 1fr 1fr; } .gallery.compact { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 479px) { .gallery.premium { grid-template-columns: 1fr; } .gallery.compact { grid-template-columns: 1fr 1fr; } }
@media (max-width: 1100px) { .gallery { grid-template-columns: 1fr 1fr; } }
/* Two columns are held all the way down to the narrowest tablets. Dropping
   to one at 719px handed every 4:5 thumbnail the full page width — a 560px
   portrait per theme, and with sixteen official themes a page 14,000px long
   that nobody could reach the bottom of. */
@media (max-width: 719px) { .gallery { gap: 12px; } .gallery .actions .btn { padding: 0 12px; } }
@media (max-width: 479px) {
  .gallery { grid-template-columns: 1fr; }
  /* Single column, so the thumbnail finally is page-width. It is letterboxed
     rather than shown at 4:5: anchored to the top (as `.shot img` already
     is), the crop keeps the masthead and hero that actually identify a
     theme, at a third of the scroll a full portrait costs. */
  .gallery .shot { aspect-ratio: 16 / 10; }
}

/* ---- post/page editor: Koenig canvas + an always-open settings rail ----
   Ghost hides the post settings behind a slide-over panel; here they are a
   second column that is simply always there. The editor takes the full
   content measure, the same 1500px every other page gets. */
.content:has(.editor-shell) { max-width: 1500px; }
.editor-shell { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 24px; align-items: start; }
/* The editor sits inside `.content`'s gutter like every other page: its title
   and body line up with the rest of the admin rather than running to the
   window edge.
   Koenig parks its ＋ card button to the left of the text column; this holds
   it 4px in, over the caret, instead. The button only ever shows on an empty
   line, so covering the caret's position costs nothing. Koenig's own offset
   is a utility class injected after this sheet, hence the `!important`. */
/* The canvas is a sheet of the same glass as the panels beside it. Without
   one the writing area was the only thing on the screen with no surface under
   it — title and body floating straight on the ambient field while every
   control around them sat on something. A sheet also gives the measure an
   edge, which is what makes a text column read as a page to write on. */
.editor-main { min-width: 0; position: relative;
  background: var(--glass); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); border-radius: 28px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  padding: 30px 34px 34px; }
/* The ＋ sits in the sheet's left margin, just before the caret — never on
   top of the text. The sheet's 48px padding is its room; the clip below
   keeps a margin that wide on the left for it. */
#koenig-mount [data-kg-plus-button] { left: -42px !important; }
#koenig-mount [data-kg-plus-button] > button { width: 32px !important; height: 32px !important; }
/* Set in the display serif, because that is what this same title will be in
   the posts list and on the site — the editor should not be the one place it
   is drawn in something else. */
.editor-title { width: 100%; border: none; outline: none; background: transparent; resize: none; overflow: hidden;
  font-family: var(--display); font-size: 34px; font-weight: 600; line-height: 1.15; letter-spacing: -.5px;
  color: var(--on-surface); padding: 0; margin: 2px 0 14px; caret-color: var(--primary); display: block; }
.editor-title::placeholder { color: color-mix(in srgb, var(--on-surface-variant) 42%, var(--surface)); opacity: 1; font-weight: 500; }
#koenig-mount { min-height: 52vh; }
/* Koenig paints its own surface; this only gives the canvas somewhere to sit
   and keeps its floating toolbars above the sticky page head. */
.koenig-react-editor { position: relative; z-index: 1; }
/* The word count, as Ghost has it since its own editor's redesign: a quiet
   pill floating in the bottom corner of the canvas, not a footer that has to
   be scrolled to. It says nothing until there are words to count. */
.wc-pill { position: absolute; right: 18px; bottom: 16px; z-index: 6; padding: 6px 14px; border-radius: 999px;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-stroke);
  color: var(--on-surface-variant); font-size: 12.5px;
  font-weight: 500; pointer-events: none;
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }
.wc-pill:empty { display: none; }

/* The `hidden` attribute has to actually hide things.
   Its UA rule is `[hidden] { display: none }`, which any class setting
   `display` outranks — and this admin sets `display` on nearly every
   component class, so `node.hidden = true` silently did nothing wherever one
   applied. That has been patched narrowly twice before (`#editor-view` here,
   `dialog.unsplash [hidden]` by the picker) and was still leaving the
   automation editor's Markdown fallback visible underneath the rich editor
   that had replaced it. One rule, once, instead of a fourth patch. */
[hidden] { display: none !important; }

/* The save state beside the header's Save button: "Saving…", "Saved", "*
   Unsaved changes" while the autosave is beaten only by the typing. */
/* A fixed slot, right-aligned: the text changes as a post saves ("Saving…",
   "Saved", "* Unsaved changes") and must never resize the header, or every
   button beside it shifts under the pointer. */
.save-state { font-size: 12.5px; color: var(--on-surface-variant); align-self: center; white-space: nowrap; min-width: 128px; text-align: right; }
.save-state:empty { visibility: hidden; }
.save-state.saved { color: var(--green-fg); }
.save-state.error { color: var(--error); }
.save-state.unsaved { font-style: italic; }

/* Koenig ships Ghost's own typography — Inter headings over a Georgia body,
   sized for Ghost's admin. Here it reads as a foreign document dropped into
   the page, so the prose is restated in this admin's typeface and scale.
   The #id prefix is needed to outweigh Koenig's own rules: its stylesheet is
   injected by the bundle, so it lands after this one with equal specificity. */
#koenig-mount .kg-prose :where(p, blockquote, aside, ul, ol, li):not(:where(.not-kg-prose, [class~=not-kg-prose] *)) {
  font-family: var(--font); font-size: 1.65rem; line-height: 1.65em; letter-spacing: 0; }
#koenig-mount .kg-prose :where(h1, h2, h3, h4, h5, h6):not(:where(.not-kg-prose, [class~=not-kg-prose] *)) {
  font-family: var(--font); color: var(--on-surface); letter-spacing: -.2px; }
#koenig-mount .kg-prose :where(h1):not(:where(.not-kg-prose, [class~=not-kg-prose] *)) { font-size: 2.8rem; }
#koenig-mount .kg-prose :where(h2):not(:where(.not-kg-prose, [class~=not-kg-prose] *)) { font-size: 2.3rem; }
#koenig-mount .kg-prose :where(h3):not(:where(.not-kg-prose, [class~=not-kg-prose] *)) { font-size: 1.95rem; }
#koenig-mount .kg-prose :where(h4, h5, h6):not(:where(.not-kg-prose, [class~=not-kg-prose] *)) { font-size: 1.7rem; }
#koenig-mount .koenig-lexical > * { color: var(--on-surface); }

/* Keep breakout cards inside the editor.
   Koenig sizes "wide" and "full" cards against the viewport — `75vw` and
   `100vw`, pulled back by a `--kg-breakout-adjustment` — because Ghost's
   editor is a narrow column of text in an otherwise empty page, so a card
   can spill into the margins. Here the settings rail is in those margins and
   the column is the full width already, which sent full-width cards out past
   the rail and under the window edge.
   The viewport maths is replaced outright rather than re-tuned: the
   adjustment would have to track the rail, the gutter and the toggle, and
   `75vw` is narrower than this column anyway, so a "wide" card would have
   come out smaller than a regular one. Cards render at the column's width
   while editing; `cardWidth` is untouched, so the post still breaks out on
   the site. */
/* One geometry in every state. Koenig gives a card 12px of side padding
   while it is hovered or selected and cancels it with a -12px margin, so the
   outline has room and the text does not move. Pinning the margin to 0 (as
   this rule used to) kept the padding and lost the cancel: on hover every
   line moved 12px right and rewrapped, which moved the text out from under a
   pointer near its edge, which ended the hover, which moved it back — the
   card shook left and right for as long as the pointer stayed. The padding
   and its cancel are now fixed for good, hovered or not. */
#koenig-mount [data-kg-card] {
  width: calc(100% + 24px) !important;
  min-width: 0 !important;
  max-width: calc(100% + 24px) !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  margin-left: -12px !important;
  margin-right: -12px !important;
  transform: none !important;
  left: auto !important;
  right: auto !important;
}
/* Nothing inside a card may push past it either — an image carrying its own
   intrinsic width, say. */
#koenig-mount [data-kg-card] img,
#koenig-mount [data-kg-card] video,
#koenig-mount [data-kg-card] iframe { max-width: 100%; }
/* Clipped at the outer wrapper only. Koenig renders a `.koenig-lexical` of
   its own, flush with the text column; clipping that one used to take the ＋
   button with it, back when the button sat in the padding to the left of
   the column — it floats over the column's start now, and this outer clip
   is the line that keeps breakout cards inside the page. */
/* No clip on the wrapper any more: cards are held to the column by the rule
   above, and the writing sheet is its own scroll area, so it clips at its own
   edge — which leaves the ＋ in the margin visible. */
#koenig-mount > .koenig-react-editor { overflow: visible; }
/* The "Begin writing…" placeholder is a separate element with its own font. */
#koenig-mount .koenig-lexical .font-serif { font-family: var(--font); }
#koenig-mount .editor-body-placeholder { color: color-mix(in srgb, var(--on-surface-variant) 42%, var(--surface)); font-weight: 400; }
/* The card menu's rows are left exactly as Koenig draws them — the icon,
   label and spacing are Ghost's. Only the panel around them is resized: each
   row is a label on the left and a keyboard hint on the right, and this
   build never passes a hint, so at Ghost's 312px the right half of every row
   is permanently blank. Narrowing the panel makes it hug its contents.
   The width is a Tailwind utility class in the bundle's own stylesheet,
   which is injected after this one — hence the attribute selector, which
   sidesteps escaping the brackets, and `!important` to outrank it. */
.koenig-lexical ul[class*="w-[312px]"] { width: 232px !important; }

/* ---- the settings rail, and the control that hides it ---- */
.editor-side { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 2px 4px 24px 0;
  scrollbar-width: thin; scrollbar-color: var(--outline-variant) transparent; }
/* Flex children shrink to fit a capped container by default, which collapsed
   every panel to a sliver and overlapped the one below it. The rail scrolls;
   the panels keep their own height. */
.editor-side > * { flex: none; }
.editor-side .card { margin: 0; }
#side-toggle { position: absolute; opacity: 0; pointer-events: none; }
.side-btn { cursor: pointer; }
.side-btn .when-shown { display: inline-flex; }
.side-btn .when-hidden { display: none; }
body:has(#side-toggle:checked) .editor-side { display: none; }
body:has(#side-toggle:checked) .editor-shell { grid-template-columns: minmax(0, 1fr); }
body:has(#side-toggle:checked) .side-btn .when-shown { display: none; }
body:has(#side-toggle:checked) .side-btn .when-hidden { display: inline-flex; }
/* With the rail gone the editor takes the whole column back. */
body:has(#side-toggle:checked) .editor-main { max-width: none; }

.panel > summary { display: flex; align-items: center; gap: 11px; padding: 12px 15px; cursor: pointer;
  list-style: none; font-size: 13.5px; font-weight: 600; user-select: none; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary .ic { width: 30px; height: 30px; border-radius: 10px; }
.panel > summary .ic svg { width: 16px; height: 16px; }
.panel > summary .twist { margin-left: auto; color: var(--on-surface-variant); transition: transform .2s var(--ease); }
.panel > summary .twist svg { width: 18px; height: 18px; display: block; }
.panel[open] > summary .twist { transform: rotate(180deg); }
.panel > summary:hover { background: var(--glass-hover); }
.panel .panel-body { padding: 2px 15px 15px; }
.panel .panel-body > .field:last-child { margin-bottom: 0; }
/* The shared field is sized for a 860px settings page; in a 316px rail the
   same padding reads as oversized, so the rail runs a tighter variant. */
.panel .field { margin-bottom: 11px; }
.panel .field input, .panel .field textarea, .panel .field select {
  font-size: 13.5px; padding: 17px 12px 5px; border-radius: 10px; }
.panel .field textarea { min-height: 62px; }
.panel .field textarea.code { font-size: 12px; }
.panel .field > span { background: var(--notch); font-size: 13.5px; top: 12px; left: 9px; }
.panel .field:focus-within > span,
.panel .field:has(input:not(:placeholder-shown)) > span,
.panel .field:has(textarea:not(:placeholder-shown)) > span,
.panel .field.fixed > span, .panel .field:has(textarea) > span { top: -7px; font-size: 11px; }
.panel .field .car { width: 18px; height: 18px; right: 10px; }
.panel .fchip { height: 28px; padding: 0 11px; font-size: 12.5px; }
/* A hint sits tight under the field it explains — but the fields carry their
   own 14px of bottom margin, which the negative top margin absorbs. After
   anything else (chips, a select) it needs its own breathing room. */
.panel .hint { font-size: 12px; color: var(--on-surface-variant); margin: -6px 0 14px; }
.panel .hint:first-child, .panel .chips + .hint { margin-top: 10px; }
.panel .panel-body > .hint:last-child { margin-bottom: 0; }
.panel .toggle-row { padding: 8px 0; min-height: 0; }
.panel .toggle-row .label b { font-size: 14px; }
.panel .toggle-row .label span { font-size: 12px; }
.panel .chips { max-height: 220px; overflow-y: auto; }
.editor-side .btn.text.danger { width: 100%; justify-content: center; }
/* ---- the feature image box ---- */
.fimg-drop { position: relative; border-radius: 16px; overflow: hidden;
  background: color-mix(in srgb, var(--sc-high) 42%, transparent);
  border: 1px solid var(--glass-stroke);
  box-shadow: inset 0 1px 0 var(--glass-edge); margin-bottom: 11px; }
.fimg-empty { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 12px; }
.fimg-btns { display: flex; gap: 8px; }
/* Ghost draws its image actions over the picture as translucent pills. The
   fixed light surface keeps them legible over any photograph, in either
   colour scheme — the danger variant keeps the red only for Remove. */
.btn.ghosted { background: rgba(255,255,255,.86); color: #201A1B; backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px); }
.btn.ghosted:hover { box-shadow: var(--shadow-1); }
.btn.ghosted.danger { color: #BA1A1A; }
.fimg-drop img { display: none; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.fimg-drop.is-set img { display: block; }
.fimg-drop.is-set .fimg-empty { display: none; }
.fimg-acts { display: none; position: absolute; left: 0; right: 0; bottom: 10px; justify-content: center; gap: 6px; }
.fimg-drop.is-set .fimg-acts { display: flex; }
.fimg-prog { display: none; position: absolute; inset: auto 0 0 0; height: 4px; background: color-mix(in srgb, var(--on-surface) 12%, transparent); }
.fimg-prog.on { display: block; }
.fimg-prog i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .15s linear; }

/* The feature image's own fields, folded behind one line: the box above is
   what the panel is opened for; the alt text, caption and URL are set once
   and rarely revisited. */
.panel-sub { border-top: 1px solid var(--outline-variant); margin-top: 12px; }
.panel-sub > summary { display: flex; align-items: center; gap: 6px; padding: 9px 0 2px; cursor: pointer;
  list-style: none; font-size: 12.5px; font-weight: 600; color: var(--on-surface-variant); user-select: none; }
.panel-sub > summary::-webkit-details-marker { display: none; }
.panel-sub > summary .twist { margin-left: auto; }
.panel-sub > summary .twist svg { width: 15px; height: 15px; display: block; transition: transform .2s var(--ease); }
.panel-sub[open] > summary .twist svg { transform: rotate(180deg); }
.panel-sub .panel-sub-body { padding-top: 10px; }
.panel-sub .field:last-child { margin-bottom: 2px; }

/* Below this the two columns leave the editor too narrow to write in — the
   rail, the gutter and the settings take ~680px before any text — so the
   settings drop underneath and the editor takes the width back. */
@media (max-width: 1199px) {
  .editor-shell, body:has(#side-toggle:checked) .editor-shell { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .editor-title { font-size: 26px; }
}

/* ---- centered auth pages ----
   Sign in, setup, the emailed code, forgot-password and invite redemption.
   All five render through `page_for(nav: false)`, so everything here is
   written once and applies to all of them. */

/* The bare shell every page without a rail gets. A class rather than the
   inline style it replaces: inline wins over every rule in this file, so the
   full-bleed override below could never take effect and the auth background
   was clipped to a 640px column down the middle of the screen. */
.content.narrow { max-width: 640px; padding-top: 40px; }
/* An auth page is the exception: it paints the whole viewport. More specific
   than `.content.narrow` on purpose, so it wins without depending on which
   rule comes last. */
.content.narrow:has(> .auth) { max-width: none; padding: 0; }

.auth { min-height: 100dvh; display: grid; place-items: center;
  padding: 32px 24px; position: relative; overflow: hidden; }

/* The background wash. Three blurred ovals, placed so each bleeds off a
   different edge — a blob fully inside the viewport reads as a stray shape
   rather than as lighting. `filter: blur()` needs room to fall off, which is
   what the negative offsets buy; `.auth` clips the overspill. */
.auth .blob { position: absolute; border-radius: 50%; filter: blur(100px);
  opacity: .5; pointer-events: none; }
.auth .b1 { width: 46vmax; height: 46vmax; min-width: 420px; min-height: 420px;
  background: var(--pink-bg); top: -18vmax; left: -12vmax; }
.auth .b2 { width: 40vmax; height: 40vmax; min-width: 360px; min-height: 360px;
  background: var(--blue-bg); bottom: -16vmax; right: -10vmax; }
.auth .b3 { width: 32vmax; height: 32vmax; min-width: 280px; min-height: 280px;
  background: var(--purple-bg); bottom: -12vmax; left: 20%; opacity: .38; }
/* Dark mode: the same hues at a fraction of the strength. At full opacity
   the containers are bright enough to glow through a dark page and the card
   stops being the brightest thing on screen, which is the one job the
   background must not take from it. */
.dark .auth .blob { opacity: .26; }
.dark .auth .b3 { opacity: .2; }

.auth-box { width: min(408px, 100%); position: relative;
  animation: rise .5s var(--ease) both; }

/* The brand tile: the same rounded square with the bottom-left corner
   squared off that the rail and the Click dashboard use, at the size a page
   with nothing else on it can afford. */
.auth-logo { font-family: Georgia, 'Iowan Old Style', serif; font-style: italic;
  font-size: 54px; line-height: 1; position: relative; width: 60px; height: 64px;
  border-radius: 20px 20px 20px 6px; background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; margin: 0 auto 18px;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 28%, transparent); }
.auth-logo span { position: absolute; font-family: var(--font); font-style: normal;
  font-weight: 600; font-size: 22px; line-height: 1; right: 5px; top: 4px; }

.auth-box h1 { text-align: center; font-size: 26px; font-weight: 600;
  letter-spacing: -.3px; margin: 0 0 6px; overflow-wrap: anywhere; }
.auth-box .sub { text-align: center; color: var(--on-surface-variant);
  font-size: 14px; margin: 0 0 24px; }
.auth-box .card { padding: 26px 26px 22px; }
.auth-box .btn { width: 100%; height: 46px; font-size: 15px; margin-top: 6px; }
/* The banner sits above the first field and must not crowd it. */
.auth-box .banner { margin: 0 0 18px; font-size: 13.5px; }

/* A password field and the control that reveals it. The button is inside the
   field's box, so the input is padded out of its way rather than overlapped —
   a long password must never run underneath it. */
.auth-pw { position: relative; }
.auth-pw input { padding-right: 48px; }
.auth-reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center; border: none;
  background: transparent; border-radius: 50%; cursor: pointer; padding: 0;
  color: var(--on-surface-variant); }
.auth-reveal:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  color: var(--on-surface); }
.auth-reveal:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.auth-reveal svg { width: 20px; height: 20px; display: block; }
/* Only one of the two glyphs shows at a time; the button's state says which. */
.auth-reveal .off, .auth-reveal[aria-pressed="true"] .on { display: none; }
.auth-reveal[aria-pressed="true"] .off { display: block; }
/* No script, no toggle — but the field must still work, so the button goes
   rather than sitting there inert. */
.no-js .auth-reveal { display: none; }
.no-js .auth-pw input { padding-right: 14px; }

/* Under the card: the way out for somebody who did not mean to be here, and
   the secondary action. Quiet, because neither is what the page is for. */
.auth-foot { display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-top: 18px; font-size: 13.5px; }
.auth-foot a { color: var(--on-surface-variant); text-decoration: none;
  padding: 6px 10px; border-radius: 10px; }
.auth-foot a:hover { color: var(--primary); text-decoration: underline; }

@media (max-width: 479px) {
  .auth { padding: 24px 16px; }
  .auth-box .card { padding: 20px 18px 18px; }
  .auth-box h1 { font-size: 23px; }
}
/* An entrance that slides is a liability for anybody who asked for less
   motion; the card still appears, it just does not travel. */
@media (prefers-reduced-motion: reduce) {
  .auth-box { animation: none; }
}

/* ---- search bar ---- */
.search { display: flex; align-items: center; gap: 12px; border-radius: 999px;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  padding: 0 18px; height: 46px; margin: 4px 0 14px; color: var(--on-surface-variant); }
.search input { flex: 1; border: none; outline: none; background: transparent; font-family: inherit;
  font-size: 14.5px; color: var(--on-surface); height: 100%; }

/* ---- post list: the posts and pages index ---------------------------------
   Rows, not cards. The column order follows Ghost's own list — thumbnail,
   title and byline, what happened to it, then the numbers — because a list
   of a hundred posts is scanned down a column, and fixed column widths are
   the whole reason rows beat cards here.
--------------------------------------------------------------------------- */

/* tools row: search takes the space, sort sits at the end */
/* `position` and a z-index of its own, because the toolbar carries `.rise`:
   the entrance animates `transform`, which leaves the toolbar a stacking
   context forever (the fill mode is `both`), and a stacking context traps
   its popovers' z-index inside itself. Without this the sort and filter
   menus open *underneath* the rows they are filtering — row text printing
   straight through them. */
.list-tools { position: relative; z-index: 40; display: flex; gap: 12px; align-items: center; margin: 4px 0 16px; }
.list-tools .search { flex: 1; margin: 0; }
/* a toolbar that holds more than one form — search submits on its own, the
   filter menu carries another, and forms cannot nest */
.list-tools .tool-form { flex: 1; min-width: 0; display: flex; }
/* the sort control: a menu of links, opened by the same <details> behaviour
   the batch bar's popovers use — no native select left on this toolbar */
.sort-menu { position: relative; flex: none; }
.sort-menu > summary { list-style: none; display: flex; align-items: center; gap: 6px;
  height: 46px; padding: 0 13px 0 18px; border-radius: 999px;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--on-surface); user-select: none; }
.sort-menu > summary::-webkit-details-marker { display: none; }
.sort-menu > summary .car { width: 18px; height: 18px; color: var(--on-surface-variant);
  transition: transform .18s var(--ease); }
.sort-menu[open] > summary .car { transform: rotate(180deg); }
.sort-menu > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sort-menu .pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 45;
  border-radius: 18px; padding: 6px;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; font-weight: 500; color: var(--on-surface); text-decoration: none; }
.menu-item:hover { background: color-mix(in srgb, var(--on-surface) 7%, transparent); }
.menu-item .ck { width: 18px; height: 18px; flex: none; display: grid; place-items: center;
  color: transparent; }
.menu-item .ck svg { width: 16px; height: 16px; }
.menu-item.on { font-weight: 600; }
.menu-item.on .ck { color: var(--primary); }
.menu-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* the NQL filter menu: the same pill-and-popover as the sort menu, so the
   toolbar reads as one row of controls rather than one control and a button
   someone bolted on. A live filter tints the pill and lights a dot — the
   state has to be visible from the toolbar, because a filtered list looks
   exactly like a short one. */
.filter-menu > summary { padding-left: 14px; gap: 8px; }
.filter-menu > summary svg.i { width: 18px; height: 18px; color: var(--on-surface-variant); }
.filter-menu.on > summary { background: var(--secondary-container); color: var(--on-secondary-container); }
.filter-menu.on > summary svg.i { color: inherit; }
.fm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex: none; }
.filter-menu .pop { width: min(360px, calc(100vw - 32px)); padding: 16px; text-align: left;
  max-height: calc(100vh - 160px); overflow-y: auto; }
.filter-menu .pop .field { margin-bottom: 8px; }
.fm-hint { margin: 0 0 14px; font-size: 11.5px; line-height: 1.5; color: var(--on-surface-variant);
  font-family: var(--mono); word-break: break-word; }
.fm-actions { display: flex; gap: 8px; }
.fm-actions .btn { flex: 1; justify-content: center; }
.fm-title { margin: 16px 0 8px; padding-top: 14px; border-top: 1px solid var(--outline-variant);
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-surface-variant); opacity: .75; }
.fm-views { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.fm-views .tiny { margin: 0; font-size: 12.5px; }
.view-row { display: flex; align-items: center; gap: 4px; }
.view-open { flex: 1; min-width: 0; text-align: left; padding: 8px 10px; border: none; border-radius: 9px;
  background: transparent; color: var(--on-surface); font: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-open:hover { background: color-mix(in srgb, var(--on-surface) 7%, transparent); }
.icon-btn.tiny { width: 28px; height: 28px; flex: none; font-size: 17px; line-height: 1; }
.fm-save .field { margin-bottom: 8px; }
.fm-save .btn { width: 100%; justify-content: center; }

/* status tabs */
.seg-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 16px; }
.seg { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 16px;
  border-radius: 999px; font-size: 13.5px; font-weight: 500; text-decoration: none;
  color: var(--on-surface-variant); background: transparent;
  border: 1px solid var(--outline-variant); transition: all .18s var(--ease); }
.seg:hover { background: color-mix(in srgb, var(--on-surface) 5%, transparent); color: var(--on-surface); }
.seg.on { background: var(--secondary-container); color: var(--on-secondary-container);
  border-color: transparent; font-weight: 600; }
.seg-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums;
  background: color-mix(in srgb, var(--on-surface) 8%, transparent); color: inherit; }
.seg.on .seg-count { background: color-mix(in srgb, var(--on-secondary-container) 14%, transparent); }

/* ---- the list ---- */
.post-list { border-radius: 24px; overflow: hidden;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }
.post-row { display: flex; align-items: center; position: relative; }
.post-row + .post-row::before { content: ""; position: absolute; top: 0; left: 170px; right: 16px;
  height: 1px; background: var(--outline-variant); }
.post-row:hover { background: color-mix(in srgb, var(--on-surface) 4%, transparent); }
.post-row:focus-within { background: color-mix(in srgb, var(--on-surface) 4%, transparent); }

.post-row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px;
  padding: 11px 0 11px 16px; text-decoration: none; color: inherit; }
.post-row-link:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px;
  border-radius: 12px; }

/* thumbnail — Ghost uses an 80–100px 16:10 tile */
.post-row-thumb { position: relative; width: 90px; aspect-ratio: 16 / 10; flex: none;
  border-radius: 9px; overflow: hidden; background: var(--sc-high); }
.post-row-img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* no feature image: a gradient keyed to the post id, so the column still
   carries some recognition when scanning */
.post-row-blank { position: absolute; inset: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--from), var(--to)); }
.post-row-blank span { font-size: 25px; font-weight: 700; line-height: 1;
  color: rgba(255,255,255,.78); }
.post-row-star { position: absolute; right: 4px; top: 4px; width: 19px; height: 19px;
  display: grid; place-items: center; border-radius: 50%; color: #fff;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px); }
.post-row-star svg.i { width: 11px; height: 11px; }

/* title and byline */
.post-row-main { flex: 1; min-width: 0; }
.post-row-title { margin: 0; font-family: var(--display); font-optical-sizing: auto;
  font-size: 15.5px; font-weight: 600; line-height: 1.3; letter-spacing: -.008em;
  color: var(--on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .18s var(--ease); }
.post-row:hover .post-row-title { color: var(--primary); }
.post-row-meta { margin: 2px 0 0; font-size: 12.5px; color: var(--on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-row-dot { opacity: .45; margin: 0 1px; }

/* status column */
.post-row-status { width: 192px; flex: none; display: flex; flex-direction: column;
  align-items: flex-start; gap: 3px; }
.tag-menu .pop { max-height: 320px; overflow-y: auto; }
.tag-menu > summary { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.post-row-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  font-weight: 600; color: var(--on-surface-variant); }
.post-row-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none; }
/* Ghost colours the dot by state: pink for a draft, green for scheduled */
.post-row-chip.draft { color: var(--primary); }
.post-row-chip.scheduled { color: var(--green-fg); }
.post-row-chip.published, .post-row-chip.sent { color: var(--on-surface-variant); }
html.dark .post-row-chip.scheduled { color: var(--green-fg); }
.post-row-detail { font-size: 11.8px; color: var(--on-surface-variant); opacity: .8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* the numbers — fixed-width cells so they line up down the page */
.post-row-stats { flex: none; display: flex; }
.post-stat { width: 66px; flex: none; display: flex; flex-direction: column; align-items: flex-end;
  gap: 1px; font-size: 11px; color: var(--on-surface-variant); }
.post-stat b { font-weight: 600; font-size: 13.5px; color: var(--on-surface);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; }


/* delete, revealed on hover — it must not be the thing you hit while
   reaching for the post */
.post-row-action { flex: none; width: 34px; height: 34px; opacity: 0;
  transition: opacity .16s var(--ease); }
.post-row:hover .post-row-action, .post-row:focus-within .post-row-action,
.member-row:hover .post-row-action, .member-row:focus-within .post-row-action { opacity: 1; }
.post-row-action .icon-btn { width: 34px; height: 34px; }
.post-row-action .icon-btn svg.i { width: 18px; height: 18px; }
@media (hover: none) { .post-row-action { opacity: 1; } }

/* ---- the trailing action column -------------------------------------------
   One fixed-width column at the end of every row, holding whatever actions
   that row has. It exists so the columns before it cannot move: these
   actions used to sit loose at the end of a flex row, which meant a post
   with an analytics link pushed its own status and numbers 42px left of a
   draft's, and the head strip — which has no actions at all — labelled a
   geometry none of the rows actually had. `--end` is declared on the list so
   the strip can reserve exactly the width the rows spend.
--------------------------------------------------------------------------- */
.post-list { --end: 92px; }
.member-list { --end: 50px; }
.row-end { width: var(--end, 50px); flex: none; display: flex; align-items: center;
  justify-content: flex-end; gap: 4px; padding-right: 10px; }

/* ---- row checkboxes and batch selection -------------------------------------
   One checkbox system across the posts, pages and members lists, drawn the
   way the rest of the admin draws its controls: the input stays a real
   checkbox (it is what the form submits), the visible box is its sibling —
   18px, 2px on-surface-variant outline, 2px radius, primary fill with an
   on-primary tick when checked, a dash while indeterminate. The hover and
   active states are state layers over the whole 40px cell, the same
   treatment `.icon-btn` gets, so the control feels like it belongs to the
   row rather than sitting on it.
--------------------------------------------------------------------------- */
.row-check { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px;
  margin-left: 8px; border-radius: 50%; cursor: pointer; position: relative;
  transition: background .15s var(--ease); }
/* The state layer is the tonal film, not grey: a grey disc over a glass list
   reads as a smudge on it. */
.row-check:hover { background: var(--glass-hover); }
.row-check:active { background: var(--glass-press); }
/* the input fills the cell rather than sitting at the size of the drawn box:
   the whole 40px is then one target on the control itself, which is both the
   M3 touch size and what makes shift-click ranges work from anywhere in it */
.row-check input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; }
/* the drawn box is decoration over the real input and must not take the
   click off it: the label forwards an activation either way, but a click
   that lands on the input itself is the one that carries shift into the
   range-select handler */
/* The resting box: a 1.5px outline at a fraction of the text colour, and a
   6px radius that belongs to the same family as the 24px cards around it.
   It was 2px of near-black at 3px radius — a hard dark square on soft glass,
   which is most of why the lists looked crude. A checkbox nobody has ticked
   should be a quiet outline, not the heaviest mark on the row. */
.row-check .box { width: 19px; height: 19px; border-radius: 6px;
  border: 1.5px solid color-mix(in srgb, var(--on-surface-variant) 52%, transparent);
  display: grid; place-items: center; color: transparent; pointer-events: none;
  background: color-mix(in srgb, var(--sc-lowest) 55%, transparent);
  transition: background .16s var(--ease), border-color .16s var(--ease),
    color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease); }
/* On a dark row, `--sc-lowest` is darker than the list it sits in, so the
   resting box read as a hole punched in the row. A thin white film instead:
   an empty control should look like empty glass, not like absence. */
html.dark .row-check .box { background: color-mix(in srgb, #fff 6%, transparent); }
.row-check:hover .box { border-color: color-mix(in srgb, var(--on-surface-variant) 80%, transparent); }
.row-check:active .box { transform: scale(.92); }
.row-check .box svg { width: 14px; height: 14px; display: block;
  transform: scale(.55); opacity: 0;
  transition: transform .18s var(--ease), opacity .12s var(--ease); }
/* Ticked, it becomes one of the admin's solid objects — the same lit top edge
   and soft drop shadow the brand mark and the selected rail tab carry, so a
   selection reads as something placed on the row. */
.row-check input:checked + .box, .row-check input:indeterminate + .box {
  background: linear-gradient(180deg, color-mix(in srgb, #fff 20%, var(--primary)), var(--primary));
  border-color: var(--primary); color: var(--on-primary);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 3px 8px -3px rgba(62,7,29,.55); }
html.dark .row-check input:checked + .box,
html.dark .row-check input:indeterminate + .box {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 8px -4px rgba(0,0,0,.8); }
.row-check input:checked + .box svg { transform: scale(1); opacity: 1; }
.row-check input:indeterminate + .box svg { display: none; }
.row-check input:indeterminate + .box::after { content: ""; width: 10px; height: 2.5px;
  border-radius: 2px; background: var(--on-primary); }
.row-check input:focus-visible + .box { outline: 2px solid var(--primary); outline-offset: 3px; }
/* a chosen row keeps a faint primary tint, so a selection is legible without
   hunting for each ticked box */
.post-row:has(.row-check input:checked),
.member-row:has(.row-check input:checked) {
  background: color-mix(in srgb, var(--primary) 7%, transparent); }
.post-row:has(.row-check input:checked) + .post-row::before,
.member-row:has(.row-check input:checked) + .member-row::before { opacity: 0; }

/* the column-heading strip: gives the select-all box a home and names the
   numbers, so the stats columns stop being unlabeled right-aligned digits */
.list-head { display: flex; align-items: center; gap: 16px; padding: 12px var(--end, 50px) 10px 0;
  border-bottom: 1px solid var(--outline-variant); }
.list-head .lh-spacer { width: 90px; flex: none; }
.list-head .lh-spacer.face { width: 40px; }
.list-head .lh-main { flex: 1; min-width: 0; }
.list-head .lh-status { width: 192px; flex: none; }
.list-head .lh-labels { width: 230px; flex: none; }
.member-list .list-head .lh-status { width: 110px; }
.list-head .lh-stats { display: flex; }
.list-head .lh-stat { width: 66px; flex: none; text-align: right; }
.lh-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--on-surface-variant); opacity: .75; white-space: nowrap; }

/* the floating action bar. Pure CSS decides whether it is on screen — the
   page `:has` a ticked row checkbox — so batch selection works before the
   script has run (and without it entirely); the script only keeps the count
   and the select-all box honest. Frosted like the sticky header, so rows
   scrolling underneath it read as being behind glass. */
form.batch { display: contents; }
/* Centred by auto margins between a left:0/right:0 pair rather than by
   `left:50%` and a translate: with `left:50%` the bar's available width is
   only half the viewport, so a bar carrying every bulk action wrapped into a
   two-row lozenge on a screen with room to spare. This way it measures
   itself against the whole width and the transform is free for the
   entrance. */
.batch-bar { position: fixed; left: 0; right: 0; bottom: 26px; z-index: 70;
  width: fit-content; margin-inline: auto;
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px; max-width: calc(100vw - 24px);
  padding: 7px 10px 7px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent);
  box-shadow: var(--shadow-2); color: var(--on-surface);
  transform: translateY(16px) scale(.97); opacity: 0; pointer-events: none;
  transition: transform .28s var(--ease), opacity .2s var(--ease); }
body:has(.row-check input[name="ids"]:checked) .batch-bar {
  transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.bb-count { font-size: 13.5px; font-weight: 600; white-space: nowrap; padding-right: 12px;
  margin-right: 6px; border-right: 1px solid var(--outline-variant); }
.bb-count b { font-variant-numeric: tabular-nums; }
.bb-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px;
  border: none; border-radius: 999px; background: transparent; color: var(--on-surface);
  font-family: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease); }
.bb-btn:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.bb-btn svg.i { width: 17px; height: 17px; }
.bb-btn.danger { color: var(--error); }
.bb-btn.danger:hover { background: var(--error-container); color: var(--on-error-container); }
.bb-btn:focus-visible, .batch-pop > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* label picker, opening upward out of the bar */
.batch-pop { position: relative; display: inline-flex; }

.batch-pop > summary { list-style: none; }
.batch-pop > summary::-webkit-details-marker { display: none; }
.batch-pop .pop { position: absolute; bottom: calc(100% + 14px); right: 0; width: 300px;
  border-radius: 20px; padding: 16px; text-align: left;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
.batch-pop .pop::after { content: ""; position: absolute; bottom: -7px; right: 26px; width: 12px;
  height: 12px; background: var(--sc-lowest); border-right: 1px solid var(--outline-variant);
  border-bottom: 1px solid var(--outline-variant); transform: rotate(45deg); }
.batch-pop .pop .field { margin: 0 0 12px; }
.batch-pop .pop .btn { width: 100%; justify-content: center; }
.batch-pop .pop p { margin: 10px 0 0; font-size: 12px; color: var(--on-surface-variant); }
.batch-pop .pop .pop-title { margin: 0 0 12px; font-size: 13px; font-weight: 600;
  color: var(--on-surface); }
/* a tag list can run long — it scrolls inside the popover rather than
   growing one off the top of the screen */
.batch-pop .pop .chips { max-height: 220px; overflow-y: auto; }

/* search came up empty — the one state the old client filter left as a
   blank page */
.filter-empty { display: none; padding: 44px 20px 48px; text-align: center;
  color: var(--on-surface-variant); }
.filter-empty.on { display: block; }
.filter-empty .btn { margin-top: 16px; }

/* ---- the members list ----------------------------------------------------
   The same row language as the posts list, so the two heaviest screens in
   the admin read as one product: checkbox, face, who they are, what they
   belong to, where they stand, when they arrived.
--------------------------------------------------------------------------- */
.member-list { border-radius: 24px; overflow: hidden;
  background: var(--glass); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); }
.member-row { display: flex; align-items: center; position: relative; }
.member-row + .member-row::before { content: ""; position: absolute; top: 0; left: 120px; right: 16px;
  height: 1px; background: var(--outline-variant); }
.member-row:hover, .member-row:focus-within { background: color-mix(in srgb, var(--on-surface) 4%, transparent); }
.member-row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px;
  padding: 11px 0 11px 16px; text-decoration: none; color: inherit; }
.member-row-link:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; border-radius: 12px; }
.member-face { width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--sc-high); color: var(--on-surface-variant); display: grid; place-items: center;
  font-size: 15px; font-weight: 600; }
.member-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.member-main { flex: 1; min-width: 0; }
.member-name { display: block; font-size: 15px; font-weight: 600; line-height: 1.3;
  letter-spacing: -.006em; color: var(--on-surface); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; transition: color .18s var(--ease); }
.member-row:hover .member-name { color: var(--primary); }
.member-email { display: block; font-size: 12.5px; color: var(--on-surface-variant);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-labels { width: 230px; flex: none; display: flex; gap: 6px; overflow: hidden; }
.label-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border-radius: 7px; background: var(--sc-high); color: var(--on-surface-variant);
  font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.label-pill.more { background: transparent; border: 1px dashed var(--outline-variant); }
.member-status { width: 110px; flex: none; }
.member-added { width: 96px; flex: none; text-align: right; font-size: 12px;
  color: var(--on-surface-variant); font-variant-numeric: tabular-nums; }
.chip.free { background: transparent; border: 1px solid var(--outline); color: var(--on-surface-variant); }
.chip.paid { background: var(--green-bg); color: var(--green-fg); }
.chip.comped { background: var(--purple-bg); color: var(--purple-fg); }

/* pagination — server-side pages, so it is links, styled to match the rest */
.pager { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; font-size: 13px;
  color: var(--on-surface-variant); }
.pager .pages { font-variant-numeric: tabular-nums; }

/* header popovers: "New member" and "Import" keep their forms, folded out of
   the page flow until asked for — the list is the point of this screen, not
   a create form that is used once a month */
.head-pop { position: relative; }
.head-pop > summary { list-style: none; }
.head-pop > summary::-webkit-details-marker { display: none; }
.head-pop .pop { position: absolute; right: 0; top: calc(100% + 12px); width: min(400px, 92vw);
  z-index: 45; border-radius: 22px; padding: 20px; text-align: left;
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
.head-pop .pop .btn { width: 100%; }

@media (max-width: 1100px) {
  .member-labels { display: none; }
  .list-head .lh-labels { display: none; }
}
@media (max-width: 900px) {
  .member-added { display: none; }
}
@media (max-width: 680px) {
  .member-status { width: auto; }
  .member-row + .member-row::before { left: 112px; }
  .list-head .lh-status { display: none; }
  .list-head .lh-stats { display: none; }
  .batch-bar { bottom: 14px; padding-left: 12px; }
  .bb-count { border-right: none; padding-right: 4px; }
}

/* ---- page atmosphere ----
   A warm wash behind the head and a fine grain over everything, so the page
   has some depth instead of being a flat fill behind a floating slab. */
.content:has(.post-list)::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 420px;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 100% at 18% 0%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 70%),
    radial-gradient(44% 86% at 88% 4%, color-mix(in srgb, var(--teal-fg) 6%, transparent), transparent 70%); }
.content:has(.post-list)::after { content: ""; position: fixed; inset: 0; pointer-events: none;
  z-index: 0; opacity: .03; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E"); }
html.dark .content:has(.post-list)::after { mix-blend-mode: screen; opacity: .045; }
.content:has(.post-list) > * { position: relative; z-index: 1; }

/* No fill on the sticky header here. Elsewhere its translucent surface is
   invisible against a flat page; over the wash below it reads as a lighter
   band across the top. The backdrop blur stays, so rows scrolling under it
   are still frosted rather than running into the title. */
.content:has(.post-list) .page-head { background: transparent; }

/* the list heading borrows the editorial face, so the page has one voice */
.content:has(.post-list) .page-head h1,
.content:has(.seg-bar) .page-head h1 { font-family: var(--display); font-optical-sizing: auto;
  font-weight: 600; letter-spacing: -.02em; font-size: 27px; }

/* a row is a lot of columns; drop them as the space runs out, numbers first
   since the title is what you are actually looking for */
@media (max-width: 1040px) {
  .post-row-stats .post-stat:nth-child(3) { display: none; }
}
@media (max-width: 900px) {
  .post-row-stats { display: none; }
  .post-row-status { width: 150px; }
  .list-tools { flex-wrap: wrap; }
  .list-tools .tool-form { flex-basis: 100%; }
  .list-tools .search { flex-basis: 100%; }
}
@media (max-width: 680px) {
  .post-row-status { display: none; }
  .post-row-thumb { width: 64px; }
  .post-row + .post-row::before { left: 136px; }
  .post-row-link { gap: 12px; padding-left: 12px; }
  .post-row-action { opacity: 1; }
}

/* ---- color input ---- */
.color-field { display: flex; align-items: center; gap: 14px; }
.color-field input[type=color] { width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: none; padding: 0; flex: none; }
.color-field input[type=color]::-webkit-color-swatch-wrapper { padding: 3px; }
/* The hairline ring is what keeps a white or near-white value legible: a
   #ffffff swatch on a white card is otherwise an empty hole. */
.color-field input[type=color]::-webkit-color-swatch { border-radius: 50%; border: 2px solid var(--surface);
  box-shadow: var(--shadow-1), 0 0 0 1px var(--outline-variant); }

/* ---- dialog + snackbar ---- */
dialog { border-radius: 28px; color: var(--on-surface);
  padding: 24px; min-width: 320px; max-width: min(420px, 90vw);
  background: var(--glass-strong); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
dialog::backdrop { background: rgba(0,0,0,.4); }

/* ---- the admin-wide search modal ----
   A command palette: near the top of the viewport rather than centred,
   because the list grows downwards and a centred box jumps as it fills.
   Like the preview and Unsplash dialogs, this restates every clamp the
   shared `dialog` rule sets — inheriting its 420px and 24px padding would
   make a palette the width of a confirm box. */
dialog.omni { width: min(640px, calc(100vw - 24px)); min-width: 0; max-width: none;
  padding: 0; border-radius: 24px; overflow: hidden;
  margin: 12vh auto auto; }
dialog.omni::backdrop { background: rgba(14,8,12,.46); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.omni-box { display: flex; flex-direction: column; max-height: min(66vh, 560px); }
/* The field: one row, the icon and the escape hint pinned either side. */
.omni-field { display: flex; align-items: center; gap: 12px; padding: 16px 18px; flex: none;
  border-bottom: 1px solid var(--glass-stroke); color: var(--on-surface-variant); }
.omni-field svg.i { width: 20px; height: 20px; flex: none; }
.omni-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: 16px; color: var(--on-surface); }
/* The clear button Safari and Chrome add to a type=search sits on top of the
   escape hint and does a different thing from Escape. */
.omni-field input::-webkit-search-decoration,
.omni-field input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.omni-esc { flex: none; font-family: var(--mono); font-size: 10px; line-height: 1; padding: 4px 7px;
  border-radius: 6px; color: var(--on-surface-variant); border: 1px solid var(--glass-stroke);
  background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.omni-results { overflow-y: auto; overscroll-behavior: contain; padding: 6px; flex: 1 1 auto; }
.omni-group + .omni-group { margin-top: 2px; border-top: 1px solid var(--glass-stroke); padding-top: 6px; }
.omni-label { margin: 6px 10px 4px; font-size: 10px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--on-surface-variant); }
.omni-hit { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px;
  text-decoration: none; color: inherit; }
/* One highlight, driven by the keyboard and by the pointer alike (`.on` is
   set on mousemove too), so there is never a hovered row and a selected row
   disagreeing about what Enter will open. */
.omni-hit.on, .omni-more.on { background: var(--glass-hover); }
.omni-hit .ic { width: 32px; height: 32px; border-radius: 11px; }
.omni-hit .ic svg { width: 18px; height: 18px; }
.omni-text { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.omni-title { font-size: 14px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-detail { font-size: 11.5px; color: var(--on-surface-variant);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-go { flex: none; color: var(--on-surface-variant); opacity: 0; transition: opacity var(--dur) var(--ease); }
.omni-go svg.i { width: 18px; height: 18px; }
.omni-hit.on .omni-go { opacity: 1; }
.omni-more { display: block; padding: 8px 12px; margin: 2px 0 0; border-radius: 12px;
  font-size: 12px; font-weight: 600; color: var(--primary); text-decoration: none; }
.omni-empty { margin: 0; padding: 26px 18px; text-align: center; font-size: 13px;
  color: var(--on-surface-variant); }
@media (max-width: 650px) {
  dialog.omni { margin-top: 6vh; width: calc(100vw - 16px); }
  .omni-box { max-height: 76vh; }
}

/* ---- the publishing preview ----.
   The shared `dialog` rule above clamps confirm dialogs to 420px, which is
   narrower than a phone: a preview left under it rendered every device at
   mobile width, because the iframe inherited the clamp and the page inside
   sized itself to that. Like the Unsplash picker, this restates every clamp
   the shared rule sets rather than only widening `width`. */
dialog.preview { width: min(1680px, calc(100vw - 16px)); height: calc(100vh - 16px);
  height: calc(100dvh - 16px); min-width: 0; max-width: none; max-height: none;
  overflow: hidden; }
/* Three rows — heading, viewport, footer — and the viewport takes every pixel
   the other two do not, so the frame is as tall as the screen allows rather
   than a fixed fraction of it. */
dialog.preview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
/* The heading row carries the tabs and device toggles as well as the title,
   so it is chrome: it does not need the 20px the shared dialog rule gives
   every heading, and its own title does not need to be page-sized. */
dialog.preview > div:first-child { margin-bottom: 8px; }
dialog.preview > div:first-child h2 { font-size: 15px; font-weight: 600; margin: 0;
  white-space: nowrap; color: var(--on-surface-variant); }
/* Pressed state on the segmented controls, so the current tab and device are
   visible at a glance rather than only to a screen reader. */
dialog.preview .btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
/* ---- the theme demo preview ----
   A theme's live demo in a frame, so looking at one does not mean leaving
   the themes page. Like the publishing preview it restates every clamp the
   shared `dialog` rule sets. Two rows: a toolbar, and the demo taking the
   rest. */
dialog.theme-preview { width: min(1680px, calc(100vw - 16px)); height: calc(100vh - 16px);
  height: calc(100dvh - 16px); min-width: 0; max-width: none; max-height: none;
  padding: 0; overflow: hidden; }
dialog.theme-preview[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
dialog.theme-preview::backdrop { background: rgba(0,0,0,.6); }
.tp-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 20px;
  border-bottom: 1px solid var(--outline-variant); }
.tp-bar .tp-name { font-size: 16px; font-weight: 600; margin: 0 auto 0 0; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-bar .tp-name small { font-size: 12.5px; font-weight: 400; color: var(--on-surface-variant); margin-left: 8px; }
.tp-devices { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--sc); }
.tp-devices button { border: none; background: none; font: inherit; font-size: 12.5px; font-weight: 500;
  height: 28px; padding: 0 12px; border-radius: 999px; color: var(--on-surface-variant); cursor: pointer; }
.tp-devices button[aria-pressed="true"] { background: var(--sc-lowest); color: var(--on-surface);
  box-shadow: 0 1px 2px color-mix(in srgb, #000 16%, transparent); }
/* The stage is tinted so a tablet- or phone-width frame reads as a device
   standing on something, and so "Loading…" has somewhere to show before the
   demo paints over it. */
.tp-stage { position: relative; display: flex; justify-content: center; min-height: 0; background: var(--sc); }
.tp-stage::before { content: "Loading demo…"; position: absolute; top: 50%; left: 0; right: 0;
  text-align: center; font-size: 13px; color: var(--on-surface-variant); }
.tp-stage iframe { position: relative; display: block; width: 100%; height: 100%; border: none;
  background: #fff; opacity: 0; transition: opacity .2s, width .25s var(--ease); }
.tp-stage iframe.ready { opacity: 1; }
dialog.theme-preview[data-device="tablet"] .tp-stage iframe { width: min(820px, 100%); }
dialog.theme-preview[data-device="mobile"] .tp-stage iframe { width: min(390px, 100%); }
dialog.theme-preview[data-device="tablet"] .tp-stage iframe,
dialog.theme-preview[data-device="mobile"] .tp-stage iframe {
  box-shadow: 0 0 0 1px var(--outline-variant), var(--shadow-2); }
@media (max-width: 719px) {
  .tp-devices, .tp-bar .tp-name small { display: none; }
  .tp-bar { padding-left: 16px; }
}
dialog h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
dialog p { margin: 0 0 22px; font-size: 14px; color: var(--on-surface-variant); }
dialog .d-actions { display: flex; justify-content: flex-end; gap: 8px; }
#toast, #publish-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 80px); background: var(--inverse-surface);
  color: var(--inverse-on-surface); border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-2); transition: transform .25s var(--ease), opacity .25s var(--ease); opacity: 0;
  z-index: 100; max-width: 90vw; }
#toast.show, #publish-toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---- entrance motion ---- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.rise { animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- responsive: the rail narrows in three stages ----
   Same stages as the Click dashboard. Under 1200px the column tightens;
   under 950px it drops to an 80px icon rail; under 650px it becomes a top
   strip. The content rules at 919px stay where they were: losing the rail's
   width is a gain for the content, not a loss, so they only answer to the
   viewport. */
@media (max-width: 1200px) {
  .shell { --rail-w: 216px; }
  .rail { padding: 24px 12px 14px; }
  .brand { padding: 8px 10px; margin-bottom: 32px; min-height: 60px; gap: 10px; }
  .brand .brand-logo img { max-height: 48px; }
  .brand-mark { width: 36px; height: 39px; font-size: 33px; border-radius: 12px 12px 12px 4px; }
  .brand-mark span { font-size: 14px; right: 2px; top: 2px; }
  .brand b { font-size: 23px; }
  .brand .tag { letter-spacing: 3px; }
  .nav-item { padding: 9px 12px; gap: 12px; }
}
/* Icon rail: the tabs keep their 44px footprint as round targets, and the
   labels stay in the accessibility tree — only sighted users lose them. A
   site named in text rather than a logo shrinks to one clipped line, since
   there is no glyph to fall back to. */
@media (min-width: 651px) and (max-width: 950px) {
  .shell { --rail-w: 80px; }
  .rail { padding: 22px 10px 14px; align-items: center; }
  .rail .nav-scroll { width: 100%; margin: 0; padding: 0; overflow-x: visible; }
  .brand { padding: 6px; margin: 0 0 24px; min-height: 0; width: 100%; justify-content: flex-start; }
  .brand .brand-logo img { max-height: 40px; }
  .brand-mark { width: 38px; height: 41px; font-size: 35px; }
  .brand-mark + .brand-name { display: none; }
  /* The search collapses to its glyph on the icon rail, keeping the 44px
     target the nav items keep. */
  .rail-search { width: 44px; height: 44px; padding: 0; justify-content: center; margin: 0 auto 14px; border-radius: 999px; }
  .rail-search-label, .rail-search-key { display: none; }
  .nav-item { width: 44px; height: 44px; padding: 0; margin: 4px auto; gap: 0; justify-content: center; }
  .nav-item .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; }
  .rail-foot { width: 100%; padding: 14px 0 0; }
  .who { flex-direction: column; gap: 10px; padding: 6px 0 0; }
  .who-link { margin: 0; padding: 2px; }
  .who > div, .who-link > div { display: none; }
  /* The popover is wider than the rail here. It opens upward from the
     foot, as on the full rail, but at its own width over the content. */
  .theme-menu .pop { left: 0; right: auto; width: 220px; }
}
/* Top strip. */
@media (max-width: 650px) {
  .shell { flex-direction: column; }
  .rail { width: 100%; height: auto; position: static; flex-direction: column; overflow: visible;
    padding: 0; border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent); }
  /* The rail is the full page width here, so centring the mark would strand
     it in the middle of the strip. It sits at the start instead. */
  .brand { padding: 14px 10px 10px; margin: 0 6px; justify-content: flex-start; min-height: 0; }
  /* The strip is a column, so the search takes its own line under the brand
     and keeps its label — on a phone a full-width search bar is the shape
     people expect, and the icon-only pill of the 80px rail would be a 44px
     target floating in a 100%-wide row. The key hint goes: there is no
     keyboard to press it on. */
  .rail-search { width: auto; margin: 0 12px 10px; }
  .rail-search-key { display: none; }
  .rail .nav-scroll { display: flex; flex: none; gap: 4px; margin: 0; overflow-x: auto; overflow-y: hidden;
    padding: 4px 12px 12px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 12px; }
  .rail .nav-scroll::-webkit-scrollbar { display: none; }
  .nav-item { flex: none; margin: 0; padding: 8px 14px 8px 10px; gap: 8px; scroll-snap-align: start; }
  .nav-item .ic { display: none; }
  .rail-foot { margin: 0; padding: 0 12px 10px; }
  .who { padding: 6px 0; }
  /* The appearance menu opens upward, which is right when the rail is a tall
     column and its foot sits at the bottom of the screen. As a top strip the
     same rule threw the popup off the top of the page — it opened at y=-61
     with Light and half of Dark above the viewport and no way to scroll to
     them. Anchored below the strip it opens over the content instead. */
  .theme-menu .pop { top: calc(100% + 10px); bottom: auto; }
}
@media (max-width: 919px) {
  .content { --gutter: 16px; padding-bottom: 48px; }
  .page-head { flex-wrap: wrap; }
  .grid2 { grid-template-columns: 1fr; }
  .nav-grid { grid-template-columns: 1fr; }
  /* The row still fits on one line here, but its supporting text no longer
     fits beside the trailing control. It wraps onto a second line rather
     than ellipsizing: on a settings row the explanation is the whole point
     of the row, and "Users and setting…" reads as broken rather than as
     abbreviated. (Below 639px the fold rule sets the same thing.) */
  .rows .row .detail { white-space: normal; overflow: visible; text-overflow: clip; }
  /* Range pills in the page head can out-run a phone's width; one tidy
     scrollable row beats either sideways page overflow or a two-line pill. */
  .page-head .actions { max-width: 100%; min-width: 0; }
  .range-tabs { display: flex; max-width: 100%; overflow-x: auto;
    scrollbar-width: none; }
  .range-tabs::-webkit-scrollbar { display: none; }
}

/* ---- scrolling strips: fade the edge that is hiding something ----
   A strip too narrow for its items guillotines one mid-word, which reads as a
   broken layout rather than as more nav just out of view. A fade says it
   scrolls. Which edge gets one depends on where the strip is scrolled to, so
   `data-edge` is set from script and only while there is genuinely something
   past that edge — no breakpoint has to guess whether the items fit, and a
   strip with room to spare is never dimmed for nothing. The mask sits on the
   scroll port, not the content, so it stays pinned while the items move
   under it. */
[data-edge] { -webkit-mask-image: var(--edge-mask); mask-image: var(--edge-mask); }
[data-edge="end"] { --edge-mask: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
[data-edge="start"] { --edge-mask: linear-gradient(90deg, transparent, #000 36px); }
[data-edge="both"] { --edge-mask: linear-gradient(90deg, transparent, #000 36px,
  #000 calc(100% - 36px), transparent); }
/* The pill group's rounding would be cut square by the mask, so the faded
   side drops its radius rather than showing a clipped curve. */
.range-tabs[data-edge="end"] { border-radius: 999px 0 0 999px; }
.range-tabs[data-edge="start"] { border-radius: 0 999px 999px 0; }
.range-tabs[data-edge="both"] { border-radius: 0; }

/* ---- responsive: phone-sized chrome ----
   Below ~640px the eight nav sections no longer fit on one line. */
@media (max-width: 639px) {
  /* The logo gets the whole brand slot, which on a desktop rail is a 240px
     column worth filling. On a phone the same 56px lockup turned the top of
     every page into a 200px masthead before a word of content. It drops to
     an app-bar height instead. */
  .brand { padding: 10px 8px 6px; gap: 10px; }
  .brand .brand-logo img { max-height: 34px; }
  .brand-mark { width: 32px; height: 35px; font-size: 30px; border-radius: 10px 10px 10px 3px; }
  .brand-mark span { font-size: 12px; right: 2px; top: 1px; }
  .brand b { font-size: 21px; }
  .brand .tag { font-size: 8px; letter-spacing: 3px; margin-top: 3px; }
}

/* ---- responsive: list rows fold onto two lines ----
   Deliberately a *lower* breakpoint than the rail's. Losing the 240px rail
   hands the content ~240px more room, not less, so between 640px and 919px a
   row has more width than it does on a 1024px desktop — folding there left
   the trailing meta stranded under a half-empty row. Rows only fold once the
   row itself is actually short of width. */
@media (max-width: 639px) {
  .rows .row + .row::before { left: 20px; }

  /* List rows are a single nowrap flex line on desktop, which on a phone
     made the title, slug, date, status chip and delete button pile onto each
     other and overflow sideways. Let the row wrap: leading icon + body on
     the first line (the body's basis reserves the icon's share, so a long
     title shrinks beside it instead of wrapping underneath and orphaning
     the icon on a line of its own), trailing meta on its own line under
     them, indented to the title's edge. */
  .rows .row { flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px; align-items: flex-start; }
  .rows .row .body { flex: 1 1 calc(100% - 52px); min-width: 0; order: 2; }
  /* The icon led a centred row before it wrapped; once the body runs to two
     or three lines, centring drifts it down past the title it labels. It
     pins to the top instead, nudged to sit on the title's own line. */
  .rows .row > .ic, .rows .row > .avatar { order: 1; margin-top: 1px; }
  .rows .row .title { white-space: normal; overflow-wrap: anywhere; }
  .rows .row .detail { white-space: normal; overflow-wrap: anywhere; }
  /* trailing drops below and left-aligns instead of being pushed off-screen
     by margin-left:auto */
  .trailing { order: 3; flex: 1 1 100%; margin-left: 0; flex-wrap: wrap;
    padding-left: 52px; justify-content: flex-start; }
  /* …except where the leading icon is hidden, so nothing is indented past it */
  .rows .row:not(:has(> .ic)):not(:has(> .avatar)) .trailing { padding-left: 0; }
  /* A trailing that is nothing but a chevron says nothing once the row wraps:
     the whole row is the link, so the lone arrow goes. */
  .rows .row .trailing > svg.i:only-child { display: none; }
  /* Same for a chevron that merely *trails* the real controls: the row is
     the link, and on a folded row the lone arrow reads as a stray glyph
     floating after the delete button. */
  .rows .row .trailing > svg.i:last-child { display: none; }
}

/* Very narrow phones: drop the leading-icon indent entirely so titles get
   the full width. */
@media (max-width: 479px) {
  .rows .row { padding: 12px 14px; }
  .trailing { padding-left: 0; }
  .rows .row + .row::before { left: 14px; }
}

/* ---- media: the library grid, and one file's own screen ---- */
/* Class prefix `ml-`. Everything structural is reused from the shared
   primitives: `.card`, `.rows .row`, `.field`, `.seg-bar`, `.btn`, `.batch`
   and `.row-check` are the posts list's, unchanged. */

/* The toolbar: search takes the room left over, the two selects and the
   buttons keep their own width. Wraps rather than compressing on a narrow
   window, because a 90px-wide search box is worse than a second line. */
.ml-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ml-bar .ml-search { flex: 1 1 240px; min-width: 0; }
.ml-bar .field.fixed { flex: 0 1 180px; }
.ml-bar .btn { margin-bottom: 2px; }

/* File pickers. The input is the thing that works — the `<label for>` beside
   it is what gets clicked — so it is moved out of sight rather than
   `display:none`, which would take it out of the accessibility tree and leave
   the label pointing at nothing. Used by both pickers in this module (Upload
   in the library header, Replace on a file's own screen), so the rule is a
   class rather than a descendant of one container. */
.ml-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
input.ml-pick { position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* The input takes the focus ring, but it is invisible — so the ring is drawn
   on the label that stands in for it. */
input.ml-pick:focus-visible + label.btn { outline: 3px solid var(--primary); outline-offset: 2px; }
.ml-state { font-size: 13px; }

/* The drop target is the whole grid area, including the empty state, so there
   is somewhere to drop a file on a site with no files yet. */
.ml-drop { position: relative; border-radius: 24px; transition: background var(--dur) var(--ease); }
.ml-drop .ml-hint { margin: 0 0 12px; display: flex; align-items: center; gap: 8px;
  color: var(--on-surface-variant); font-size: 13px; }
.ml-drop .ml-hint svg { width: 18px; height: 18px; }
.ml-drop.ml-over { background: var(--sc-high); outline: 2px dashed var(--primary); outline-offset: 6px; }
.ml-drop.ml-busy { opacity: .6; pointer-events: none; }

/* Tiles. `auto-fill` with a minimum rather than a fixed count: the library is
   the one screen whose contents have no natural column count, and a 180px
   floor keeps a thumbnail readable at every window width without a stack of
   breakpoints. */
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.ml-tile { position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: 20px; background: var(--glass); border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.ml-tile:hover { background: var(--sc-high); box-shadow: var(--shadow-1); }
.ml-tile:focus-within { outline: 3px solid var(--primary); outline-offset: 3px; }
.ml-open { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.ml-open:focus-visible { outline: none; }

/* A square frame, so a portrait photo and a landscape one leave the grid's
   rows the same height. `object-fit: cover` is what fills it without
   distorting; the checkerboard underneath is what makes a transparent PNG
   legible instead of invisible on a pale surface. */
.ml-shot { position: relative; aspect-ratio: 1; border-radius: 17px 17px 0 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 6px; flex-direction: column;
  background-color: var(--sc-high);
  background-image:
    linear-gradient(45deg, var(--outline-variant) 25%, transparent 25%, transparent 75%, var(--outline-variant) 75%),
    linear-gradient(45deg, var(--outline-variant) 25%, transparent 25%, transparent 75%, var(--outline-variant) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.ml-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Nothing to show a pattern behind, so the glyph gets a plain surface. */
.ml-shot-glyph { background-image: none; }
.ml-shot .ml-glyph { width: 44px; height: 44px; border-radius: 14px; }
.ml-shot .ml-glyph svg { width: 22px; height: 22px; }
.ml-ext { font-family: var(--mono, 'Roboto Mono', monospace); font-size: 11px; font-weight: 500;
  letter-spacing: .06em; color: var(--on-surface-variant); }

.ml-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; min-width: 0; }
.ml-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ml-sub { font-size: 12px; color: var(--on-surface-variant); }

/* The checkbox and the copy button float over the thumbnail. They stay hidden
   until the tile is hovered or focused — or, for the checkbox, until anything
   on the page is selected, so an existing selection is visible everywhere
   rather than only under the pointer. */
.ml-tile .row-check { position: absolute; top: 8px; left: 8px; z-index: 2; margin: 0;
  border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-1); }
.ml-copy { position: absolute; top: 8px; right: 8px; z-index: 2;
  background: var(--surface); box-shadow: var(--shadow-1); }
.ml-tile .row-check, .ml-copy { opacity: 0; transition: opacity var(--dur) var(--ease); }
.ml-tile:hover .row-check, .ml-tile:hover .ml-copy,
.ml-tile:focus-within .row-check, .ml-tile:focus-within .ml-copy,
.ml-tile .row-check:has(input:checked) { opacity: 1; }
body:has(.ml-tile input:checked) .ml-tile .row-check { opacity: 1; }
/* A touch screen has no hover, so the controls are simply always there. */
@media (hover: none) { .ml-tile .row-check, .ml-copy { opacity: 1; } }

/* One file's screen: the preview beside the forms that act on it, and stacked
   once there is no longer room for both. */
.ml-item { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.ml-side { display: grid; gap: 16px; }
.ml-preview { display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 24px; border: 1px solid var(--outline-variant); background-color: var(--sc-low);
  background-image:
    linear-gradient(45deg, var(--outline-variant) 25%, transparent 25%, transparent 75%, var(--outline-variant) 75%),
    linear-gradient(45deg, var(--outline-variant) 25%, transparent 25%, transparent 75%, var(--outline-variant) 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px; min-height: 240px; }
/* Capped at the viewport so a tall photograph does not push the forms beside
   it off the bottom of the screen. */
.ml-preview img, .ml-preview video { max-width: 100%; max-height: min(70vh, 720px); display: block; }
.ml-sound, .ml-nothing { display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 40px 24px; text-align: center; background: var(--surface); width: 100%; }
.ml-sound .ic, .ml-nothing .ic { width: 56px; height: 56px; border-radius: 18px; }
.ml-sound .ic svg, .ml-nothing .ic svg { width: 28px; height: 28px; }
.ml-sound audio { width: 100%; max-width: 420px; }
.ml-nothing p { margin: 0; font-size: 15px; font-weight: 600; }
.ml-nothing p.muted { font-weight: 400; max-width: 34ch; }
@media (max-width: 1000px) { .ml-item { grid-template-columns: minmax(0, 1fr); } }

/* ---- seo: the report's score badges and its filter bar ---- */
/* Class prefix `seo-`. Everything else on both screens is the shared set:
   `.tiles`, `.card.rows .row`, `.chips`, `.chip`, `.seg-bar`, `.btn`. */

/* A score in place of an icon. The `.ic` box already centres its content and
   carries the tint, so this only has to make a number read as a number —
   tabular figures so a column of them does not jitter between 8 and 100. */
.ic.seo-score { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* The findings under an entry's title. Sits inside `.row .body`, so the gap
   above it is the row's business rather than the chips'. */
.seo-findings { margin-top: 8px; }
/* A finding chip carries its explanation in `title=`, so the pointer should
   say there is something to read. */
.seo-findings .chip { cursor: help; }

/* The filter bar: three selects that submit on change, wrapping rather than
   compressing — a 90px-wide "Issue" select is worse than a second line. The
   same arrangement as the media library's `.ml-bar`, with its own widths. */
.seo-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 2px 0 16px; }
.seo-bar .field.fixed { flex: 0 1 220px; }
.seo-bar .btn { margin-bottom: 2px; }
@media (max-width: 560px) { .seo-bar .field.fixed { flex: 1 1 100%; } }

/* ---- history: Post history / Page history ---- */
/* Class prefix `ph-`. The page head, cards, buttons and chips are the shared
   set; what is here is the two-column split and the revision list, neither of
   which has an existing primitive. */

/* List on the left, the version being read on the right. The list is given a
   fixed share rather than `auto` so a long title in one row cannot widen the
   column and squeeze the content beside it. */
.ph-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .ph-split { grid-template-columns: minmax(0, 1fr); } }

/* The list itself. Scrolls rather than running down the page: a post saved a
   hundred times should not push its own content out of reach. */
.ph-list { overflow: hidden; padding: 6px; }
.ph-split > .ph-list { max-height: calc(100vh - 220px); overflow-y: auto; }
/* In the editor panel there is no card around it and no scroll. */
.ph-list.compact { padding: 0; margin-bottom: 10px; }

.ph-rev { display: grid; gap: 1px; padding: 10px 12px; border-radius: 12px;
  color: inherit; text-decoration: none; transition: background var(--dur) var(--ease); }
.ph-rev:hover { background: color-mix(in srgb, var(--on-surface) 7%, transparent); }
.ph-rev:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ph-rev.on { background: var(--secondary-container); color: var(--on-secondary-container); }
.ph-rev .ph-when { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ph-rev .ph-title { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-rev .ph-by { font-size: 12.5px; color: var(--on-surface-variant); }
.ph-rev.on .ph-by { color: inherit; opacity: .8; }
/* The editor panel's rows are tighter and drop the title, which the panel's
   own heading already implies. */
.ph-rev.compact { padding: 7px 8px; }
.ph-rev.compact .ph-title { display: none; }

/* The version being read. */
.ph-detail-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  justify-content: space-between; margin-bottom: 14px; }
.ph-detail-head h2 { margin: 2px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.ph-detail-head .ph-when { margin: 0; font-size: 13px; color: var(--on-surface-variant); }
.ph-restore { margin: 0; flex: none; }
.ph-image { display: block; width: 100%; max-height: 300px; object-fit: cover;
  border-radius: 16px; margin-bottom: 16px; }

/* The stored body, rendered as it was. Deliberately plain: this is a record
   of what the text said, not a preview of how the theme would paint it, and
   dressing it up as the latter would be a promise this cannot keep. */
.ph-body { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.ph-body > :first-child { margin-top: 0; }
.ph-body > :last-child { margin-bottom: 0; }
.ph-body h1, .ph-body h2, .ph-body h3 { margin: 22px 0 8px; line-height: 1.25; letter-spacing: -.01em; }
.ph-body h1 { font-size: 24px; } .ph-body h2 { font-size: 20px; } .ph-body h3 { font-size: 17px; }
.ph-body p, .ph-body ul, .ph-body ol, .ph-body blockquote { margin: 0 0 14px; }
.ph-body ul, .ph-body ol { padding-left: 22px; }
.ph-body img, .ph-body video, .ph-body iframe { max-width: 100%; height: auto; border-radius: 12px; }
.ph-body blockquote { padding-left: 14px; border-left: 3px solid var(--outline-variant);
  color: var(--on-surface-variant); }
.ph-body pre { padding: 12px 14px; border-radius: 12px; background: var(--sc-low);
  overflow-x: auto; font-size: 13px; }
.ph-body figcaption { font-size: 13px; color: var(--on-surface-variant); text-align: center; }
.ph-body a { color: var(--primary); }

/* ---- languages: the Multilingual module's picks, and the editor panel ---- */
/* Class prefix `lg-`. Tiles, cards, rows, chips and switches are the shared
   set; what is here is the language checkbox grid and the editor's
   translation list, neither of which has an existing primitive. */

/* The enabled-languages grid. A plain multi-column list rather than a
   multi-select: there are ~60 languages and a native multi-select of that
   length is unusable, where ticking boxes is not. */
.lg-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px 14px; }
.lg-pick { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 10px;
  font-size: 14px; cursor: pointer; transition: background var(--dur) var(--ease); }
.lg-pick:hover { background: color-mix(in srgb, var(--on-surface) 6%, transparent); }
.lg-pick input { flex: none; accent-color: var(--primary); width: 16px; height: 16px; }
.lg-pick > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The default language is ticked and disabled — it is set in General
   settings, and unticking it here would mean nothing. Shown rather than
   hidden so the list is not missing the one language the site definitely
   publishes in. */
.lg-pick.is-default { cursor: default; background: var(--secondary-container);
  color: var(--on-secondary-container); }
.lg-pick em { margin-left: auto; font-size: 11.5px; font-style: normal; font-weight: 600;
  letter-spacing: .03em; text-transform: uppercase; opacity: .75; }

/* A navigation box, one per language. Monospaced because its content is
   `Label | /url/` lines and the pipe should line up. */
textarea.lg-nav { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; line-height: 1.6; }

/* ---- the editor's Language panel ---- */
/* The panel stacks a picker, a list, two actions and three hints, and with
   no rhythm of its own they ran together into a wall. Each block gets the
   same gap, and each control is separated from the sentence explaining it —
   so the eye can tell "thing you set" from "thing telling you about it". */
.lg-field { margin: 0 0 4px; }
.lg-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--outline-variant); }
.lg-group:first-of-type { border-top: 0; }
/* A small heading for a block that is a list rather than a control. */
.lg-label { display: block; margin-bottom: 8px; font-size: 11.5px; font-weight: 600;
  letter-spacing: .05em; text-transform: uppercase; color: var(--on-surface-variant); }
/* A hint that stands alone rather than under a field needs its own top gap,
   since there is no control above it to sit against. */
.lg-note { margin: 0; }
/* Hints under a control: close enough to read as belonging to it, far enough
   not to crowd it. */
.lg-group .hint, .lg-field .hint { margin: 8px 0 0; line-height: 1.5; }

/* An action row: a control and its button, on one line, wrapping rather than
   squeezing the control on a narrow panel. `align-items: end` so the button
   sits on the field's baseline instead of floating above its label. */
.lg-action { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0; }
.lg-action > .field { flex: 1 1 150px; min-width: 0; margin: 0; }
.lg-action > .btn { flex: none; }

/* The linked set: this entry is listed with the rest, marked rather than
   linked, so the card reads the same from every member. */
.lg-sib.is-self .lg-sib-title { font-weight: 600; }
.lg-sib-note { flex: none; font-size: 12px; color: var(--on-surface-variant); }

/* The link search: results sit in the flow under the input, full width.
   Not a floating dropdown: the panel is a .card (overflow: hidden, for its
   corners) inside a sidebar that scrolls itself, so anything hanging out of
   the panel was clipped — every result past its bottom edge was invisible
   and could not be scrolled to. In the flow the panel grows, the sidebar
   scrolls, and the list scrolls within its own max-height. */
.lg-search { position: relative; }
.lg-results { flex: 1 1 100%; order: 3; box-sizing: border-box; margin: 0;
  padding: 6px; max-height: min(320px, 50vh); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 14px; background: var(--sc-lowest); border: 1px solid var(--outline-variant); }
.lg-results[hidden] { display: none; }
.lg-result-more { margin: 4px 0 0; padding: 8px 9px 4px; border-top: 1px solid var(--outline-variant);
  font-size: 12.5px; color: var(--on-surface-variant); }
.lg-result { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 9px;
  border: 0; border-radius: 10px; background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; }
.lg-result:hover, .lg-result:focus-visible { background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
.lg-result-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 13.5px; }
.lg-result-status { font-size: 12px; color: var(--on-surface-variant); }
.lg-result-none { margin: 0; padding: 10px; font-size: 13px; color: var(--on-surface-variant); }

/* The entry that has been picked, in place of the input. */
.lg-chosen { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px;
  background: var(--secondary-container); color: var(--on-secondary-container); font-size: 13.5px; }
.lg-chosen-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }


/* One existing translation. The title takes the room left over so the
   language chip and the status stay put as titles vary in length. */
.lg-sibs { display: grid; gap: 6px; }
.lg-sib { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 10px;
  background: var(--sc-low); font-size: 13.5px; }
.lg-sib-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-sib-title a { text-decoration: none; }
.lg-sib-title a:hover { text-decoration: underline; }
/* The unlink forms cannot nest inside the editor's own form, so they sit
   beside it and the buttons reach them by id — the same arrangement the
   delete button uses. */
.lg-hidden-form { display: none; }

/* "Translate into …" and "Or link one that exists": a select and a button on
   one line, wrapping rather than squeezing the select on a narrow panel. */
.lg-create { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 0; }
.lg-create .field.fixed { flex: 1 1 150px; min-width: 0; }
.lg-create .btn { margin-bottom: 2px; }

/* A tag's public archive in each language that uses it. */
.tag-archives { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.tag-archive { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag-archive a { overflow-wrap: anywhere; }

/* ---- dashboard: the admin home ----
   Almost entirely the shared primitives — `.page-head`, `.tiles`, `.card
   rows`, `.chip`, `.ic .tint-*` — because the home screen's whole job is to
   look like a condensed version of the screens it links to. What is new here
   is a section heading that carries a link or a note on its right, and a
   caption above the one chart. */

/* What is left here is only what this screen does differently. The glass
   itself — cards, tiles, rows, chips, icon squares, overline headings — is
   now the shared material in the "groups + cards + rows" section above, so
   every screen wears it and the home screen goes on looking like a condensed
   version of the ones it links to. */

/* The greeting is the one line of display type in the admin's chrome.
   Fraunces at this size is drawn with the contrast its optical-size axis
   gives a headline, which is what makes it read as somebody saying hello
   rather than as a page title. */
.dash .page-head { padding: 26px calc(var(--gutter, 24px) + 4px) 18px; }
.dash .page-head h1 { font-family: var(--display); font-size: 31px; font-weight: 600;
  letter-spacing: -.4px; line-height: 1.12; }
.dash .page-head .sub { font-size: 13px; letter-spacing: .01em; margin-top: 5px; }

/* The header's actions. The filled button gets the lit top edge and the drop
   shadow the brand mark has, so the primary action on the home screen is the
   same object as the mark in the rail; the tonal one beside it is glass, and
   the text ones stay flat — three weights, in order. */
.dash .page-head .btn { height: 40px; }
.dash .page-head .btn:not(.tonal):not(.text) {
  background: linear-gradient(180deg, color-mix(in srgb, #fff 16%, var(--primary)), var(--primary));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 18px -10px rgba(62,7,29,.7); }
.dash .page-head .btn.tonal { background: var(--glass-strong); color: var(--on-secondary-container);
  border: 1px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-edge); }
.dash .page-head .btn.tonal:hover { background: var(--secondary-container); }

/* A row on the home screen carries a sentence under its title, so it is a
   little taller and its title a little heavier than a list row elsewhere. */
.dash .rows .row { padding: 15px 20px; }
.dash .rows .row + .row::before { left: 72px; }
.dash .rows .row .title { font-size: 15px; font-weight: 600; letter-spacing: -.1px; }
.dash .rows .row .detail { font-size: 12.8px; }

/* The headline figures are the biggest numbers in the admin; nothing else
   needs a 34px value, so the size stays here rather than on `.tile`. */
.dash .tile .value { font-size: 34px; font-weight: 600; letter-spacing: -1px;
  font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
@media (prefers-reduced-motion: reduce) { .dash .tile:hover { transform: none; } }

/* The door out of a card, and the note that qualifies one. Both sit inside a
   `.section`, which is uppercase and tracked out — neither of them is a
   label, so both opt back out of it. The door is a glass pill: small enough
   to read as a way out rather than a second title. */
.dash-more { text-transform: none; letter-spacing: .01em; font-size: 12px;
  padding: 4px 10px; border-radius: 999px; background: var(--glass-film);
  border: 1px solid var(--glass-stroke); transition: background var(--dur) var(--ease); }
.dash-more:hover { text-decoration: none; background: var(--glass-hover); }
.dash-note { text-transform: none; letter-spacing: .01em; font-size: 12px; }

/* A `.section` with something on its right. The heading keeps its own type
   and padding from the shared rule; this only lays the two parts out, so the
   headings on every other screen are untouched. */
.dash-head { display: flex; align-items: baseline; gap: 12px; }

/* "All drafts →" / "Full report →": the way out of a card that shows the
   first five of something. Sized down from the heading it sits beside, so it
   reads as a door rather than as a second title. */
.dash-more { margin-left: auto; display: inline-flex; align-items: center; gap: 2px;
  font-size: 13px; font-weight: 600; color: var(--primary); text-decoration: none;
  white-space: nowrap; flex: none; }
.dash-more:hover { text-decoration: underline; }
.dash-more svg.i { width: 16px; height: 16px; }

/* What the figures in a card's trailing chips are measuring. On the right of
   the heading because it qualifies every row at once — repeating "readers in
   the last 30 days" on five rows would crowd out the titles. */
.dash-note { margin-left: auto; font-size: 12.5px; font-weight: 400;
  color: var(--on-surface-variant); white-space: nowrap; flex: none; }

/* The sparkline's own label. The chart is a single series, so the caption is
   the legend and no legend box is drawn — the same arrangement the Analytics
   overview uses, restated here because that card gets its title from the
   `.section` above it and this one does not. */
.dash-chart-title { margin: 0 0 10px; font-size: 13px; font-weight: 600;
  color: var(--on-surface-variant); letter-spacing: .2px; }

/* On a phone the heading and its door stack rather than squeezing the
   heading to nothing. */
@media (max-width: 599px) {
  .dash-head { flex-wrap: wrap; gap: 4px 12px; }
  .dash-more, .dash-note { margin-left: 0; }
}

/* A row whose title is itself the link. `.rows .row` clears the underline
   for a row that is wholly an anchor, but these rows wrap the anchor around
   the title and detail only — so the link kept its underline and every entry
   in the work queue read as a wall of underscored text. Underline on hover
   instead, and only under the title. */
.dash-rows a.body { text-decoration: none; color: inherit; }
.dash-rows a.body:hover .title { text-decoration: underline; }
.dash-rows a.body:focus-visible { outline: 2px solid var(--primary);
  outline-offset: 2px; border-radius: 8px; }

/* The reset form's live region. Empty until the script puts an answer in it,
   so it must not reserve space or draw a gap under the button. */
.auth-status { margin: 14px 0 0; font-size: 13.5px; text-align: center;
  color: var(--on-surface-variant); }
.auth-status:empty { display: none; }

/* ---- security: the posture ring, the finding rows and the "ways in" tiles ---- */
/* Everything else on these two screens is a shared primitive — .card.rows,
   .row, .chip, .ic.tint-*, .seg-bar, .btn, .selbox, .switch — so what is here
   is only the three things the module draws that nothing else does. */

/* The hero: ring on the left, prose on the right, stacking under the ring on
   a narrow viewport rather than squeezing the number. */
.sec-hero { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.sec-hero-body { flex: 1; min-width: 240px; }
.sec-hero-body h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.sec-hero-body p { margin: 0; }

/* The score ring. The number is laid over the SVG rather than drawn in it, so
   it is selectable text in the page's own font and inherits the theme's
   colours — an SVG <text> would need its own size and fill repeated here. */
.sec-score { position: relative; width: 128px; height: 128px; flex: 0 0 auto; }
.sec-ring { width: 128px; height: 128px; display: block; }
/* `currentColor` on the arc, so one class carries the colour and there is one
   rule per grade rather than one per element. Deliberately NOT the shared
   `.tint-*` classes: those set a background as well as a foreground, which is
   right for the `.ic` chip they were written for and would paint a block
   behind the ring.
   Nor the `--*-fg` variables: those are *text on the matching tint
   background*, so in light mode they are near-black (`--amber-fg` is #483000)
   and an arc drawn in one reads as muddy brown rather than as a grade. These
   are the mid-tones of the same hues, chosen to carry at 10px on both
   surfaces. */
.sec-ring-green { color: #1E9E62; }
.sec-ring-blue { color: var(--primary); }
.sec-ring-amber { color: #C98A04; }
.sec-ring-red { color: #D8453C; }
html.dark .sec-ring-green { color: #4ED894; }
html.dark .sec-ring-amber { color: #F1B434; }
html.dark .sec-ring-red { color: #FF6F63; }
.sec-score-text { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; pointer-events: none; }
.sec-score-text .num { font-size: 34px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; }
.sec-score-text .grade { font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--on-surface-variant); }

/* A finding's detail is two or three sentences, not a label, so it wraps
   rather than ellipsing — the whole value of the row IS the sentence, and the
   shared `.rows .row .detail` truncates it to one line. All three of
   `white-space`, `overflow` and `text-overflow` have to be undone; setting
   only the first leaves the ellipsis. The same three are what
   `.settings .rows .row .detail` undoes, for the same reason. */
/* Every selector here is qualified `.rows .row.sec-finding` rather than the
   bare `.sec-finding` it reads as. It has to be: the rules being overridden
   are `.rows .row .detail` and `.rows .row`, at specificity 0,3,0 and 0,2,0,
   and a bare `.sec-finding .detail` is 0,2,0 — it loses the cascade and does
   nothing at all, however late in the file it sits. (`.settings .rows .row
   .detail`, which undoes the same truncation for the settings screens, is
   qualified for the same reason.) */
.rows .row.sec-finding .detail { white-space: normal; overflow: visible;
  text-overflow: clip; line-height: 1.5; }
/* …and the row's own `align-items: center` has to go with it: centred is
   right for a one-line row and leaves the icon floating against the middle
   of a three-line one. The trailing link stays centred, because a Fix link
   level with the first line reads as part of the title. */
.rows .row.sec-finding { align-items: flex-start; padding-top: 14px;
  padding-bottom: 14px; }
.rows .row.sec-finding .ic { margin-top: 2px; }
.rows .row.sec-finding .trailing { align-self: center; }
.rows .row.sec-finding .title { display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; white-space: normal; overflow: visible; }

/* The "ways in" tiles: a number, what it counts, and one line about it.
   `minmax(240px, …)` rather than something narrower so the six of them land
   as 3+3 or 2+2+2 — at 168px they fitted five across on a desktop and left
   the sixth alone on its own row, which reads as a mistake rather than as a
   grid. Auto-fit still reflows the whole thing without a breakpoint. */
.sec-tiles { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sec-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  color: inherit; transition: border-color .15s, transform .15s; }
.sec-tile:hover { border-color: var(--outline); transform: translateY(-1px); }
.sec-tile .ic { margin-bottom: 8px; }
.sec-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.sec-tile-label { font-size: 13.5px; font-weight: 600; }
.sec-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.4; }

/* ---- memberships: the hero sentence, the funnel tiles, the gap rows and the
   stacked growth chart's legend ---- */
/* Everything else on these three screens is a shared primitive — .card.rows,
   .row, .chip, .avatar, .ic.tint-*, .seg-bar, .btn, .chart — so what is here
   is only the five things this module draws that nothing else does. The
   `mb-` prefix is this module's and nobody else's. */

/* The hero: the verdict in a heading, the arithmetic under it. Its own block
   rather than a bare .card.padded because the heading needs the page's
   section size rather than an <h2>'s default, and because the prose line is
   deliberately quieter than the sentence above it. */
.mb-hero-body h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.mb-hero-body p { margin: 0; }

/* The funnel tiles: a number, what it counts, and one line about it.
   `minmax(240px, …)` for the same reason the Security module's tiles use it —
   the six of them land as 3+3 or 2+2+2 rather than five across with the
   sixth alone on its own row. Auto-fit reflows without a breakpoint. */
.mb-tiles { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mb-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  color: inherit; transition: border-color .15s, transform .15s; }
/* Only the tiles that lead somewhere lift on hover. A tile with no
   destination is rendered as a <div> (see `tile`), so this never promises a
   click that does nothing. */
a.mb-tile:hover { border-color: var(--outline); transform: translateY(-1px); }
.mb-tile .ic { margin-bottom: 8px; }
.mb-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.mb-tile-label { font-size: 13.5px; font-weight: 600; }
.mb-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.4; }

/* Two cards side by side — where members came from, and who arrived — falling
   to one column when there is no room for two. */
.mb-two { display: grid; gap: 12px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* A gap's detail is a sentence or two, not a label, so it wraps rather than
   ellipsing — the whole value of the row IS the sentence.
   Every selector is qualified `.rows .row.mb-gap` rather than the bare
   `.mb-gap` it reads as, and it has to be: the rules being overridden are
   `.rows .row .detail` and `.rows .row`, at specificity 0,3,0 and 0,2,0, so a
   bare `.mb-gap .detail` at 0,2,0 loses the cascade and does nothing at all,
   however late in the file it sits. The Security module's finding rows carry
   the same comment for the same reason. */
.rows .row.mb-gap .detail { white-space: normal; overflow: visible;
  text-overflow: clip; line-height: 1.5; }
/* …and the row's own `align-items: center` goes with it: centred is right for
   a one-line row and leaves the icon floating against the middle of a
   three-line one. The Fix link stays centred, because one level with the
   first line reads as part of the title. */
.rows .row.mb-gap { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.rows .row.mb-gap .ic { margin-top: 2px; }
.rows .row.mb-gap .trailing { align-self: center; }
.rows .row.mb-gap .title { display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; white-space: normal; overflow: visible; }

/* The growth chart's legend. Two weights of one hue rather than two colours:
   free is the same `--primary` at reduced opacity, which is what the chart
   draws, so the key cannot drift from the bars. */
.mb-legend { display: flex; align-items: center; gap: 6px; margin: 10px 0 0;
  font-size: 12.5px; color: var(--on-surface-variant); }
.mb-key { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.mb-key:not(:first-child) { margin-left: 10px; }
.mb-key-paying { background: var(--primary); }
.mb-key-free { background: var(--primary); opacity: .38; }

/* ---- newsletters: the hero, the sending tiles, the gap rows and the
   editions pager ---- */
/* Everything else on these two screens is a shared primitive — .card.rows,
   .row, .chip, .ic.tint-*, .seg-bar, .btn — so what is here is only the five
   things this module draws that nothing else does. The `nl-` prefix is this
   module's and nobody else's.
   It is deliberately NOT sharing the Memberships module's `mb-` block: the
   two look alike today and one of them restyling its tiles must not silently
   restyle the other's. Duplicated declarations are cheaper than a shared rule
   nobody dares touch. */

/* The hero: the verdict, the arithmetic under it, and the window picker
   pushed to the end of the row — the one place on these screens where a
   control sits inside a card rather than above it, because the window it
   picks is what the sentence beside it is about. */
.nl-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nl-hero-body { flex: 1; min-width: 260px; }
.nl-hero-body h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.nl-hero-body p { margin: 0; }

/* The sending tiles. `minmax(240px, …)` so the six land as 3+3 or 2+2+2
   rather than five across with the sixth alone, which reads as a mistake. */
.nl-tiles { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.nl-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  color: inherit; transition: border-color .15s, transform .15s; }
/* Only a tile that leads somewhere lifts: one with no destination is rendered
   as a <div>, so this never promises a click that does nothing. */
a.nl-tile:hover { border-color: var(--outline); transform: translateY(-1px); }
.nl-tile .ic { margin-bottom: 8px; }
.nl-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.nl-tile-label { font-size: 13.5px; font-weight: 600; }
.nl-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.4; }

/* Delivery beside the latest editions, falling to one column when there is no
   room for two. */
.nl-two { display: grid; gap: 12px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* A gap's detail is a sentence or two, so it wraps rather than ellipsing — and
   a provider's error, which is the longest thing on either screen, wraps for
   the same reason.
   Every selector is qualified `.rows .row.nl-gap` rather than the bare
   `.nl-gap` it reads as, and it has to be: the rules being overridden are
   `.rows .row .detail` and `.rows .row` at 0,3,0 and 0,2,0, so a bare
   `.nl-gap .detail` at 0,2,0 loses the cascade and does nothing at all,
   however late in the file it sits. */
.rows .row.nl-gap .detail { white-space: normal; overflow: visible;
  text-overflow: clip; line-height: 1.5; }
.rows .row.nl-gap { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
.rows .row.nl-gap .ic { margin-top: 2px; }
.rows .row.nl-gap .trailing { align-self: center; }
.rows .row.nl-gap .title { display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap; white-space: normal; overflow: visible; }

/* The date beside an edition's status chip. Tabular so a column of them lines
   up, and quiet so the chip and the button beside it stay the row's subject. */
.nl-when { margin-left: 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rows .row .trailing .nl-when + form { margin-left: 10px; }

/* The editions pager. Centred rather than split to the edges: with only
   Previous and Next there is nothing in the middle to anchor them. */
.nl-pager { display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 14px 0 0; font-size: 13px; }

/* ---- permissions: the Owner's role × resource matrix ----
   Every row is a shared `.rows .row` with a select in its trailing slot; the
   only thing this block adds is the width that keeps 40-odd of those selects
   in one column instead of each sizing to its longest option. */
.pm-intro { margin: -6px 2px 18px; font-size: 12.5px; }
.pm-pick { margin: 0; min-width: 210px; }
.pm-pick select { padding-top: 12px; padding-bottom: 12px; font-size: 14px; }
/* The fallback row sits above the named ones and reads as their heading
   rather than as another entry, so it loses the hairline and gains the tint
   of the card it opens. */
.rows .row.pm-default { background: var(--hover-quiet); }
.rows .row.pm-default .title { font-weight: 600; }
@media (max-width: 639px) {
  .pm-pick { min-width: 0; width: 100%; }
}

/* ---- popups: the module's figures and its editor controls ----
   Reuses `.card.padded` for the tiles and `.rows .row` for the editor, as
   Newsletters and Memberships do; what is here is the grid they sit in and
   the width that keeps a column of selects from each sizing to its longest
   option. */
.pu-tiles { display: grid; gap: 12px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pu-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  color: inherit; transition: border-color .15s, transform .15s; }
/* Only a tile that leads somewhere lifts: one with no destination is a
   <div>, so this never promises a click that does nothing. */
a.pu-tile:hover { border-color: var(--outline); transform: translateY(-1px); }
.pu-tile .ic { margin-bottom: 8px; }
.pu-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.pu-tile-label { font-size: 13.5px; font-weight: 600; }
.pu-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.4; }

/* The editor's right-hand column. A fixed minimum rather than `auto` so the
   selects line up down the card instead of stepping in and out with the
   length of "Once, then wait a while".
   `flex-end` is what that minimum costs: a select fills the 232px, but a
   switch is 52px wide and would otherwise sit at the LEFT edge of the block
   — floating in the middle of the row while every select beside it reached
   the margin. */
.pu-control { min-width: 232px; display: flex; justify-content: flex-end; align-items: center; }
.pu-control .field { width: 100%; }
@media (max-width: 639px) {
  .pu-control { min-width: 0; width: 100%; }
}

/* ---- media › images: the optimisation card and Settings → Images ----
   The card sits above the library's tabs and says what optimisation is doing
   to new uploads, how much of the library is done, and offers the next batch.
   One row on a wide screen; the actions drop under the words on a narrow one. */
.im-card { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.im-card > .ic { flex: none; }
.im-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.im-title { font-size: 14.5px; font-weight: 600; }
.im-detail { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.45; }
.im-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* Settings → Images: the same right-aligned column as the popups editor, so
   a switch reaches the margin a number field does. */
.im-control { min-width: 160px; display: flex; justify-content: flex-end; align-items: center; }
@media (max-width: 639px) {
  .im-actions { width: 100%; }
  .im-control { min-width: 0; width: 100%; justify-content: flex-start; }
}

/* ---- cookies: the consent overview, the banner preview, the declaration
   and the log ----
   Tiles, rows, chips and fields are the shared primitives. What is here is
   the hero (status beside a drawing of the banner), the category bars, and
   the preview itself — a static sketch in the site's own shapes, NOT the
   site stylesheet, so it reads the admin's tokens. The preview is a small
   repeated-free element and takes tint + hairline, no backdrop filter. */
.ck-tiles { display: grid; gap: 12px; margin: 14px 0 4px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.ck-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none;
  color: inherit; transition: border-color .15s, transform .15s; }
a.ck-tile:hover { border-color: var(--outline); transform: translateY(-1px); }
.ck-tile .ic { margin-bottom: 8px; }
.ck-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ck-tile-label { font-size: 13.5px; font-weight: 600; }
.ck-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.4; }

.ck-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 28px;
  align-items: center; padding: 24px 24px 24px 28px; margin-top: 16px; }
.ck-hero h2 { margin: 12px 0 6px; font-size: 22px; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
.ck-hero p { margin: 0; max-width: 52ch; }
.ck-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.ck-hero-actions form { margin: 0; }
@media (max-width: 860px) { .ck-hero { grid-template-columns: 1fr; } }

/* The banner, sketched over a sketched page. Layout classes move the card
   the way the real banner moves. */
.ck-preview { position: relative; min-height: 210px; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--glass-stroke);
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 7%, var(--surface, #fff)),
    color-mix(in srgb, var(--blue-bg) 70%, var(--surface, #fff))); }
.ck-pv-page { position: absolute; inset: 18px 18px auto; display: grid; gap: 8px; }
.ck-pv-page i { display: block; height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--on-surface) 9%, transparent); }
.ck-pv-page i:first-child { height: 14px; width: 55%; margin-bottom: 4px; }
.ck-pv-page i:nth-child(3) { width: 85%; }
.ck-pv-page i:last-child { width: 70%; }
.ck-pv-card { position: absolute; left: 12px; bottom: 12px; width: min(78%, 280px); padding: 12px 12px 10px;
  border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
.ck-pv-card b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.ck-pv-card p { margin: 0; font-size: 10.5px; line-height: 1.4; color: var(--on-surface-variant);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ck-pv-card u { color: var(--primary); }
.ck-pv-actions { display: flex; gap: 4px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.ck-pv-btn { font-size: 9.5px; font-weight: 600; height: 20px; padding: 0 9px; border-radius: 999px;
  display: inline-flex; align-items: center; white-space: nowrap; }
.ck-pv-btn.text { color: var(--primary); padding: 0 4px; }
.ck-pv-btn.tonal { background: var(--secondary-container); color: var(--on-secondary-container); }
.ck-pv-btn.filled { background: var(--primary); color: var(--on-primary); }
.ck-pv-bar .ck-pv-card { left: 8px; right: 8px; width: auto; display: grid;
  grid-template-columns: 1fr auto; column-gap: 10px; align-items: end; }
.ck-pv-bar .ck-pv-card p { -webkit-line-clamp: 2; }
.ck-pv-bar .ck-pv-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; flex-wrap: nowrap; }
.ck-pv-modal::after { content: ""; position: absolute; inset: 0; background: rgba(20, 10, 15, .22); }
.ck-pv-modal .ck-pv-card { z-index: 1; left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.ck-pv-label { position: absolute; top: 10px; right: 12px; z-index: 2; font-size: 11px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--on-surface-variant); }

.ck-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 16px; }
.ck-bars { display: grid; gap: 14px; }
.ck-bar-head { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 6px; }
.ck-bar-head b { font-variant-numeric: tabular-nums; }
.ck-bar-track { height: 8px; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--on-surface) 8%, transparent); }
/* The tint class supplies the colour; the fill is that colour solid. */
.ck-bar-track span { display: block; height: 100%; border-radius: inherit; background: currentColor;
  transition: width .4s cubic-bezier(.2, 0, 0, 1); }

.ck-name { font: 600 13px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.ck-cat-desc { margin: -4px 4px 10px; font-size: 13px; max-width: 72ch; }
.ck-embed-hint { display: flex; gap: 14px; align-items: flex-start; margin-top: 16px; }
.ck-embed-hint p { margin: 4px 0 0; font-size: 13px; }
.ck-embed-hint code, .ck-hero code { font-size: 12px; }
.ck-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
.ck-add .ck-wide { grid-column: 1 / -1; }
.ck-search { display: flex; gap: 10px; align-items: center; margin: 16px 0 6px; }
.ck-log-note { margin: 0 4px 14px; font-size: 12.5px; }

.ck-settings-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 16px; align-items: start; }
.ck-settings-split .ck-preview { position: sticky; top: 96px; min-height: 240px; }
@media (max-width: 860px) { .ck-settings-split { grid-template-columns: 1fr; } }
.ck-control { min-width: 232px; display: flex; justify-content: flex-end; align-items: center; }
.ck-control .field { width: 100%; }
@media (max-width: 639px) { .ck-control { min-width: 0; width: 100%; } }
.ck-wrap .row .detail { white-space: normal; overflow: visible; text-overflow: clip; }

/* ---- site search (Tools → Search and Filtering): engine cards, weights,
   the tester's scores and the insights bars ----
   Cards, rows, fields and switches are the shared primitives. The engine
   cards are radio labels — the whole card is the hit area — and take tint
   and a hairline, not a backdrop filter: three on a row. */
.ss-lead { margin: -2px 4px 10px; font-size: 13px; max-width: 76ch; }
.ss-engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ss-engine { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 14px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ss-engine:hover { transform: translateY(-1px); }
.ss-engine input { position: absolute; opacity: 0; pointer-events: none; }
.ss-engine-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ss-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--outline); transition: border-color .15s; }
.ss-engine:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--glass-shadow-lift); }
.ss-engine:has(input:checked) .ss-radio { border: 6px solid var(--primary); }
.ss-engine:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.ss-engine b { font-size: 16px; }
.ss-engine-line { font-size: 13px; color: var(--on-surface-variant); }
.ss-engine ul { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.6; }
.ss-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ss-tag { display: inline-flex; align-items: center; cursor: pointer; }
.ss-tag input { position: absolute; opacity: 0; pointer-events: none; }
.ss-tag span { height: 30px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; border: 1px solid var(--outline-variant); transition: background-color .12s; }
.ss-tag span:hover { background: var(--glass-hover); }
.ss-tag input:checked + span { background: var(--red-bg); color: var(--red-fg); border-color: transparent; font-weight: 600;
  text-decoration: line-through; }
.ss-tag input:focus-visible + span { outline: 2px solid var(--primary); }
.ss-weights { display: grid; gap: 18px; }
.ss-weight { display: grid; grid-template-columns: minmax(0, 1fr) minmax(140px, 260px) 28px; gap: 16px; align-items: center; }
.ss-weight .title { display: block; font-weight: 600; font-size: 14.5px; }
.ss-weight .detail { display: block; font-size: 12.5px; color: var(--on-surface-variant); }
.ss-weight input[type=range] { width: 100%; accent-color: var(--primary); }
.ss-weight output { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.ss-control { min-width: 232px; display: flex; justify-content: flex-end; align-items: center; }
.ss-control .field { width: 100%; }
@media (max-width: 639px) {
  .ss-control { min-width: 0; width: 100%; }
  .ss-weight { grid-template-columns: 1fr 28px; }
  .ss-weight > div { grid-column: 1 / -1; }
}
.ss-try { display: flex; gap: 10px; align-items: center; margin: 16px 0 14px; }
.ss-note { margin-top: 16px; font-size: 13.5px; }
.ss-hit .ss-rank { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 700; font-size: 13px; }
.ss-hit .detail { white-space: normal; }
.ss-score { font: 700 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--primary); }
.ss-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; }
.ss-tile { display: flex; flex-direction: column; gap: 2px; }
.ss-tile .ic { margin-bottom: 8px; }
.ss-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ss-tile-label { font-size: 13.5px; font-weight: 600; }
.ss-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); }
.ss-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 16px; }
.ss-query { text-decoration: none; color: inherit; }
.ss-bar { display: block; height: 6px; border-radius: 999px; margin-top: 6px;
  background: color-mix(in srgb, var(--on-surface) 7%, transparent); overflow: hidden; }
.ss-bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); opacity: .7; }
.ss-count { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 8px; }

/* ---- tools: the hub's search box ----
   A pill-shaped glass field above the grid, the same 56px height and
   radius language as the rail's search. What matched inside a card shows
   on the card itself, between its description and its state line. */
.tool-finder { position: relative; display: flex; align-items: center; gap: 12px; height: 56px; margin-top: 18px;
  padding: 0 18px 0 20px; border-radius: 999px; background: var(--glass-strong);
  border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transition: border-color .15s, box-shadow .15s; }
.tool-finder:focus-within { border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
.tool-finder-ic { display: grid; place-items: center; color: var(--on-surface-variant); }
.tool-finder-ic svg { width: 22px; height: 22px; }
.tool-finder input { all: unset; flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--on-surface); }
.tool-finder input::placeholder { color: var(--on-surface-variant); opacity: .85; }
.tool-finder input::-webkit-search-cancel-button { cursor: pointer; }
.tool-finder-count { font-size: 12.5px; font-weight: 600; color: var(--on-surface-variant); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.tool-card[hidden] { display: none; }
.tool-found { font-size: 11.5px; line-height: 1.45; color: var(--on-secondary-container);
  background: var(--secondary-container); border-radius: 8px; padding: 5px 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-found[hidden] { display: none; }
.tool-found b { font-weight: 700; }
.tool-none { margin-top: 20px; text-align: center; }
.tool-none p { margin: 0 0 6px; }
.tool-none .btn { margin-top: 10px; }
.tool-none[hidden] { display: none; }

/* ---- ads (Tools → Advertising & Ad Management) ----
   Tiles, rows, fields, chips are the shared primitives. What is here: the
   30-day chart, the editor's two columns, the kind picker, and the rule that
   shows only the fields the chosen kind and placement use — done with
   `:has()`, so the editor needs no script and every field still posts. The
   preview draws the site's own ad markup (`.vad`) with a few admin-scoped
   rules, because the admin does not load the site's stylesheet. */
.ad-tiles { display: grid; gap: 12px; margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.ad-tile { display: flex; flex-direction: column; gap: 2px; }
.ad-tile .ic { margin-bottom: 8px; }
.ad-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ad-tile-label { font-size: 13.5px; font-weight: 600; }
.ad-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); }
.ad-off { display: flex; gap: 14px; align-items: center; margin-top: 16px; }
.ad-off > div { flex: 1; }
.ad-off p { margin: 2px 0 0; font-size: 13px; }
.ad-off form { margin: 0; }

.ad-chart svg { display: block; width: 100%; height: 180px; overflow: visible; }
.ad-bar { fill: color-mix(in srgb, var(--blue-fg) 55%, transparent); }
.ad-bar:hover { fill: var(--blue-fg); }
.ad-line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke; }
.ad-chart-key { display: flex; gap: 16px; font-size: 12.5px; color: var(--on-surface-variant); margin-bottom: 10px; }
.ad-chart-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ad-chart-key .k-imp { background: color-mix(in srgb, var(--blue-fg) 55%, transparent); }
.ad-chart-key .k-clk { background: var(--primary); border-radius: 50%; }
.ad-chart-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--on-surface-variant); margin-top: 6px; }

.ad-nums { display: flex; gap: 18px; align-items: center; font-size: 12.5px; color: var(--on-surface-variant); white-space: nowrap; }
.ad-nums b { color: var(--on-surface); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .ad-nums span:nth-child(n+2) { display: none; } }

.ad-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: 0 20px; align-items: start; }
.ad-split-even { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.ad-side { position: sticky; top: 96px; }
@media (max-width: 980px) { .ad-split { grid-template-columns: 1fr; } .ad-side { position: static; } }
.ad-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 640px) { .ad-grid { grid-template-columns: 1fr; } }
.ad-hint { margin: -6px 2px 12px; font-size: 12.5px; }
.ad-hint:last-child { margin-bottom: 0; }
.ad-form textarea.mono, .ad-code, textarea.mono { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.ad-code { margin: 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--on-surface) 6%, transparent); overflow-x: auto; }
.ad-warn { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--amber-bg); color: var(--amber-fg); font-size: 13px; }
.ad-warn ul { margin: 6px 0 0; padding-left: 18px; }
.ad-control { min-width: 200px; display: flex; justify-content: flex-end; }
@media (max-width: 639px) { .ad-control { min-width: 0; width: 100%; } }

/* The kind picker: three cards that are radio labels. */
.ad-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 16px; }
.ad-kind { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px;
  border-radius: 16px; border: 1px solid var(--outline-variant); cursor: pointer; transition: border-color .15s, background-color .15s; }
.ad-kind:hover { background: var(--glass-hover); }
.ad-kind input { position: absolute; opacity: 0; pointer-events: none; }
.ad-kind b { font-size: 13.5px; }
.ad-kind:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--glass-hover); }
.ad-kind:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 520px) { .ad-kinds { grid-template-columns: 1fr; } }

/* Only the fields the chosen kind and placement use. */
.ad-form .ad-only, .ad-form .ad-only-p { display: none; }
.ad-form:has(input[name=kind][value=image]:checked) .ad-only.ad-image,
.ad-form:has(input[name=kind][value=text]:checked) .ad-only.ad-text,
.ad-form:has(input[name=kind][value=code]:checked) .ad-only.ad-code,
.ad-form:has(select[name=placement] option[value=post_paragraph]:checked) .ad-p-post_paragraph,
.ad-form:has(select[name=placement] option[value=slot]:checked) .ad-p-slot { display: block; }
/* A browser without :has() shows everything rather than hiding a field
   somebody needs. */
@supports not selector(:has(*)) { .ad-form .ad-only, .ad-form .ad-only-p { display: block; } }

.ad-preview { overflow: hidden; }
.ad-preview .vad { margin: 0; text-align: center; }
.ad-preview .vad-label { display: block; margin-bottom: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--on-surface-variant); }
.ad-preview .vad-img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; }
.ad-preview .vad-link { text-decoration: none; color: inherit; }
.ad-preview .vad-text { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
  border: 1px solid var(--outline-variant); border-radius: 14px; }
.ad-preview .vad-thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.ad-preview .vad-words { flex: 1; display: grid; gap: 2px; }
.ad-preview .vad-headline { font-size: 15px; }
.ad-preview .vad-body { font-size: 13px; color: var(--on-surface-variant); }
.ad-preview .vad-cta { padding: 6px 12px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: 12.5px; font-weight: 600; }
.ad-preview .vad-code { font-size: 12px; color: var(--on-surface-variant); }

/* ---- workflows (Tools → Workflow & Editorial Management) ----
   The board is a row of columns that scrolls sideways; each column is a
   glass panel (one per stage — a handful, so the blur is allowed), each
   card a tinted tile with no backdrop filter. The stepper, calendar and
   entry page reuse cards, rows and fields. */
.wf-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 16px; }
.wf-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wf-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--outline-variant); color: var(--on-surface-variant); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.wf-chip:hover { background: var(--glass-hover); }
.wf-chip.on { background: var(--secondary-container); color: var(--on-secondary-container); border-color: transparent; font-weight: 600; }
.wf-chip b { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: color-mix(in srgb, var(--on-surface) 10%, transparent); }
.wf-sep { width: 1px; height: 20px; background: var(--outline-variant); margin: 0 4px; }
.wf-person { min-width: 220px; margin: 0; }
.wf-idea { display: flex; gap: 8px; margin: 14px 0 0; }
.wf-idea input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--glass-stroke);
  background: var(--glass-strong); color: var(--on-surface); font: inherit; font-size: 15px; }
.wf-idea input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

.wf-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; margin-top: 16px;
  overflow-x: auto; padding-bottom: 8px; align-items: start; scroll-snap-type: x proximity; }
.wf-col { display: flex; flex-direction: column; min-height: 240px; max-height: calc(100vh - 260px); border-radius: 20px;
  background: var(--glass); border: 1px solid var(--glass-stroke); box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
  scroll-snap-align: start; transition: box-shadow .15s, border-color .15s; }
.wf-col.wf-drop-on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary), var(--glass-shadow-lift); }
.wf-col.wf-over .wf-count { background: var(--red-bg); color: var(--red-fg); }
.wf-col-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.wf-col-head h2 { margin: 0; font-size: 14px; font-weight: 650; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.wf-dot.tint-slate, .wf-dot[class*="tint-"] { background: currentColor; }
.wf-count { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--on-surface) 8%, transparent);
  font-variant-numeric: tabular-nums; }
.wf-cards { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 12px; overflow-y: auto; min-height: 60px; }
.wf-empty { margin: 8px 4px; font-size: 12.5px; color: var(--on-surface-variant); text-align: center; }

.wf-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px; border-radius: 14px;
  background: var(--glass-strong); border: 1px solid var(--glass-stroke); box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: transform .12s, box-shadow .12s; }
.wf-card[draggable="true"] { cursor: grab; }
.wf-card:hover { box-shadow: var(--glass-shadow-lift); }
.wf-card.wf-dragging { opacity: .5; transform: rotate(1.5deg); }
.wf-card.wf-p-urgent { border-left: 3px solid var(--red-fg); }
.wf-card.wf-p-high { border-left: 3px solid var(--amber-fg); }
.wf-title { color: var(--on-surface); text-decoration: none; font-weight: 600; font-size: 14px; line-height: 1.35; }
.wf-title:hover { color: var(--primary); }
.wf-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wf-meta:empty { display: none; }
.wf-meta .chip { height: 20px; font-size: 11px; padding: 0 8px; }
.wf-prio { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.wf-due, .wf-when { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--on-surface) 7%, transparent); color: var(--on-surface-variant); }
.wf-due svg { width: 12px; height: 12px; }
.wf-due-over { background: var(--red-bg); color: var(--red-fg); }
.wf-due-today { background: var(--amber-bg); color: var(--amber-fg); }
.wf-due-soon { background: var(--blue-bg); color: var(--blue-fg); }
.wf-foot { display: flex; align-items: center; gap: 8px; }
.wf-stats { display: flex; gap: 8px; flex: 1; font-size: 11.5px; color: var(--on-surface-variant); }
.wf-stats span { display: inline-flex; align-items: center; gap: 3px; }
.wf-stats svg { width: 13px; height: 13px; }
.wf-avatar { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  background: var(--secondary-container); color: var(--on-secondary-container); }
.wf-avatar-none { background: color-mix(in srgb, var(--on-surface) 7%, transparent); color: var(--on-surface-variant); }
.wf-move { display: flex; gap: 2px; }
.wf-move form { margin: 0; }
.wf-arrow { all: unset; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--on-surface-variant); }
.wf-arrow:hover { background: var(--glass-hover); color: var(--primary); }
.wf-arrow:focus-visible { outline: 2px solid var(--primary); }
.wf-arrow svg { width: 16px; height: 16px; }
.wf-arrow-gap { width: 26px; }
.wf-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 1000; padding: 12px 20px; border-radius: 14px;
  background: var(--inverse-surface, #322F30); color: var(--inverse-on-surface, #F5EFF0); font-size: 14px; box-shadow: var(--glass-shadow-lift); }

/* The entry page. */
.wf-stepper { display: flex; gap: 4px; margin-top: 16px; overflow-x: auto; padding-bottom: 4px; }
.wf-step { flex: 1; min-width: 110px; margin: 0; }
.wf-step > button, .wf-step:not(form) { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.wf-step > button { cursor: pointer; }
.wf-step > button:hover { background: var(--glass-hover); }
.wf-step-dot { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  border: 2px solid var(--outline-variant); color: var(--on-surface-variant); }
.wf-step-done .wf-step-dot { background: var(--green-bg); border-color: var(--green-fg); color: var(--green-fg); }
.wf-step-now .wf-step-dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.wf-step-now .wf-step-label { font-weight: 700; }
.wf-step-todo .wf-step-label { color: var(--on-surface-variant); }
.wf-gate { display: flex; gap: 12px; align-items: center; margin-top: 12px; background: var(--amber-bg); color: var(--amber-fg); }
.wf-gate p { margin: 0; }
.wf-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 0 20px; align-items: start; }
@media (max-width: 960px) { .wf-item { grid-template-columns: 1fr; } }
.wf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.wf-due-note { margin: -4px 2px 10px; font-size: 12.5px; font-weight: 600; }
.wf-due-note.wf-due-over { color: var(--red-fg); background: none; }
.wf-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wf-check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 4px; border-radius: 10px; }
.wf-check form { margin: 0; flex: 1; }
.wf-tick-btn { all: unset; display: flex; align-items: center; gap: 10px; width: 100%; cursor: pointer; }
.wf-tick-btn:focus-visible { outline: 2px solid var(--primary); border-radius: 8px; }
.wf-check:hover { background: var(--glass-hover); }
.wf-tick { width: 20px; height: 20px; flex: none; border-radius: 6px; border: 2px solid var(--outline); display: grid; place-items: center; }
.wf-tick svg { width: 14px; height: 14px; }
.wf-check.on .wf-tick { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.wf-check.wf-auto.on .wf-tick { background: var(--green-fg); border-color: var(--green-fg); color: #fff; }
.wf-check.wf-auto:hover { background: none; }
.wf-auto-tag { margin-left: auto; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--on-surface-variant); }
.wf-notes { display: grid; gap: 14px; margin-bottom: 14px; }
.wf-note { display: flex; gap: 10px; }
.wf-note-body { flex: 1; min-width: 0; }
.wf-note-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.wf-note-head span { color: var(--on-surface-variant); font-size: 12px; }
.wf-note-head form { margin: 0 0 0 auto; }
.wf-note-body p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; white-space: normal; overflow-wrap: anywhere; }
.wf-note-del { all: unset; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--on-surface-variant); }
.wf-note-del:hover { background: var(--glass-hover); }
.wf-note-del svg { width: 14px; height: 14px; }
.wf-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.wf-history li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.wf-ev-ic { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; }
.wf-ev-ic svg { width: 14px; height: 14px; }
.wf-ev-when { display: block; font-size: 12px; color: var(--on-surface-variant); margin-top: 1px; }

/* The calendar. */
.wf-cal-bar { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.wf-cal-bar h2 { margin: 0 8px; font-size: 20px; font-weight: 650; min-width: 170px; text-align: center; }
.wf-legend { margin-left: auto; display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--on-surface-variant); }
.wf-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 4px; margin-left: 10px; }
.wf-legend i.wf-pill-due { border: 1.5px dashed var(--outline); }
.wf-legend i.tint-purple, .wf-legend i.tint-green { background: currentColor; }
.wf-cal { margin-top: 12px; padding: 8px; overflow-x: auto; }
.wf-week { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); }
.wf-weekdays span { padding: 6px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--on-surface-variant); }
.wf-day { min-height: 104px; padding: 6px; border-top: 1px solid var(--outline-variant); display: flex; flex-direction: column; gap: 4px; }
.wf-day + .wf-day { border-left: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent); }
.wf-out { background: color-mix(in srgb, var(--on-surface) 3%, transparent); }
.wf-out .wf-daynum { opacity: .45; }
.wf-daynum { font-size: 12.5px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.wf-today .wf-daynum { background: var(--primary); color: var(--on-primary); }
.wf-pill { display: block; padding: 3px 7px; border-radius: 7px; font-size: 11.5px; font-weight: 600; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-pill-due { background: transparent; border: 1.5px dashed currentColor; }
.wf-pill:hover { filter: brightness(.96); }

/* Settings. */
.wf-lead { margin: -2px 4px 10px; font-size: 13px; max-width: 80ch; }
.wf-stage-row { display: grid; grid-template-columns: 12px minmax(160px, 1fr) 150px 90px 90px auto; gap: 10px; align-items: center; padding: 6px 0; }
.wf-stage-row + .wf-stage-row { border-top: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent); }
.wf-stage-new { padding-top: 12px; }
.wf-remove { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--on-surface-variant); cursor: pointer; white-space: nowrap; }
.wf-control { min-width: 220px; display: flex; justify-content: flex-end; }
@media (max-width: 760px) {
  .wf-stage-row { grid-template-columns: 12px 1fr 1fr; }
  .wf-control { min-width: 0; width: 100%; }
}
/* `all: unset` on a step that is not a form also unset its flex share, so
   the clickable and current steps sat at different widths. Re-applied. */
.wf-step, .wf-step:not(form) { flex: 1 1 0; min-width: 110px; }

/* ---- social media (Tools → Social → Social media), and the switch both
   halves of Social share ----
   The switch is two large cards, so that "Social web" and "Social media"
   read as two different things at a glance; the current one is lifted and
   outlined. Accounts are rows; the connect grid is <details> tiles that open
   in place. Network badges are letters on a tint — no third-party logos. */
.sm-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
@media (max-width: 760px) { .sm-sections { grid-template-columns: 1fr; } }
.sm-section { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 22px;
  text-decoration: none; color: var(--on-surface); background: var(--glass); border: 1px solid var(--glass-stroke);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge); transition: transform .15s, border-color .15s, box-shadow .15s; }
.sm-section:hover { transform: translateY(-1px); border-color: var(--outline); }
.sm-section.on { background: var(--glass-strong); border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--glass-shadow-lift), inset 0 1px 0 var(--glass-edge); }
.sm-section .ic { flex: none; width: 44px; height: 44px; border-radius: 14px; }
.sm-section .ic svg { width: 22px; height: 22px; }
.sm-section-text { display: grid; gap: 3px; min-width: 0; }
.sm-section-text b { font-size: 17px; font-weight: 650; }
.sm-section-text span { font-size: 14px; }
.sm-section-text small { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.45; }
.sm-section-mark { position: absolute; top: 14px; right: 16px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--primary); }
.sm-subhead { margin: 22px 4px 4px; font-size: 18px; font-weight: 650; }
.sm-subhead span { font-weight: 400; font-size: 14px; color: var(--on-surface-variant); }

.sm-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.sm-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
a.sm-tile:hover { border-color: var(--outline); }
.sm-tile-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sm-tile-value.sm-bad { color: var(--red-fg); }
.sm-tile-label { font-size: 12.5px; color: var(--on-surface-variant); font-weight: 600; }
.sm-empty b { display: block; margin-bottom: 4px; }
.sm-empty p { margin: 0; }
.sm-lead { margin: -2px 4px 10px; font-size: 13px; max-width: 80ch; }
.sm-hint { margin: -6px 2px 12px; font-size: 12.5px; color: var(--on-surface-variant); }

.sm-badge { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
  font: 800 13px/1 system-ui, -apple-system, sans-serif; letter-spacing: -.02em; }
.sm-account .body .detail { white-space: normal; }
.sm-controls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.sm-controls form { margin: 0; }
.sm-toggle { all: unset; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 600; border: 1px solid var(--outline-variant); color: var(--on-surface-variant); }
.sm-toggle i { width: 8px; height: 8px; border-radius: 50%; background: var(--outline); }
.sm-toggle.on { background: var(--green-bg); color: var(--green-fg); border-color: transparent; }
.sm-toggle.on i { background: #2E9D5B; box-shadow: 0 0 0 3px color-mix(in srgb, #2E9D5B 22%, transparent); }
.sm-toggle:focus-visible { outline: 2px solid var(--primary); }

.sm-connects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.sm-connect { border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-stroke); box-shadow: inset 0 1px 0 var(--glass-edge); }
.sm-connect[open] { background: var(--glass-strong); border-color: var(--outline); }
.sm-connect summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.sm-connect summary::-webkit-details-marker { display: none; }
.sm-connect summary b { flex: 1; font-size: 14.5px; }
.sm-connect summary svg { width: 18px; height: 18px; color: var(--on-surface-variant); transform: rotate(90deg); transition: transform .15s; }
.sm-connect[open] summary svg { transform: rotate(-90deg); }
.sm-limit { font-size: 11.5px; color: var(--on-surface-variant); }
.sm-connect-form { padding: 4px 14px 14px; }
.sm-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 4px 2px 12px; cursor: pointer; }
.sm-connect-actions, .sm-edit-actions, .sm-save { display: flex; justify-content: flex-end; gap: 8px; }
.sm-edit-actions { justify-content: space-between; }
.sm-save { margin-top: 14px; }
.sm-account-head { display: flex; align-items: center; gap: 12px; margin: 18px 0 4px; }
.sm-account-head h2 { margin: 0; font-size: 20px; }
.sm-account-head p { margin: 2px 0 0; font-size: 13px; }
.sm-edit { max-width: 760px; }

.sm-pick { display: flex; gap: 8px; align-items: center; margin: 16px 0 12px; }
.sm-drafts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.sm-draft { padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-stroke); display: grid; gap: 10px; }
.sm-draft-head { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.sm-draft-head .sm-badge { width: 30px; height: 30px; border-radius: 9px; font-size: 11.5px; }
.sm-draft-head b { font-size: 14px; }
.sm-draft-head .muted { font-size: 12px; flex: 1; }
.sm-draft:has(input[type=checkbox]:not(:checked)) { opacity: .55; }
.sm-count { text-align: right; font-size: 12px; font-weight: 600; color: var(--on-surface-variant); font-variant-numeric: tabular-nums; }
.sm-over .sm-count { color: var(--red-fg); }
.sm-over textarea { border-color: var(--red-fg) !important; }
.sm-send { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

.sm-filters { margin: 16px 0 12px; }
.sm-share .body { min-width: 0; }
.sm-share-text { display: block; margin-top: 6px; font-size: 13px; color: var(--on-surface-variant); white-space: pre-wrap; overflow-wrap: anywhere;
  max-height: 4.5em; overflow: hidden; }
.sm-err { display: block; margin-top: 6px; font-size: 12.5px; color: var(--red-fg); }
.sm-control { min-width: 240px; display: flex; justify-content: flex-end; }
@media (max-width: 639px) { .sm-control { min-width: 0; width: 100%; } }
/* The share bar's own look, for the preview — the site stylesheet is not
   loaded in the admin. */
.sm-preview .vsb-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-surface-variant); }
.sm-preview .vsb-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sm-preview .vsb-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--outline-variant);
  font-size: 13.5px; font-weight: 600; color: var(--on-surface); text-decoration: none; background: none; cursor: pointer; font-family: inherit; }
.sm-sections + .seg-bar { margin-top: 18px; }

/* ---- caching (Tools → Caching & Performance) ----
   Tiles, rows and fields are the shared primitives. What is here: the
   slowest-pages bars, the fact lists, and the settings' controls. */
.cp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.cp-tile { display: flex; flex-direction: column; gap: 2px; }
.cp-tile .ic { margin-bottom: 8px; }
.cp-tile-value { font-size: 24px; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.cp-tile-label { font-size: 13.5px; font-weight: 600; }
.cp-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); line-height: 1.4; }
.cp-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 16px; }
@media (max-width: 960px) { .cp-split { grid-template-columns: 1fr; } }
.cp-slow { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 4px 12px; align-items: center; padding: 8px 0; }
.cp-slow + .cp-slow { border-top: 1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent); }
.cp-slow a { color: var(--on-surface); text-decoration: none; font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-slow a:hover { color: var(--primary); }
.cp-bar { grid-row: 2; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--on-surface) 7%, transparent); overflow: hidden; }
.cp-bar span { display: block; height: 100%; border-radius: inherit; background: var(--amber-fg); opacity: .65; }
.cp-ms { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 12px; color: var(--on-surface-variant); font-variant-numeric: tabular-nums; }
.cp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cp-facts li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.cp-facts li span { color: var(--on-surface-variant); }
.cp-facts li b { font-variant-numeric: tabular-nums; }
.cp-lead { margin: -2px 4px 10px; font-size: 13px; max-width: 82ch; }
.cp-hint { margin: -4px 2px 12px; font-size: 12.5px; color: var(--on-surface-variant); }
.cp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 640px) { .cp-two { grid-template-columns: 1fr; } }
.cp-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.cp-save { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; }
.cp-save > :only-child { margin-left: auto; }
.cp-control { min-width: 230px; display: flex; justify-content: flex-end; }
.cp-control .field { width: 100%; }
@media (max-width: 639px) { .cp-control { min-width: 0; width: 100%; } }

/* ---- directories (Tools → Directory & Classified Listings) ----
   Tiles, rows, fields and chips are the shared primitives. What is here:
   the live/off banner, listing rows with thumbnails and inline review,
   the kind picker, and the price section that only a classified shows
   (`:has()`, so the editor needs no script and still posts every field). */
.dr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.dr-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
a.dr-tile:hover { border-color: var(--outline); }
.dr-tile .ic { margin-bottom: 8px; }
.dr-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dr-tile-label { font-size: 13.5px; font-weight: 600; }
.dr-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); }
.dr-live { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.dr-live > div { flex: 1; }
.dr-live p { margin: 2px 0 0; font-size: 13px; }
.dr-off { background: color-mix(in srgb, var(--amber-bg) 45%, var(--glass)); }
.dr-thumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.dr-listing .title a { color: inherit; text-decoration: none; }
.dr-listing .title a:hover { color: var(--primary); }
.dr-listing .detail { white-space: normal; }
.dr-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dr-actions form { margin: 0; }
.dr-reject { display: flex; gap: 4px; align-items: center; }
.dr-reject input { height: 32px; width: 160px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--outline-variant);
  background: transparent; color: var(--on-surface); font: inherit; font-size: 13px; }
.dr-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 16px 0 8px; }
.dr-filter .field.fixed { min-width: 170px; }
.dr-lead { margin: 0 4px 10px; font-size: 13px; }
.dr-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 0 20px; align-items: start; }
.dr-split-even { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
@media (max-width: 980px) { .dr-split { grid-template-columns: 1fr; } }
.dr-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
@media (max-width: 560px) { .dr-kinds { grid-template-columns: 1fr; } }
.dr-kind { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--outline-variant); cursor: pointer; }
.dr-kind input { position: absolute; opacity: 0; pointer-events: none; }
.dr-kind span { font-size: 12.5px; color: var(--on-surface-variant); }
.dr-kind:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--glass-hover); }
.dr-kind:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.dr-form .dr-only-classified { display: none; }
.dr-form:has(input[name=kind][value=classified]:checked) .dr-only-classified { display: block; }
@supports not selector(:has(*)) { .dr-form .dr-only-classified { display: block; } }
.dr-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.dr-hint { margin: -4px 2px 0; font-size: 12.5px; }
.dr-save { display: flex; justify-content: flex-end; margin-top: 14px; }
.dr-status p { margin: 0 0 8px; }
.dr-status-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-status-actions form { margin: 0; }
.dr-cat { border-radius: 14px; }
.dr-cat + .dr-cat { border-top: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent); }
.dr-cat summary { display: flex; align-items: center; gap: 10px; padding: 10px 4px; cursor: pointer; list-style: none; }
.dr-cat summary::-webkit-details-marker { display: none; }
.dr-cat summary b { font-size: 14.5px; }
.dr-cat summary .muted { flex: 1; font-size: 12.5px; }
.dr-cat summary svg:last-child { width: 18px; height: 18px; transform: rotate(90deg); transition: transform .15s; }
.dr-cat[open] summary svg:last-child { transform: rotate(-90deg); }
.dr-cat-form { padding: 6px 4px 14px; }
.dr-cat-actions { display: flex; justify-content: space-between; }
.dr-control { min-width: 220px; display: flex; justify-content: flex-end; }
@media (max-width: 639px) { .dr-control { min-width: 0; width: 100%; } }

/* ==== Tools → Page Builder & Visual Editor (builder.rs) — `vb-` ==========
   The tool's own screens. The visual editor itself is a separate,
   full-screen stylesheet: assets/builder-editor.css. */
.vb-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.vb-tile { display: flex; flex-direction: column; gap: 2px; }
.vb-tile .ic { margin-bottom: 8px; }
.vb-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vb-tile-label { font-weight: 600; }
.vb-tile-detail { color: var(--on-surface-variant); font-size: 13px; }
.vb-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.vb-start-card { display: flex; gap: 14px; align-items: flex-start; }
.vb-start-body { flex: 1; min-width: 0; }
.vb-start-body p { margin: 2px 0 12px; }
.vb-import { margin-top: 12px; }
.vb-import-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.vb-import-file { flex: 1 1 260px; min-width: 0; max-width: 420px; box-sizing: border-box; padding: 4px; border: 1px solid var(--outline-variant, GrayText); border-radius: 12px; font: inherit; font-size: 14px; color: inherit; }
.vb-import-file::file-selector-button { margin-inline-end: 10px; padding: 7px 12px; border: 0; border-radius: 8px; background: color-mix(in srgb, currentColor 9%, transparent); color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.vb-import-file::file-selector-button:hover { background: color-mix(in srgb, currentColor 15%, transparent); }
.vb-import-file:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.vb-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vb-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.vb-actions form { margin: 0; }
.vb-live { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.vb-live > div { flex: 1; }
.vb-live p { margin: 2px 0 0; }
.vb-control { min-width: 220px; }
.vb-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.vb-swatch { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 16px; border: 1px solid var(--outline); cursor: pointer; }
.vb-swatch input[type=color] { width: 100%; height: 56px; border: 0; border-radius: 10px; padding: 0; background: none; cursor: pointer; }
.vb-swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.vb-swatch input[type=color]::-webkit-color-swatch { border: 0; border-radius: 10px; }
.vb-swatch-name { font-weight: 600; font-size: 14px; }
.vb-swatch-hex { font-family: var(--mono); font-size: 12px; color: var(--on-surface-variant); }
.vb-swatch-follow { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--on-surface-variant); }
.vb-editor-note { display: flex; gap: 14px; align-items: center; margin: 0 0 16px; }
.vb-editor-note > div { flex: 1; }
.vb-editor-note p { margin: 2px 0 0; }
.vb-off { background: color-mix(in srgb, var(--amber-bg) 45%, var(--glass)); }
.vb-row-item .title a { color: inherit; text-decoration: none; }
.vb-row-item .title a:hover { color: var(--primary); }
.vb-row-item .detail { white-space: normal; }

/* ==== the post/page editor as a workspace (2026-11-22) ====================
   Wide screens: the window is the frame. The head is a plain row (not the
   sticky glass scrim other pages use — nothing scrolls under it), and the
   writing sheet and the settings column each scroll on their own, so neither
   slides beneath the other or beneath the head. The sheet is paper: opaque,
   still, one hairline edge — not a translucent pane over a moving backdrop.
   Below 1200px the old single-column flow returns unchanged. */
@media (min-width: 1200px) {
  .content:has(.editor-shell) { height: 100vh; display: flex; flex-direction: column; padding-bottom: 0; overflow: hidden; }
  .content:has(.editor-shell) > .ed-head { flex: none; }
  .content:has(.editor-shell) > .editor-shell { flex: 1 1 auto; min-height: 0; align-items: stretch; padding-bottom: 20px; }
  .editor-shell > .editor-main { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable;
    scrollbar-width: thin; scrollbar-color: var(--outline-variant) transparent; }
  .editor-shell > .editor-side { position: static; height: 100%; max-height: none; overscroll-behavior: contain; scrollbar-gutter: stable; }
  .editor-main .wc-pill { position: sticky; display: block; width: max-content; margin: 18px 0 0 auto; bottom: 0; right: auto; }
  .editor-main .wc-pill:empty { display: none; }
}
.page-head.ed-head { position: relative; top: auto; z-index: 5; background: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  -webkit-mask-image: none; mask-image: none; box-shadow: none; border: 0; margin-bottom: 4px; }
.page-head.ed-head::before, .page-head.ed-head::after { display: none; }
.ed-head-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ed-head-title h1 { white-space: nowrap; }
.editor-main { background: var(--sc-lowest); -webkit-backdrop-filter: none; backdrop-filter: none;
  border: 1px solid var(--outline); box-shadow: 0 1px 2px rgba(0,0,0,.04); border-radius: 20px; padding: 40px 48px 32px; }
html.dark .editor-main { background: var(--sc-low); }
/* the actions card: one row per thing you can do with the entry */
.ed-actions-card { padding: 8px; }
.ed-actions { display: flex; flex-direction: column; gap: 2px; }
.ed-action { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border: 0; border-radius: 12px;
  background: none; color: var(--on-surface); font: inherit; font-size: 14px; font-weight: 500; text-align: left; text-decoration: none; cursor: pointer;
  transition: background var(--dur) var(--ease); }
.ed-action:hover { background: var(--glass-hover); }
.ed-action:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ed-action:disabled { opacity: .55; cursor: progress; }
.ed-action svg.i { width: 18px; height: 18px; flex: none; color: var(--primary); }
.ed-action span { display: flex; flex-direction: column; min-width: 0; }
.ed-action small { font-size: 12px; font-weight: 400; color: var(--green-fg); }
/* the Save button follows the save state (koenig-bridge.js paintSaveButton) */
#editor-save { min-width: 132px; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
#editor-save.is-clean, #editor-save.is-saving { background: var(--secondary-container); color: var(--on-secondary-container); box-shadow: none; cursor: default; opacity: 1; }
#editor-save.is-saving { cursor: progress; }
#editor-save.is-dirty { position: relative; }
#editor-save.is-dirty::after { content: ""; position: absolute; top: 6px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: #ffb4c8; box-shadow: 0 0 0 2px var(--primary); }
#editor-save.is-error { background: var(--error); color: #fff; }
#editor-save:disabled:hover { box-shadow: none; }
#editor-save:disabled:active { transform: none; }
/* back, not forward: the chevron glyph points right */
.ed-head > .icon-btn:first-child svg { transform: rotate(180deg); }
/* the top bar's Preview button is placed by script into this slot */
.ed-head-slot { display: contents; }
/* "More actions": rows inside a settings panel */
.editor-side .ed-actions { margin: -4px -8px 0; }

/* ---- the editor's top bar, as the window narrows ----
   Title and status chip on the left may shrink (the title ellipsises); the
   actions never overlap them. Step 1: the text buttons go icon-only, with
   their names as tooltips. Step 2: the save status text goes — the Save
   button says the same. Step 3: the actions take a row of their own. */
.ed-head { flex-wrap: wrap; row-gap: 10px; }
.ed-head-title { flex: 1 1 auto; min-width: 0; }
.ed-head-title h1 { overflow: hidden; text-overflow: ellipsis; }
.ed-head .actions { flex-wrap: nowrap; min-width: 0; }
.ed-head .actions .btn.text, .ed-head .actions #editor-builder { white-space: nowrap; }
@media (max-width: 1399px) {
  .ed-head .actions .btn.text, .ed-head .actions #editor-builder { width: 42px; padding: 0; justify-content: center; }
  .ed-head .actions .lbl { display: none; }
}
@media (max-width: 899px) {
  .ed-head .save-state { display: none; }
}
@media (max-width: 640px) {
  .ed-head .actions { flex: 1 0 100%; justify-content: flex-end; margin-left: 0; }
  .ed-head #editor-save { min-width: 0; }
}
/* Koenig's card-type marker (the `<>` beside an HTML card, and its kin) is
   placed 6rem left of the column — past this sheet's 48px margin, where it
   was clipped or hung outside the sheet. It sits in the margin instead,
   just before the card, like the ＋. */
#koenig-mount svg[aria-label$="indicator"] { left: -32px !important; }

/* ---- editor polish (2026-11-22) ---- */
/* The page title is a label, not the content: a lighter weight and tone, so
   the post's own title (the display serif in the sheet) is what reads first. */
.ed-head-title h1 { font-size: 20px; font-weight: 500; color: var(--on-surface-variant); letter-spacing: 0; }

/* Settings cards: a header row, a hairline when open, then the content with
   real room above it — floating field labels used to touch the header. */
.editor-side .panel > summary { min-height: 54px; padding: 12px 16px; font-weight: 600; font-size: 14px; border-radius: inherit; }
.editor-side .panel[open] > summary { border-bottom: 1px solid var(--outline); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.editor-side .panel .panel-body { padding: 18px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.editor-side .panel .panel-body > * { margin-top: 0; margin-bottom: 0; }
.editor-side .panel .panel-body > .field { margin-bottom: 0; }
.editor-side .panel .panel-body .hint { margin: -4px 2px 0; font-size: 12.5px; line-height: 1.45; color: var(--on-surface-variant); }
.editor-side .panel .panel-body > .hint:first-child { margin-top: 0; }
.editor-side .panel .chips { gap: 6px; }
.editor-side .panel .fchip { height: 30px; font-size: 13px; }
.editor-side { gap: 10px; }
/* the delete card is one centred action, not a panel */
.editor-side > .card.panel:last-child .panel-body { padding: 10px; }

/* Tags: find or add */
.tag-add { display: flex; gap: 8px; align-items: center; }
.tag-add .field { flex: 1; min-width: 0; }
.tag-add .btn { height: 40px; flex: none; }
.tag-msg { margin: -2px 2px 0 !important; }
.tag-msg.bad { color: var(--error) !important; }
#tag-chips:empty { display: none; }

/* ==== Tools → E-commerce & Online Stores (ecom.rs + ecom/) — `ec-` ========
   Tiles, rows, cards, chips and fields are the shared primitives. What is
   here: the tab bar, sub-tabs, list tables, the two-column editor (main +
   side) used by products, collections, orders and customers, the media
   grid, the variants table, the sales chart and the order timeline. */
.ec-tabs { flex-wrap: wrap; }
.ec-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.ec-tile { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; }
a.ec-tile:hover { border-color: var(--outline); }
.ec-tile .ic { margin-bottom: 8px; }
.ec-tile-value { font-size: 26px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ec-tile-label { font-size: 13.5px; font-weight: 600; }
.ec-tile-detail { font-size: 12.5px; color: var(--on-surface-variant); }
.ec-live { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.ec-live > div { flex: 1; }
.ec-live p { margin: 2px 0 0; font-size: 13px; }
.ec-off { background: color-mix(in srgb, var(--amber-bg) 45%, var(--glass)); }
.ec-setup { margin-top: 12px; }
.ec-setup-head { display: flex; justify-content: space-between; align-items: baseline; }
.ec-progress { height: 6px; border-radius: 999px; background: var(--outline-variant); margin: 10px 0 12px; overflow: hidden; }
.ec-progress span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.ec-setup ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.ec-setup li a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--outline-variant); color: inherit; text-decoration: none; font-size: 13.5px; }
.ec-setup li a:hover { background: var(--glass-hover); }
.ec-setup li.done a { color: var(--on-surface-variant); text-decoration: line-through; }
.ec-setup li.done svg { color: var(--green, #2e7d32); }
.ec-split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 0 20px; align-items: start; }
@media (max-width: 980px) { .ec-split { grid-template-columns: 1fr; } }
.ec-line .trailing { display: flex; align-items: center; gap: 8px; }

/* Store home panels */
.ec-home-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px 20px; align-items: start; margin-top: 12px; }
.ec-home-grid .card { margin-bottom: 0; }
.ec-home-chart { padding: 16px 18px; }
.ec-home-panel { min-width: 0; }
.ec-home-panel-head { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 12px; min-height: 58px; padding: 8px 18px; border-bottom: 1px solid var(--glass-stroke); }
.ec-home-panel-head h2 { margin: 0; font-size: 16px; font-weight: 650; }
.ec-home-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.ec-home-period { font-size: 12.5px; color: var(--on-surface-variant); }
.ec-home-panel-head .btn { margin-inline-start: auto; padding-inline: 8px; }
.ec-home-empty { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 18px; }
.ec-home-empty p { margin: 0; color: var(--on-surface-variant); font-size: 14px; }
.ec-home-panel .ic { width: 36px; height: 36px; border-radius: 12px; }
.ec-home-panel .ic svg { width: 19px; height: 19px; }
.ec-home-panel .row.ec-home-row { display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 6px 12px; padding: 12px 18px; }
.ec-home-panel .row.ec-todo-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.ec-home-panel .row + .row::before { inset-inline: 18px; }
.ec-home-panel .row .body { order: 0; }
.ec-home-panel .row > .ic { order: 0; margin: 0; }
.ec-home-panel .row .title { font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
.ec-home-panel a.row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ec-order-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 10px; }
.ec-home-amount { text-align: end; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 980px) { .ec-home-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) {
  .ec-home-panel .row.ec-recent-row { grid-template-columns: minmax(0, 1fr); }
  .ec-order-summary { justify-content: space-between; }
}

/* the sales chart: one hue, thin rounded bars, recessive axis */
.ec-chart { margin: 0; }
.ec-chart svg { width: 100%; height: 190px; display: block; overflow: visible; }
.ec-chart .ec-axis { stroke: var(--outline-variant); stroke-width: 1; }
.ec-chart text { fill: var(--on-surface-variant); font-size: 10.5px; }
.ec-bar path { fill: var(--primary); transition: opacity .15s; }
.ec-bar .ec-hit { fill: transparent; }
.ec-chart svg:hover .ec-bar path { opacity: .45; }
.ec-chart svg .ec-bar:hover path, .ec-chart svg .ec-bar:focus path { opacity: 1; }
.ec-bar:hover .ec-hit, .ec-bar:focus .ec-hit { fill: color-mix(in srgb, var(--primary) 7%, transparent); }
.ec-bar:focus { outline: none; }
.ec-chart-table summary { cursor: pointer; font-size: 12.5px; color: var(--on-surface-variant); margin-top: 8px; }
.ec-chart-table table { margin-top: 8px; }
.ec-range { display: flex; gap: 6px; margin-top: 16px; }
.ec-range .chip { text-decoration: none; }

/* lists */
.ec-subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 16px 0 4px; }
.ec-subtab { padding: 6px 12px; border-radius: 999px; color: var(--on-surface-variant); text-decoration: none; font-size: 13.5px; font-weight: 500; }
.ec-subtab span { font-size: 12px; opacity: .75; margin-left: 2px; }
.ec-subtab:hover { background: var(--glass-hover); color: var(--on-surface); }
.ec-subtab.on { background: var(--secondary-container); color: var(--on-secondary-container, var(--on-surface)); }
.ec-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 8px; }
.ec-filter .field.fixed { min-width: 160px; }
.ec-lead { margin: 0 4px 10px; font-size: 13px; }
.ec-bulkbar { display: flex; align-items: center; gap: 8px; margin: 4px 4px 8px; font-size: 13px; }
.ec-bulkbar select { height: 32px; border-radius: 8px; border: 1px solid var(--outline-variant); background: transparent; color: inherit; font: inherit; font-size: 13px; padding: 0 8px; }
.ec-table-card { padding: 0; overflow-x: auto; }
.ec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ec-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--on-surface-variant); padding: 10px 12px; border-bottom: 1px solid var(--outline-variant); white-space: nowrap; }
.ec-table td { padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--outline-variant) 55%, transparent); vertical-align: middle; }
.ec-table tbody tr:last-child td { border-bottom: 0; }
.ec-list tbody tr:hover { background: var(--glass-hover); }
.ec-table a { color: inherit; text-decoration: none; }
.ec-table a:hover b { color: var(--primary); }
.ec-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ec-cb { width: 34px; }
.ec-cancelled td { opacity: .55; }
.ec-kv td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ec-kv td { padding: 7px 4px; }
.ec-strong td { font-weight: 700; border-top: 1px solid var(--outline-variant); }
.ec-prod { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ec-prod > span { display: flex; flex-direction: column; min-width: 0; }
.ec-prod small { font-size: 12px; }
.ec-thumb { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; border: 1px solid var(--outline-variant); }
.ec-thumb-empty { width: 42px; height: 42px; flex: none; }
.ec-low { color: #b26a00; font-weight: 600; }
.ec-neg { color: var(--error, #c62828); font-weight: 600; }
.ec-empty { text-align: center; padding: 42px 20px; display: grid; justify-items: center; gap: 4px; }
.ec-empty > svg { width: 40px; height: 40px; color: var(--primary); margin-bottom: 6px; }
.ec-empty p { margin: 0; }
.ec-empty .btn { margin-top: 12px; }
.ec-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 14px 0; font-size: 13px; }
.ec-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.ec-row-tools { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }
.ec-row-tools form { margin: 0; display: flex; gap: 2px; }

/* the editor: main column + side column */
.ec-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); gap: 16px; align-items: start; margin-top: 16px; }
@media (max-width: 1080px) { .ec-edit { grid-template-columns: 1fr; } }
.ec-edit-main, .ec-edit-side { display: grid; gap: 16px; min-width: 0; }
.ec-edit-side { position: sticky; top: 84px; }
@media (max-width: 1080px) { .ec-edit-side { position: static; } }
.ec-edit-head h1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ec-subhead { font-size: 22px; margin: 16px 4px 0; }
.ec-below { margin-top: 16px; max-width: calc(100% - 356px); }
@media (max-width: 1080px) { .ec-below { max-width: none; } }
.ec-card { margin: 0; }
.ec-card-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; margin: 0 0 14px; }
.ec-card-title .ic { width: 30px; height: 30px; }
.ec-sublabel { font-size: 12.5px; font-weight: 600; color: var(--on-surface-variant); margin: 12px 2px 6px; }
.ec-hint { font-size: 12.5px; margin: 6px 2px 0; }
.ec-p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.5; }
.ec-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; margin: 6px 0; }
.ec-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.ec-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 640px) { .ec-grid2, .ec-grid3 { grid-template-columns: 1fr; } }
.ec-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.ec-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ec-wide { width: 100%; justify-content: center; }
.ec-in { height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--outline-variant); background: transparent; color: var(--on-surface); font: inherit; font-size: 13px; width: 100%; min-width: 0; }
.ec-in:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: transparent; }
.ec-in-qty { width: 84px; }
.ec-calc { display: flex; flex-direction: column; justify-content: center; padding: 0 4px 14px; }
.ec-calc b { font-variant-numeric: tabular-nums; }
.ec-only-variants { display: none; }
.has-variants .ec-only-variants { display: block; }
.ec-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ec-kpis div { display: flex; flex-direction: column; }
.ec-kpis b { font-size: 20px; font-variant-numeric: tabular-nums; }
.ec-side-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ec-side-actions form { margin: 0; }
.ec-more summary { cursor: pointer; font-size: 13px; color: var(--primary); margin: 6px 0; list-style: none; }
.ec-more summary::-webkit-details-marker { display: none; }
.ec-control { min-width: 220px; display: flex; justify-content: flex-end; }
@media (max-width: 639px) { .ec-control { min-width: 0; width: 100%; } }

/* description (Koenig) */
.ec-koenig { border: 1px solid var(--outline-variant); border-radius: 14px; padding: 10px 18px; min-height: 220px; background: color-mix(in srgb, var(--surface) 55%, transparent); }
.ec-koenig .koenig-lexical { font-size: 1.6rem; }
.ec-koenig:focus-within { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* media */
.ec-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.ec-media-item, .ec-media-add { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--outline-variant); }
.ec-media-item:first-child { grid-column: span 2; grid-row: span 2; }
.ec-media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ec-media-item.dragging { opacity: .4; }
.ec-media-tools { position: absolute; inset: auto 6px 6px auto; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.ec-media-item:hover .ec-media-tools, .ec-media-item:focus-within .ec-media-tools { opacity: 1; }
.ec-media-tools button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .62); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.ec-media-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; border-style: dashed; color: var(--on-surface-variant); font-size: 12.5px; }
.ec-media-add:hover { background: var(--glass-hover); color: var(--primary); }
.ec-media-add input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ec-uploading { display: grid; place-items: center; font-size: 12px; color: var(--on-surface-variant); background: var(--glass-hover); }
.ec-failed { color: var(--error, #c62828); padding: 8px; text-align: center; }

/* options and variants */
.ec-option { display: flex; gap: 8px; align-items: center; }
.ec-option .field { flex: 1; }
.ec-variants-wrap { margin-top: 12px; overflow-x: auto; }
.ec-variants td { padding: 6px; }
.ec-variants td:first-child { min-width: 140px; }

/* search listing preview */
.ec-serp { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: #fff; color: #202124; border: 1px solid #dadce0; margin-bottom: 14px; font-family: Arial, sans-serif; }
.ec-serp-url { font-size: 12.5px; color: #4d5156; overflow-wrap: anywhere; }
.ec-serp-title { font-size: 18px; color: #1a0dab; }
.ec-serp-desc { font-size: 13px; color: #4d5156; }

/* collections */
.ec-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.ec-kind { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--outline-variant); cursor: pointer; }
.ec-kind input { position: absolute; opacity: 0; pointer-events: none; }
.ec-kind span { font-size: 12.5px; color: var(--on-surface-variant); }
.ec-kind:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--glass-hover); }
.ec-only-smart { display: none; }
.is-smart .ec-only-smart { display: block; }
.ec-match { display: flex; gap: 16px; }
.ec-rule { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px; margin: 6px 0; align-items: center; }
.ec-coll-img { width: 100%; border-radius: 12px; margin-top: 6px; }
.ec-addprod { margin-bottom: 10px; }

/* orders */
.ec-line { align-items: center; }
.ec-line-q { font-size: 13px; color: var(--on-surface-variant); white-space: nowrap; margin-right: 12px; }
.ec-fulfil summary, .ec-refund summary { list-style: none; display: inline-flex; margin-top: 12px; }
.ec-fulfil summary::-webkit-details-marker, .ec-refund summary::-webkit-details-marker { display: none; }
.ec-fulfil-form, .ec-refund-form, .ec-cancel-form { margin-top: 12px; }
.ec-fulfilled { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--green-bg, #e6f4ea) 60%, transparent); font-size: 13.5px; }
.ec-fulfilled p { margin: 0; display: flex; align-items: center; gap: 6px; }
.ec-fulfilled form { margin: 0; }
.ec-cnote { padding: 10px 12px; border-radius: 12px; background: var(--glass-hover); }
.ec-timeline { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; }
.ec-timeline li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding: 0 0 14px; position: relative; }
.ec-timeline li::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 0; width: 2px; background: var(--outline-variant); }
.ec-timeline li:last-child::before { display: none; }
.ec-timeline p { margin: 0; font-size: 13.5px; }
.ec-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--outline); margin-top: 2px; border: 3px solid var(--surface, #fff); box-sizing: border-box; z-index: 1; }
.ec-dot-placed, .ec-dot-paid { background: var(--primary); }
.ec-dot-fulfilled { background: #2e7d32; }
.ec-dot-refund, .ec-dot-cancelled { background: var(--error, #c62828); }
.ec-dot-comment { background: #7b61ff; }
.ec-newline { margin: 0 0 8px; }

/* settings: shipping rates */
.ec-rate { display: grid; grid-template-columns: 1.4fr .8fr .8fr .8fr 1.4fr auto auto; gap: 6px; align-items: center; margin: 6px 0; }
.ec-rate-head { font-size: 12px; color: var(--on-surface-variant); font-weight: 600; margin-top: 12px; }
@media (max-width: 900px) { .ec-rate { grid-template-columns: 1fr 1fr; } .ec-rate-head { display: none; } }
.ec-stock-form { display: flex; gap: 6px; align-items: center; margin: 0; }
/* With variants, stock and SKU live per variant in the table, so the
   single-product fields would only mislead. */
.ec-edit:has(#ec-variants tr) #ec-inventory .ec-grid3 { display: none; }
#ec-inventory .ec-grid3 { margin-top: 10px; }
.ec-upload .btn { white-space: nowrap; flex: none; }
/* digital downloads: the drop zone inside the product form */
.ec-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 22px 16px; margin-top: 8px;
  border: 1.5px dashed var(--outline-variant); border-radius: 16px; cursor: pointer; text-align: center; color: var(--on-surface-variant); transition: background .15s, border-color .15s; }
.ec-drop:hover, .ec-drop.over { border-color: var(--primary); background: var(--glass-hover); color: var(--on-surface); }
.ec-drop svg { width: 26px; height: 26px; color: var(--primary); }
.ec-drop b { color: var(--primary); }
.ec-drop small { font-size: 12px; }
.ec-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ec-picked { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.ec-picked li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--glass-hover); font-size: 13px; }
.ec-picked li span { color: var(--on-surface-variant); white-space: nowrap; }
.ec-picked li.too-big { background: color-mix(in srgb, var(--error, #c62828) 12%, transparent); }
.ec-file .ic { width: 34px; height: 34px; }
/* product editor polish (2026-11-23) */
.ec-koenig #koenig-mount { min-height: 180px; }
.ec-koenig { min-height: 0; padding: 6px 18px 10px; }
.ec-titlecard .field + .ec-sublabel { margin-top: 16px; }
.ec-titlecard > .field:last-child { margin: 14px 0 0; }
.ec-card .ec-check + .ec-grid2, .ec-card .ec-check + .ec-grid3, .ec-card .ec-check + .ec-tracked, .ec-card .ec-check + .ec-physical { margin-top: 14px; }
.ec-card .ec-grid2 + .ec-check, .ec-card .ec-grid3 + .ec-check { margin-top: 2px; }
#ec-inventory:not(:has(input[name=track]:checked)) .ec-tracked { display: none; }
#ec-shipping:not(:has(input[name=requires_shipping]:checked)) .ec-physical { display: none; }
#ec-shipping:has(input[name=requires_shipping]:checked) .ec-nonphysical { display: none; }
.ec-edit:has(#ec-variants tr) #ec-inventory .ec-tracked .ec-grid2 { display: none; }
.ec-edit:has(#ec-variants tr) #ec-inventory .ec-grid2:first-child { display: none; }
#ec-variants-card:has(.ec-option:not([hidden])) .ec-no-options { display: none; }
#ec-variants-card .ec-no-options { margin: 0 2px 4px; }
.ec-option { margin-bottom: 2px; }
.ec-option .field { margin: 6px 0; }
.ec-calc { padding: 0 4px 12px; }
.ec-calc b { font-size: 15px; }
.ec-media { margin-bottom: 4px; }
.ec-more summary { display: inline-block; }
.ec-kinds-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .ec-kinds-3 { grid-template-columns: 1fr; } }
.ec-url-example { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px !important; overflow-wrap: anywhere; }
.ec-address .ec-only-custom { display: none; }
.ec-address:has(input[name=ecom_product_style][value=custom]:checked) .ec-only-custom { display: grid; }

/* store settings: one padded card per section (2026-11-23) */
.ec-set { display: grid; gap: 4px; }
.ec-setting { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.ec-setting + .ec-setting, .ec-set-fields + .ec-setting { border-top: 1px solid color-mix(in srgb, var(--outline-variant) 60%, transparent); }
.ec-setting:first-child { padding-top: 2px; }
.ec-setting-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ec-setting-text b { font-size: 14.5px; font-weight: 600; }
.ec-setting-text span { font-size: 13px; color: var(--on-surface-variant); }
.ec-setting-control { flex: none; display: flex; justify-content: flex-end; }
.ec-set-fields { padding: 6px 0 4px; }
.ec-countries summary { cursor: pointer; font-weight: 600; }
.ec-countries summary span { margin-inline-start: 8px; color: var(--on-surface-variant); font-size: 13px; font-weight: 400; }
.ec-country-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 4px 10px; max-height: 280px; overflow: auto; padding: 4px; margin-block: 8px; }
.ec-country { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 8px;
  border-radius: 8px; font-size: 14px; cursor: pointer; }
.ec-country:hover { background: var(--glass-hover); }
.ec-country input { flex: none; accent-color: var(--primary); }
.ec-country small { margin-inline-start: auto; color: var(--on-surface-variant); }
.ec-countries [hidden] { display: none; }
.ec-set-fields .field:last-child { margin-bottom: 0; }
.ec-set > .ec-setting + .ec-set-fields { padding-top: 2px; }
.ec-set:not(:has(input[name=ecom_pay_bank]:checked)) .ec-bank-fields { display: none; }
.ec-set .ec-hint { margin-top: 4px; }
.ec-set code { font-size: 12px; background: var(--glass-hover); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
/* site URL + editable path */
.ec-urlfield { display: grid; gap: 6px; margin: 2px 0 4px; }
.ec-urlfield-label { font-size: 12.5px; font-weight: 600; color: var(--on-surface-variant); }
.ec-urlfield-box { display: flex; align-items: center; height: 46px; border: 1px solid var(--outline-variant); border-radius: 12px; padding: 0 14px; background: color-mix(in srgb, var(--surface) 50%, transparent); }
.ec-urlfield-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ec-urlfield-site { color: var(--on-surface-variant); font-size: 14px; white-space: nowrap; }
.ec-urlfield-box input { flex: 1; min-width: 60px; height: 100%; border: 0; outline: 0; background: transparent; color: var(--on-surface); font: inherit; font-size: 15px; font-weight: 600; padding: 0 2px; }
.ec-url-kind span { margin-top: 4px; }
.ec-address .ec-sublabel { margin-top: 14px; }
.ec-address .ec-kinds { margin-bottom: 4px; }
/* shipping rates: fixed action columns, so headers sit over their inputs */
.ec-rate { grid-template-columns: 1.4fr .8fr .8fr .8fr 1.4fr 84px 36px; }
.ec-rate-head span { text-align: left; padding-left: 2px; }
.ec-rate .ec-rate-add { grid-column: span 2; justify-content: center; }
.ec-rate .btn.small { justify-content: center; }
@media (max-width: 900px) { .ec-rate { grid-template-columns: 1fr 1fr; } .ec-rate .ec-rate-add { grid-column: span 2; } }
/* Shared Unsplash picker for the admin and the visual builder. */
dialog.unsplash { width: min(1920px, calc(100vw - 24px)); height: calc(100vh - 24px);
  height: calc(100dvh - 24px); max-height: none;
  min-width: 0; max-width: none; border: none; border-radius: 16px; padding: 0;
  background: var(--sc-lowest); color: var(--on-surface); box-shadow: var(--shadow-2);
  overflow: hidden; }
dialog.unsplash [hidden] { display: none !important; }
dialog.unsplash[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
dialog.unsplash::backdrop { background: rgba(0,0,0,.6); }
.u-close { display: grid; place-items: center; width: 40px; height: 40px; border: none; background: transparent;
  color: var(--on-surface-variant); cursor: pointer; padding: 0; border-radius: 50%; }
.u-close:hover { background: color-mix(in srgb, var(--on-surface) 8%, transparent); color: var(--on-surface); }
.u-close svg.i { width: 18px; height: 18px; display: block; }
.u-head { display: grid; grid-template-columns: 1fr minmax(240px, 480px) 40px; align-items: center; gap: 20px;
  padding: 20px 24px; border-bottom: 1px solid var(--outline-variant); }
.u-head h3 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.3px; white-space: nowrap; }
.u-searchbox { position: relative; min-width: 0; }
.u-searchbox svg.i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--on-surface-variant); pointer-events: none; }
.u-searchbox input { width: 100%; height: 40px; border-radius: 999px; border: 1px solid var(--outline);
  background: transparent; color: var(--on-surface); font: inherit; font-size: 14px;
  padding: 0 16px 0 42px; outline: none; }
.u-searchbox input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 15%, transparent); }
.u-searchbox input::placeholder { color: var(--on-surface-variant); }
.u-body { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 24px; scrollbar-width: thin;
  scrollbar-color: var(--outline-variant) transparent; }
/* Four masonry columns keep each photograph's original proportions. */
.u-grid { columns: 4; column-gap: 16px; }
@media (max-width: 1100px) { .u-grid { columns: 3; } }
@media (max-width: 800px) { .u-grid { columns: 2; } }
@media (max-width: 500px) { .u-grid { columns: 1; } }
@media (max-width: 600px) {
  .u-head { grid-template-columns: minmax(0, 1fr) 40px; padding: 16px; gap: 12px; }
  .u-searchbox { grid-row: 2; grid-column: 1 / -1; }
  .u-close { grid-row: 1; grid-column: 2; }
  .u-body { padding: 16px; }
}
.u-tile { position: relative; min-width: 0; break-inside: avoid; margin-bottom: 16px; border-radius: 10px;
  overflow: hidden; cursor: zoom-in; }
.u-tile > img { display: block; width: 100%; height: auto; }
.u-hover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: 12px; opacity: 0; transition: opacity .15s var(--ease);
  background: linear-gradient(180deg, rgba(0,0,0,.15), transparent 40%, rgba(0,0,0,.65)); }
.u-tile:hover .u-hover, .u-tile:focus-within .u-hover { opacity: 1; }
@media (hover: none) { .u-hover { opacity: 1; } }
.u-top { display: flex; justify-content: flex-end; gap: 8px; }
.u-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border-radius: 999px; background: rgba(255,255,255,.85); color: #201A1B; font-size: 12.5px;
  font-weight: 600; text-decoration: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.u-chip svg.i { width: 15px; height: 15px; }
.u-chip:hover { background: #fff; }
.u-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.u-credit { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-size: 13px;
  font-weight: 500; min-width: 0; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.u-credit-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-credit > img.u-avatar { display: block; width: 26px; height: 26px; min-width: 26px; max-width: 26px;
  object-fit: cover; border-radius: 50%; flex: none; }
.u-insert { border: none; height: 34px; padding: 0 12px; border-radius: 999px; background: #fff;
  color: #201A1B; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; flex: none; }
.u-insert:hover { box-shadow: var(--shadow-1); }
dialog.unsplash button:focus-visible, .u-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.u-empty { column-span: all; padding: 9vh 0; text-align: center; color: var(--on-surface-variant);
  font-size: 14px; }
.u-zoom { display: flex; justify-content: center; align-items: center; height: 100%; cursor: zoom-out; }
.u-zoom .u-tile { cursor: zoom-out; aspect-ratio: auto; margin: 0; max-width: 100%; max-height: 100%; }
.u-zoom .u-tile > img { max-height: calc(100dvh - 220px); height: auto; width: auto; max-width: 100%; object-fit: contain; }
/* Ghost's spinner: a ring with a dot, hung in the middle of the gallery. */
.u-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.u-loading i { display: block; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--on-surface) 10%, transparent); position: relative;
  animation: u-spin 1s linear infinite; }
.u-loading i::before { content: ""; position: absolute; top: 6px; left: 50%; margin-left: -3.5px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--on-surface-variant); }
@keyframes u-spin { to { transform: rotate(360deg); } }
