/* Prooflive.ai admin: the "proof sheet" system. Tokens mirror docs/brand.md; views use tokens only. */
:root {
  /* Paper and ink: the inverse of the marketing site (cream paper, blue-black ink) */
  --paper: #EAE5DA;          /* page background: the marketing site's cream */
  --surface: #F5F2EB;        /* sheet: cards, top bar, inputs */
  --soft: #DED8CA;           /* tracks, hover fills */
  --ink: #171A20;            /* the marketing site's blue-black */
  --ink-2: #2B2F37;
  --muted: #5F5D57;
  --line: #D3CCBC;           /* rule */
  --line-strong: #B3AB99;
  /* Process inks, as on the marketing site */
  --cyan: #4A93AA;
  --magenta: #D9527A;
  --yellow: #CBAE52;
  --key: #0C0E12;
  --accent: #B83C62;         /* magenta deep enough for white text: primary actions, active tab, ticks */
  --accent-ink: #FFFFFF;
  --accent-fill: #B83C62;     /* backgrounds behind white text: AA in light and dark */
  --accent-soft: #F3DCE2;
  /* States */
  --ok: #1F7A55;  --ok-soft: #E1EFE6;
  --warn: #946100; --warn-soft: #F8EDD0;
  --err: #B3261E; --err-soft: #F7E2DF;
  /* Shape: square corners, rules not shadows */
  --radius: 0;
  --radius-sm: 0;
  --shadow: none;
  --control-h: 36px;         /* inputs, selects and buttons share one height so rows line up */
  --control-h-sm: 28px;
  --chart: var(--ink);       /* single-series charts: ink bars, today in magenta */
  --tier-partner: var(--line-strong);   /* partner levels: the account menu, Settings and the upgrade dialog */
  --tier-preferred: var(--cyan);
  --tier-premier: var(--yellow);
  --staff: #1D7480;         /* staff-only pages, tabs, cards and buttons: never something a customer sees */
  --tick: 70%;               /* plan warning tick on usage bars (USAGE_WARN_PCT) */
  /* Type */
  --font: "Archivo", system-ui, -apple-system, sans-serif;
  --display: "Archivo", system-ui, sans-serif;   /* set at 800, condensed, uppercase */
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --brand-font: "Inter Tight", system-ui, sans-serif;   /* the wordmark only */
  /* the four process inks, then their deep shades, three times across: the top of every page and the assistant's panel */
  --strip: repeating-linear-gradient(90deg,
    var(--cyan) 0 4.1667%, var(--magenta) 4.1667% 8.3333%, var(--yellow) 8.3333% 12.5%, var(--key) 12.5% 16.6667%,
    #2E5A68 16.6667% 20.8333%, #763247 20.8333% 25%, #736436 25% 29.1667%, #40444C 29.1667% 33.3333%);
}
@media (prefers-color-scheme: dark) {
  :root {   /* dark mode is the marketing site itself: blue-black page, cream ink */
    --paper: #171A20; --surface: #1F232B; --soft: #2A2F38; --ink: #EAE5DA; --ink-2: #D3CDBF; --muted: #A6A39B;
    --line: #30343C; --line-strong: #454A54; --accent: #D9527A; --accent-soft: #3A1E29;
    --staff: #5DB6C1;
    --ok: #4CB088; --ok-soft: #15291F; --warn: #D7A23A; --warn-soft: #30260F; --err: #F07A70; --err-soft: #3A1714;
  }
}

/* Webmail (app and sign-in): the same cream and inks, cooled with a touch of cyan, so mail is never mistaken for the admin. */
body.wm, body.wm-public { --paper: #DDE3DE; --soft: #CFD8D2; --surface: #F1F4F0; --line: #C4CEC7; --line-strong: #A5B1A9; --accent-soft: #F1DDE3; }
@media (prefers-color-scheme: dark) {
  body.wm, body.wm-public { --paper: #141B20; --soft: #26303A; --surface: #1B232A; --line: #2C373E; --line-strong: #435059; --accent-soft: #3A1E29; }
}

/* Enterprise (accounts.enterprise, and /login/enterprise): the prooflive.ai/enterprise look
   (marketing/site/enterprise.css). White and navy, trust blue, IBM Plex Sans, 4px corners, light
   only. Declared after the webmail block so it wins there too. */
body.ent {
  --paper: #F5F7FA; --surface: #FFFFFF; --soft: #EDF0F5; --ink: #0B1F3A; --ink-2: #1B1B1F; --muted: #4A5262;
  --line: #E1E3E8; --line-strong: #C9CFD9; --accent: #0B1F3A; --accent-fill: #0B1F3A; --accent-ink: #FFFFFF; --accent-soft: #E3ECF7;   /* navy actions, as the site's primary buttons */
  --cyan: #00A3D9; --magenta: #D61F5B; --yellow: #F5D300; --key: #121316; --chart: #1F5FAD;
  --ok: #1F7A55; --ok-soft: #E1EFE6; --warn: #946100; --warn-soft: #F8EDD0; --err: #B3261E; --err-soft: #F7E2DF;
  --radius: 4px; --radius-sm: 4px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --brand-font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }   /* the page never shifts sideways as a scrollbar comes and goes */
body { margin: 0; font: 14px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
/* The marketing site's strip across the very top of every page: the four process inks, then their
   deep shades, repeating three times across the width (24 cells). */
body::before { content: ""; display: block; flex: none; height: 5px; opacity: .85; background: var(--strip); }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font: 800 34px/1 var(--display); font-stretch: 72%; text-transform: uppercase; letter-spacing: -.01em; }
h2 { font-size: 15px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
/* Card titles, dialog titles and plan names: the condensed display cut */
.card-h h2, dialog h2, .plan-title { font: 800 18px/1.05 var(--display); font-stretch: 78%; text-transform: uppercase; letter-spacing: .01em; }

/* Top bar */
.top { --top-icon: 30px; display: flex; align-items: center; gap: 24px; height: 56px; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--brand-font); font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.brand svg { width: var(--top-icon, 22px); height: var(--top-icon, 22px); }
.top nav { display: flex; gap: 2px; align-self: stretch; flex: 1; }
.top nav a { display: flex; align-items: center; text-decoration: none; padding: 0 12px; color: var(--muted); font-weight: 500; }
.top nav a:hover { color: var(--ink); }
.top nav a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
/* The site switcher beside the logo: the site being worked on (or Sites), the others under it */
.site-switch { position: relative; align-self: stretch; display: flex; margin-right: -12px; }
.site-switch summary { display: flex; align-items: center; gap: 8px; padding: 0 12px; list-style: none; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; }
.site-switch summary::-webkit-details-marker { display: none; }
.site-switch summary:hover, .site-switch[open] summary { color: var(--ink); }
.site-switch summary.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.site-switch summary b { font-weight: 600; color: var(--ink); max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.site-switch .slash { color: var(--line-strong); font-weight: 400; margin-left: -8px; }
.site-switch .site-fav { width: var(--top-icon); height: var(--top-icon); }
.site-switch .caret { width: 16px; height: 16px; fill: currentColor; flex: none; }
.site-switch .sw-icon { width: var(--top-icon); height: var(--top-icon); fill: currentColor; flex: none; }
/* The site switcher sits beside the account menu (after the nav): the open site's favicon, else a Sites icon, the same
   height as the logo's mark and the avatar (--top-icon). The site you're on is marked in its list, not named in the bar. */
.top nav { order: 1; }
.site-switch { order: 2; flex: none; margin: 0 0 0 auto; }
.top .who { order: 3; }
.site-switch summary { padding: 0 8px; }
.site-switch summary.on { box-shadow: none; }
.top .site-switch .menu { left: auto; right: 0; }
.site-switch .sw-row.here .sw-site { font-weight: 600; }
.site-switch .sw-row.here .sw-site::after { content: ""; flex: none; margin-left: auto; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--mdi-check) center / contain no-repeat; mask: var(--mdi-check) center / contain no-repeat; }
.site-switch .menu { position: absolute; left: 0; top: 100%; z-index: 20; width: 300px; max-height: min(480px, 70vh); overflow-y: auto; scrollbar-width: none; background: var(--surface); border: 1.5px solid var(--ink); padding: 4px; display: flex; flex-direction: column; }
.site-switch .menu input { margin: 4px 4px 6px; width: auto; }
.site-switch .menu a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.site-switch .sw-row { display: flex; align-items: stretch; }
.site-switch .sw-row .sw-site { flex: 1; min-width: 0; }
.site-switch .menu a .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-switch .menu a .mono { color: var(--muted); font-size: 11px; }
.site-switch .menu a:hover, .site-switch .sw-row.here { background: var(--soft); }
.site-switch .menu a.sw-out { flex: none; width: 34px; justify-content: center; padding: 0; color: var(--muted); }
.site-switch .menu a.sw-out:hover { color: var(--ink); }
.site-switch .menu a.sw-out::after { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--mdi-open-in-new) center / contain no-repeat; mask: var(--mdi-open-in-new) center / contain no-repeat; }
.site-switch .menu a.all { border-top: 1px solid var(--line); margin-top: 4px; color: var(--muted); }
.site-switch .menu a.lib { color: var(--muted); }
.site-switch .menu .sw-row[hidden] { display: none; }
.top .who { position: relative; }
.top .who summary { display: flex; list-style: none; cursor: pointer; border-radius: 99px; }
.top .who summary::-webkit-details-marker { display: none; }
.top .who summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar { display: grid; place-items: center; width: var(--top-icon, 30px); height: var(--top-icon, 30px); border-radius: 99px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 600; }
.top .who .menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; background: var(--surface); border: 1.5px solid var(--ink); padding: 4px; z-index: 20; }
.top .who .menu-h { display: flex; flex-direction: column; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.top .who .menu a, .top .who .menu button { display: block; width: 100%; text-align: left; font: inherit; font-size: 13.5px; color: var(--ink); text-decoration: none; background: none; border: 0; padding: 8px 10px; cursor: pointer; }
.top .who .menu a:hover, .top .who .menu button:hover { background: var(--soft); }
.top form { margin: 0; }
.top .who .menu-h .mono { font-size: 12px; overflow-wrap: anywhere; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 28px 64px; }
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.head .grow { flex: 1; }
.sub { color: var(--muted); font-size: 13px; }
.dt { white-space: nowrap; }   /* App::dateTimeHtml(): one line; the time goes on smaller screens */
@media (max-width: 900px) { .dt-t { display: none; } }

/* Site header: name, then a mono slug line (domain, plan, SSL, hosting) */
.site-title { display: flex; align-items: center; gap: 14px; }
.slug { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: -12px 0 0; color: var(--muted); font: 12px/1.6 var(--mono); }
.slug b { color: var(--ink); font-weight: 500; }
.slug a { text-decoration: none; }
.slug a:hover { color: var(--ink); }

/* Tabs: ink baseline; the active tab is a sheet tab with a magenta top edge */
.tabs { display: flex; flex-wrap: wrap; gap: 0 2px; border-bottom: 1.5px solid var(--ink); margin: 22px 0; }   /* never scrolls: a menu replaces it when narrow (.tabs-select) */
/* A site's tab bar (its sub-tabs are a slim .subtabs row under it). Its plan, status and Preview (.site-end) sit at the
   right of the tabs with room to spare, else wrap upwards to a line of their own above them (wrap-reverse). */
.site-bar { display: flex; flex-wrap: wrap-reverse; align-items: flex-start; gap: 0 48px;   /* wrap-reverse: flex-start is the bottom */
  border-bottom: 1.5px solid var(--ink); margin: 0 0 18px; }
.site-bar + .subtabs { margin-top: -6px; }
.site-bar .tabs { border-bottom: 0; margin: 0; flex: 0 1 auto; min-width: 0; }
.site-bar .tabs a { padding: 8px 12px; }
.site-bar .tabs a.on { padding-bottom: 9.5px; }
.site-bar .site-end { display: flex; align-items: center; gap: 8px; margin-left: auto; padding-bottom: 6px; }
.site-end .slug { margin: 0; white-space: nowrap; gap: 4px 12px; }
.tabs a { text-decoration: none; padding: 10px 14px; color: var(--muted); font-weight: 500; white-space: nowrap; border: 1px solid transparent; border-bottom: 0; }
.tabs a:hover { color: var(--ink); background: var(--soft); }   /* the tab's full size shows on hover */
.tabs a.on:hover { background: var(--surface); }
.tabs a.on { color: var(--ink); background: var(--surface); box-shadow: inset 0 3px 0 var(--accent); border-color: var(--line); margin-bottom: -1.5px; padding-bottom: 11.5px; }
.tabs a.end { margin-left: auto; }
.tabs-select { display: none; }
.tabs.wrapped { visibility: hidden; height: 0; margin: 0; border: 0; overflow: hidden; }   /* would take two rows: the menu shows instead (admin.js) */
.tabs.wrapped + .tabs-select { display: block; width: 100%; margin: 18px 0; font-weight: 600; }
.site-bar .tabs.wrapped + .tabs-select { width: auto; flex: 1 1 200px; margin: 0 0 8px; }
.tabs .count { background: var(--accent-fill, var(--accent)); color: var(--accent-ink); font: 500 11px/1 var(--mono); padding: 2px 5px; margin-left: 5px; vertical-align: 1px; }
.tabs .count.needs { background: var(--ink); color: var(--surface); margin-left: 3px; }   /* Needs you: handed over by the bot */

/* Cards and tables: square sheets with a rule border, no shadows */
.card { background: var(--surface); border: 1px solid var(--line); }
/* Stacked cards: 18px above every card that has a card before it in the same container, whatever sits between them
   (dialogs, scripts, hidden forms) and whether or not a card is wrapped in its <form>. "~", never "+": a "+" rule
   breaks as soon as anything is placed between two cards (docs/style.md "Spacing"). */
:is(.card, form:has(> .card)) ~ :is(.card, form:has(> .card)) { margin-top: 18px; }
/* Cards laid out side by side are spaced by their grid's gap, never by the stacking margin above. */
:is(.grid, .split, .stats, .row, .recent-sites-in, .lib-dirs, .lib-patterns) > :is(.card, form:has(> .card)):nth-child(n) { margin-top: 0; }   /* :nth-child(n) outweighs the form:has() rule above */
.card-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-h .grow { flex: 1; }
.card-h > .sub, .card-h > a.sub { font-family: var(--mono); font-size: 12px; text-decoration: none; }
/* Build tab: the line to give your AI, copied with a click (wide screens only) */
.card-h .ask-ai { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 12px; white-space: nowrap; }
@media (max-width: 860px) { .card-h .ask-ai { display: none; } }
.card-b { padding: 18px; }
/* nothing adds to a card's bottom padding: the last field's own gap goes (and inside a last row of fields) */
.card-b > :last-child, .card-b > .row:last-child > .field, .card-b > :last-child > .field:last-child { margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 500 11.5px var(--mono); color: var(--muted); padding: 9px 18px; border-bottom: 1px solid var(--line); }
td { padding: 10px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline; }
/* a compact picker in a table cell (a member's role): its own width, not the field's */
td select.td-pick { width: auto; min-width: 0; padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.empty { padding: 40px 18px; text-align: center; color: var(--muted); }

/* Site grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.site-card { display: block; text-decoration: none; padding: 16px 18px; overflow: hidden; }
.site-card .shot { display: block; aspect-ratio: 16 / 10; margin: -16px -18px 14px; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.site-card .shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .3s ease; }
.site-card:hover .shot img { transform: scale(1.02); }
.site-card .shot-empty { display: grid; place-items: center; height: 100%; font: 800 64px/1 var(--display); font-stretch: 68%; color: var(--line-strong); }
.site-card:hover { border-color: var(--ink); }
.site-card h2 { margin-bottom: 4px; font: 800 17px/1.1 var(--display); font-stretch: 78%; text-transform: uppercase; }
.site-card .sub.mono, .site-card .mono { font-size: 12px; }
.site-fav { position: relative; flex: none; width: 24px; height: 24px; background: var(--ink); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--surface); overflow: hidden; }
.site-fav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.site-fav.lg { width: 44px; height: 44px; }
.site-card .meta { display: flex; gap: 8px; align-items: center; margin-top: 12px; color: var(--muted); font-size: 12.5px; }
.sites-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: -8px 0 18px; }
.sites-bar .view-seg { margin-left: auto; }
.new-site-btn { gap: 8px; }
.site-new { display: grid; place-content: center; justify-items: center; gap: 14px; min-height: 240px; padding: 24px; border: 1.5px dashed var(--line-strong); background: transparent; color: var(--ink); font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.site-new b { font: 800 17px/1.1 var(--display); font-stretch: 78%; text-transform: uppercase; }
.site-new-plus { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); transition: transform .15s; }
.site-new:hover, .site-new:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.site-new:hover .site-new-plus { transform: scale(1.06); }
.site-new-row { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 13.5px; cursor: pointer; color: var(--accent); }
.site-new-row .site-new-plus { width: 24px; height: 24px; }
.site-new-row:hover, .site-new-row:focus-visible { background: var(--accent-soft); }
.draft-count { font: 500 12px/1 var(--mono); color: var(--muted); padding: 6px 8px; border: 1px solid var(--line); }
.draft-count.low { color: var(--warn); border-color: currentColor; background: var(--warn-soft); }
.site-card.archived, .site-row.archived { opacity: .6; }
.site-card.archived:hover, .site-row.archived:hover { opacity: 1; }
.site-new small { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.site-new-row small { margin-left: auto; font-size: 12px; color: var(--muted); }
table.drafts-full td { padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 0; }
table.drafts-full td.actions > * + * { margin-left: 4px; }
table.drafts-full td.actions { text-align: right; white-space: nowrap; }
table.drafts-full form { display: inline; }
.sites-line { border: 0; border-top: 1.5px solid var(--ink); margin: 26px 0; }
.site-list { padding: 0; }
.site-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) minmax(140px, 1fr) minmax(120px, 1fr) 190px 90px; gap: 16px; align-items: center; padding: 10px 16px; text-decoration: none; border-top: 1px solid var(--line); font-size: 13.5px; }
.site-row:first-child { border-top: 0; }
.site-row:hover { background: var(--paper); }
.site-row .site-title { gap: 10px; min-width: 0; }
.site-row .site-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-row .meta { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.site-row .when { text-align: right; font-size: 12.5px; }
@media (max-width: 760px) {
  .site-row { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .site-row > span:nth-child(3), .site-row .when { display: none; }
  .site-row > .mono { grid-column: 1; grid-row: 2; }
  .site-row .meta { grid-column: 2; grid-row: 1 / span 2; }
  .sites-bar .view-seg { margin-left: 0; }
}

/* Pills: square mono stamps */
.pill { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--mono); padding: 4px 8px; background: transparent; color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
/* No status dot: a coloured dot in a pill is the stock "availability pill" our build rules ban on sites. The coloured
   square-cornered border, like a proof stamp, carries the state. */
.pill.live, .pill.active { color: var(--ok); border: 1.5px solid currentColor; }
.pill.draft, .pill.pending { color: var(--warn); border: 1.5px solid currentColor; }
.pill.disabled, .pill.failed { color: var(--err); border: 1.5px solid currentColor; }
.pill.plain::before { display: none; }

/* Buttons: square, 1.5px ink border; primary (.accent) is magenta */
.btn, .btn-secondary, .btn-ghost, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 600 13px/1 var(--font); min-height: var(--control-h); padding: 0 14px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn:hover { background: var(--ink); color: var(--surface); }
.btn.accent { background: var(--accent-fill, var(--accent)); border-color: var(--accent-fill, var(--accent)); color: var(--accent-ink); }
.btn.accent:hover { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost { background: none; color: var(--muted); padding: 0 8px; font-weight: 500; }
.btn-ghost:hover { color: var(--ink); background: var(--soft); }
.btn-danger { background: none; color: var(--err); border-color: currentColor; }
.btn-danger:hover { background: var(--err); border-color: var(--err); color: #fff; }
.sm { min-height: var(--control-h-sm); padding: 0 10px; font-size: 12.5px; }

/* Forms */
label { display: block; font-weight: 500; font-size: 12.5px; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field .hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 14px; color: var(--ink); background-color: var(--surface); border: 1px solid var(--line-strong); border-radius: 0; padding: 9px 11px;
}
input[type=text], input[type=email], input[type=password], input[type=url], input[type=tel], input[type=number], input[type=search], input[type=date], input:not([type]), select {
  height: var(--control-h); padding-top: 0; padding-bottom: 0; line-height: normal;
}
/* a colour picker lines up with the fields beside it */
input[type=color] { display: block; width: 100%; height: var(--control-h); padding: 3px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface); cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch, input[type=color]::-moz-color-swatch { border: 0; border-radius: 0; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
input:focus, select:focus, textarea:focus { outline: 1.5px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
input[type=radio] { accent-color: var(--accent); }
/* Every checkbox in the admin is an on/off switch: a track with a sliding knob, green when on */
input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 36px; height: 20px; margin: 0; border-radius: 10px;
  background: var(--line-strong); cursor: pointer; transition: background .15s; vertical-align: middle; }
input[type=checkbox]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
input[type=checkbox]:checked { background: var(--ok); }
input[type=checkbox]:checked::after { transform: translateX(16px); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=checkbox]:disabled { opacity: .45; cursor: default; }
textarea { resize: vertical; min-height: 90px; }
textarea.code { font: 12.5px/1.55 var(--mono); min-height: 480px; tab-size: 2; white-space: pre; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }   /* fields carry their own bottom margin */
.inline { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.inline .field { margin: 0; flex: 1; min-width: 180px; }
.inline .field.fit { flex: none; min-width: 0; }
table.dns th:nth-child(1), table.dns td:nth-child(1) { width: 110px; white-space: nowrap; }
table.dns th:nth-child(2), table.dns td:nth-child(2) { width: 34%; white-space: nowrap; }
table.dns td:nth-child(3) { word-break: break-all; }
.ns-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; border-bottom: 1px solid var(--line); }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; font-size: 13px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Flash: a ruled bar with a coloured left edge */
.flash { padding: 10px 14px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); }
.flash.err { border-left-color: var(--err); color: var(--err); }
.flash.warn { border-left-color: var(--yellow); }

/* Build tab */
.prompt { position: relative; background: var(--paper); border: 1px dashed var(--line-strong); padding: 48px 16px 16px; font: 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; }
.prompt .btn { position: absolute; top: 10px; right: 10px; }
.prompt .prompt-tools { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.prompt .prompt-tools .btn { position: static; }
.log { list-style: none; margin: 0; padding: 0; }
/* a long list or table in a card never runs past the screen: it scrolls inside the card, its header row staying put.
   At its end the page carries on scrolling (no overscroll-behavior: contain), and on phones it doesn't scroll at all. */
.card > .log, .card-scroll { max-height: calc(100vh - 160px); overflow-y: auto; }
.card-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.card-scroll { scrollbar-width: none; }
.card-scroll::-webkit-scrollbar { display: none; }
table.sortable thead th { cursor: pointer; user-select: none; }
table.sortable thead th:hover { color: var(--ink); }
table.sortable thead th[data-dir]::after { content: ''; display: inline-block; width: 0; height: 0; margin-left: 6px; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; }
table.sortable thead th[data-dir="asc"]::after { border-bottom: 5px solid currentColor; }
table.sortable thead th[data-dir="desc"]::after { border-top: 5px solid currentColor; }
.log li { display: grid; grid-template-columns: 130px 70px 1fr; gap: 12px; padding: 9px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.log li:last-child { border: 0; }
.log.picks li { grid-template-columns: 90px 84px minmax(0, 1fr) auto; column-gap: 14px; align-items: start; }   /* 84px: room for the widest tag ("waiting") */
.log.picks li > span:nth-child(3) { overflow-wrap: anywhere; }
.log .when { color: var(--muted); font: 12px var(--mono); }

/* Leads */
.lead summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 18px 1fr 140px auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.lead summary::-webkit-details-marker { display: none; }
.lead .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.lead.read .dot { background: transparent; }
.lead dl { margin: 0; padding: 14px 18px 18px 48px; border-bottom: 1px solid var(--line); background: var(--paper); }
.lead dt { color: var(--muted); font: 11.5px var(--mono); margin-top: 10px; }
.lead dd { margin: 2px 0 0; white-space: pre-wrap; }

/* Outreach (app/outreach.php) */
.prospect summary { grid-template-columns: 64px minmax(0, 1fr) 90px auto; }
.prospect .score { font-size: 11px; letter-spacing: 1px; color: var(--accent); white-space: nowrap; }
.prospect .tags { display: flex; gap: 6px; justify-content: flex-end; }
.prospect .pill.st-replied, .prospect .pill.st-demo { color: var(--accent); border-color: currentColor; }
.prospect .pill.st-signed, .prospect .pill.st-paying { color: var(--ok); border-color: currentColor; }
.prospect .pill.st-lost { text-decoration: line-through; }
.prospect .pill.due { background: var(--accent-fill); color: var(--accent-ink); border-color: var(--accent-fill); }
.prospect-b { display: grid; gap: 16px; padding: 16px 18px 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
.prospect-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.prospect-msgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.prospect-msg { display: grid; gap: 8px; align-content: start; background: var(--surface); border: 1px solid var(--line); padding: 12px; min-width: 0; }
.prospect-msg-h { display: flex; justify-content: space-between; color: var(--muted); font: 11.5px var(--mono); }
.prospect-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.prospect-msg .msg-text { field-sizing: content; min-height: 5lh; resize: vertical; }
.prospect-msg [data-count-for].bad { color: var(--err); }
.msg-sources { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.msg-sources a::after { content: " \2197"; }
.prospect-call .inline .field { min-width: 0; }
.prospect .pill.st-call { color: var(--accent); border-color: currentColor; }
.msg-tools { display: inline-flex; align-items: center; gap: 8px; }
@keyframes msg-spin { to { transform: rotate(360deg); } }
.prospect-stages { display: flex; flex-wrap: wrap; gap: 6px; }
.prospect-stages form { margin: 0; }
.prospect-b .log { border: 1px solid var(--line); background: var(--surface); }
/* Outreach: Today's cards */
.outreach-sending { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocards .ocard, .card.ocard { display: grid; gap: 10px; padding: 14px 18px; min-width: 0; }
.ocards .ocard + .ocard { border-top: 1px solid var(--line); }
.ocard-h { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ocard-h .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ocard-h .pill { flex: none; }
.ocard .score { font-size: 11px; letter-spacing: 1px; color: var(--accent); white-space: nowrap; flex: none; }
.ocard-why { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ocard-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.ocard-body { position: relative; }
.ocard .msg-text { width: 100%; field-sizing: content; min-height: 6lh; resize: vertical; }
.ocard-quote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 14lh; overflow: auto; font-size: 13.5px; }
.ocard-earlier summary { cursor: pointer; }
.ocard-earlier p { white-space: pre-wrap; margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.oqueue { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--line); margin: 0; min-width: 0; }
.oqueue .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.osent { color: var(--ink); text-decoration: none; }
.osent:first-child { border-top: 0; }
.osent .pill, .osent .mono { flex: none; white-space: nowrap; }
a.osent:hover { background: var(--soft); }
.prospect .pill.st-talking { color: var(--accent); border-color: currentColor; }
.prospect .pill.st-won { color: var(--ok); border-color: currentColor; }
.prospect .pill.st-dead { text-decoration: line-through; }
@media (max-width: 640px) { .ocard-fields { grid-template-columns: 1fr; } }
dialog.wide { width: min(720px, 94vw); }
@media (max-width: 640px) { .prospect summary { grid-template-columns: 1fr auto; } .prospect summary > .score, .prospect summary > .sub { display: none; } }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 18px; }
.media-item { border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.media-item .thumb { aspect-ratio: 4/3; background: var(--paper) center/contain no-repeat; display: grid; place-items: center; color: var(--muted); font: 600 12px var(--mono); text-transform: uppercase; border-bottom: 1px solid var(--line); }
.media-item .info { padding: 8px 10px; font-size: 12px; }
.media-item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 11.5px; }
.media-item .acts { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; color: var(--muted); }
.drop { border: 1.5px dashed var(--line-strong); padding: 20px; text-align: center; color: var(--muted); margin: 18px 18px 0; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

/* Public pages: login, signup, go-live */
.auth { min-height: calc(100vh - 5px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 32px 16px; }
.auth-inner { width: min(400px, 100%); }
.auth.wide .auth-inner { width: min(560px, 100%); }
.auth .brand { margin-bottom: 20px; font-size: 18px; }
.auth .card { padding: 32px; }
.auth h1 { font-size: 30px; margin-bottom: 12px; }
.lead { margin: 0 0 22px; font-size: 14.5px; }
.eyebrow { font: 500 12px var(--mono); color: var(--accent); margin: 0 0 8px; }
.center { text-align: center; }
.btn.block, .btn-secondary.block { width: 100%; justify-content: center; min-height: 44px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.plans { border: 0; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { position: relative; display: grid; gap: 2px; padding: 16px; border: 1.5px solid var(--line-strong); cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.plan input { position: absolute; opacity: 0; }
.plan:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.plan:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-name { font: 500 11.5px var(--mono); color: var(--muted); }
.plan-price { font: 800 32px/1 var(--display); font-stretch: 68%; }
.plan-price small { font: 400 12px var(--mono); color: var(--muted); }
.plan-note { font-size: 12.5px; color: var(--muted); }
.plan:has(input:disabled) { cursor: not-allowed; border-style: dashed; }
.plan:has(input:disabled) > :not(.plan-misfit) { opacity: .45; }
.plan-misfit { font: 500 11.5px var(--mono); color: var(--accent); white-space: nowrap; }
@media (max-width: 480px) { .plans { grid-template-columns: 1fr; } .auth .card { padding: 24px 20px; } }

/* Stats: one ruled strip of cells, not separate cards.
   <div class="stats"><div class="stat"><span class="l">Label</span><span class="n">12<small>GB</small></span><span class="sub">note</span></div></div> */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }   /* one row: more tiles scroll sideways, never a second row */
.stats::-webkit-scrollbar { display: none; }
.stat { display: flex; flex-direction: column; gap: 6px; background: var(--surface); padding: 16px 16px 18px; min-width: 0; }
.stat .l { color: var(--muted); font: 11.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .n { font: 800 44px/1 var(--display); font-stretch: 68%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; overflow-wrap: anywhere; }
.stat .n small { font-size: 22px; margin-left: 2px; }
.stat .sub { font-size: 12.5px; }
.stat .sub .stat-x { display: block; margin-top: 2px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-b.stats { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; margin: 0; padding: 0; border: 0; overflow: visible; }   /* auto-fit: no empty ruled cells */

/* Dialog */
/* Every dialog (a rule, docs/style.md): never taller than the screen, scrolls inside itself, Save/Cancel always in reach */
dialog { border: 1.5px solid var(--ink); padding: 0; width: min(440px, 92vw); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(18, 19, 22, .45); }
dialog .card-b { padding: 22px; }
dialog h2 { overflow-wrap: anywhere; }
dialog .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; position: sticky; bottom: 0; padding: 12px 0; background: var(--surface); z-index: 1; }
.ui-dialog { width: min(400px, 92vw); }
.ui-dialog [hidden] { display: none !important; }
.ui-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-dialog .ui-title { margin: 0 0 8px; }
.ui-dialog .ui-msg { margin: 0 0 16px; white-space: pre-line; }
.ui-dialog .ui-field { margin-bottom: 8px; }

/* Wide tables whose columns all matter: <div class="scroll"><table>. Scrolls inside its card, never hides columns. */
.scroll { overflow-x: auto; }
:not(.scroll) > table :is(td.mono, td .mono, td .sub) { overflow-wrap: anywhere; }   /* long domains and emails wrap instead of widening the page */
/* A table that runs past its card, squeezes its text into a few letters a line, or wraps its buttons into a column, at
   any width (admin.js): .stack makes each row a compact card: the first value is its title, the rest sit side by side
   under it, each labelled with its column, and the buttons share that line, pushed right */
table.stack, table.stack > tbody { display: block; width: auto; }
table.stack > thead { display: none; }
table.stack > * > tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.stack > * > tr:last-child { border-bottom: 0; }
table.stack > * > tr > td { display: block; width: auto; padding: 0; border: 0; text-align: left; }
table.stack > * > tr > td:first-child { flex: 1 0 100%; font-weight: 500; }
table.stack > * > tr > td:empty { display: none; }
table.stack > * > tr > td[data-col]:has(> form):not(.actions) { display: flex; align-items: center; }
table.stack > * > tr > td[data-col]:not(:first-child, .actions)::before { content: attr(data-col); margin-right: 8px; color: var(--muted); font: 500 11.5px var(--mono); }
table.stack > * > tr > td.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; margin: 0 -8px 0 auto; white-space: nowrap; }
table.stack > * > tr > td.actions > * { margin: 0; }

@media (max-width: 640px) { .ocard-fields { grid-template-columns: 1fr; } }
dialog.wide { width: min(720px, 94vw); }
@media (max-width: 640px) { .prospect summary { grid-template-columns: 1fr auto; } .prospect summary > .score, .prospect summary > .sub { display: none; } }

/* Media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; padding: 18px; }
.media-item { border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.media-item .thumb { aspect-ratio: 4/3; background: var(--paper) center/contain no-repeat; display: grid; place-items: center; color: var(--muted); font: 600 12px var(--mono); text-transform: uppercase; border-bottom: 1px solid var(--line); }
.media-item .info { padding: 8px 10px; font-size: 12px; }
.media-item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 11.5px; }
.media-item .acts { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; color: var(--muted); }
.drop { border: 1.5px dashed var(--line-strong); padding: 20px; text-align: center; color: var(--muted); margin: 18px 18px 0; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }

/* Public pages: login, signup, go-live */
.auth { min-height: calc(100vh - 5px); display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 32px 16px; }
.auth-inner { width: min(400px, 100%); }
.auth.wide .auth-inner { width: min(560px, 100%); }
.auth .brand { margin-bottom: 20px; font-size: 18px; }
.auth .card { padding: 32px; }
.auth h1 { font-size: 30px; margin-bottom: 12px; }
.lead { margin: 0 0 22px; font-size: 14.5px; }
.eyebrow { font: 500 12px var(--mono); color: var(--accent); margin: 0 0 8px; }
.center { text-align: center; }
.btn.block, .btn-secondary.block { width: 100%; justify-content: center; min-height: 44px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.plans { border: 0; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan { position: relative; display: grid; gap: 2px; padding: 16px; border: 1.5px solid var(--line-strong); cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.plan input { position: absolute; opacity: 0; }
.plan:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.plan:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-name { font: 500 11.5px var(--mono); color: var(--muted); }
.plan-price { font: 800 32px/1 var(--display); font-stretch: 68%; }
.plan-price small { font: 400 12px var(--mono); color: var(--muted); }
.plan-note { font-size: 12.5px; color: var(--muted); }
.plan:has(input:disabled) { cursor: not-allowed; border-style: dashed; }
.plan:has(input:disabled) > :not(.plan-misfit) { opacity: .45; }
.plan-misfit { font: 500 11.5px var(--mono); color: var(--accent); white-space: nowrap; }
@media (max-width: 480px) { .plans { grid-template-columns: 1fr; } .auth .card { padding: 24px 20px; } }

/* Stats: one ruled strip of cells, not separate cards.
   <div class="stats"><div class="stat"><span class="l">Label</span><span class="n">12<small>GB</small></span><span class="sub">note</span></div></div> */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }   /* one row: more tiles scroll sideways, never a second row */
.stats::-webkit-scrollbar { display: none; }
.stat { display: flex; flex-direction: column; gap: 6px; background: var(--surface); padding: 16px 16px 18px; min-width: 0; }
.stat .l { color: var(--muted); font: 11.5px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .n { font: 800 44px/1 var(--display); font-stretch: 68%; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; overflow-wrap: anywhere; }
.stat .n small { font-size: 22px; margin-left: 2px; }
.stat .sub { font-size: 12.5px; }
.stat .sub .stat-x { display: block; margin-top: 2px; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-b.stats { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; margin: 0; padding: 0; border: 0; overflow: visible; }   /* auto-fit: no empty ruled cells */

/* Dialog */
/* Every dialog (a rule, docs/style.md): never taller than the screen, scrolls inside itself, Save/Cancel always in reach */
dialog { border: 1.5px solid var(--ink); padding: 0; width: min(440px, 92vw); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); color: var(--ink); }
dialog::backdrop { background: rgba(18, 19, 22, .45); }
dialog .card-b { padding: 22px; }
dialog h2 { overflow-wrap: anywhere; }
dialog .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; position: sticky; bottom: 0; padding: 12px 0; background: var(--surface); z-index: 1; }
.ui-dialog { width: min(400px, 92vw); }
.ui-dialog [hidden] { display: none !important; }
.ui-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ui-dialog .ui-title { margin: 0 0 8px; }
.ui-dialog .ui-msg { margin: 0 0 16px; white-space: pre-line; }
.ui-dialog .ui-field { margin-bottom: 8px; }

/* Wide tables whose columns all matter: <div class="scroll"><table>. Scrolls inside its card, never hides columns. */
.scroll { overflow-x: auto; }
:not(.scroll) > table :is(td.mono, td .mono, td .sub) { overflow-wrap: anywhere; }   /* long domains and emails wrap instead of widening the page */
/* A table that runs past its card or squeezes its text into a few letters a line, at any width (admin.js): .tight lets
   its buttons wrap; if that isn't enough, .stack gives each row its own block, every cell full width */
table.tight td.actions { white-space: normal; width: 1%; }
table.tight td.actions > * { white-space: nowrap; }
table.stack, table.stack > tbody, table.stack > * > tr, table.stack > * > tr > td { display: block; width: auto; }
table.stack > thead { display: none; }
table.stack > * > tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
table.stack > * > tr:last-child { border-bottom: 0; }
table.stack > * > tr > td { padding: 2px 0; border: 0; text-align: left; }
table.stack > * > tr > td.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: auto; padding-top: 8px; white-space: normal; }
table.stack > * > tr > td.actions > * { margin: 0; }
table.stack > * > tr > td:empty { display: none; }
table.stack > * > tr > td[data-col]:has(> form):not(.actions) { display: flex; align-items: center; }
table.stack > * > tr > td[data-col]:not(:first-child, .actions)::before { content: attr(data-col); margin-right: 10px; color: var(--muted); font: 500 11.5px var(--mono); }

@media (max-width: 640px) {
  .top { flex-wrap: wrap; height: auto; padding: 8px 16px 0; gap: 2px 12px; }
  /* One line that scrolls sideways, so the sticky bar stays short with six staff items */
  .top nav { order: 3; flex: 1 0 100%; margin: 0 -16px; padding: 0 6px; overflow-x: auto; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { padding: 10px 10px; white-space: nowrap; font-size: 13.5px; }
  .top nav { order: 4; }
  .site-switch summary { min-height: 40px; }
  .site-switch .menu { width: min(300px, calc(100vw - 32px)); }
  /* The tab menu and the site's status share one row: the menu takes the room, status and Preview (an icon) sit right */
  .site-bar:has(.tabs.wrapped) { flex-wrap: nowrap; align-items: center; gap: 10px; border-bottom: 0; margin-bottom: 14px; }
  .site-bar .tabs.wrapped { position: absolute; width: 0; }
  .site-bar .tabs.wrapped + .tabs-select { flex: 1 1 auto; min-width: 0; margin: 0; }
  .site-bar .site-end { flex: none; padding: 0; }
  .site-end .slug, .site-end .pill, .site-end .btn .lbl { display: none; }
  .buildbar { display: none; }
  /* A contact's head: name and addresses take the row beside the avatar, the buttons go to a row of their own under
     it, and long addresses wrap instead of running under the buttons */
  .ct-head { flex-wrap: wrap; row-gap: 8px; }
  .ct-head .ct-who { flex: 1 1 calc(100% - 110px); }
  .ct-handles span { white-space: normal; overflow-wrap: anywhere; min-width: 0; }   /* desktop only: on a phone it crowds the page (Go live stays beside Preview) */
  .site-end a.btn[target="_blank"]::after { margin-left: 0; }
  .site-end .btn { min-width: 36px; min-height: 36px; justify-content: center; }
  .wrap { padding: 20px 16px 48px; }
  h1 { font-size: 28px; }
  .head > .grow { min-width: 55%; }
  .site-fav.lg { width: 36px; height: 36px; }
  .slug { gap: 2px 14px; margin-top: -14px; }
  .card-h { flex-wrap: wrap; padding: 12px 14px; }
  .card-b { padding: 14px; }
  th, td { padding: 9px 6px; }
  :is(th, td):first-child { padding-left: 14px; }
  :is(th, td):last-child { padding-right: 14px; }
  :not(.scroll, details) > table:not(.stack) > * > tr > :nth-child(n+3):not(.actions, th:empty) { display: none; }
  td.actions { white-space: normal; width: 1%; }
  /* A box inside the page that scrolls on its own traps a thumb: on phones lists just run on down the page */
  .card > .log, .card-scroll, .rb-list { max-height: none; overflow-y: visible; }
  .stats { grid-auto-columns: minmax(136px, 42%); }
  .stat { padding: 12px 12px 14px; }
  .stat .n { font-size: 36px; }
  .log li, .log.picks li { grid-template-columns: 1fr; gap: 2px; padding: 9px 14px; }
  .media-grid { padding: 14px; }
  .drop { margin: 14px 14px 0; }
  .lead summary { grid-template-columns: 18px 1fr; gap: 4px 12px; padding: 12px 14px; }
  .lead summary > :nth-child(n+3) { grid-column: 2; }
}

/* Daily column chart: ink bars, today in magenta, ink baseline */
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; border-bottom: 1.5px solid var(--ink); }
.chart .col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; cursor: default; }
.chart .col i { display: block; width: 100%; max-width: 28px; min-height: 2px; background: var(--chart); }
.chart .col:last-child i { background: var(--accent); }
.chart .col:hover i { background: var(--ink-2); }
.chart .col:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--surface); font: 12px var(--mono); padding: 5px 8px; pointer-events: none; z-index: 2; }
.chart .col:first-child:hover::after { left: 0; transform: none; }
.chart .col:last-child:hover::after { left: auto; right: 0; transform: none; }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; font: 12px var(--mono); }

/* Collapsible card: <details class="card reveal"><summary class="card-h"> */
.reveal > summary { list-style: none; cursor: pointer; }
.reveal > summary::-webkit-details-marker { display: none; }
.reveal > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); margin: -3px 4px 0 0; transition: transform .15s; }
.reveal[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.reveal:not([open]) > summary { border-bottom: 0; }
.dns-zones > .zone { border-top: 1px solid var(--line); }
.dns-zones > .zone > summary { gap: 12px; }
.dns-zones > .zone > summary:hover { background: var(--soft); }
.ns-row .push { margin-left: auto; }
.ns-set { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-right: 18px; }

/* Page editor: Visual / HTML */
.seg { display: inline-flex; gap: 0; border: 1.5px solid var(--ink); }
.seg button { all: unset; cursor: pointer; padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--ink); color: var(--surface); }
.seg a { padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.seg a.on { background: var(--ink); color: var(--surface); }
table.log td { vertical-align: top; }
table.log .log-when { white-space: nowrap; }
table.log .log-ip { display: block; margin-top: 2px; font-size: 10.5px; opacity: .8; }
@media (max-width: 760px) { .card-h .seg { flex-wrap: wrap; } }
.ve .card-h { flex-wrap: wrap; }
.ve-tools { display: flex; gap: 2px; margin-left: auto; }
.ve [hidden], [data-seg-panel][hidden] { display: none !important; }
.ve-frame { display: block; width: 100%; min-height: 600px; border: 1px solid var(--line); background: #fff; }
.ve-lock { all: unset; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; cursor: pointer; font-size: 13px; color: var(--muted); border: 1.5px solid var(--line-strong); background: var(--surface); }
.ve-lock:hover { color: var(--ink); border-color: var(--ink); }
.ve-lock:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ve-lock svg { width: 15px; height: 15px; }
.ve-lock .ve-lock-open, .ve-lock.open .ve-lock-shut { display: none; }
.ve-lock.open .ve-lock-open { display: block; }
.ve-lock.open { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
/* Locked: dimmed and inert (no hover, click, select or scroll) until the padlock is opened. */
.ve.locked .ve-frame, .ve.locked textarea { opacity: .55; filter: grayscale(.35); pointer-events: none; user-select: none; transition: opacity .15s, filter .15s; }
.ve.locked textarea { background: var(--paper); }

/* Usage meters: ink fill on a soft track with a magenta line where it ends. The fill turns amber from the warning level (USAGE_WARN_PCT) and magenta when over */
.usage { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 24px; }
.meter-l { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13.5px; margin-bottom: 7px; white-space: nowrap; }
.meter-l > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* one line: a long label shortens, never wraps */
.meter-l .sub { flex: none; font: 12px var(--mono); }
.meter-bar { position: relative; height: 8px; background: var(--soft); }
.meter-bar i { display: block; height: 100%; background: var(--ink); max-width: 100%; }
.meter-bar[style*="--at"]::after { content: ""; position: absolute; left: max(3px, var(--at)); top: -3px; bottom: -3px; border-left: 1.5px solid var(--accent); }   /* where the use reaches (meter_bar()) */
.meter.warn .meter-bar i { background: var(--warn); }
.meter.over .meter-bar i { background: var(--accent); }
.tiers { display: grid; gap: 10px; margin-bottom: 8px; }
.tier { display: grid; gap: 2px; padding: 12px 14px 12px 40px; position: relative; border: 1.5px solid var(--line-strong); cursor: pointer; font-weight: 400; margin: 0; background: var(--surface); }
.tier input { position: absolute; left: 14px; top: 15px; }
.tier:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.tier-name { font: 800 17px/1.1 var(--display); font-stretch: 78%; text-transform: uppercase; }
.tier-name .sub { font: 400 12px var(--mono); text-transform: none; }
.tier-price { font: 800 24px/1 var(--display); font-stretch: 68%; }
.tier-price small { font: 400 12px var(--mono); color: var(--muted); }

/* Success messages: a toast that fades out. Errors stay as a .flash bar. */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 50; max-width: min(420px, calc(100vw - 40px)); background: var(--ink); color: var(--surface); padding: 12px 16px; border-left: 4px solid var(--accent); font-size: 13.5px; animation: toast 5s ease forwards; }
@keyframes toast { 0% { opacity: 0; transform: translateY(8px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(8px); visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

.notfound { max-width: 420px; margin: 64px auto; text-align: center; }
.notfound h1 { margin-bottom: 8px; }
.notfound .sub { margin: 0 0 20px; }

.avatar.xs { width: 22px; height: 22px; font-size: 11px; margin-left: auto; }
.who-filter select { width: auto; min-width: 140px; }

/* Overview layouts */
.split.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split.dash { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split + .split, .card + .split, .split + .card { margin-top: 18px; }
@media (max-width: 860px) { .split.even, .split.dash { grid-template-columns: 1fr; } }
td.num, th.num { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li a { display: block; padding: 10px 18px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.list li:last-child a { border-bottom: 0; }
.list li a:hover { background: var(--soft); }
.attention { border-left: 4px solid var(--yellow); }
.server { display: grid; gap: 16px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); font: 12px/1.6 var(--mono); }
.kv dd { margin: 0; text-align: right; }
.services { display: flex; flex-wrap: wrap; gap: 6px; }
.bad { color: var(--err); }
.err-msg { font-size: 12px; margin-top: 2px; overflow-wrap: anywhere; }

/* Filter row above a table, and Newer/Older paging below */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filters select { width: auto; min-width: 140px; }
.filters .grow { flex: 1; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }

/* Staff design library */
.lib-dirs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-bottom: 18px; }
.lib-dir { display: grid; gap: 8px; padding: 16px; text-decoration: none; color: inherit; }
.lib-dir.on { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.lib-specimen { display: grid; place-items: center; height: 96px; background: var(--bg); color: var(--ink); font-size: 56px; line-height: 1; }
.lib-name { font: 800 17px/1.1 var(--display); font-stretch: 78%; text-transform: uppercase; }
.lib-name .sub { margin-left: 6px; font: 400 12px var(--mono); text-transform: none; vertical-align: 2px; }
.lib-swatches { display: flex; }
.lib-swatches i { flex: 1; height: 18px; border: 1px solid var(--line); margin-left: -1px; }
.lib-swatches i:first-child { margin-left: 0; }
.lib-rules h2 { margin-bottom: 4px; font: 800 18px/1.05 var(--display); font-stretch: 78%; text-transform: uppercase; }
.lib-dodont { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 13px; }
.lib-dodont ul { margin: 6px 0 0; padding-left: 18px; }
.lib-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.lib-bar select { width: auto; }
.lib-bar .seg { flex-wrap: wrap; gap: 6px; border: 0; }
.lib-bar .seg a { border: 1px solid var(--line-strong); }
.lib-bar .seg a.on { border-color: var(--ink); }
.lib-qc > summary { cursor: pointer; list-style: none; }
.lib-qc > summary::-webkit-details-marker { display: none; }
.lib-qc:not([open]) > summary { border-bottom: 0; }
.lib-qc dl { margin: 0; padding: 4px 18px 14px; display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 0 24px; }
.lib-qc dt, .lib-qc dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); }
.lib-qc dt { font-size: 12.5px; }
.lib-qc dd { font-size: 14px; }
.lib-studio .lib-frame { margin-bottom: 12px; border: 1px solid var(--line); }
.lib-studio .lib-swatches { margin: 8px 0 14px; }
.lib-rules-list { margin: 8px 0 0; padding-left: 22px; font-size: 14px; }
.lib-rules-list li + li { margin-top: 6px; }
.lib-colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0 12px; }
.lib-style-form .row .field { min-width: 0; }
.lib-premier { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.lib-count { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.lib-studio-rules textarea { min-height: 300px; }
.lib-patterns { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; }
.lib-pattern { overflow: hidden; }
/* The pattern renders at 1280px wide and is scaled down to the card. */
.lib-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--paper); }
.lib-frame iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .3)); pointer-events: none; }
.lib-ph { display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.lib-ph strong { margin-right: auto; }
.lib-ph .lib-copy { flex: none; color: var(--muted); }
.lib-ph .lib-copy:hover { color: var(--ink); }
.lib-intro { max-width: 70ch; margin: -12px 0 22px; color: var(--muted); }
.lib-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
@media (max-width: 720px) { .lib-dodont { grid-template-columns: 1fr; } .lib-patterns { grid-template-columns: 1fr; } .lib-qc dl { grid-template-columns: 1fr; } .lib-qc dd { border-top: 0; padding-top: 0; } }

/* Go-live: free trial terms above the button */
.trial-terms { margin: 0 0 14px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--surface); font-size: 13px; }

/* Build tab: prompt builder (admin.js): a request, ready-made ones, change requests, and the prompt it makes */
.pb { display: grid; gap: 10px; }
.pb-reset::before { content: ""; display: inline-block; width: 1.05em; height: 1.05em; background: currentColor; vertical-align: -0.16em; -webkit-mask: var(--mdi-refresh) center / contain no-repeat; mask: var(--mdi-refresh) center / contain no-repeat; }
.pb-reset:disabled { opacity: .35; cursor: default; }
.pb-build { border-top: 1px solid var(--line); padding-top: 10px; }
.pb-build > summary { cursor: pointer; font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pb-build[open] > summary { margin-bottom: 10px; }
.pb-build > :not(summary) + :not(summary) { margin-top: 10px; }
.pb-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pb-actions .grow { flex: 1; }
.pb textarea { width: 100%; min-height: 72px; resize: vertical; }
.pb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-chip { padding: 4px 10px; border: 1px solid var(--line-strong); background: var(--surface); font: 500 11.5px var(--mono); color: var(--muted); cursor: pointer; white-space: nowrap; }
.pb-chip:hover { color: var(--ink); border-color: var(--ink); }
.pb-chip.on { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.pb-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.pb-pick input { margin: 0; }
.pb-pick:has(input:disabled) { opacity: .45; cursor: default; }
.pb-pick .mono { font-size: 11.5px; padding: 1px 6px; background: var(--ink); color: var(--surface); }

/* Enterprise overrides that tokens can't reach (tokens are at the top of this file). */
body.ent::before { height: 3px; opacity: .75; background: linear-gradient(90deg, var(--cyan) 0 25%, var(--magenta) 25% 50%, var(--yellow) 50% 75%, var(--key) 75% 100%); }
body.ent h1, body.ent .auth h1 { font-weight: 300; font-size: 32px; line-height: 1.1; text-transform: none; letter-spacing: -.02em; }
body.ent .card-h h2, body.ent dialog h2, body.ent .plan-title, body.ent .site-card h2, body.ent .tier-name, body.ent .lib-name, body.ent .lib-rules h2 { font-weight: 600; font-size: 16px; text-transform: none; letter-spacing: 0; }
body.ent .stat .n, body.ent .plan-price, body.ent .tier-price, body.ent .site-card .shot-empty { font-weight: 300; letter-spacing: -.02em; }
body.ent input, body.ent select, body.ent textarea, body.ent .btn, body.ent .btn-secondary, body.ent .btn-ghost { border-radius: 4px; }
body.ent a { text-decoration-color: currentColor; }
body.ent .sub a, body.ent .auth a:not(.btn):not(.brand) { color: #1F5FAD; }
body.ent :focus-visible { outline-color: #1F5FAD; }
body.ent .top { border-bottom: 1px solid var(--line); }
body.ent .brand { font-weight: 600; color: var(--ink); }
/* Enterprise sign-in (layouts/public.view.php): navy brand panel beside the form, as prooflive.ai/enterprise */
.ent-auth { min-height: calc(100vh - 3px); display: grid; grid-template-columns: minmax(340px, 5fr) 7fr; background: var(--surface); }
.ent-side { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px 48px; background: #0B1F3A; color: #FFFFFF; }
body.ent .ent-side .brand { color: #FFFFFF; font-size: 18px; text-decoration: none; }
body.ent .ent-side .brand .ent-sub { color: #C9D3E3; border-left-color: rgba(255, 255, 255, .28); }
.ent-eyebrow { margin: 0 0 14px; font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #8FB4E6; }
.ent-line { margin: 0 0 32px; max-width: 15ch; font: 300 clamp(28px, 3vw, 40px)/1.15 var(--display); letter-spacing: -.02em; color: #FFFFFF; }
.ent-trust { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: #E3ECF7; }
.ent-trust li { display: flex; align-items: center; gap: 12px; }
.ent-trust svg { width: 18px; height: 18px; flex: none; fill: #8FB4E6; }
.ent-side-foot { margin: 0; font: 12px var(--mono); color: #8C9BB3; }
.ent-main { display: grid; place-items: center; padding: 48px 24px; }
.ent-main .auth-inner { width: min(380px, 100%); }
.ent-main .card { padding: 0; border: 0; box-shadow: none; background: transparent; }
.ent-main h1 { font-size: 34px; margin-bottom: 20px; }
.ent-main .btn.block { padding-top: 12px; padding-bottom: 12px; font-size: 14.5px; }
@media (max-width: 860px) {
  .ent-auth { grid-template-columns: 1fr; }
  .ent-side { padding: 20px 24px; gap: 0; }
  .ent-side > div, .ent-side-foot { display: none; }
}
.brand .ent-sub { font-weight: 400; padding-left: 12px; margin-left: 4px; border-left: 1px solid var(--line-strong); color: var(--muted); }
.golive-signoff { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.golive-signoff .check { margin: 0; font-weight: 600; }
.sec-panel { margin-bottom: 18px; }
.sec-panel .card-b.stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sec-panel .stat .n { font-size: 34px; }
.sec-panel .card-b.stats.sec-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sec-panel table { border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .sec-panel .card-b.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sec-panel .card-b.stats, .sec-panel .card-b.stats.sec-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inline-actions { display: flex; gap: 6px; justify-content: flex-end; margin: 0; }

/* Get a domain (site Domains tab, app/registrar.php) */
.domain-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.domain-pick form { margin: 0; }
.domain-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.get-domain { display: block; margin-bottom: 18px; color: inherit; text-decoration: none; }
.get-domain .card-h { gap: 12px; }
.get-domain .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Go-live basket: domain, email, total (admin.js) */
.basket { margin: 0 0 18px; }
.basket-h { margin: 18px 0 8px; font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.basket-find { display: flex; gap: 8px; margin-bottom: 8px; }
.basket-find input { flex: 1; min-width: 0; }
.basket-opts { display: grid; gap: 4px; margin-bottom: 6px; }
.basket-opts > p { margin: 4px 0; }
.basket-opt { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0; padding: 7px 12px; border: 1.5px solid var(--line-strong); cursor: pointer; font-weight: 400; }
.basket-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); }
.basket-opt input { margin: 0; }
.basket-opt .sub { margin: 0; white-space: nowrap; }
.basket-opt .domain-name { font-size: 14.5px; }
.basket-box { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.basket-box input { width: 140px; flex: none; }
.basket-box .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basket-box .sub { margin: 0; white-space: nowrap; }
.basket-sum { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 16px 0 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; }
.basket-sum dt { font: 500 11.5px/1.6 var(--mono); color: var(--muted); white-space: nowrap; }
.basket-sum dd { margin: 0; text-align: right; font-weight: 600; }
.tiers-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.legal-links { margin: 18px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.legal-links a { color: inherit; }

/* Password fields: show/hide eye (admin.js) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 44px; }
.pw-eye { position: absolute; top: 0; right: 0; bottom: 0; width: 42px; display: grid; place-items: center; padding: 0; background: none; border: 0; color: var(--muted); cursor: pointer; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--ink); }
.media-item .btn-ghost.sm.on { color: var(--ok); }
/* the client's design files (Media::design()): tagged on the thumbnail; "Design files" on the drop box tags an upload */
.media-item .thumb { position: relative; }
.media-design { position: absolute; left: 6px; top: 6px; }
.craft-list ul { margin: 0; padding: 4px 18px 14px 36px; }
.craft-list li { margin: 8px 0; }
.drop-design { display: block; margin-top: 8px; font-size: 13px; cursor: pointer; }

/* Build bar on a draft (admin/views/site/buildbar.php): one slim line that follows Claude live */
.buildbar { position: relative; display: flex; align-items: center; gap: 14px; height: 42px; padding: 0 6px 0 16px; margin: -12px 0 30px; background: var(--ink); color: var(--surface); overflow: hidden; font-size: 13.5px; }
.bb-dots { display: flex; gap: 5px; flex: none; }
.bb-dots i { width: 7px; height: 7px; border: 1.25px solid rgba(255,255,255,.55); border-radius: 50%; transition: background .4s, border-color .4s; }
.bb-dots i.done { background: var(--surface); border-color: var(--surface); }
.bb-dots i.on { background: var(--accent); border-color: var(--accent); animation: bb-ring 1.8s infinite; }
@keyframes bb-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 7px transparent; } }
.bb-label { flex: none; width: 58px; font: 400 10.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; opacity: .5; }
.bb-ticker { position: relative; flex: 1; align-self: stretch; overflow: hidden; }
.bb-line { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bb-line em { font: 400 12px/1 var(--mono); font-style: normal; opacity: .55; }
.bb-line.in { animation: bb-in .45s cubic-bezier(.2,.8,.2,1) both; }
.bb-line.out { animation: bb-out .3s ease both; }
@keyframes bb-in { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bb-out { to { transform: translateY(-100%); opacity: 0; } }
.bb-count { flex: none; font: 400 11.5px/1 var(--mono); padding: 4px 7px; border: 1px solid rgba(255,255,255,.25); }
.bb-count.pop { animation: bb-pop .35s ease; }
@keyframes bb-pop { from { transform: scale(1.25); } to { transform: none; } }
.bb-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.bb-acts form { display: inline; }
.bb-btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; font: 500 12.5px/1 var(--font); background: var(--surface); color: var(--ink); }
.bb-btn.accent { background: var(--accent-fill); color: #fff; }
.bb-btn:hover { filter: brightness(1.08); }
.bb-link { color: var(--surface); opacity: .7; font-size: 12.5px; text-decoration: none; padding: 0 6px; }
.bb-link:hover { opacity: 1; }
.buildbar [data-when] { display: none; }
.buildbar.is-start [data-when~="start"], .buildbar.is-waiting [data-when~="start"], .buildbar.is-building [data-when~="building"], .buildbar.is-ready [data-when~="ready"] { display: inline-flex; align-items: center; gap: 6px; }
.bb-prog { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.is-waiting .bb-prog, .is-building .bb-prog { width: 28%; animation: bb-sweep 1.6s ease-in-out infinite; }
.is-ready .bb-prog { width: 100%; transition: width .6s; }
@keyframes bb-sweep { from { transform: translateX(-100%); } to { transform: translateX(360%); } }
@media (max-width: 760px) { .bb-label, .bb-count, .bb-link { display: none; } .buildbar { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .buildbar *, .buildbar { animation: none !important; } }

/* Sign-up: business or designer, one page (admin/views/signup.php) */
.typepick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; margin: 4px 0 20px; }
.typepick label { position: relative; display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 12px; border: 1.5px solid var(--line-strong); background: var(--surface); text-align: center; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.typepick input { position: absolute; opacity: 0; pointer-events: none; }
.typepick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.typepick label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Tap-to-pick pills (the rebuild page's questions): any number */
.rb-pills { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 4px 0 20px; }
.rb-pills label { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; cursor: pointer; transition: border-color .15s, background .15s; }
.rb-pills input { position: absolute; opacity: 0; pointer-events: none; }
.rb-pills label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.rb-pills label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
form:has(.typepick input[value="agency"]:checked) .for-client, form:has(.typepick input[value="client"]:checked) .for-agency { display: none; }

/* Rebuild my website (app/views/app/rebuild): one question at a time, made for a phone */
.rb .typepick label { min-height: 64px; font-size: 15px; }
.rb input:not([type=radio]):not([type=checkbox]) { font-size: 16px; min-height: 46px; }
.rb-reading { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-spin { flex: none; width: 13px; height: 13px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: msg-spin .8s linear infinite; }
.rb-back { margin-top: 12px; }
/* A studio's website requests (app/views/app/intake): the same, with a step bar and photos */
.rb .lbl { display: block; font-weight: 500; font-size: 12.5px; margin-bottom: 6px; padding: 0; }
.in-steps { display: flex; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.in-steps li { flex: 1 1 0; display: flex; align-items: center; gap: 6px; min-width: 0; padding-top: 8px; border-top: 3px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; }
.in-steps li b { flex: none; font-weight: 700; }
.in-steps li[data-done] { border-top-color: var(--accent); }
.in-steps li[aria-current] { border-top-color: var(--accent); color: var(--ink); font-weight: 600; }
.in-steps li:not([aria-current]) span { display: none; }
.in-steps li[aria-current] { overflow: visible; }
/* anything hidden on these pages stays hidden, whatever its own display (Back, Uploading, the step sections) */
.rb [hidden] { display: none !important; }
.in-type { position: relative; }
.in-type-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; max-height: 300px; overflow-y: auto; margin: 2px 0 0; padding: 4px 0; list-style: none; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.in-type-list li { padding: 10px 14px; font-size: 15px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.in-type-list li[aria-selected="true"], .in-type-list li:hover { background: var(--accent-soft); }
.in-type-list .in-type-other { border-top: 1px solid var(--line); color: var(--muted); }
.in-logo { display: grid; gap: 10px; }
.in-logo .filedrop-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.in-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.in-photos figure { position: relative; margin: 0; aspect-ratio: 1; overflow: hidden; background: var(--soft); }
.in-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.in-photos [data-remove] { position: absolute; top: 4px; right: 4px; min-width: 28px; min-height: 28px; padding: 0; background: var(--surface); }
.in-add { position: relative; display: grid; place-items: center; aspect-ratio: 1; margin: 0; border: 1px dashed var(--line-strong); background: var(--surface); color: var(--muted); font-size: 28px; cursor: pointer; }
.in-add:hover { border-color: var(--accent); color: var(--accent); }
.in-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rb-mine { margin-bottom: 16px; }
.auth .card.rb-mine { padding: 20px 24px 8px; }
.rb-mine summary { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; cursor: pointer; list-style: none; font: 800 18px/1.05 var(--display); font-stretch: 78%; text-transform: uppercase; letter-spacing: .01em; }
.rb-mine summary::-webkit-details-marker { display: none; }
.rb-mine summary::after { content: ""; margin-left: auto; align-self: center; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.rb-mine[open] summary::after { transform: rotate(-135deg); }
.rb-mine summary .sub { font: 400 12px var(--mono); text-transform: none; letter-spacing: 0; }
/* newest at the top; a long list scrolls inside the card */
.rb-list { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--line); }
.rb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rb-row:first-child { border-top: 0; }
.rb-what { display: flex; flex-direction: column; min-width: 0; }
.rb-what b, .rb-what .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-what .mono { color: var(--muted); font-size: 12px; }
.rb-state { display: flex; align-items: center; gap: 8px; flex: none; max-width: 55%; }
.rb-state .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rb-state .rb-spin { color: var(--muted); }
@media (max-width: 480px) { .auth .card.rb-mine { padding: 16px 20px 6px; } }
@media (prefers-reduced-motion: reduce) { .rb-spin { animation: none; } }

/* Partner tier bar (Overview) and upgrade dialog */
.tier-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; text-decoration: none; }
.tier-chip::before { content: ""; flex: none; width: 15px; height: 15px; background: var(--tier); -webkit-mask: var(--tier-icon) center / contain no-repeat; mask: var(--tier-icon) center / contain no-repeat; }
/* Each level: its colour and an MDI star that fills up as the level rises */
.t-partner { --tier: var(--tier-partner); --tier-icon: var(--mdi-star-outline); } .t-preferred { --tier: var(--tier-preferred); --tier-icon: var(--mdi-star-half-full); } .t-premier { --tier: var(--tier-premier); --tier-icon: var(--mdi-star); }
.avatar[class*=" t-"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tier); }
.top .who .menu .menu-h a.tier-chip { display: inline-flex; align-self: flex-start; width: auto; padding: 0; font-size: 12px; margin-top: 6px; }
.top .who .menu .menu-h a.tier-chip:hover { background: none; text-decoration: underline; }
.tier-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; }
.tier-facts > * { white-space: nowrap; }
.tier-commission { display: inline-flex; align-items: center; gap: 8px; }
.tier-commission select { width: auto; min-height: var(--control-h-sm); padding-top: 0; padding-bottom: 0; font-size: 13px; }
/* a row of buttons under a card's or dialog's content; never a table's actions cell, which must stay a cell or the
   table's rules and alignment break (td.actions above) */
.card-b .actions:not(td, th) { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.card-b .actions form { display: inline; }
.tier-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tier-option { border: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; align-content: start; }
.tier-option h3 { margin: 0; }
.tier-option ul { margin: 0 0 6px; padding-left: 18px; }
.tier-option button { width: 100%; }
.share-row { display: grid; gap: 10px; }
.share-code { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.share-code strong { font-size: 1.2rem; letter-spacing: .15em; }

/* White-label: a studio's logo in place of ours (go-live page, Premier clients' admin) */
.brand.studio { gap: 10px; }
.brand.studio img { display: block; max-height: 32px; max-width: 200px; width: auto; }
.auth .brand.studio img { max-height: 44px; max-width: 240px; }
.brand.studio .hosted { font: 500 11px var(--font); color: var(--muted); letter-spacing: 0; white-space: nowrap; }
.legal-links.hosted { margin-bottom: 4px; }
.brand-logo-row { align-items: center; }
.brand-preview { max-height: 40px; max-width: 160px; background: var(--paper); padding: 4px; border: 1px solid var(--line); }
.brand-admin-row { align-items: end; gap: 10px; }
.agents { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.agents li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Advanced: set-once and technical settings, folded away at the foot of a screen (remembered per screen) */
details.advanced { margin-top: 26px; }
details.advanced > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13px; font-weight: 600; color: var(--muted); border-top: 1px solid var(--line); }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -3px; transition: transform .15s; }
details.advanced[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
details.advanced > summary:hover { color: var(--ink); }
details.advanced > summary + .card { margin-top: 4px; }   /* the first card only: :first-of-type counts tags, so it also hit the first <div> card after <form> ones */
/* Sub-tabs: the pages inside one site tab (Pages / Blog, Settings / People / Data / Log) */
.subtabs { display: flex; flex-wrap: wrap; gap: 0 2px; margin: -6px 0 18px; font-size: 13.5px; }   /* spaced like the tabs above (.site-bar .tabs a), so they line up */
/* phones: the row scrolls sideways instead of pushing the page wider */
@media (max-width: 640px) { .subtabs { flex-wrap: nowrap; margin: -6px -16px 16px; padding: 0 3px 2px; overflow-x: auto; scrollbar-width: none; } .subtabs::-webkit-scrollbar { display: none; } }
.subtabs a { color: var(--muted); text-decoration: none; padding: 6px 13px 5px; border-bottom: 1.5px solid transparent; white-space: nowrap; }
.subtabs a:hover { color: var(--ink); background: var(--soft); }
.subtabs .o-n { display: inline-block; min-width: 3ch; }   /* a count that changes between projects keeps the tabs after it still */
.subtabs a.on { color: var(--ink); border-bottom-color: var(--accent); text-shadow: 0 0 .6px currentColor; }   /* bolder without getting wider, so the row never moves */
.slug .slug-plan b { font-weight: 700; }
.slug .slug-plan:hover b { text-decoration: underline; text-underline-offset: 3px; }
/* Build with AI: getting the desktop app */
.setup { display: grid; gap: 14px; margin-bottom: 4px; }
.setup > div { border: 1px solid var(--line); padding: 12px 14px; }
.setup h3 { margin: 0 0 6px; font-size: 14px; }
.setup ol { margin: 0 0 10px; padding-left: 18px; line-height: 1.6; }
.seo-fix td:first-child { white-space: nowrap; width: 1%; }
/* The SEO tab (admin/views/site/seo.php) and its Overview summary */
a.card.seo-sum { display: block; color: var(--ink); text-decoration: none; }
a.card.seo-sum:hover { border-color: var(--ink); }
a.card.seo-sum .card-h { gap: 8px; }
.seo-waiting { display: flex; align-items: center; gap: 12px; }
.seo-waiting .grow { flex: 1; }
.waiting { list-style: none; margin: 0; padding: 0; }
.waiting li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.waiting li > div { flex: 1 1 220px; min-width: 0; }
.waiting li > form:first-of-type { display: flex; gap: 8px; flex: 2 1 260px; }
.waiting li > form:first-of-type input { flex: 1; min-width: 0; }
.seo-tasks td { vertical-align: top; }
.seo-tasks td:first-child { white-space: nowrap; width: 1%; }
.seo-tasks td.actions { width: 1%; }
/* The SEO tab's Google charts (Seo::chartSvg(), drawn in currentColor): clicks and views side by side, stacked on phones */
.seo-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 24px; padding: 14px 18px 8px; }
.seo-chart { margin: 0; color: var(--muted); }
.seo-chart svg { display: block; width: 100%; height: auto; }
.seo-chart polyline { stroke: var(--accent); }
.seo-chart polygon { fill: var(--accent); }
.seo-chart text[font-weight] { fill: var(--ink); }
/* The shared results page (results/show): a wider sheet */
body.results .auth-inner { width: min(860px, 100%); }
body.results .stats { margin: 18px 0; }

/* Where AI finds you: share of voice (bars against the most named), the trend, discussions to join */
.ai-h { font-size: 13px; margin: 0; padding: 4px 18px 6px; }
.ai-voice { margin-bottom: 8px; }
.ai-voice td { padding: 6px 18px; border-bottom: 0; }
.ai-voice td.bar { width: 45%; }
.ai-voice td.bar span { display: block; height: 8px; background: var(--line-strong); }
.ai-voice tr.us td { font-weight: 600; }
.ai-voice tr.us td.bar span { background: var(--accent); }
.ai-trend { padding: 0 18px 8px; }
.talk-list { list-style: none; margin: 0; padding: 0; }
.talk-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 18px; border-top: 1px solid var(--line); }
.talk-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.talk-main a { text-decoration: none; }
.talk-reply { margin: 6px 0 0; white-space: normal; }
.talk-list .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; flex: none; }
@media (max-width: 640px) { .talk-list li { flex-direction: column; } .talk-list .actions { justify-content: flex-start; } }
.card-h .sub.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.seo-tasks td.actions > * + * { margin-left: 6px; }
.seo-ideas .pill { white-space: nowrap; }
.seo-ideas .pill.idea-post, .seo-ideas .pill.idea-page, .seo-ideas .pill.idea-both { color: var(--accent); border: 1.5px solid currentColor; }
/* Stat tile icons: plain MDI glyphs (stat_tile()), coloured by kind of figure, amber when it needs a look. No tinted tiles behind them. */
.stat .l { display: flex; align-items: center; gap: 6px; }
.si { flex: none; width: 16px; height: 16px; fill: currentColor; }
.si-traffic { color: var(--cyan); }
.si-server { color: color-mix(in srgb, var(--yellow) 70%, var(--ink)); }
.si-mail, .si-money { color: var(--magenta); }
.si-security { color: var(--ok); }
.stat.warn .si, .stat.warn .n { color: var(--warn); }
.linkish { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkish:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.stat.go { color: inherit; text-decoration: none; }
a.stat.go:hover { background: var(--soft); }
a.stat.go:hover .n { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }

/* MDI glyphs (Material Design Icons), drawn through CSS masks in the text colour: copy buttons, links that open a
   new tab, and the account menu. Deliberately few: everywhere else stays words. */
:root {
  --mdi-star-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z'/%3E%3C/svg%3E");
  --mdi-star-half-full: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,15.4V6.1L13.71,10.13L18.09,10.5L14.77,13.39L15.76,17.67M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z'/%3E%3C/svg%3E");
  --mdi-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z'/%3E%3C/svg%3E");
  --mdi-arrow-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z'/%3E%3C/svg%3E");
  --mdi-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z'/%3E%3C/svg%3E");
  --mdi-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z'/%3E%3C/svg%3E");
  --mdi-content-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z'/%3E%3C/svg%3E");
  --mdi-chevron-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z'/%3E%3C/svg%3E");
  --mdi-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z'/%3E%3C/svg%3E");
  --mdi-open-in-new: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z'/%3E%3C/svg%3E");
  --mdi-cog-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z'/%3E%3C/svg%3E");
  --mdi-account-multiple-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.07 10.41A5 5 0 0 0 13.07 4.59A3.39 3.39 0 0 1 15 4A3.5 3.5 0 0 1 15 11A3.39 3.39 0 0 1 13.07 10.41M5.5 7.5A3.5 3.5 0 1 1 9 11A3.5 3.5 0 0 1 5.5 7.5M7.5 7.5A1.5 1.5 0 1 0 9 6A1.5 1.5 0 0 0 7.5 7.5M16 17V19H2V17S2 13 9 13 16 17 16 17M14 17C13.86 16.22 12.67 15 9 15S4.07 16.31 4 17M15.95 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13Z'/%3E%3C/svg%3E");
  --mdi-credit-card-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20,8H4V6H20M20,18H4V12H20M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z'/%3E%3C/svg%3E");
  --mdi-account-group-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,5A3.5,3.5 0 0,0 8.5,8.5A3.5,3.5 0 0,0 12,12A3.5,3.5 0 0,0 15.5,8.5A3.5,3.5 0 0,0 12,5M12,7A1.5,1.5 0 0,1 13.5,8.5A1.5,1.5 0 0,1 12,10A1.5,1.5 0 0,1 10.5,8.5A1.5,1.5 0 0,1 12,7M5.5,8A2.5,2.5 0 0,0 3,10.5C3,11.44 3.53,12.25 4.29,12.68C4.65,12.88 5.06,13 5.5,13C5.94,13 6.35,12.88 6.71,12.68C7.08,12.47 7.39,12.17 7.62,11.81C6.89,10.86 6.5,9.7 6.5,8.5C6.5,8.41 6.5,8.31 6.5,8.22C6.2,8.08 5.86,8 5.5,8M18.5,8C18.14,8 17.8,8.08 17.5,8.22C17.5,8.31 17.5,8.41 17.5,8.5C17.5,9.7 17.11,10.86 16.38,11.81C16.5,12 16.63,12.15 16.78,12.3C16.94,12.45 17.1,12.58 17.29,12.68C17.65,12.88 18.06,13 18.5,13C18.94,13 19.35,12.88 19.71,12.68C20.47,12.25 21,11.44 21,10.5A2.5,2.5 0 0,0 18.5,8M12,14C9.66,14 5,15.17 5,17.5V19H19V17.5C19,15.17 14.34,14 12,14M4.71,14.55C2.78,14.78 0,15.76 0,17.5V19H3V17.07C3,16.06 3.69,15.22 4.71,14.55M19.29,14.55C20.31,15.22 21,16.06 21,17.07V19H24V17.5C24,15.76 21.22,14.78 19.29,14.55M12,16C13.53,16 15.24,16.5 16.23,17H7.77C8.76,16.5 10.47,16 12,16Z'/%3E%3C/svg%3E");
  --mdi-tune-variant: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 13C6.14 13 4.59 14.28 4.14 16H2V18H4.14C4.59 19.72 6.14 21 8 21S11.41 19.72 11.86 18H22V16H11.86C11.41 14.28 9.86 13 8 13M8 19C6.9 19 6 18.1 6 17C6 15.9 6.9 15 8 15S10 15.9 10 17C10 18.1 9.1 19 8 19M19.86 6C19.41 4.28 17.86 3 16 3S12.59 4.28 12.14 6H2V8H12.14C12.59 9.72 14.14 11 16 11S19.41 9.72 19.86 8H22V6H19.86M16 9C14.9 9 14 8.1 14 7C14 5.9 14.9 5 16 5S18 5.9 18 7C18 8.1 17.1 9 16 9Z'/%3E%3C/svg%3E");
  --mdi-palette-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12,22A10,10 0 0,1 2,12A10,10 0 0,1 12,2C17.5,2 22,6 22,11A6,6 0 0,1 16,17H14.2C13.9,17 13.7,17.2 13.7,17.5C13.7,17.6 13.8,17.7 13.8,17.8C14.2,18.3 14.4,18.9 14.4,19.5C14.5,20.9 13.4,22 12,22M12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C12.3,20 12.5,19.8 12.5,19.5C12.5,19.3 12.4,19.2 12.4,19.1C12,18.6 11.8,18.1 11.8,17.5C11.8,16.1 12.9,15 14.3,15H16A4,4 0 0,0 20,11C20,7.1 16.4,4 12,4M6.5,10C7.3,10 8,10.7 8,11.5C8,12.3 7.3,13 6.5,13C5.7,13 5,12.3 5,11.5C5,10.7 5.7,10 6.5,10M9.5,6C10.3,6 11,6.7 11,7.5C11,8.3 10.3,9 9.5,9C8.7,9 8,8.3 8,7.5C8,6.7 8.7,6 9.5,6M14.5,6C15.3,6 16,6.7 16,7.5C16,8.3 15.3,9 14.5,9C13.7,9 13,8.3 13,7.5C13,6.7 13.7,6 14.5,6M17.5,10C18.3,10 19,10.7 19,11.5C19,12.3 18.3,13 17.5,13C16.7,13 16,12.3 16,11.5C16,10.7 16.7,10 17.5,10Z'/%3E%3C/svg%3E");
  --mdi-robot-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17.5 15.5C17.5 16.61 16.61 17.5 15.5 17.5S13.5 16.61 13.5 15.5 14.4 13.5 15.5 13.5 17.5 14.4 17.5 15.5M8.5 13.5C7.4 13.5 6.5 14.4 6.5 15.5S7.4 17.5 8.5 17.5 10.5 16.61 10.5 15.5 9.61 13.5 8.5 13.5M23 15V18C23 18.55 22.55 19 22 19H21V20C21 21.11 20.11 22 19 22H5C3.9 22 3 21.11 3 20V19H2C1.45 19 1 18.55 1 18V15C1 14.45 1.45 14 2 14H3C3 10.13 6.13 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2S14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C17.87 7 21 10.13 21 14H22C22.55 14 23 14.45 23 15M21 16H19V14C19 11.24 16.76 9 14 9H10C7.24 9 5 11.24 5 14V16H3V17H5V20H19V17H21V16Z'/%3E%3C/svg%3E");
  --mdi-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z'/%3E%3C/svg%3E");
  --mdi-account-switch-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M16 9C22 9 22 13 22 13V15H16V13C16 13 16 11.31 14.85 9.8C14.68 9.57 14.47 9.35 14.25 9.14C14.77 9.06 15.34 9 16 9M8 11C11.5 11 11.94 12.56 12 13H4C4.06 12.56 4.5 11 8 11M8 9C2 9 2 13 2 13V15H14V13C14 13 14 9 8 9M9 17V19H15V17L18 20L15 23V21H9V23L6 20L9 17M8 3C8.55 3 9 3.45 9 4S8.55 5 8 5 7 4.55 7 4 7.45 3 8 3M8 1C6.34 1 5 2.34 5 4S6.34 7 8 7 11 5.66 11 4 9.66 1 8 1M16 1C14.34 1 13 2.34 13 4S14.34 7 16 7 19 5.66 19 4 17.66 1 16 1Z'/%3E%3C/svg%3E");}
[data-copy]::before, [data-copy-el]::before, a.btn[target="_blank"]::after, a.btn-secondary[target="_blank"]::after,
.top .who .menu > a::before, .top .who .menu > form button::before, .top .who .menu > button[data-help]::before {
  content: ""; display: inline-block; flex: none; width: 1.05em; height: 1.05em; background: currentColor; vertical-align: -0.16em;
  -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat;
}
[data-copy]::before, [data-copy-el]::before { --i: var(--mdi-content-copy); margin-right: .4em; }
a.btn[target="_blank"]::after, a.btn-secondary[target="_blank"]::after { --i: var(--mdi-open-in-new); margin-left: .4em; width: .95em; height: .95em; }
.top .who .menu > a::before, .top .who .menu > form button::before, .top .who .menu > button[data-help]::before { margin-right: .6em; color: var(--muted); }
.top .who .menu a[href="/settings"]::before { --i: var(--mdi-cog-outline); }
.top .who .menu a[href="/account"]::before { --i: var(--mdi-account-multiple-outline); }
.top .who .menu a[href="/billing"]::before { --i: var(--mdi-credit-card-outline); }
.top .who .menu a[href="/users"]::before { --i: var(--mdi-account-group-outline); }
.top .who .menu a[href="/platform"]::before { --i: var(--mdi-tune-variant); }
.top .who .menu a[href^="/enterprise-look"]::before { --i: var(--mdi-palette-outline); }
.top .who .menu a.staff, .top .who .menu a.staff::before { color: var(--staff); }
.top .who .menu form[action^="/logout"] button::before { --i: var(--mdi-logout); }
.top .who .menu form[action="/sign-in-as/back"] button::before { --i: var(--mdi-account-switch-outline); }
.top .who .menu > button[data-help]::before { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z'/%3E%3C/svg%3E"); }

/* Help (the profile menu, app/views/app/home/_help.view.php): the getting-started steps and the how-to list */
dialog.help { width: min(560px, 94vw); }
dialog.help > .card-h { position: sticky; top: 0; background: var(--surface); z-index: 2; }
.guide-meter { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; font: 500 12px var(--mono); color: var(--muted); }
.guide-meter i { display: block; width: 90px; height: 6px; background: var(--soft); position: relative; }
.guide-meter i b { position: absolute; inset: 0 auto 0 0; background: var(--ok); }
.guide-x { width: 30px; height: 30px; padding: 0; display: grid; place-items: center; border: 0; background: none; color: var(--muted); cursor: pointer; flex: none; }
.guide-x::before { content: ''; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--mdi-close) center / contain no-repeat; mask: var(--mdi-close) center / contain no-repeat; }
.guide-x:hover { color: var(--ink); }
.guide { list-style: none; margin: 0; padding: 0; }
.guide li { display: flex; align-items: center; gap: 14px; padding: 10px 22px; min-height: 48px; border-top: 1px solid var(--line); }
.guide li:first-child { border-top: 0; }
.guide .n { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-strong); font: 500 12px var(--mono); color: var(--muted); }
.guide li.done .n { font-size: 0; background: var(--ok); border-color: transparent; color: #fff; }
.guide li.done .n::before { content: ''; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--mdi-check) center / contain no-repeat; mask: var(--mdi-check) center / contain no-repeat; }
.guide li.now { background: color-mix(in srgb, var(--soft) 45%, transparent); }
.guide li.now .n { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.guide .t { flex: 1 1 auto; min-width: 0; font-weight: 500; }
.guide li.done .t { color: var(--muted); font-weight: 400; text-decoration: line-through; text-decoration-color: var(--line-strong); }
.guide a { flex: none; }
.help-sec { margin: 0; padding: 14px 22px 6px; font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--line); }
.howto details { border-top: 1px solid var(--line); }
.howto details:first-child { border-top: 0; }
.howto summary { display: flex; align-items: center; padding: 12px 22px; cursor: pointer; font-weight: 500; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: ''; margin-left: auto; width: 18px; height: 18px; background: var(--muted); -webkit-mask: var(--mdi-chevron-down) center / contain no-repeat; mask: var(--mdi-chevron-down) center / contain no-repeat; transition: transform .15s; }
.howto details[open] summary::after { transform: rotate(180deg); }
.howto ol { margin: 0; padding: 0 22px 14px 44px; color: var(--ink-2); }
.howto li { margin: 4px 0; }
.help-foot { display: flex; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); }
@media (max-width: 640px) { .guide li, .howto summary, .help-sec, .help-foot { padding-left: 14px; padding-right: 14px; } .howto ol { padding-left: 36px; } .guide-meter i { width: 50px; } }

/* Staff-only: in the staff colour, so it's never mistaken for something customers see */
.top nav a.staff { color: var(--staff); }
.top nav a.staff:hover { color: var(--staff); filter: brightness(.85); }
.top nav a.staff.on { box-shadow: inset 0 -2px 0 var(--staff); }
.subtabs a.staff { color: var(--staff); }
.subtabs a.staff.on { border-bottom-color: var(--staff); }
.card.staff { box-shadow: inset 3px 0 0 var(--staff); }
.card.staff .card-h h2::after { content: "staff"; margin-left: 10px; font: 500 11px var(--mono); color: var(--staff); text-transform: none; letter-spacing: 0; vertical-align: middle; }
.btn-ghost.staff, .field.staff label { color: var(--staff); }
.top .who .menu > form[action="/sign-in-as/back"] button { color: var(--staff); }
/* A status pill straight after a name or link: a little more room than the word space */
:is(a, strong, b) + .pill { margin-left: 6px; }

/* Live activity (staff Overview), above Server: short label and figure pairs, two to a row */
.card.live h3 { margin: 14px 0 6px; font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.card.live h3:first-child { margin-top: 0; }
.card.live .kv.two { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 5px 12px; }
.card.live .kv.two dt { white-space: nowrap; }
.card.live .kv.two dd { font-variant-numeric: tabular-nums; font-weight: 600; }
.card.live .kv.two dd:nth-of-type(odd) { padding-right: 18px; }
.card.live .mini { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.card.live .mini li { display: flex; gap: 8px; justify-content: space-between; padding: 4px 0; border-top: 1px solid var(--line); }
.card.live .mini li:first-child { border-top: 0; }
.card.live .mini a { color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.live .mini a:hover { text-decoration: underline; }
.card.live .mini .sub { flex: none; }
@media (max-width: 420px) { .card.live .kv.two { grid-template-columns: minmax(0, 1fr) auto; } .card.live .kv.two dd:nth-of-type(odd) { padding-right: 0; } }

/* Where AI finds you (site Overview) */
.ai-find .ai-sources td, .ai-find .ai-sources th { white-space: nowrap; }
.ai-find .ai-sources td:first-child { max-width: 0; width: 40%; overflow: hidden; text-overflow: ellipsis; }
.ai-find .ai-questions { padding: 10px 18px 14px; border-top: 1px solid var(--line); }
.ai-find .ai-questions ul { margin: 8px 0 0; padding-left: 18px; }

/* Opening hours editor (site Settings > Business) */
.hours-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin-bottom: 6px; }
.hours-h label { margin: 0; white-space: nowrap; }
/* Opening hours: one row a day, a toggle, then each session as one joined time field */
.hours { max-width: 640px; border: 1px solid var(--line); background: var(--surface); }
.hr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 52px; padding: 8px 12px; border-top: 1px solid var(--line); }
.hr:first-child { border-top: 0; }
.hr-day { display: flex; align-items: center; gap: 10px; width: 74px; margin: 0; font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.hr-day input { margin: 0; }
.hr-range { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); background: var(--paper); }
.hr-range:focus-within { border-color: var(--ink); }
.hr-range[hidden] { display: none; }
.hr-range input[type=time] { width: auto; min-width: 0; padding: 6px 4px 6px 10px; border: 0; background: transparent; font-variant-numeric: tabular-nums; }
.hr-range input[type=time]:focus { outline: none; box-shadow: none; }
.hr-range input[type=time]::-webkit-calendar-picker-indicator { opacity: .4; cursor: pointer; }
.hr-range > span { color: var(--muted); padding: 0 2px; }
.hr-add { width: 30px; height: 30px; padding: 0; border: 1px dashed var(--line-strong); background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.hr-add:hover { color: var(--ink); border-color: var(--ink); border-style: solid; }
.hr .closed { display: none; color: var(--muted); font-size: 13px; }
.hr.off .closed { display: inline; }
.hr.off .t, .hr.off .hr-add { display: none; }
.hr.off .hr-day { color: var(--muted); }
@media (max-width: 560px) {
  .hr { padding: 8px 10px; }
  .hr-day { width: 100%; }
  .hr.off .hr-day { width: 74px; }   /* closed: "Closed" sits beside the day */
  .hr-range input[type=time] { padding: 6px 2px 6px 8px; }
}

/* Account Activity timeline (staff, Users > Accounts) */
.timeline .tl-day { padding: 10px 18px 6px; font: 600 11px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-top: 1px solid var(--line); background: var(--soft); }
.timeline .tl-session { padding: 10px 18px 12px; border-top: 1px solid var(--line); }
.timeline .tl-day + .tl-session { border-top: 0; }
.timeline .tl-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.timeline .tl-session.ai .tl-h strong { color: var(--staff); }
.timeline .tl-items { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--line); }
.timeline .tl-items li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; padding: 3px 0 3px 8px; font-size: 13px; }
.timeline .tl-t { color: var(--muted); font: 12px/1.6 var(--mono); }
.timeline .tl-x { overflow-wrap: anywhere; }
.timeline .tl-items li.k-view .tl-x { color: var(--muted); }
.timeline .tl-items li.bad .tl-x, .timeline .bad { color: var(--err); }

.timeline .tl-filter { display: flex; gap: 8px; align-items: center; }
.timeline .tl-filter select { width: auto; padding: 5px 28px 5px 10px; font-size: 13px; }
.timeline .tl-session.mail .tl-h strong { color: var(--muted); }
.timeline .tl-mail summary { cursor: pointer; }
.timeline .tl-mail pre { margin: 6px 0 4px; padding: 10px 12px; background: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.5 var(--mono); max-height: 360px; overflow-y: auto; }
@media (max-width: 760px) { .timeline .card-h { flex-wrap: wrap; } .timeline .tl-filter { width: 100%; } .timeline .tl-filter select { flex: 1; } }

/* SEO tab, Top searches: the page Google showed for each search, under it */
.sr-page { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.sr-group + .sr-group { border-top: 1px solid var(--line); }
.sr-group h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 18px 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
details.sr-group > summary { list-style: none; cursor: pointer; }
details.sr-group > summary::-webkit-details-marker { display: none; }
details.sr-group > summary h3 { padding-bottom: 14px; }
details.sr-group[open] > summary h3 { padding-bottom: 4px; }
.sr-groups td.num { white-space: nowrap; width: 1%; }
/* every group's rows line up: the same column widths in each */
.sr-groups .seo-ideas { table-layout: fixed; width: 100%; }
.sr-groups .seo-ideas td:nth-child(1) { width: 30%; }
.sr-groups .seo-ideas td.num { width: 84px; }
.sr-groups .seo-ideas td.actions { width: 280px; }
@media (max-width: 760px) { .sr-groups .seo-ideas { table-layout: auto; } .sr-groups .seo-ideas td:nth-child(2) { display: none; } }
.sr-page:hover { color: var(--ink); text-decoration: underline; }

/* A button whose form is on its way (data-busy, admin.js): spinner, no second press */
.is-busy { pointer-events: none; opacity: .85; }
.is-busy::before { content: ""; display: inline-block; width: 1em; height: 1em; margin-right: .5em; vertical-align: -0.14em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: msg-spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .is-busy::before { animation: none; } }

/* Email health (site Email tab, app/mailhealth.php) */
.mail-health .card-b + .card-b { border-top: 1px solid var(--line); }
.mh-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.mh-stats { grid-template-columns: repeat(3, auto 1fr); margin: 0 0 10px; }
.mh-stats dd { white-space: nowrap; text-align: left; }
.mh-senders { width: 100%; }
.mh-senders td { padding: 8px 0; border-top: 1px solid var(--line); border-bottom: 0; }
.mh-senders td.num { width: 1%; padding: 8px 14px; }
.mh-senders td.actions { width: 1%; }
.mh-senders form { margin: 0; }
@media (max-width: 640px) { .mh-stats { grid-template-columns: auto 1fr; } }

/* A feature shown but not available on the plan: greyed, not clickable */
.card-off { opacity: .55; pointer-events: none; user-select: none; }
.card-off h2 { color: var(--muted); }

/* Connect cards (People tab, Settings > Your details): app/connect.php */
.profile-photo { display: flex; gap: 14px; align-items: center; }
.profile-photo img, .profile-ini { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.profile-ini, .cc-ini { display: inline-grid; place-items: center; background: var(--ink); color: var(--paper); font-weight: 700; }
.profile-ini { font-size: 26px; }
table.connect-cards td { padding: 10px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
table.connect-cards td.actions { text-align: right; white-space: nowrap; }
table.connect-cards form { display: inline; }
.cc-who { display: flex; gap: 10px; align-items: center; }
/* People on a phone: the person and their role on one line, what can be done below, no column of stacked links */
@media (max-width: 640px) {
  table.connect-cards tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
  table.connect-cards td { display: block; padding: 0; border: 0; }
  table.connect-cards td.actions { grid-column: 1 / -1; width: auto; }
  table.connect-cards td.actions:not(:has(.row-tools > *)) { display: none; }
  table.connect-cards .row-tools { justify-content: flex-start; padding-left: 42px; }
}
/* People tab: a cell's buttons, code and links on one line, centred */
.row-tools { display: flex; align-items: center; justify-content: flex-end; gap: 4px 10px; flex-wrap: wrap; }
.row-tools form { display: flex; margin: 0; }
.cc-who img, .cc-ini { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; font-size: 13px; }
.cc-stats { white-space: nowrap; }
.cc-slug { display: flex; align-items: center; gap: 4px; }
.cc-qs .cc-q { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.cc-qs .cc-q[hidden] { display: none; }
.cc-qs .cc-q > input:first-child { flex: 2 1 220px; }
.cc-qs .cc-q > select { flex: 0 0 auto; width: auto; }
.cc-qs .cc-q > [name^="q_options"] { flex: 1 1 180px; }
.cc-qs .cc-q .check { margin: 0; white-space: nowrap; }
.cc-slug .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.cc-h { margin: 8px 0 10px; font-size: 14px; }
.cc-qr canvas { display: block; width: 240px; height: 240px; margin: 0 auto; image-rendering: pixelated; }
@media (max-width: 700px) { .cc-stats { display: none; } }

/* Staff Overview, Emails sent: the subject opens what was sent (mail_log.body, links' tokens hidden) */
.mail-open { all: unset; cursor: pointer; font-weight: 700; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.mail-open:hover { text-decoration-color: currentColor; }
.mail-open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.6 var(--mono); margin: 0; max-height: 60vh; overflow: auto; padding: 14px 16px; border: 1px solid var(--line); background: var(--paper); }

/* Content > Emails: placeholders, click to insert */
.ph-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ph { font: 12px/1 var(--mono); color: var(--muted); background: none; border: 1px solid var(--line); padding: 5px 7px; cursor: pointer; }
.ph:hover { color: var(--ink); border-color: var(--line-strong); }

/* An on/off switch: a checkbox drawn as a sliding track, labelled On or Off (Content > Emails) */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; position: relative; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 40px; height: 22px; border-radius: 11px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch-track { background: var(--ok, #1f7a4d); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-label { font: 500 12px/1 var(--mono); white-space: nowrap; min-width: 2em; }
.switch-label::after { content: "Off"; }
.switch input:checked ~ .switch-label::after { content: "On"; }

/* People > Edit: the person's Connect card, its switch and QR code */
.cc-edit { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }
.cc-edit-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cc-edit-h h3 { margin: 0; font-size: 14px; }
.cc-qr-row { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.cc-qr-row .cc-qr canvas { width: 112px; height: 112px; margin: 0; }
.cc-qr-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.cc-qr-acts a.mono { font-size: 12px; overflow-wrap: anywhere; }

/* A file picker you can also drop a file on (Settings: photo, studio logo). The real input covers the box, so a click
   browses and a drop lands on it natively; admin.js shows the preview and name. */
.filedrop { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px dashed var(--line-strong); background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.filedrop:hover, .filedrop.over { border-color: var(--accent); }
.filedrop.over { background: var(--accent-soft); }
.filedrop input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.filedrop-img { flex: none; width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; background: var(--soft); font-weight: 700; font-size: 20px; color: var(--muted); }
.filedrop.round .filedrop-img { border-radius: 50%; background: var(--ink); color: var(--paper); }
.filedrop-img img { width: 100%; height: 100%; object-fit: cover; }
.filedrop-img.wide { width: 120px; }
.filedrop-img.wide img { object-fit: contain; }
.filedrop-name { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filedrop-name u { color: var(--accent); text-underline-offset: 2px; }
.filedrop-remove { position: relative; z-index: 1; }
.filedrop.removed .filedrop-img img { opacity: .25; }

/* Go-live basket: a taken domain stays listed, greyed out, and can't be picked */
.basket-opt.taken { opacity: .5; cursor: not-allowed; }
.basket-opt.taken .domain-name { text-decoration: line-through; }

/* Platform (staff, app/views/app/platform): its sections beside the page, a menu on phones */
.pf { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.pf-nav { position: sticky; top: 76px; display: grid; gap: 1px; }
.pf-nav .pf-head { margin: 14px 0 4px; font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.pf-nav .pf-head:first-child { margin-top: 0; }
.pf-nav a { padding: 6px 10px; color: var(--ink); text-decoration: none; border-left: 2px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-nav a:hover { background: var(--soft); }
.pf-nav a.on { border-left-color: var(--accent); font-weight: 600; background: var(--surface); }
.pf-menu { display: none; margin-bottom: 16px; }
.pf-main > .card + .card { margin-top: 16px; }
@media (max-width: 860px) { .pf { grid-template-columns: minmax(0, 1fr); } .pf-nav { display: none; } .pf-menu { display: block; } }

/* Settings: rows of label, input and unit; related values as small tables */
.set-title { margin: 0; padding: 16px 18px 6px; font: 500 11.5px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-top: 1px solid var(--line); }
.card-h + .set-title { border-top: 0; }
.set-list { display: grid; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 72px; gap: 6px 16px; align-items: center; padding: 10px 18px; border-top: 1px solid var(--line); }
.set-title + .set-list > .set-row:first-child, .card-h + .set-list > .set-row:first-child { border-top: 0; }
.set-row > label { font-weight: 500; }
.set-in { display: flex; align-items: center; gap: 8px; min-width: 0; }
.set-in > .set-text, .set-in > select, .set-in > textarea { flex: 1; min-width: 0; }
input.set-num { width: 8.5em; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.set-in > .sub { flex: none; white-space: nowrap; }
.set-reset { text-align: right; }
.set-changed > label::after, td.set-changed::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 8px; vertical-align: middle; background: var(--accent); }
td.set-changed::before { margin: 0 6px 0 0; }
.set-map { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.set-map label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); }
.set-map input.set-num { width: 6.5em; }
.set-table-wrap { padding: 0 8px; }
.set-table { width: auto; min-width: 60%; }
.set-table th { white-space: nowrap; }
.set-table :is(th, td):not(:first-child) { padding-left: 10px; padding-right: 10px; }
.set-table td { white-space: nowrap; padding-top: 7px; padding-bottom: 7px; }
.set-table td:first-child { font-weight: 500; white-space: normal; }
.set-table input.set-num, .set-table select { width: 7.5em; }
.set-table-foot { padding: 4px 18px 10px; text-align: right; }
/* the bar at the foot of the form: wakes (and sticks) when something changes */
.set-save { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.set-save .grow { flex: 1; }
.set-save.dirty { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -6px 18px rgba(21, 22, 26, .08); }
.set-save.dirty [data-dirty-note] { color: var(--ink); font-weight: 600; }
.set-pick { display: none; margin: 6px 18px 4px; }
@media (max-width: 640px) {
  .set-row { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; }
  .set-row > .set-in { grid-column: 1 / -1; grid-row: 2; }
  .set-table-wrap { padding: 0; }
  .set-table { width: 100%; min-width: 0; }
  .set-table input.set-num, .set-table select { width: 7em; }
  /* a small table stacks: each row its own block, each value labelled with its column */
  .set-table:not(.picks) thead { display: none; }
  .set-table:not(.picks) tr { display: grid; grid-template-columns: minmax(0, 1fr); padding: 10px 14px; border-top: 1px solid var(--line); }
  .set-table:not(.picks) td { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .set-table:not(.picks) td:first-child { padding-bottom: 6px; }
  .set-table:not(.picks) td:not(:first-child)::before { content: attr(data-label); color: var(--muted); font-size: 13px; }
  .set-table:not(.picks) td:not(:first-child):empty { display: none; }
  .pe-meta { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pe-meta dd { margin-bottom: 8px; }
  /* a wide grid shows one column at a time on a phone (the buttons above pick it) */
  .set-pick { display: flex; flex-wrap: wrap; }
  .set-table.picks th:not(:first-child), .set-table.picks td:not(:first-child) { display: none; }
  .set-table.picks[data-col="1"] :is(th, td):nth-child(2), .set-table.picks[data-col="2"] :is(th, td):nth-child(3),
  .set-table.picks[data-col="3"] :is(th, td):nth-child(4), .set-table.picks[data-col="4"] :is(th, td):nth-child(5) { display: table-cell; }
  .set-save { flex-wrap: wrap; }
}

/* Emails: the list, and one open with its timing beside it */
.pe-list td:first-child a { display: block; }
.pe-subj { display: block; margin-top: 2px; }
.pe-list td.nowrap { white-space: nowrap; width: 1%; }
.pe-list td.actions > * + * { margin-left: 4px; }
.pe-head { flex-wrap: wrap; }
.pe-meta { padding: 12px 18px 16px; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); }
.pe-meta dd.set-in { flex-wrap: wrap; }
.pe-meta dd { text-align: left; }
.pe-meta dd.set-in { justify-content: flex-start; }
.pe-form > .card { margin-bottom: 16px; }
.pe-body { font: 14px/1.55 var(--font); }
.pe-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 var(--font); margin: 0; }
.pe-subject { font-weight: 700; margin: 0 0 12px; }
.ph.req { border-color: var(--accent); }
/* Platform > Rebuilds */
.rbs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px 18px; border-top: 1px solid var(--line); }
.rbs-row:first-child { border-top: 0; }
.rbs-what { display: grid; gap: 2px; min-width: 0; }
.rbs-in { margin-top: 6px; font-size: 13px; }
.rbs-in summary { cursor: pointer; color: var(--muted); }
.rbs-in p { margin: 8px 0 0; }
.rbs-in .in-photos { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.rbs-what .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbs-state { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.rbs-act { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.rbs-act:not(:has(button)) { display: none; }
@media (max-width: 640px) { .rbs-row { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; } .rbs-state { justify-content: flex-start; } }

/* Social > Connections (site/_social_connections.view.php): WhatsApp's QR code */
.sc-qr { display: flex; align-items: center; gap: 16px; }
.sc-qr[hidden] { display: none; }
.sc-qr img { flex: none; background: #fff; }

/* Inbox (site/leads.view.php, _contact.view.php): people like a phone's messages, one thread per person */
.ct-ic { width: 16px; height: 16px; flex: none; fill: var(--ch, currentColor); vertical-align: -3px; }
.ct-av { position: relative; flex: none; width: 44px; height: 44px; }
.ct-av > img, .ct-av > span { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; object-fit: cover; background: var(--soft); color: var(--ink-2); font: 600 15px/1 var(--font); }
.ct-badge { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; padding: 2px; border-radius: 50%; background: var(--surface); fill: var(--ch); }
.ct-tools { display: flex; flex-direction: column; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.ct-tools input[type=search] { width: 100%; max-width: none; height: 34px; }
/* Messages is for reading: a slim header over the list */
.ct-inbox > .card-h { padding: 8px 12px; }
.ct-inbox > .card-h h2 { font-size: 15px; }
/* the filters: quiet words, the chosen one underlined like a tab */
.ct-chips { display: flex; flex-wrap: nowrap; gap: 0 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.ct-chips::-webkit-scrollbar { display: none; }
.ct-chips a { flex: none; }
.ct-chips a { padding: 6px 0 7px; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; line-height: 1.2; color: var(--muted); text-decoration: none; white-space: nowrap; }
.ct-chips a:hover { color: var(--ink); }
.ct-chips a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.ct-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ct-row:hover { background: var(--paper); }
.ct-row.dragging { opacity: .5; }
.ct-row.drop { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }
.ct-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1.3; }
/* the list's photos smaller than the open contact's */
.ct-row .ct-av, .ct-row .ct-av > img, .ct-row .ct-av > span { width: 38px; height: 38px; font-size: 14px; }
.ct-row .ct-badge { width: 16px; height: 16px; right: -3px; bottom: -3px; padding: 1.5px; }
.ct-main b, .ct-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-main b { font-weight: 500; font-size: 14px; }
.ct-main span { color: var(--muted); font-size: 13px; }
.ct-row.unread .ct-main b { font-weight: 700; }
.ct-row.unread .ct-main span { color: var(--ink); }
.ct-time { flex: none; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ct-row.unread .ct-time { color: var(--accent); font-weight: 600; }
.ct-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ct-head .ct-av, .ct-head .ct-av > img, .ct-head .ct-av > span { width: 40px; height: 40px; font-size: 15px; }
.ct-back { display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink); }
.ct-back .ct-ic { width: 22px; height: 22px; }
.ct-who { flex: 1; min-width: 0; }
.ct-who h1 { margin: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-handles { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.ct-handles span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.ct-convs { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 2px 16px; margin: 4px 0 0; }   /* their conversations, as tabs (_contact.view.php) */
.ct-convs a { display: inline-flex; align-items: center; gap: 5px; max-width: 260px; padding: 2px 0; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-convs a:hover { color: var(--ink); }
.ct-convs a.on { color: var(--ink); border-bottom-color: var(--accent); }
/* Unread, Junk and Edit, behind More */
.ct-more summary { text-decoration: none; padding: 0 8px; }
.ct-more summary .ct-ic { width: 18px; height: 18px; }
.ct-more .ct-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: flex; flex-direction: column; align-items: stretch; min-width: 150px; padding: 4px; background: var(--surface); border: 1.5px solid var(--ink); }
.ct-more .ct-menu form { margin: 0; }
.ct-more .ct-menu button { width: 100%; justify-content: flex-start; text-align: left; }
.ct-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.ct-who h1 .ct-tag { margin-left: 8px; font: 500 11.5px/1 var(--mono); color: var(--muted); text-transform: none; letter-spacing: 0; text-decoration: none; vertical-align: 2px; }
.ct-who h1 a.ct-tag:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ct-pop { position: relative; display: inline-block; }
.ct-pop summary { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; list-style: none; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ct-pop summary::-webkit-details-marker { display: none; }
.ct-pop .ct-visits { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: min(360px, 80vw); max-height: 320px; overflow-y: auto; scrollbar-width: none; margin: 0; background: var(--surface); border: 1.5px solid var(--ink); }
.ct-page > .card ~ .card { margin-top: 0; }
.ct-thread { display: flex; flex-direction: column; gap: 6px; padding: 12px; max-height: 64vh; overflow-y: auto; background: var(--paper); }
.ct-msg { max-width: 78%; align-self: flex-start; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); overflow-wrap: anywhere; font-size: 14.5px; }
.ct-msg.ct-out, .ct-msg.ct-owner { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--accent-soft); border-color: transparent; }
.ct-meta { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.ct-meta .ct-ic { width: 12px; height: 12px; vertical-align: 0; }
.ct-lead { align-self: stretch; margin: 6px 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); font-size: 13.5px; }
.ct-lead-h { display: flex; align-items: center; gap: 8px; }
.ct-lead-h .sub { flex: 1; }
.ct-lead-h form { margin: 0; }
.ct-lead dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0 0; }
.ct-lead dt { color: var(--muted); font: 11.5px var(--mono); }
.ct-lead dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ct-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); flex-wrap: wrap; flex: none; }   /* flex: none: the thread gives way, never the reply box */
.ct-compose textarea { flex: 1; line-height: 1.5; min-height: calc(4.5em + 18px); field-sizing: content; max-height: calc(15em + 18px); resize: none; }   /* 3 lines, growing to 10 */
.ct-compose select { width: auto; }
.ct-on { display: grid; place-items: center; height: var(--control-h); }
.ct-on .ct-ic { width: 22px; height: 22px; }
.ct-send { width: var(--control-h); padding: 0; display: grid; place-items: center; }
.ct-send .ct-ic { fill: currentColor; }
.ct-paused { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px; border-top: 1px solid var(--line); flex: none; }
.ct-paused.is-off { opacity: .5; }
.ct-replying { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; overflow: hidden; }
.ct-replying b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ct-replying[hidden] { display: none; }
.ct-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 10px; margin: 0; align-items: center; }
.ct-facts dt { margin: 0; }
.ct-facts dd { margin: 0; overflow-wrap: anywhere; }
.ct-visits { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; }
.ct-visits li { display: flex; gap: 10px; padding: 8px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ct-visits li .grow { min-width: 0; display: flex; flex-direction: column; }
.ct-visits li a.grow { color: var(--ink); text-decoration: none; }
.ct-visits li .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .ct-page { grid-template-columns: minmax(0, 1fr); }
  .ct-thread { max-height: none; }
  .ct-row { padding: 12px 14px; }
}
/* the Inbox like an email client: the list beside the open contact; on a phone, one or the other */
.ct-row.on, .ct-row.on:hover { background: var(--accent-soft); }
.ct-none { display: grid; place-items: center; min-height: 50vh; border: 1px dashed var(--line); }
.ct-none .ct-ic { width: 40px; height: 40px; opacity: .25; }
.ct-panel { min-width: 0; container-type: inline-size; transition: opacity .15s; }
.ct-panel.loading { opacity: .5; }
@container (max-width: 760px) { .ct-page { grid-template-columns: minmax(0, 1fr); } .ct-split.fit .ct-page { overflow-y: auto; } .ct-split.fit .ct-thread-card { min-height: 70%; } }
@media (min-width: 900px) {
  .ct-split { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
  .ct-split .ct-inbox { position: sticky; top: 12px; max-height: calc(100vh - 24px); display: flex; flex-direction: column; }
  .ct-split .ct-list { flex: 1; overflow-y: auto; }
  .ct-split .ct-back { display: none; }
  /* the page fits the screen (its height set by messages.view.php's script): the list, the thread and the side column
     each scroll inside, the page itself doesn't grow */
  .ct-split.fit { align-items: stretch; }
  .ct-split.fit .ct-inbox { position: static; max-height: none; min-height: 0; }
  .ct-split.fit .ct-panel { display: flex; flex-direction: column; min-height: 0; }
  .ct-split.fit .ct-page { flex: 1; min-height: 0; align-items: stretch; }
  .ct-split.fit .ct-thread-card { display: flex; flex-direction: column; min-height: 0; }
  .ct-split.fit .ct-thread { flex: 1; min-height: 0; max-height: none; }
  .ct-split:not(.fit) .ct-thread { max-height: calc(100vh - 300px); }
}
@media (max-width: 899px) {
  .ct-split.has-contact .ct-inbox { display: none; }
  .ct-split:not(.has-contact) .ct-panel { display: none; }
}
/* the Mailbox's email: subjects, attachments, and a reply the bot drafted, waiting to be checked */
.ct-subj { display: block; margin-bottom: 4px; font-weight: 600; }
.ct-files { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.ct-files span { display: inline-flex; align-items: center; gap: 3px; }
.ct-write { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ct-write textarea { flex: none; width: 100%; }
.ct-draft-pill, .ct-discard { display: none; }
.ct-compose.has-draft .ct-draft-pill { display: inline-flex; align-self: flex-start; }
.ct-compose.has-draft .ct-discard { display: inline-flex; }
.ct-compose.has-draft textarea, .ct-compose.has-draft .rich-body { background: var(--warn-soft); }
/* the small editor (admin.js rich()): a row of tools over a writing area */
.rich { display: flex; flex-direction: column; border: 1px solid var(--line-strong); background: var(--surface); min-width: 0; }
.rich-tools { display: flex; gap: 2px; padding: 3px; border-bottom: 1px solid var(--line); }
.rich-tools .rich-ai { margin-left: auto; width: 34px; padding: 0; display: grid; place-items: center; }
.rich-tools .rich-ai::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--mdi-robot-outline) center / contain no-repeat; mask: var(--mdi-robot-outline) center / contain no-repeat; }
.rich-tools .rich-ai.is-busy::before { background: none; -webkit-mask: none; mask: none; width: 14px; height: 14px; margin: 0; }   /* the spinner in the icon's place */
.rich-body { min-height: 150px; max-height: 45vh; overflow-y: auto; scrollbar-width: none; padding: 10px 12px; outline: 0; overflow-wrap: anywhere; line-height: 1.5; }
.rich-body:empty::before { content: attr(data-placeholder); color: var(--muted); }
.rich-body:focus-visible { box-shadow: inset 0 0 0 1px var(--ink); }
.ct-compose .rich-body { min-height: calc(4.5em + 20px); max-height: calc(15em + 20px); }   /* the reply box: 3 lines, growing to 10, then it scrolls */
.ct-rcpt { flex: 1 1 100%; margin: 0; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-rcpt .sub { margin-right: 2px; }
.ct-rcpt [data-rcpt-cc-row] { margin-left: 12px; }
.ct-compose .ct-rcpt select.ct-from { width: auto; max-width: 40%; margin: 0 14px 0 0; padding: 2px 26px 2px 0; font-size: 13px; min-height: 0; background-position: calc(100% - 13px) 50%, calc(100% - 8px) 50%; }
.ct-rcpt[hidden], .ct-rcpt [hidden] { display: none; }
/* an email reply: the editor across the whole width, the address it goes to above it and Send below */
.ct-compose[data-email="1"] { align-items: center; }
.ct-compose[data-email="1"] .ct-write { order: 1; flex: 1 1 100%; }
.ct-compose[data-email="1"] .ct-discard { order: 2; margin-left: auto; height: var(--control-h); }
.ct-compose[data-email="1"] .ct-send { order: 3; }
.ct-compose[data-email="1"] .ct-on { display: none; }
/* the signature an email reply goes out with, inside the editor's box under the text, as it will look; its X sends this
   reply without it */
.ct-compose[data-email="1"] .ct-write { border: 1px solid var(--line-strong); background: var(--surface); }
.ct-compose[data-email="1"] .ct-write .rich { border: 0; }
.ct-sig { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 0 12px 12px; }
.ct-sig.has-sig { padding: 10px 40px 10px 12px; border: 1px solid var(--line); }
.ct-sig-x { position: absolute; top: 4px; right: 4px; }
.ct-sig[hidden], .ct-compose[data-email="0"] .ct-sig, .ct-compose.sig-off .ct-sig.has-sig { display: none; }
.ct-sig table { opacity: .8; }
.sig-logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sig-logo img { height: 40px; width: auto; max-width: 160px; object-fit: contain; }
.sig-logo .check { margin: 0; }
.ct-compose[data-email="1"] select { border: 0; background-color: transparent; padding-left: 0; font-size: 13px; height: auto; }
.ct-row .pill { flex: none; }
.sc-modes td:not(:first-child), .sc-modes th:not(:first-child) { width: 96px; text-align: center; }
.sc-modes td:first-child { display: flex; align-items: center; gap: 8px; }
/* a thread's day heading, like a phone's */
.ct-day { align-self: center; margin: 10px 0 2px; }
.ct-call { align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; margin: 4px 0; border: 1px solid var(--line); background: var(--surface); font-size: 13px; }
.ct-call .ct-ic { width: 15px; height: 15px; }
.ct-call.missed { color: var(--accent); border-color: var(--accent); }
.ct-day span { padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
/* an email's Original (site/_contact.view.php) */
.ct-orig { all: unset; cursor: pointer; text-decoration: underline; }
.ct-orig:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ct-orig-frame { display: block; width: 100%; height: min(70vh, 720px); border: 1px solid var(--line); background: #fff; }

/* Growth > Channels: linking a text message phone */
.sms-copy { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sms-copy .sub { flex: none; width: 44px; }
.sms-copy .mono { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }

/* Growth > Live Chat: the chat's words in the order a visitor meets them, as a numbered line down the left */
.chat-flow { list-style: none; counter-reset: step; margin: 8px 0 0; padding: 0; }
.chat-flow li { counter-increment: step; position: relative; padding: 0 0 18px 40px; display: flex; flex-direction: column; gap: 6px; }
.chat-flow li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  font: 600 12px var(--mono); background: var(--ink); color: var(--surface); }
.chat-flow li::after { content: ""; position: absolute; left: 11px; top: 28px; bottom: 4px; width: 2px; background: var(--line); }
.chat-flow li:last-child { padding-bottom: 0; }
.chat-flow li:last-child::after { display: none; }
.chat-flow label { font-weight: 600; font-size: 13.5px; margin: 0; }
.chat-flow label .sub { font-weight: 400; }
.chat-flow label ~ label { margin-top: 6px; }
.chat-flow .chat-them { color: var(--muted); font-size: 13.5px; line-height: 24px; }
.chat-flow .chat-them::before { background: var(--soft); color: var(--ink); }
.sms-qr-one { width: 200px; margin: 0 auto 6px; text-align: center; }
.sms-qr-one .sms-qr { margin-bottom: 4px; }
.sms-qr { background: #fff; padding: 4px; aspect-ratio: 1; }
.sms-qr svg { display: block; width: 100%; height: auto; }
/* the phone's SMS set-up page (app/views/app/social/sms_setup.view.php) */
.sms-setup h1 { margin: 0 0 4px; }
.sms-setup ol { margin: 16px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 14px; line-height: 1.5; }
.sms-setup li > .btn { margin: 4px 0; }
.sms-setup li > .sub { display: block; }
.sms-setup .sms-copy { margin-top: 6px; }

/* Teaching the bot (Growth > Channels > Answers, and the conversation's card): a question and its answer */
.bq { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.bq + .bq, details .bq { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.bq label { font-size: 13.5px; margin: 0; }
.bq-row { display: flex; gap: 8px; align-items: flex-start; }
.bq-row textarea { flex: 1; }
.bq-ask { border-color: var(--accent); }
.bq-ask button { align-self: flex-start; }
/* Messages > Compose: the channel, then the contact found as you type */
.ct-via { margin-bottom: 14px; }
.ct-via label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.ct-via label.on { background: var(--ink); color: var(--surface); }
.ct-via label.on .ct-ic { filter: brightness(0) invert(1); }
.ct-via input { position: absolute; opacity: 0; pointer-events: none; }
.ct-via .ct-ic { width: 16px; height: 16px; }
.ct-find { position: relative; }
.ct-found { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--surface); border: 1.5px solid var(--ink); border-top: 0; max-height: 240px; overflow-y: auto; }
.ct-found[hidden] { display: none; }
.ct-hit { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 8px 12px; cursor: pointer; font-size: 14px; }
.ct-hit:hover, .ct-hit:focus { background: var(--soft); }
.ct-hit b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-hit .sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-compose-btn { display: inline-flex; align-items: center; gap: 6px; }
.ct-compose-btn .ct-ic { width: 15px; height: 15px; fill: currentColor; }
/* a question the bot didn't know, flagged in the thread; learnt once the owner's reply answered it */
.ct-flag { max-width: 86%; border-color: var(--accent); }
.ct-flag > span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-flag.learnt { border-color: var(--line); color: var(--muted); }
.ct-flag.learnt .ct-ic { fill: var(--muted); }
/* an email's Original: its addresses, date and subject above it, raw headers on request */
.ct-orig-head { display: grid; grid-template-columns: max-content 1fr; gap: 3px 12px; margin: 0 0 10px; font-size: 13.5px; }
.ct-orig-head dt { color: var(--muted); font: 12px/1.6 var(--mono); }
.ct-orig-head dd { margin: 0; overflow-wrap: anywhere; }
.ct-orig-head [hidden] { display: none; }
.ct-orig-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 14px; margin-bottom: 10px; }
.ct-orig-tools [hidden] { display: none; }
.ct-orig-raw summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.ct-orig-raw pre { max-height: 240px; overflow: auto; margin: 6px 0 0; padding: 10px; background: var(--paper); border: 1px solid var(--line); font: 11.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.ct-orig-raw { flex-basis: 100%; }
.sr-hidden { padding: 8px 18px; border-bottom: 1px solid var(--line); }
/* SEO > Get found by AI and search: a short checklist, each step with why and where */
.gf-list { list-style: none; margin: 0; padding: 0; }
.gf-list li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.gf-list li:last-child { border-bottom: 0; }
.gf-list li.done { opacity: .55; }
.gf-tick { flex: none; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.gf-list li.done .gf-tick { background: var(--ink); color: var(--surface); }
.gf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gf-main .sub { font-size: 13px; }
.gf-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.gf-list .actions { flex: none; }
.ai-pages { border-top: 1px solid var(--line); }
.bot-acts { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.bot-acts .check { margin: 0; }
/* a form sent in the background (admin.js data-inline): its row says what happened */
.seo-waiting[hidden] { display: none; }
.inline-done { font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }
tr.is-done td:not(.actions), li.is-done .gf-main { opacity: .45; }
.o-rule-add { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); }
.o-rule-add select { width: auto; }
.o-rule-add input { flex: 1; min-width: 0; }
@media (max-width: 640px) { .o-rule-add { flex-wrap: wrap; } }
/* Growth > Channels > When: the bot's triggers */
.bt-list td { vertical-align: top; }
.bt-list td:first-child { width: 34%; }
.bt-list td:first-child b { display: block; }
.bt-list .bt-do { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bt-list tr.off { opacity: .5; }
.copy-row { display: flex; gap: 8px; }
.copy-row input { flex: 1; min-width: 0; }
.bt-eg { margin: 6px 0 0; padding: 8px 10px; background: var(--paper); border: 1px solid var(--line); font-size: 11.5px; white-space: pre-wrap; }

/* Touch screens: form fields at least 16px, or iOS zooms into a field when it's tapped and leaves the page zoomed in
   (the same rule as RENDER_TOUCH_CSS on every site) */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea, [contenteditable="true"] { font-size: max(16px, 1em) !important; }
}

/* Draft limit dialog: buy more */
.drafts-buy { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; }
.drafts-buy input[type=number] { width: 76px; flex: none; }
.drafts-buy .btn { flex: none; white-space: nowrap; }

/* Overview: recent sites, one row of quick links */
.recent-sites { container-type: inline-size; margin-bottom: 20px; }
.recent-sites-in { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.recent-sites-in > .recent-site { background: transparent; display: flex; align-items: center; gap: 12px; min-width: 0; margin: 0; padding: 10px 14px; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.recent-site:hover, .recent-site:focus-visible { border-color: var(--accent); }
.recent-site img { flex: none; width: 28px; height: 28px; object-fit: contain; }
.recent-site span { display: grid; min-width: 0; }
.recent-site b, .recent-site small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recent-site b { font-size: 14px; }
.recent-site small { font-size: 12px; color: var(--muted); }
/* one row: as many as fit at 200px or more each, the rest hidden */
@container (max-width: 1259px){ .recent-sites-in { grid-template-columns: repeat(5, minmax(0, 1fr)); } .recent-sites-in > :nth-child(n+6) { display: none; } }
@container (max-width: 1047px){ .recent-sites-in { grid-template-columns: repeat(4, minmax(0, 1fr)); } .recent-sites-in > :nth-child(n+5) { display: none; } }
@container (max-width: 835px){ .recent-sites-in { grid-template-columns: repeat(3, minmax(0, 1fr)); } .recent-sites-in > :nth-child(n+4) { display: none; } }
@container (max-width: 623px){ .recent-sites-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } .recent-sites-in > :nth-child(n+3) { display: none; } }

/* Build tab, Proofrails card: a page's rules as small wrapping tags */
.seo-tasks td.craft-page { white-space: normal; width: auto; overflow-wrap: anywhere; }
.craft-rules { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.craft-page > .craft-rules { display: inline-flex; margin: 0 6px; vertical-align: 1px; }
.craft-rules span { padding: 1px 6px; border: 1px solid var(--line); font: 12px/1.6 var(--mono); color: var(--muted); white-space: nowrap; }
.craft-rules span.more { border-color: transparent; }

/* Data tab: AI tools and their credit */
.ai-meters { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-bottom: 14px; }
.ai-meters > span { white-space: nowrap; }
.ai-buy { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.ai-buy form { display: flex; gap: 8px; align-items: center; margin: 0; }
.ai-buy select { width: auto; }
.ai-ledger { padding: 0 18px 12px; }
.ai-ledger summary { cursor: pointer; padding: 8px 0; }

/* SEO tab, where AI finds the business: a source's buttons in one even row */
.src-actions { display: inline-flex; flex-wrap: nowrap; justify-content: flex-end; align-items: center; gap: 6px; }
.ai-sources td.actions { white-space: nowrap; }
@media (max-width: 760px) { .src-actions { flex-wrap: wrap; } .ai-sources td.actions { white-space: normal; } }
.src-actions > form { display: flex; margin: 0; }
td.actions .src-actions > * { margin: 0; }
/* the bot handed a conversation to the owner: Needs you in the list, and the line in the thread */
.pill.needs { background: var(--accent); border-color: var(--accent); color: #fff; }
.ct-handoff span:first-of-type { white-space: normal; }

/* Assistant (app/views/app/layouts/_ask.view.php): the header icon's panel, a side sheet in the admin's own colours,
   full height and in front of the top bar. Leans to a copilot (soft corners, a composer, suggestion rows) while keeping
   the strip, the condensed heading, magenta and the process inks. */
/* left of the site switcher (before it in the page, same order), taking over its push to the right; the three icons evenly spaced */
.ask-open { order: 2; margin: 0 -14px 0 auto; flex: none; display: flex; align-items: center; justify-content: center; width: 36px; align-self: stretch; padding: 0; background: none; border: 0; color: var(--muted); cursor: pointer; }
.ask-open svg { width: 22px; height: 22px; fill: currentColor; }
.ask-open:hover, .ask-open.on { color: var(--accent); }
.ask-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ask-open + .site-switch { margin: 0 -8px 0 0; }
@media (max-width: 640px) { .ask-open { margin-right: -6px; } .ask-open + .site-switch { margin-right: 0; } }
.ask-panel { position: fixed; z-index: 30; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--line); overscroll-behavior: contain; --ask-r: 12px; }
.ask-panel::before { content: ""; flex: none; height: 5px; opacity: .85; background: var(--strip) fixed; }   /* fixed: in step with the page's strip */
.ask-panel[hidden] { display: none; }
.ask { display: flex; flex-direction: column; min-width: 0; min-height: 0; flex: 1; }
.ask-h { display: flex; align-items: center; gap: 8px; height: 51px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--line); }
.ask-h h2 { flex: 1; min-width: 0; font: 800 18px/1 var(--display); font-stretch: 78%; text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; }
.ask-mark { flex: none; width: 18px; height: 18px; fill: var(--accent); }
.ask-h .btn-ghost { color: var(--muted); border-radius: 8px; }
.ask-h .btn-ghost:hover { color: var(--ink); background: var(--soft); }
.ask-h .btn-ghost[hidden] { display: none; }
.ask-new::before, .ask-x::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: var(--g) center / contain no-repeat; mask: var(--g) center / contain no-repeat; }
.ask-new { --g: var(--mdi-refresh); padding: 0 8px; }
.ask-x { --g: var(--mdi-close); padding: 0 8px; }
/* before anything is said: the sparkle in process inks, the question, then what people usually want */
.ask-ideas { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 36px 18px 12px; overflow-y: auto; scrollbar-width: none; }
.ask-ideas[hidden] { display: none; }
.ask-spark { width: 34px; height: 34px; margin-bottom: 14px; }
.ask-hi { margin: 0 0 18px; font: 800 30px/1 var(--display); font-stretch: 74%; text-transform: uppercase; letter-spacing: -.01em; }
.ask-idea { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; text-align: left; font: 500 14px var(--font); color: var(--ink);
  background: var(--paper); border: 1px solid transparent; border-radius: var(--ask-r); cursor: pointer; transition: border-color .12s, background .12s; }
.ask-idea svg { flex: none; width: 18px; height: 18px; fill: var(--muted); transition: fill .12s; }
.ask-idea:hover { background: var(--surface); border-color: var(--line-strong); }
.ask-idea:hover svg { fill: var(--accent); }
.ask-idea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* the conversation: theirs in a soft bubble on the right, the assistant's as plain text */
.ask-log { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 20px 18px; overflow-y: auto; scrollbar-width: none; overscroll-behavior: contain; }
.ask-log::-webkit-scrollbar, .ask-ideas::-webkit-scrollbar { display: none; }
.ask-log:empty { display: none; }
.ask-msg { max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; font-size: 14px; }
.ask-msg.me { align-self: flex-end; padding: 9px 14px; background: var(--accent-soft); border-radius: var(--ask-r) var(--ask-r) 4px var(--ask-r); }
.ask-msg.bot { align-self: flex-start; max-width: 100%; white-space: normal; }
.ask-msg.bot p { margin: 0; }
.ask-msg.bot p + p, .ask-msg.bot ul + p, .ask-msg.bot p + ul { margin-top: 8px; }
.ask-msg.bot ul { margin: 0; padding-left: 18px; }
.ask-msg.bot ul ul { margin-top: 2px; }
.ask-msg.bot li::marker { color: var(--accent); }
.ask-msg.bot strong { font-weight: 600; }
.ask-msg.err { color: var(--err); }
.ask-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; white-space: normal; }
.ask-links .btn-secondary { border-radius: 8px; }
.ask-typing { display: flex; gap: 5px; padding: 6px 0; }
.ask-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); animation: ask-dot 1.1s ease-in-out infinite; }
.ask-typing i:nth-child(2) { background: var(--magenta); animation-delay: .15s; }
.ask-typing i:nth-child(3) { background: var(--yellow); animation-delay: .3s; }
@keyframes ask-dot { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ask-typing i { animation: none; opacity: .7; } }
/* the composer: a soft box at the foot, the send button magenta once there's something to send */
.ask-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 14px 14px; padding: 6px 6px 6px 14px; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 16px; transition: border-color .12s, box-shadow .12s; }
.ask-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ask-form textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 160px; resize: none; padding: 8px 0; line-height: 1.4; border: 0; background: none; color: var(--ink); font-size: 14px; }
.ask-form textarea:focus { outline: none; }
.ask-form textarea::placeholder { color: var(--muted); }
.ask-send { flex: none; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px;
  background: var(--soft); color: var(--muted); cursor: pointer; transition: background .12s, color .12s; }
.ask-send::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--mdi-arrow-up) center / contain no-repeat; mask: var(--mdi-arrow-up) center / contain no-repeat; }
.ask-form:has(textarea:not(:placeholder-shown)) .ask-send, .ask-send.is-busy { background: var(--accent-fill, var(--accent)); color: var(--accent-ink); }
.ask-send:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ask-send.is-busy::before { width: 14px; height: 14px; margin: 0; background: none; -webkit-mask: none; mask: none; }
@media (max-width: 760px) {
  .ask-panel { width: 100vw; border-left: 0; }
  .ask-msg.me { max-width: 100%; }
}
