/* Platform chrome — the gallery, dashboard, and editor UI. Distinct from a
   claimed site's own theme, which is generated inline per Site (its own
   --site-* namespace in site_style.html — untouched by anything below).

   Dark is the base/fallback theme now (not light) — asked for directly:
   follow the system's own light/dark preference when it has one, and
   default to dark specifically when it doesn't (an old browser with no
   prefers-color-scheme support, or a system truly reporting no
   preference). Light only ever applies two ways: the system explicitly
   prefers it (the @media block below, only when there's no explicit
   dark override — :not([data-theme="dark"])), or a visitor explicitly
   picks it via base.html's #theme-toggle (data-theme="light", which
   always wins outright, same as data-theme="dark" always winning over a
   light system). */
:root {
  --ink: #e7ece8; --ink-muted: #9aa79f; --border: #2c3630; --border-strong: #3c4a41;
  --bg: #12161a; --surface: #191f1a; --surface-alt: #212822;
  --accent: #3fbb84; --accent-strong: #6fd6a6; --warm: #e2895a;
  --success-bg: #16261d; --success-border: #234433;
  --error-bg: #2a1c16; --error-border: #4a2e21;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ink: #16201b; --ink-muted: #6b7570; --border: #dde3de; --border-strong: #c3ccc4;
    --bg: #f6f7f5; --surface: #ffffff; --surface-alt: #eef1ec;
    --accent: #1f8f5f; --accent-strong: #146b45; --warm: #b5581f;
    --success-bg: #eaf5ef; --success-border: #c8e6d5;
    --error-bg: #fbeeea; --error-border: #f0c7b3;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ink: #16201b; --ink-muted: #6b7570; --border: #dde3de; --border-strong: #c3ccc4;
  --bg: #f6f7f5; --surface: #ffffff; --surface-alt: #eef1ec;
  --accent: #1f8f5f; --accent-strong: #146b45; --warm: #b5581f;
  --success-bg: #eaf5ef; --success-border: #c8e6d5;
  --error-bg: #fbeeea; --error-border: #f0c7b3;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #e7ece8; --ink-muted: #9aa79f; --border: #2c3630; --border-strong: #3c4a41;
  --bg: #12161a; --surface: #191f1a; --surface-alt: #212822;
  --accent: #3fbb84; --accent-strong: #6fd6a6; --warm: #e2895a;
  --success-bg: #16261d; --success-border: #234433;
  --error-bg: #2a1c16; --error-border: #4a2e21;
  color-scheme: dark;
}
/* A soft crossfade between same-origin page loads instead of a hard
   white flash — native browser behavior (Chromium 126+ today; anywhere
   else this rule is just ignored and navigation looks exactly as it
   always has, no fallback code needed). Declared once here since every
   builder-chrome page includes this stylesheet via base.html. */
@view-transition {
  navigation: auto;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
a { color: var(--accent-strong); }
.shell { max-width: 1400px; margin: 0 auto; padding: 0 20px; }  /* one width on every platform page, so the top bar, menu and footer never move (the founder's test pass, 2026-10-15; 960px before) */
/* The scrollbar's room is kept on every page, so the centred navbar doesn't
   jump sideways between a page that scrolls and one that doesn't. */
html { scrollbar-gutter: stable; }
nav.top {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
nav.top .shell { display: flex; align-items: center; gap: 20px; padding-block: 14px; flex-wrap: wrap; }
nav.top .shell > * { height: 29px; display: flex; align-items: center; }
nav.top .brand { font-weight: 700; margin-right: auto; display: inline-flex; align-items: center; }
/* The logo (Designs/brand/) in the platform theme's colours: the dark
   version unless the light theme applies — the same rule as the tokens above.
   The image runs below the baseline for the name's descenders (p, g): its
   mark and letters fill the top 20px, centred on the row by the margin. */
.brand-logo { display: block; height: 25px; width: auto; margin-bottom: -5px; }
.brand-logo-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand-logo-light { display: block; }
  :root:not([data-theme="dark"]) .brand-logo-dark { display: none; }
}
:root[data-theme="light"] .brand-logo-light { display: block; }
:root[data-theme="light"] .brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }
/* Phones: the mark alone (the lockup cropped to its symbol), so the nav
   keeps to one row. */
@media (max-width: 480px) {
  nav.top .brand { width: 19px; overflow: hidden; }
}
nav.top a { text-decoration: none; color: var(--ink); font-size: 14px; }
nav.top a.cta { color: var(--accent-strong); font-weight: 600; }
.nav-quicklinks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-quicklink, nav.top a.nav-quicklink {
  padding: 4px 12px; line-height: 19px; border: 1px solid var(--border-strong); border-radius: 999px;
  font: inherit; font-size: 13px; color: var(--ink-muted); text-decoration: none;
  background: none; cursor: pointer;
}
.nav-quicklink:hover { border-color: var(--accent); color: var(--accent-strong); }
.nav-quicklink.is-active { border-color: var(--accent); color: var(--accent-strong); background: var(--surface-alt); }
/* The navbar's menus (base.html): Settings (a gear, for everyone), the
   signed-in person (a round badge with their initial) and the bell, at the
   right end. A <details> each; one open at a time. Every item is at most
   29px tall, so the bar is the same height on every page. */
.nav-menu { position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; gap: 6px; padding: 4px 2px;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary:hover { color: var(--accent-strong); }
.nav-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px; z-index: 110;
  display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.nav-menu-panel a, .nav-menu-panel .link-button, .settings-option {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 14px;
  color: var(--ink); background: none; border: 0; cursor: pointer; text-decoration: none;
}
.nav-menu-panel a:hover, .nav-menu-panel .link-button:hover, .settings-option:hover { background: var(--surface-alt); }
.nav-icon { display: block; }
/* "Staff" / "Agency" beside the account badge; an ordinary account has none.
   Inside the bar's 29px height, so the bar doesn't change. */
nav.top .shell > .nav-account-kind {
  height: 22px; margin-right: -12px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .02em; border: 1px solid currentColor; align-self: center;
}
.nav-account-kind.is-staff { color: #b45309; }
.nav-account-kind.is-agency { color: var(--accent-strong); }
.settings-menu summary { padding: 4px; }
.user-menu summary { padding: 0; }
.nav-avatar {
  display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%;
  background: var(--accent-strong); color: var(--surface); font-size: 14px; font-weight: 700; line-height: 1;
}
.user-menu summary:hover .nav-avatar, .user-menu[open] .nav-avatar { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.user-menu-name { margin: 4px 10px 6px; font-size: 13px; font-weight: 700; color: var(--ink-muted); overflow-wrap: anywhere; }
.settings-panel { min-width: 220px; }
/* The bell (notifications/_bell.html): a red count until opened. */
.bell-menu summary { position: relative; padding: 4px; }
.bell-icon { display: block; }
.bell-count {
  position: absolute; top: -3px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
  border-radius: 999px; background: #d93025; color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.bell-panel { width: min(360px, calc(100vw - 32px)); padding: 6px; max-height: 70vh; overflow-y: auto; }
.bell-head { margin: 4px 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.nav-menu-panel a.bell-item { display: grid; gap: 3px; padding: 10px 12px; border-radius: 8px; white-space: normal; }
.bell-item strong { font-size: 14px; }
.bell-body { font-size: 13px; color: var(--ink-muted); line-height: 1.45; overflow-wrap: anywhere; }
.bell-item small { font-size: 12px; color: var(--ink-muted); }
.bell-item.is-unread { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); }
.bell-item.is-unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #d93025; vertical-align: middle; }
.bell-empty { margin: 8px 12px 12px; font-size: 14px; color: var(--ink-muted); }
.nav-menu-panel a.bell-all { margin-top: 4px; text-align: center; font-weight: 600; color: var(--accent-strong); border-top: 1px solid var(--border); border-radius: 0 0 6px 6px; }
.inbox { max-width: 720px; }
.inbox-item { padding: 16px 18px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.inbox-item.is-unread { border-left: 4px solid #d93025; }
.inbox-item header { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inbox-item small { color: var(--ink-muted); }
.inbox-body { margin-top: 8px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.settings-row { display: flex !important; justify-content: space-between; align-items: center; gap: 12px; }
.settings-row-value { color: var(--ink-muted); font-size: 13px; }
.settings-row-value::after { content: " ›"; }
.settings-menu.is-highlighted summary { color: var(--accent-strong); border-radius: 6px; animation: settings-pulse 1.2s ease-in-out 4; }
@keyframes settings-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .settings-menu.is-highlighted summary { animation: none; } }

/* "We picked your language" (base.html) — a banner under the navbar, then a
   small notice pointing at Settings. */
.language-banner { background: var(--surface-alt); border-bottom: 1px solid var(--border); font-size: 14px; }
.language-banner[hidden] { display: none; }
.language-banner .shell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 10px; }
.language-banner p { margin: 0; }
.language-banner-english { display: block; color: var(--ink-muted); font-size: 12px; }
.language-banner-actions { display: flex; gap: 8px; }
.language-toast {
  position: fixed; top: 64px; right: 16px; z-index: 120; max-width: 320px; padding: 12px 36px 12px 14px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--accent); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-size: 14px;
}
.language-toast[hidden] { display: none; }
.language-toast-close { position: absolute; top: 6px; right: 8px; background: none; border: 0; font-size: 18px; color: var(--ink-muted); cursor: pointer; }
/* The notice staff switch on in the admin (_announcement.html). Its colours
   are fixed rather than the theme's, so the same notice reads the same in
   light and dark. */
.announcement { font-size: 14px; line-height: 1.45; }
.announcement[hidden] { display: none; }
.announcement-tone-brand { background: #2F6A43; color: #ffffff; }
.announcement-tone-highlight { background: #b4501a; color: #ffffff; }
.announcement-tone-quiet { background: var(--surface-alt); color: var(--ink); border: 1px solid var(--border); }
.announcement-message { margin: 0; }
.announcement-link {
  flex: none; color: inherit; font-weight: 600; text-decoration: none; white-space: nowrap;
  border: 1px solid currentColor; border-radius: 999px; padding: 2px 12px;
}
.announcement-link:hover { background: rgba(255, 255, 255, .15); }
.announcement-close {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: inherit; opacity: .85; font-size: 22px; line-height: 1;
  padding: 4px 8px; cursor: pointer;
}
.announcement-close:hover { opacity: 1; }
.announcement-bar.announcement-tone-quiet { border-width: 0 0 1px; }
.announcement-bar .announcement-inner {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px 14px; padding-block: 8px; padding-right: 40px; text-align: center;
}
.announcement-popup {
  position: fixed; right: 16px; bottom: 16px; z-index: 110; max-width: 340px;
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  animation: announcement-in .3s ease-out;
}
.announcement-popup .announcement-inner {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px 40px 14px 16px;
}
.announcement-popup .announcement-close { top: 6px; transform: none; }
@keyframes announcement-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .announcement-popup { animation: none; } }
@media (max-width: 480px) { .announcement-popup { left: 16px; max-width: none; } }
.announcement-popup .announcement-headline { display: block; }
/* The middle-of-the-screen promotion: a native <dialog> over a dimmed page. */
.announcement-modal {
  border: 0; padding: 0; border-radius: 18px; width: min(600px, calc(100vw - 32px)); max-width: none; outline: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4); text-align: center;
}
.announcement-modal[open] { animation: announcement-pop .25s ease-out; }
/* The box takes focus when it opens (so its button shows no ring); the box
   itself needs no ring either — the buttons inside keep theirs. */
.announcement.announcement-modal:focus-visible { outline: none; }
.announcement-modal::backdrop { background: rgba(0, 0, 0, .6); }
.announcement-modal .announcement-inner {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 60px 40px 48px;
}
.announcement-modal .announcement-headline { margin: 0; font-size: clamp(28px, 7vw, 46px); line-height: 1.15; letter-spacing: -.01em; }
.announcement-modal .announcement-message { font-size: 18px; line-height: 1.55; max-width: 40ch; }
.announcement-modal .announcement-link {
  margin-top: 8px; padding: 12px 28px; font-size: 16px; border: 0;
  background: #ffffff; color: #2F6A43;
}
.announcement-modal.announcement-tone-highlight .announcement-link { color: #b4501a; }
.announcement-modal.announcement-tone-quiet { background: var(--surface); }
.announcement-modal.announcement-tone-quiet .announcement-link { background: var(--accent); color: #ffffff; }
.announcement-modal .announcement-link:hover { background: #ffffff; filter: brightness(.95); }
.announcement-modal .announcement-close { top: 10px; right: 10px; transform: none; font-size: 26px; }
@keyframes announcement-pop { from { opacity: 0; transform: scale(.96); } }
@media (prefers-reduced-motion: reduce) { .announcement-modal[open] { animation: none; } }
.link-button {
  background: none; border: none; padding: 0; margin: 0; font: inherit; color: var(--ink);
  font-size: 14px; cursor: pointer;
}
.link-button:hover { color: var(--accent-strong); }

.messages { list-style: none; padding: 0; margin: 16px 0 0; }
.messages li {
  padding: 10px 14px; border-radius: 6px; margin-bottom: 8px; font-size: 14px;
  background: var(--success-bg); border: 1px solid var(--success-border); color: var(--accent-strong);
}
.messages li.error { background: var(--error-bg); border-color: var(--error-border); color: var(--warm); }

main.shell { padding-block: 32px 60px; }
/* The editor drops the site-wide 1400px centered column — its canvas needs
   real width, and pinned to the left (not floating in the middle of a
   wide screen with dead space on both sides) is what was actually asked
   for. */
main.editor-main { max-width: none; margin-left: 0; margin-right: 0; padding-block: 14px 16px; }
main.editor-main .name-row { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 10px; }
main.editor-main .name-row h1 { font-size: 22px; margin: 0; }
main.editor-main .page-tabs { margin-bottom: 10px; }

/* The search-engine switch under the canvas (_page_seo_toggle.html). */
.page-seo-form { margin: 10px 2px 0; }
.switch-row { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 400; color: var(--ink-muted); cursor: pointer; }
.switch-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 36px; height: 20px; flex: none; border-radius: 999px; background: var(--border-strong); transition: background .15s; }
.switch-track::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; }
.switch-input:checked + .switch-track { background: var(--accent); }
.switch-input:checked + .switch-track::after { transform: translateX(16px); }
.switch-input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The gallery drops the site-wide 1400px column too — full width, so the
   grid actually has room to lay out more, larger cards side by side
   instead of narrowing into 2-3 columns with dead space on both sides. */
main.gallery-main { max-width: none; margin-left: 0; margin-right: 0; }
h1 { font-size: 28px; margin: 0 0 6px; }
h2 { font-size: 20px; }
p.lede { color: var(--ink-muted); margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
/* Slightly bigger cards on the gallery specifically (not the dashboard's
   or the mutant admin's own use of .grid/.card, which weren't part of
   this ask) — the real preview inside each one reads better with a bit
   more room. */
.gallery-main .grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.gallery-main .card { padding: 20px; gap: 10px; }
.swatches { display: flex; gap: 6px; }
.swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }
/* A real look at the template, not just its 4 swatch colors — the same
   preview document template_detail's own canvas renders, but at a FIXED
   1200x700 intrinsic size (a representative desktop "first landing"
   view, not reflowed to the card's actual narrow width) and then scaled
   down with a CSS transform to fit whatever width the card rendered at
   (gallery.html's own small script computes the ratio and sets it — the
   aspect-ratio below keeps the wrapper's height in lockstep with that
   scale automatically, no JS needed for the wrapper itself). Squeezed
   rather than clipped or reflowed-to-mobile, asked for directly. Not
   interactive — pointer-events:none — this is a preview, not a second
   way to click into the site from the card. */
.card-preview {
  width: 100%; aspect-ratio: 1200 / 700; overflow: hidden; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-alt); position: relative;
}
.card-preview iframe {
  width: 1200px; height: 700px; border: 0; pointer-events: none;
  position: absolute; top: 0; left: 0; transform-origin: top left;
}
/* Info (vertical + name) on the left, a smaller claim button on the
   right — one row, not stacked. */
/* margin-top:auto pins the footer to the bottom of .card (a flex column)
   — combined with CSS Grid's default align-items:stretch (every card in
   a row is already the same outer height, the tallest one's), the
   footer's own bottom edge lands at the same Y in every card regardless
   of content height above it. But the footer's OWN height still varies
   (a 2-line vertical badge + 2-line name, vs. one line of each) — so the
   button also needs align-items:flex-end, not center, or it would still
   drift by half that height difference: flex-end anchors it to the
   footer's already-consistent bottom edge instead of its own variable
   midpoint. */
.card-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; }
.card-info { min-width: 0; }
.card-info h2 { margin: 0; font-size: 16px; }
.card-footer .btn { flex-shrink: 0; white-space: nowrap; }
.card .vertical { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.card .desc { font-size: 14px; color: var(--ink-muted); margin: 0; }
/* The template gallery's cards (_template_cards.html): the preview edge to
   edge with no padding, the name under it, nothing else. The whole card is
   the link; its button shows over the preview on hover or keyboard focus.
   On a touch screen (no hover) the card itself is the tap target. */
.tcards { align-items: start; }
.tcard { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; border-radius: 12px; }
.tcard-preview {
  position: relative; display: block; width: 100%; aspect-ratio: 1200 / 700; overflow: hidden;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-alt);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.tcard-preview iframe {
  width: 1200px; height: 700px; border: 0; pointer-events: none;
  position: absolute; top: 0; left: 0; transform-origin: top left;
}
.tcard-preview::after {
  content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .28); opacity: 0; transition: opacity .2s;
}
.tcard-cta {
  position: absolute; left: 50%; top: 50%; z-index: 1; transform: translate(-50%, calc(-50% + 6px));
  padding: 10px 18px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .5);
  opacity: 0; transition: opacity .2s, transform .2s;
}
.tcard:hover .tcard-preview, .tcard:focus-visible .tcard-preview {
  border-color: var(--border-strong); box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .45); transform: translateY(-2px);
}
.tcard:hover .tcard-preview::after, .tcard:focus-visible .tcard-preview::after { opacity: 1; }
.tcard:hover .tcard-cta, .tcard:focus-visible .tcard-cta { opacity: 1; transform: translate(-50%, -50%); }
.tcard-name { padding: 0 2px; font-size: 16px; font-weight: 600; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .tcard-preview, .tcard-cta { transition: none; } }

.btn {
  display: inline-block; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--accent-strong); }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}

form.stack { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
form .row { display: flex; flex-direction: column; gap: 4px; }
label { font-size: 13px; font-weight: 600; }
input[type=text], input[type=password], input[type=email], textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font: inherit; width: 100%;
  background: var(--surface); color: inherit;
}
textarea { min-height: 80px; }
/* The generic text-input padding above crushed the native color swatch
   down to an unreadable sliver — this gives it room to actually show
   the color instead of a thin line. */
input[type=color] {
  width: 44px; height: 36px; padding: 2px; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; background: var(--surface);
}
.errorlist { color: var(--warm); font-size: 12px; margin: 0; padding: 0; list-style: none; }

.preview-frame { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 20px 0; }
.preview-frame iframe { display: block; width: 100%; height: 640px; border: 0; }

.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px;
  margin-bottom: 20px; scroll-margin-top: 76px; /* clears the sticky nav when jumped to via #anchor */
}
.panel h2 { margin-top: 0; }
#theme-panel h2, #layout-panel h2, #mutant-colors-panel h2 { position: relative; padding-right: 60px; }

/* Opened by its sidebar button, inside that same right-hand sidebar
   column — real layout space, not a floating overlay, so it can never
   end up covering the canvas or anything else on the page. */
.panel-dropdown {
  display: none;
  width: 100%; max-height: calc(100vh - 260px); overflow-y: auto;
  margin: 0 0 20px;
}
.panel-dropdown.is-open { display: block; }
/* One field per row, label above input — the narrow sidebar column made
   flex-wrap here land fields at inconsistent widths/positions depending
   on how many fit per line. */
.theme-row { display: flex; flex-direction: column; gap: 14px; }
.theme-row .row { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.theme-row .row label { flex: 0 0 100px; }

.candidates { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.candidate { border: 1px solid var(--border); border-radius: 8px; padding: 12px; width: 220px; }
.candidate.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(31,143,95,.2); }
.candidate .swatches { margin-bottom: 8px; }
/* Only the mutant picker's cards are whole-card-clickable (the logo-
   suggestion candidates below it still use their own "Use this" submit
   button as the sole action). */
#mutant-picker .candidate { cursor: pointer; }
/* Every design has 36 looks (builder/looks.py): two or three to a row. */
#mutant-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
#mutant-picker .candidate { width: auto; min-width: 0; padding: 10px; }
#mutant-picker .candidate:hover { border-color: var(--accent); }
/* template_detail's "Looks" panel is sized to the viewport bottom by JS
   (same idea as editor.html's panels) — this is what makes that height
   actually scroll internally instead of pushing the main page taller. */
#mutant-explore-panel { overflow-y: auto; }
.swatch-hex { font-size: 11px; color: var(--ink-muted); margin-bottom: 8px; }

.section-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.section-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-alt); cursor: grab;
}
/* Menu label + "in menu" — its own full-width line under the row's main
   controls, so the panel's narrow width doesn't squeeze either. */
.section-nav-fields { flex-basis: 100%; display: flex; gap: 10px; align-items: center; font-size: 13px; }
.section-nav-fields input[type="text"] { flex: 1; min-width: 0; padding: 5px 8px; font-size: 13px; cursor: text; }
.section-nav-fields .section-nav-order { width: 52px; padding: 5px 6px; font-size: 13px; cursor: text; }
.section-row .handle { color: var(--ink-muted); }
/* The row's name: its section's heading, editable; the section's type under it. */
.section-row-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.section-row-name .section-name {
  width: 100%; padding: 3px 6px; margin-left: -6px; border: 1px solid transparent; border-radius: 5px;
  background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: text;
}
.section-row-name .section-name:hover { border-color: var(--border); }
.section-row-name .section-name:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.section-row .type { font-size: 11.5px; color: var(--ink-muted); }
.section-row.dragging { opacity: .4; }
.reorder-btns { display: flex; gap: 4px; }

.site-links { display: flex; gap: 10px; align-items: center; margin: 10px 0 18px; font-size: 14px; }
.page-tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--border); }
.page-tab {
  padding: 8px 14px; text-decoration: none; color: var(--ink-secondary); font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.page-tab:hover { color: var(--accent-strong); }
.page-tab.is-active { color: var(--accent-strong); font-weight: 600; border-bottom-color: var(--accent); }
/* An app's tab (builder/app_pages.py), after the site's own pages. */
.page-tab-app { font-style: italic; }
.page-tab:not(.page-tab-app) + .page-tab-app,
.page-tab-delete + .page-tab-app { margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--border); }
.editable-app { cursor: default; }

/* The canvas takes the full width; a side panel (Images, Theme, Layout,
   Sharing — opened from the toolbar above the canvas) gets its column only
   while one is open, in normal layout flow, so it never covers the page. */
.editor-workspace { display: flex; gap: 18px; align-items: flex-start; }
.editor-canvas { flex: 1; min-width: 0; }
.editor-sidebar { display: none; flex: 0 0 340px; position: sticky; top: 76px; }
.editor-workspace.has-panel .editor-sidebar { display: block; }
.editor-sidebar .panel-dropdown { margin: 0; }
/* On a phone the canvas and the sidebar stack: there's no room for a
   340px sidebar beside the page. */
@media (max-width: 760px) {
  .editor-workspace { flex-direction: column; align-items: stretch; }
  .editor-sidebar { flex: none; width: 100%; position: static; order: -1; }
}
.editor-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.editor-toolbar .device-switcher { margin: 0; flex: none; }
.editor-hint { flex: 1; min-width: 0; margin: 0; font-size: 13px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-tabs { display: flex; gap: 6px; flex: none; margin-left: auto; }
@media (max-width: 1100px) { .editor-hint { display: none; } }
@media (max-width: 760px) {
  .editor-toolbar { flex-wrap: wrap; }
  .sidebar-tabs { width: 100%; flex-wrap: wrap; }
  .sidebar-tabs .sidebar-btn { flex: 1 1 auto; padding-inline: 10px; white-space: nowrap; }
}
.sidebar-btn {
  padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 8px;
  font: inherit; font-size: 13px; color: var(--ink-muted); background: var(--surface); cursor: pointer;
  text-align: center;
}
.sidebar-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.sidebar-btn.is-active { border-color: var(--accent); color: var(--accent-strong); background: var(--surface-alt); }

.device-switcher { display: flex; gap: 8px; margin-bottom: 12px; }
.device-btn {
  padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 999px;
  font: inherit; font-size: 13px; color: var(--ink-muted); background: none; cursor: pointer;
}
.device-btn:hover { border-color: var(--accent); color: var(--accent-strong); }
.device-btn.is-active { border-color: var(--accent); color: var(--accent-strong); background: var(--surface-alt); }

/* The left canvas scrolls on its own so a long page of sections doesn't
   just make the whole editor page tall — the main scrollbar stays put.
   height is a fallback for no-JS; editor.html's resizeFrame() sets an
   exact inline height (viewport bottom minus this frame's own offset)
   so the frame's bottom edge always lands at the viewport edge, however
   tall the page/tabs/domains panel above it happen to be. */
.live-preview-frame {
  border: 1px solid var(--border); border-radius: 10px; overflow-y: auto;
  height: calc(100vh - 260px); min-height: 320px;
  margin-left: auto; margin-right: auto;
}
.live-preview-frame[data-device="tablet"] { max-width: 600px; }
.live-preview-frame[data-device="mobile"] { max-width: 375px; }
/* Tablet and Mobile show the design's small-screen rules: the frame is the
   container they follow (builder/frame_css.py, the {% frame_style %} tag). */
.live-preview-frame:not([data-device="desktop"]) { container: sib-frame / inline-size; }
/* On a narrow window the canvas is drawn at the device's width, shrunk to
   fit (editor.html), and is itself the container: on a phone, Website
   shows the desktop layout. */
.live-preview.sib-scaled { container: sib-frame / inline-size; }
/* The template page's preview likewise: the frame at the device's width, scaled. */
.live-preview-frame.sib-scaled { overflow: hidden; }
.live-preview-frame.sib-scaled iframe { transform-origin: 0 0; }
/* template_detail's un-claimed preview: a real iframe rather than the
   editor's directly-embedded canvas (no Site/editing exists yet), so it
   needs its own fill rule instead of the editable content's own sizing. */
.live-preview-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.live-preview { position: relative; }
.live-preview [contenteditable] {
  outline: 2px dashed transparent; outline-offset: 2px; border-radius: 3px; cursor: text;
  transition: outline-color .12s ease, background-color .12s ease;
}
.live-preview [contenteditable]:hover { outline-color: rgba(31,143,95,.35); }
.live-preview [contenteditable]:focus { outline: 2px dashed var(--accent); background: rgba(31,143,95,.06); }
.live-preview [contenteditable]:empty::before { content: "Click to add text\2026"; color: var(--ink-muted); font-style: italic; }

.editable-section { position: relative; }
/* Chrome gives every editable text overflow-wrap: break-word; on the canvas
   it follows the page's own rule (site_style.html's safety net), so a long
   word breaks here exactly as it does for visitors. */
.live-preview [contenteditable="true"] { overflow-wrap: inherit; }
/* The editor's guidance on small screens (editor.html): what runs past the
   screen in Tablet/Mobile, and a note when a text is far longer than the
   design's own. */
.editable-section .sib-spill { outline: 2px solid #d97706 !important; outline-offset: 1px; }
.editable-section .sib-spill-badge,
.editable-section .sib-length-note {
  position: absolute; top: 8px; left: 8px; z-index: 25; max-width: calc(100% - 16px); box-sizing: border-box;
  padding: 6px 10px; border-radius: 8px; background: #b45309; color: #fff; text-align: left;
  font: 600 12.5px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: normal; text-transform: none;
}
.editable-section .sib-spill-badge { pointer-events: none; }
.editable-section .sib-length-note { background: #1f2937; }
.editable-section .sib-length-note button {
  margin-left: 6px; padding: 2px 8px; border: 1px solid rgba(255,255,255,.6); border-radius: 6px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.editable-section.is-hidden { opacity: .6; }
/* A section the owner added (builder/placed.py): its block's settings under
   it, and a note when it shows nothing to visitors. Editor-only, so drawn
   in the editor's own look, not the design's. */
.placed-options, .live-preview .sib-placed-empty {
  font: 13px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: normal; text-transform: none;
}
.placed-options {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 18px; margin: 0 16px 16px; padding: 10px 14px;
  border: 1px dashed rgba(31,143,95,.55); border-radius: 10px; background: #f6faf8; color: #16201b; text-align: left;
}
.placed-options-title { font-weight: 600; }
.placed-option { display: flex; align-items: center; gap: 8px; }
.placed-option input[type="number"] { width: 4.5em; padding: 3px 6px; }
.placed-pick { display: block; }
.placed-pick summary { cursor: pointer; }
.placed-pick label { display: block; margin: 2px 0; }
.placed-help { margin: 4px 0 6px; color: #4b5563; }
.live-preview .sib-placed-empty { padding: 12px 14px; border-radius: 8px; background: rgba(0,0,0,.06); }
.add-section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 8px; }
.add-section h3 { margin: 0; font-size: 14px; }
.add-section-row { display: grid; grid-template-columns: 5em 1fr; align-items: center; gap: 8px; font-weight: 400; }
.add-section-row select { min-width: 0; }
.add-section .btn { justify-self: start; }
/* The Pages panel (builder/site_pages.py) and, on a Pages page's canvas, the
   site's footer shown under it. */
.page-settings h3, .add-page h3 { margin: 0; font-size: 14px; }
.page-setting { display: flex; align-items: center; gap: 8px; font-weight: 400; flex-wrap: wrap; }
.page-setting select { min-width: 0; flex: 1; }
.add-page { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.add-page .btn { justify-self: start; }
.borrowed-section { position: relative; opacity: .85; }
.borrowed-note {
  position: absolute; top: 8px; left: 8px; margin: 0; padding: 4px 10px; border-radius: 999px; background: #1f2937; color: #fff;
  font: 600 12px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: normal; text-transform: none;
}
.hidden-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px;
  background: rgba(22, 32, 27, .45);
}
.hidden-overlay span {
  font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .04em;
  text-transform: uppercase; color: #fff; background: rgba(22, 32, 27, .85);
  padding: 6px 14px; border-radius: 999px;
}
.save-indicator {
  position: absolute; top: 6px; right: 10px; z-index: 2; font-family: "IBM Plex Mono", monospace; font-size: 11px;
  padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff;
  opacity: 0; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease; pointer-events: none;
}
.save-indicator.is-visible { opacity: 1; transform: translateY(0); }
.save-indicator.is-error { background: var(--warm); }

/* Adding and removing repeating items on the canvas (team members, menu
   rows, quotes, cards…). Editor chrome, so it keeps the app's own colours
   rather than the site's. */
.s-item-add {
  display: block; margin: 16px auto 0; padding: 9px 18px; border: 1px dashed var(--accent);
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--accent-strong);
  font: 600 13px/1.2 -apple-system, "Segoe UI", sans-serif; letter-spacing: normal; text-transform: none; cursor: pointer;
}
.s-item-add:hover { background: var(--accent); border-style: solid; color: #fff; }
.live-preview [data-item] { position: relative; }
.live-preview [data-item]:hover { outline: 1px dashed rgba(63,187,132,.55); outline-offset: 4px; }
.s-item-remove {
  position: absolute; top: 6px; right: 6px; z-index: 3; width: 26px; height: 26px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid rgba(0,0,0,.15); background: #fff; color: #9b3b12;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; font: 600 16px/1 -apple-system, "Segoe UI", sans-serif;
  opacity: .8; transition: opacity .12s ease, transform .12s ease;
}
.live-preview [data-item]:hover > .s-item-remove, .s-item-remove:focus-visible { opacity: 1; }
.s-item-remove:hover { background: #b5581f; border-color: #b5581f; color: #fff; transform: scale(1.08); }
.s-notices [data-item] { padding-right: 30px; }

/* The canvas's Mobile/Tablet widths narrow its frame, not the window, so a
   style's narrow-screen @media rules don't apply there. Keep a menu row's
   text from being squeezed to nothing by its price and photo box: they
   drop to the next line instead once the row runs out of room. */
.live-preview .s-menu-items > .s-menu-item { flex-wrap: wrap; }
.live-preview .s-menu-item > .s-menu-item-info { min-width: 180px; }

/* Undo after removing an item (editor.html). */
.editor-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; border-radius: 999px;
  background: #14181a; color: #fff; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.editor-toast[hidden] { display: none; }
.editor-toast button {
  border: 0; border-radius: 999px; padding: 6px 14px; background: #3fbb84; color: #0d1a13;
  font: 600 13px/1 -apple-system, "Segoe UI", sans-serif; cursor: pointer;
}

/* The icon picker on an icon-list card: folded away until the icon itself
   is clicked. */
.live-preview button.s-icon-preview {
  display: block; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 8px;
  outline: 2px dashed transparent; outline-offset: 4px;
}
.live-preview button.s-icon-preview:hover { outline-color: rgba(63,187,132,.6); }
.icon-picker {
  display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 0 0 10px; padding: 6px;
  border-radius: 8px; background: var(--surface); border: 1px solid var(--border);
}
.icon-picker[hidden] { display: none; }
.icon-picker-btn {
  width: 28px; height: 28px; padding: 4px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface-alt); color: var(--ink); cursor: pointer;
}
.icon-picker-btn svg { width: 100%; height: 100%; display: block; }
.icon-picker-btn:hover { border-color: var(--accent); color: var(--accent-strong); }

/* The link picker (#link-bubble, editor.html): floats under the link it
   belongs to. */
.link-bubble {
  position: fixed; z-index: 1000; width: 320px; max-width: calc(100vw - 16px); padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); font: 400 13px/1.35 -apple-system, "Segoe UI", sans-serif;
}
.link-bubble[hidden] { display: none; }
/* The text style bar (editor.html): colour and size of the text being edited. */
.text-style-bar {
  position: fixed; z-index: 1001; display: flex; align-items: center; gap: 12px; padding: 6px 10px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  box-shadow: 0 8px 24px rgba(0,0,0,.3); font: 600 13px/1 -apple-system, "Segoe UI", sans-serif;
}
.text-style-bar[hidden] { display: none; }
.text-style-bar label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.text-style-color input { width: 28px; height: 24px; padding: 0; border: 1px solid var(--border-strong); border-radius: 5px; background: none; cursor: pointer; }
.text-style-size input { width: 120px; accent-color: #3fbb84; }
.text-style-size output { width: 42px; font-weight: 400; color: var(--ink-muted); text-align: right; }
.text-style-align { display: inline-flex; gap: 2px; }
.text-style-align button {
  display: grid; place-items: center; width: 28px; height: 26px; padding: 0; border: 1px solid transparent;
  border-radius: 5px; background: none; color: var(--ink); cursor: pointer;
}
.text-style-align button:hover { border-color: var(--border-strong); }
.text-style-align button[aria-pressed="true"] { border-color: #3fbb84; background: color-mix(in srgb, #3fbb84 18%, transparent); }
.text-style-align svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.text-style-width { min-width: 36px; font-weight: 400; color: var(--ink-muted); }
.text-style-bar [hidden] { display: none !important; }
/* Link: the selected words become a link (builder/text_links.py). */
.text-style-link {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 1px solid var(--border-strong);
  border-radius: 5px; background: none; color: var(--ink); font: inherit; cursor: pointer;
}
.text-style-link:hover { border-color: #3fbb84; }
.text-style-link svg, .media-link-row svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.text-style-hint { font-weight: 400; color: #c0392b; }
/* On the canvas: words that are a link, and an image that is one. */
.live-preview [data-text-link] { outline: 1px dashed color-mix(in srgb, #3fbb84 70%, transparent); outline-offset: 1px; cursor: pointer; }
.live-preview [data-image-link]:not([data-link-value=""])::after {
  content: ""; position: absolute; top: 8px; left: 8px; z-index: 2; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(20,24,26,.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 9.5l3-3M7 4.5l1.2-1.2a2.6 2.6 0 0 1 3.7 3.7L10.7 8.2M9 11.5l-1.2 1.2a2.6 2.6 0 0 1-3.7-3.7L5.3 7.8' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 15px no-repeat;
  pointer-events: none;
}
.media-link-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.media-link-row[hidden] { display: none; }
/* A slideshow in an image's place (builder/slides.py): the picker's part, and
   a badge on the canvas's slot with how many images it shows. */
.media-slides { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-alt); }
.media-slides[hidden], .media-slides [hidden] { display: none; }
.media-slides-title { margin: 0 0 2px; font-weight: 600; }
.media-slides-help { margin: 0 0 8px; color: var(--ink-muted); font-size: 13px; }
.media-slides-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.media-slides-list:empty { display: none; }
.media-slide { position: relative; display: flex; align-items: flex-end; gap: 2px; width: 104px; height: 80px; border-radius: 6px; overflow: hidden; background: var(--surface); outline: 2px solid transparent; outline-offset: 1px; }
.media-slide.is-main { outline-color: var(--accent); }
.media-slide.is-ticked { outline-color: #c0392b; }
.media-slide.is-ticked img { opacity: .55; }
.media-slide-tick { position: absolute; top: 4px; left: 4px; z-index: 1; width: 18px; height: 18px; margin: 0; accent-color: #c0392b; cursor: pointer; }
.media-slide-badge { position: absolute; top: 4px; right: 4px; z-index: 1; padding: 2px 6px; border-radius: 4px; background: var(--accent); color: #fff; font: 600 11px/1.3 -apple-system, "Segoe UI", sans-serif; }
.media-slide .media-slide-main { position: absolute; top: 3px; right: 3px; margin: 0; }
.media-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-slide button { position: relative; min-width: 24px; height: 24px; margin: 3px 0 3px 3px; padding: 0 5px; border: 0; border-radius: 5px; background: rgba(0,0,0,.6); color: #fff; font: 600 13px/1 -apple-system, "Segoe UI", sans-serif; cursor: pointer; }
.media-slide button:hover { background: rgba(0,0,0,.85); }
.media-slide .media-slide-remove { margin-left: auto; margin-right: 3px; }
.media-slides-settings { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 10px; }
.media-slides-settings label { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-muted); }
.media-slides-settings .media-slides-check { flex-direction: row; align-items: center; gap: 6px; align-self: flex-end; color: var(--ink); }
.media-slides-note { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--ink-muted); }
.media-slides-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.media-slides-adding { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--accent-strong); }
.media-dialog.is-adding-slide .media-grid, .media-dialog.is-adding-slide .media-upload-btn { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 8px; }
.media-dialog.is-adding-slide .media-remove-btn, .media-dialog.is-adding-slide .media-link-row { display: none; }
.media-remove-btn[hidden] { display: none; }
.live-preview [data-slides-count]::before {
  content: "\29C9  " attr(data-slides-count); position: absolute; z-index: 3; top: 8px; left: 8px; padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.65); color: #fff; font: 600 12px/1.2 -apple-system, "Segoe UI", sans-serif; pointer-events: none;
}
.live-preview .img-slot-hero[data-slides-count]::before { position: static; margin-right: 6px; }
.media-link-row .btn { display: inline-flex; align-items: center; gap: 6px; }
.media-link-now { font-size: 13px; color: var(--ink-muted); }
/* Handles around the text being edited: its width (the side) and the
   space above and below it (top and bottom). And an image's size corner. */
.text-box-handles[hidden], .text-box-handles [hidden], .img-size-handle[hidden] { display: none; }
.tbh, .img-size-handle {
  position: fixed; z-index: 1000; padding: 0; border: 2px solid #fff; background: #3fbb84;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); touch-action: none;
}
.tbh-width { width: 10px; height: 28px; border-radius: 5px; cursor: ew-resize; }
.tbh-above, .tbh-below { width: 28px; height: 10px; border-radius: 5px; cursor: ns-resize; }
.img-size-handle { width: 18px; height: 18px; border-radius: 50%; cursor: nwse-resize; }
body.is-box-dragging, body.is-box-dragging * { cursor: grabbing !important; user-select: none; }
/* The editor's tablet and phone views are narrower than the window, so
   the window-wide rules in site_style.html can't tell: here a text keeps
   its column's width and an image is never above the design's size. */
.live-preview-frame:is([data-device="tablet"], [data-device="mobile"]) .live-preview [style*="--sib-w"] { --sib-w: 100% !important; }
.live-preview-frame:is([data-device="tablet"], [data-device="mobile"]) .live-preview [style*="--sib-img"] { zoom: min(var(--sib-img), 1); }
/* A section's own colours (editor.html's #section-colors-pop). */
.section-colors-pop {
  position: fixed; z-index: 1001; width: 300px; max-width: calc(100vw - 16px); padding: 12px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); font: 400 13px/1.35 -apple-system, "Segoe UI", sans-serif;
  max-height: calc(100vh - 16px); overflow-y: auto;
}
.section-colors-pop[hidden] { display: none; }
.scp-title {
  display: flex; align-items: center; gap: 8px; margin: -12px -12px 10px; padding: 10px 12px 8px;
  font-weight: 600; cursor: move; user-select: none; touch-action: none; border-radius: 10px 10px 0 0;
}
.scp-title:hover { background: color-mix(in srgb, var(--ink) 5%, transparent); }
.scp-grip { color: var(--ink-muted); font-size: 14px; line-height: 1; }
.section-colors-pop.is-dragging { opacity: .92; box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.scp-swatches { display: flex; flex-direction: column; gap: 6px; max-height: min(46vh, 420px); overflow-y: auto; }
.scp-row { display: flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 8px; padding: 4px 4px 4px 6px; }
.scp-row:hover { border-color: #3fbb84; }
.scp-row label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.scp-row label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scp-row.is-own label span::after { content: " •"; color: #3fbb84; }
.scp-row input { flex: none; width: 30px; height: 26px; padding: 0; border: 1px solid var(--border-strong); border-radius: 5px; background: none; cursor: pointer; }
.scp-row button { flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: none; color: var(--ink-muted); cursor: pointer; }
.scp-row button:hover:not(:disabled) { border-color: var(--border-strong); color: var(--ink); }
.scp-row button:disabled { opacity: .35; cursor: default; }
.scp-row svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.scp-clip { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--ink-muted); }
.scp-clip[hidden] { display: none; }
.scp-clip-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border-strong); }
/* Where the colour pointed at in the panel paints. */
.live-preview .sib-color-hint { outline: 2px dashed #e0218a !important; outline-offset: 1px; }
.scp-hint { margin: 10px 0 0; color: var(--ink-muted); font-size: 12px; }
.scp-warn { margin: 8px 0 0; color: #c0392b; font-size: 12px; font-weight: 600; }
.scp-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 12px; }
.scp-actions [hidden] { display: none; }
.scp-actions #section-colors-done { margin-left: auto; }
/* Its two tabs: Colours, Section settings. */
.scp-tabs { display: flex; gap: 4px; margin: 0 0 10px; border-bottom: 1px solid var(--border); }
.scp-tabs[hidden], .scp-pane[hidden], .scp-list-view[hidden], .scp-picker [hidden], .scp-picker[hidden] { display: none; }
.scp-tab { flex: 1; padding: 6px 4px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-muted); font: 600 12.5px/1.2 -apple-system, "Segoe UI", sans-serif; cursor: pointer; }
.scp-tab:hover { color: var(--ink); }
.scp-tab.is-on { color: var(--ink); border-bottom-color: #3fbb84; }
.scp-settings { display: flex; flex-direction: column; gap: 8px; }
.scp-settings-row { display: flex; gap: 6px; }
.scp-settings-row .btn { flex: 1; }
/* A colour picked from an image. */
.scp-picker-head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; }
.scp-picker-thumbs { max-height: 190px; overflow-y: auto; }
.scp-picker-group { margin: 4px 0; font-size: 11.5px; color: var(--ink-muted); }
.scp-picker-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.scp-picker-strip button { width: 44px; height: 36px; padding: 0; border: 2px solid transparent; border-radius: 5px; overflow: hidden; background: var(--surface-alt); cursor: pointer; }
.scp-picker-strip button.is-on { border-color: #3fbb84; }
.scp-picker-strip img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scp-picker-stage { display: flex; justify-content: center; margin: 8px 0 0; padding: 4px; border-radius: 6px; background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.scp-picker-stage canvas { display: block; max-width: 100%; cursor: crosshair; }
#section-colors-picker-screen { margin-top: 8px; }
.link-bubble-row { display: flex; align-items: center; gap: 8px; }
.link-bubble-row[hidden] { display: none; }
.link-bubble-label { font-weight: 600; white-space: nowrap; }
.link-bubble select, .link-bubble-input {
  flex: 1; min-width: 0; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--surface-alt); color: var(--ink); font: inherit;
}
.link-bubble-input { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; }
.link-bubble-input[hidden] { display: none; }
.link-bubble-hint { margin: 6px 0 0; font-size: 12px; color: var(--ink-muted); }
.link-bubble-check { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; cursor: pointer; }
.link-bubble-check[hidden] { display: none; }
/* A button's look in the link picker (builder/buttons.py): each shape's
   chip drawn in that shape. */
.link-btn-look { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.link-btn-look[hidden] { display: none; }
.link-btn-shapes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.link-btn-shapes button {
  padding: 5px 10px; border: 1.5px solid #2f6a43; border-radius: 4px; background: #fff; color: #2f6a43;
  font: 600 12px/1.2 system-ui, -apple-system, "Segoe UI", sans-serif; cursor: pointer;
}
.link-btn-shapes [data-shape=""] { border-style: dashed; }
.link-btn-shapes [data-shape="filled"] { background: #2f6a43; color: #fff; }
.link-btn-shapes [data-shape="pill"] { background: #2f6a43; color: #fff; border-radius: 999px; }
.link-btn-shapes [data-shape="soft"] { background: rgba(47, 106, 67, .14); border-color: transparent; }
.link-btn-shapes button[aria-pressed="true"] { outline: 2px solid #f59e0b; outline-offset: 2px; }
.scp-boxes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.scp-boxes[hidden] { display: none; }
.scp-boxes-title { margin: 0; font-size: 13px; font-weight: 600; }
.scp-box-shapes button { background: #f3f4f1; color: #1f2937; border-color: #c9cec6; }
.scp-box-shapes [data-box=""] { border-style: dashed; background: #fff; }
.scp-box-shapes [data-box="rounded"] { border-radius: 10px; }
.scp-box-shapes [data-box="square"] { border-radius: 0; }
.scp-box-shapes [data-box="shadow"] { border-radius: 10px; border-color: transparent; background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.scp-box-shapes [data-box="outline"] { border-radius: 10px; background: #fff; }
.scp-box-shapes [data-box="plain"] { border-color: transparent; background: none; }
.link-btn-colours { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 10px; font-size: 13px; }
.link-btn-colours label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.link-btn-colours input[type="color"] { width: 28px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: none; }
.link-btn-reset { padding: 3px 8px; border: 0; background: none; color: var(--accent-strong); font-size: 12.5px; text-decoration: underline; cursor: pointer; }
.link-bubble-hint:empty { display: none; }
/* "Show layouts" (editor.html): each part of the page outlined and named,
   the texts marked as link targets outlined (builder/marks.py); editing
   goes on underneath. */
.layouts-toggle.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.live-preview.sib-show-layouts [data-section-id] { outline: 2px dashed rgba(31,143,95,.55); outline-offset: -2px; }
.live-preview.sib-show-layouts [data-mark-name] { outline: 2px solid var(--accent); outline-offset: 2px; }
.sib-layouts-layer { position: absolute; inset: 0; pointer-events: none; z-index: 200; }
.sib-layout-badge {
  position: absolute; pointer-events: auto; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 4px 10px; border: 0; border-radius: 999px; background: #1f8f5f; color: #fff; cursor: pointer;
  font: 600 12px/1.2 -apple-system, "Segoe UI", sans-serif; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.sib-layout-badge:hover, .sib-layout-badge:focus-visible { background: #16704a; outline: 2px solid #fff; outline-offset: 1px; }
.mark-pop-title { margin: 0; font-weight: 600; }
.mark-pop-actions { display: flex; gap: 6px; margin-top: 10px; }
.mark-pop-actions [hidden] { display: none; }
.link-bubble .link-bubble-action { margin-top: 8px; }
.link-bubble .link-bubble-action[hidden] { display: none; }
.live-preview .nav-add-link {
  position: absolute; top: 3px; right: 4px; z-index: 12; padding: 2px 8px; border-radius: 999px;
  border: 1px dashed rgba(63,187,132,.8); background: rgba(20,24,26,.75); color: #bff0d9; cursor: pointer;
  font: 600 10px/1.4 -apple-system, "Segoe UI", sans-serif; font-style: normal; letter-spacing: normal; text-transform: none;
  opacity: .7;
}
.live-preview .nav-add-link:hover { opacity: 1; }
/* "+ Link on this page" sits under "+ Menu link". */
.live-preview .nav-add-link[data-nav-add-page-link] { top: 24px; }
.live-preview .nav-add-link[hidden] + .nav-add-link[data-nav-add-page-link] { top: 3px; }
.sib-nav-custom { display: contents; }

/* Image slots — every place an image goes, clickable where it sits,
   opening the shared picker (#media-dialog). The slot keeps the photo's
   own class (size, shape, border come from the site's style); the image
   fills it the way object-fit: cover would. */
.live-preview [data-image-slot] { cursor: pointer; }
.live-preview .img-slot { position: relative; overflow: hidden; }
.live-preview .img-slot > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.live-preview .img-slot:hover, .live-preview .img-slot:focus-visible { outline: 2px solid #3fbb84; outline-offset: 2px; }
.live-preview .img-slot.is-empty {
  display: flex; align-items: center; justify-content: center;
  outline: 2px dashed rgba(63,187,132,.8); outline-offset: -2px;
}
.img-slot-cue {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; max-width: 92%;
  padding: 5px 10px; border-radius: 999px; background: rgba(20,24,26,.85); color: #fff; text-align: center;
  font: 600 12px/1.25 -apple-system, "Segoe UI", sans-serif; font-style: normal; letter-spacing: normal; text-transform: none;
  pointer-events: none; opacity: 0; transition: opacity .12s ease;
}
[data-image-slot]:hover .img-slot-cue, [data-image-slot]:focus-visible .img-slot-cue, .is-empty > .img-slot-cue { opacity: 1; }
/* A team photo slot that shows the member's initials until a photo is
   uploaded (team.html, photo_fallback): it looks like the public page, and
   the cue appears on hover like a filled slot's. */
.live-preview .img-slot.has-initials { outline: none; }
.live-preview .img-slot.has-initials > .img-slot-cue { opacity: 0; }
.live-preview .img-slot.has-initials:hover > .img-slot-cue { opacity: 1; }
.live-preview .img-slot.has-initials:hover { outline: 2px solid #3fbb84; outline-offset: 2px; }
.live-preview .s-gallery-add { background: color-mix(in srgb, #3fbb84 8%, transparent); }
.live-preview .s-gallery-add .img-slot-cue { font-size: 14px; padding: 8px 16px; }
/* Small slots (a 90px menu thumbnail, a 96px portrait circle) get a
   smaller cue so "+ Upload image" still fits inside them. */
.live-preview .img-slot { container-type: inline-size; }
/* A drawing's slot (sections/_art.html) is as big as the drawing: size
   containment would collapse it to nothing. */
.live-preview .img-slot.s-hero-art, .live-preview .img-slot.s-contact-art,
.live-preview .img-slot.s-menu-callout-art, .live-preview .img-slot.s-icon-preview { container-type: normal; overflow: visible; }
@container (max-width: 120px) {
  .img-slot-cue { font-size: 10px; padding: 4px 7px; }
}
/* The hero's background photo: its slot is a button in the hero's corner. */
.live-preview .s-hero { position: relative; }
.live-preview .s-hero > .img-slot-hero {
  position: absolute; top: 14px; right: 14px; z-index: 4; width: auto; max-width: none; margin: 0;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35); background: rgba(20,24,26,.82); color: #fff; cursor: pointer;
  font: 600 13px/1.2 -apple-system, "Segoe UI", sans-serif; letter-spacing: normal; text-transform: none;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.live-preview .s-hero > .img-slot-hero:hover { background: #1f8f5f; border-color: #1f8f5f; }
/* The nav bar's brand on the canvas: the logo (an image slot) and the
   business name (editable text), each with a drag grip, plus the
   "Logo & name" chip and toolbar (_brand_toolbar.html). */
.live-preview .sib-nav-brand > [data-brand-item] { position: relative; }
.live-preview .sib-nav-brand > .is-off { display: none !important; }
.live-preview .sib-site-nav .sib-nav-brand:not(:has(> :not(.is-off))) { display: none; }
.live-preview .sib-logo-slot {
  display: inline-flex; align-items: center; cursor: pointer; border-radius: 4px;
  outline: 2px dashed transparent; outline-offset: 4px;
}
.live-preview .sib-logo-slot:hover { outline-color: #3fbb84; }
.live-preview .sib-logo-slot .img-slot-cue { font-size: 11px; white-space: nowrap; }
.live-preview .sib-logo-slot.is-empty .img-slot-cue {
  position: static; transform: none; opacity: 1; background: transparent; color: #3fbb84;
  border: 1px dashed #3fbb84; padding: 4px 10px;
}
/* The sidebar style's initials stand in for a missing logo: they show as on
   the page, and the upload cue appears under them on hover. */
.live-preview .sib-logo-slot.is-empty.has-initials .img-slot-cue {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); z-index: 12;
  border: 0; background: rgba(20,24,26,.9); color: #fff; opacity: 0;
}
.live-preview .sib-logo-slot.is-empty.has-initials:hover .img-slot-cue { opacity: 1; }
.live-preview .sib-logo-slot:not(.is-empty)::after {
  content: "Change logo"; position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); z-index: 12;
  padding: 3px 8px; border-radius: 999px; background: rgba(20,24,26,.9); color: #fff; white-space: nowrap;
  font: 600 11px/1.2 -apple-system, "Segoe UI", sans-serif; font-style: normal; letter-spacing: normal; text-transform: none;
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
.live-preview .sib-logo-slot:not(.is-empty):hover::after { opacity: 1; }
.brand-grip {
  position: absolute; left: -18px; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 16px; height: 24px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; background: rgba(20,24,26,.85); color: #fff; font: 12px/1 -apple-system, "Segoe UI", sans-serif;
  font-style: normal; letter-spacing: normal; cursor: grab; opacity: 0; transition: opacity .12s ease; touch-action: none;
}
.live-preview [data-brand-item]:hover > .brand-grip, .live-preview .sib-site-nav.brand-open [data-brand-item] > .brand-grip { opacity: 1; }
.live-preview [data-brand-item].is-dragging { z-index: 20; cursor: grabbing; opacity: .9; }
.live-preview [data-brand-item].is-dragging > .brand-grip { cursor: grabbing; opacity: 1; }
.brand-drop-guides {
  position: absolute; inset: 0; z-index: 15; display: grid; grid-template-columns: repeat(3, 1fr); pointer-events: none;
}
.brand-drop-guides span {
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px;
  border: 1px dashed rgba(63,187,132,.45); background: rgba(63,187,132,.06); color: #3fbb84;
  font: 600 10px/1 -apple-system, "Segoe UI", sans-serif; font-style: normal; letter-spacing: .04em; text-transform: uppercase;
}
.brand-drop-guides span.is-target { background: rgba(63,187,132,.22); border-style: solid; }
.live-preview .brand-chip {
  position: absolute; top: 3px; left: 4px; z-index: 12; padding: 2px 8px; border-radius: 999px;
  border: 1px dashed rgba(63,187,132,.8); background: rgba(20,24,26,.75); color: #bff0d9; cursor: pointer;
  font: 600 10px/1.4 -apple-system, "Segoe UI", sans-serif; font-style: normal; letter-spacing: normal; text-transform: none;
  opacity: .7;
}
.live-preview .brand-chip:hover, .live-preview .sib-site-nav.brand-open .brand-chip { opacity: 1; }
.live-preview .sib-site-nav [contenteditable]:empty::before { content: "Add text\2026"; }
/* A button the owner removed from the site (the link picker's "Remove this button"): still here to put back. */
.live-preview [data-removed] { opacity: .35 !important; outline: 2px dashed currentColor; outline-offset: 2px; }
.brand-toolbar {
  position: absolute; top: calc(100% + 6px); left: 16px; z-index: 30; width: 330px; max-width: calc(100% - 32px);
  padding: 10px 12px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink);
  box-shadow: 0 10px 30px rgba(0,0,0,.35); text-align: left;
  font: 400 13px/1.3 -apple-system, "Segoe UI", sans-serif; font-style: normal; letter-spacing: normal; text-transform: none;
}
.brand-toolbar[hidden] { display: none; }
.brand-toolbar-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.brand-toolbar-row[hidden] { display: none; }
.brand-toolbar-label { width: 64px; flex-shrink: 0; color: var(--ink-muted); font-size: 12px; }
.brand-toggle { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; cursor: pointer; }
.brand-toolbar-close {
  margin-left: auto; width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--ink-muted); font-size: 16px; line-height: 1; cursor: pointer;
}
.brand-toolbar input[type="range"] { flex: 1; min-width: 0; accent-color: #3fbb84; }
.brand-size-value { width: 40px; font-size: 12px; color: var(--ink-muted); text-align: right; }
.brand-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.brand-seg button {
  padding: 4px 11px; border: 0; background: transparent; color: var(--ink); font: 500 12px/1.2 -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
}
.brand-seg button + button { border-left: 1px solid var(--border); }
.brand-seg button.is-selected { background: #1f8f5f; color: #fff; }
.brand-mini {
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--ink);
  font: 500 12px/1.2 -apple-system, "Segoe UI", sans-serif; cursor: pointer;
}
.brand-mini:hover, .brand-seg button:not(.is-selected):hover { border-color: #3fbb84; color: #3fbb84; }
.brand-toolbar-hint { margin: 6px 0 0; font-size: 11px; color: var(--ink-muted); }

/* The shared image picker. */
.media-dialog {
  width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.media-dialog::backdrop { background: rgba(10,14,12,.6); }
.media-dialog-body { padding: 20px 22px 18px; }
.media-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.media-dialog-head h2 { margin: 0; font-size: 18px; }
.media-dialog-close {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border); background: transparent;
  color: var(--ink-muted); font-size: 20px; line-height: 1; cursor: pointer;
}
.media-dialog-close:hover { color: var(--ink); border-color: var(--border-strong); }
.media-dialog-hint { margin: 6px 0 16px; color: var(--ink-muted); font-size: 13px; }
.media-upload-btn { display: inline-flex; cursor: pointer; }
.media-dialog-sub { margin: 20px 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-muted); }
.media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px;
  max-height: 300px; overflow-y: auto; padding: 2px;
}
.media-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.media-thumb {
  aspect-ratio: 1 / 1; width: 100%; padding: 0; border-radius: 8px; border: 2px solid var(--border);
  background: var(--surface-alt); cursor: pointer; overflow: hidden;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb:hover, .media-thumb:focus-visible { border-color: var(--accent); }
.asset-name {
  font-size: 11px; color: var(--ink-muted); text-align: center; overflow-wrap: anywhere;
  outline: 1px dashed transparent; border-radius: 3px; cursor: text; padding: 1px 2px;
}
.asset-name:hover { outline-color: rgba(31,143,95,.35); }
.asset-name:focus { outline: 1px dashed var(--accent); background: rgba(31,143,95,.06); }
.media-dialog-foot { display: flex; align-items: center; gap: 12px; margin-top: 16px; min-height: 20px; }
.media-status { margin: 0; font-size: 13px; color: var(--ink-muted); }
.media-status.is-error { color: var(--warm); }
.media-dialog.is-busy .media-grid, .media-dialog.is-busy .media-upload-btn, .media-dialog.is-busy .media-remove-btn { opacity: .5; pointer-events: none; }

.name-row { position: relative; display: inline-block; max-width: 100%; }
.editable-name, .editable-vertical {
  outline: 2px dashed transparent; outline-offset: 4px; border-radius: 3px; cursor: text;
  transition: outline-color .12s ease, background-color .12s ease;
}
.editable-name:hover, .editable-vertical:hover { outline-color: rgba(31,143,95,.35); }
.editable-name:focus, .editable-vertical:focus { outline: 2px dashed var(--accent); background: rgba(31,143,95,.06); }
.name-row .save-indicator { top: -6px; right: -8px; transform: translate(100%, -50%); }
.name-row .save-indicator.is-visible { transform: translate(100%, -50%); }

.claim-highlight {
  animation: claim-pulse 1.4s ease 2;
  border: 1px solid var(--accent);
}
@media (prefers-reduced-motion: reduce) { .claim-highlight { animation: none; } }
@keyframes claim-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31,143,95,0); }
  40% { box-shadow: 0 0 0 4px rgba(31,143,95,.25); }
}

/* Dashboard: left menu bar (My sites) + a table-per-tab canvas.
   `.dashboard-nav-link` doubles as both <a> (real tabs) and <span>
   (coming-soon placeholders) — `.is-disabled` just mutes it, no click
   handling either way for the placeholders since there's nowhere to send
   them yet. */
.dashboard { display: flex; gap: 28px; align-items: flex-start; margin-top: 12px; }
.dashboard-nav {
  flex: 0 0 180px; display: flex; flex-direction: column; gap: 2px;
  border-right: 1px solid var(--border); padding-right: 16px;
  /* Stays in view under the platform's sticky bar (58px) while a long tab scrolls. */
  position: sticky; top: 74px;
}
.dashboard-nav-link {
  padding: 9px 10px; border-radius: 6px; text-decoration: none; color: var(--ink);
  font-size: 14px; display: flex; justify-content: space-between; gap: 8px;
}
.dashboard-nav-link:hover { background: var(--surface-alt); }
.dashboard-nav-link.is-active { background: var(--success-bg); color: var(--accent-strong); font-weight: 600; }
.dashboard-nav-link.is-disabled { color: var(--ink-muted); cursor: default; }
.dashboard-nav-link.is-disabled:hover { background: none; }
.dashboard-nav-link em { font-style: normal; font-size: 11px; color: var(--ink-muted); }

.dashboard-panel { flex: 1; min-width: 0; }
.dashboard-nav-count { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #d98e04; color: #fff; font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
/* On a phone the tabs become a row above the panel. */
@media (max-width: 760px) {
  .dashboard { flex-direction: column; gap: 16px; }
  .dashboard-nav {
    flex: none; flex-direction: row; flex-wrap: wrap; border-right: 0; padding: 6px 0;
    top: 58px; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border);
  }
}
.muted { color: var(--ink-muted); }

.dashboard-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.dashboard-subhead { margin: 34px 0 0; font-size: 18px; }
.dashboard-table th, .dashboard-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dashboard-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); font-weight: 600; }
.dashboard-table .app-group-head th { padding-top: 22px; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 700; border-bottom: 2px solid var(--border-strong); }
.dashboard-table .app-group-head th .muted { font-weight: 400; font-size: 13px; }
.app-site-picker { display: flex; justify-content: flex-end; margin: 4px 0 -8px; }
.app-site-picker label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.app-site-picker select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; }
.dashboard-table tbody tr:hover { background: var(--surface-alt); }
.dashboard-table .site-row-actions { white-space: nowrap; text-align: right; }
/* On a phone each row is a card: no header, one cell under the other. */
@media (max-width: 760px) {
  .dashboard-table thead { display: none; }
  .dashboard-table, .dashboard-table tbody, .dashboard-table tr, .dashboard-table td { display: block; width: 100%; }
  .dashboard-table tr { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .dashboard-table td { padding: 3px 0; border: 0; }
  .dashboard-table .site-row-actions { white-space: normal; text-align: left; padding-top: 8px; }
  .switch-design-pop { left: 0; right: auto; }
}
/* A draft's "Use on a live site" (dashboard.html, site_switch_design). */
.switch-design { position: relative; display: inline-block; text-align: left; white-space: normal; }
.switch-design > summary { list-style: none; }
.switch-design > summary::-webkit-details-marker { display: none; }
.switch-design-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 280px; padding: 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .4);
}
.switch-design-pop p { margin: 0 0 8px; font-size: 13px; color: var(--ink-muted); }
.switch-design-pop form { margin: 0 0 4px; }
.switch-design-pop button {
  display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.switch-design-pop button:hover { border-color: var(--accent); background: var(--surface-alt); }
.switch-design-pop button small { font-size: 12px; font-weight: 400; color: var(--ink-muted); }
.switch-design-pop .switch-design-note { margin: 8px 0 0; font-size: 12px; line-height: 1.45; }
.switch-design-pop .switch-design-carry { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; font-size: 12.5px; line-height: 1.4; font-weight: 400; cursor: pointer; }
/* A live site's Manage menu (dashboard.html): the same popover, with links and a delete step. */
.manage-pop { width: 300px; }
.manage-pop .manage-heading { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--ink); }
.manage-pop hr { margin: 10px 0; border: 0; border-top: 1px solid var(--border); }
.manage-pop .manage-link { display: block; margin: 0 0 4px; padding: 9px 11px; border-radius: 9px; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.manage-pop .manage-link:hover { background: var(--surface-alt); }
.manage-pop .manage-offline { margin: 4px 0; }
.manage-pop .manage-offline > summary { cursor: pointer; padding: 9px 11px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--ink); }
.manage-pop .manage-offline > summary:hover { background: var(--surface-alt); }
.manage-pop .manage-offline label { display: block; margin: 6px 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-muted); }
.manage-pop .manage-offline textarea { width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13.5px; resize: vertical; }
.manage-pop button.manage-small { align-items: center; }
.manage-pop .manage-delete { margin-top: 8px; }
.manage-pop .manage-delete > summary { cursor: pointer; padding: 6px 11px; font-size: 13px; color: #b42318; }
.manage-pop .manage-delete p { margin: 6px 0 8px; font-size: 12.5px; line-height: 1.45; }
.manage-pop .manage-delete input { width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.manage-pop button.manage-danger { align-items: center; border-color: #b42318; color: #b42318; }
.manage-pop button.manage-danger:hover { background: #b42318; color: #fff; }
/* On a phone the popovers (Manage, "Use on a live site") span the row's card, never past the screen. */
@media (max-width: 760px) {
  .dashboard-table tr { position: relative; }
  .switch-design { position: static; }
  .switch-design-pop, .manage-pop { left: 0; right: 0; width: auto; }
}
.dashboard-table .vertical { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); margin-top: 2px; }

.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
/* The apps connected to a site, on the Live sites tab. */
.site-apps { font-size: 13px; }
.app-chip {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 4px 0; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--ink); text-decoration: none; white-space: nowrap;
}
.app-chip .status-dot { width: 7px; height: 7px; box-shadow: none; }
.app-chip.is-ended { color: var(--ink-muted); border-style: dashed; }
.app-chip:hover { border-color: var(--accent); }
.app-connect select { font-size: 12px; padding: 3px 6px; max-width: 180px; }
.status-dot.is-gray { background: var(--ink-muted); }
.status-dot.is-green { background: var(--accent); box-shadow: 0 0 0 3px rgba(63,187,132,.28), 0 0 10px 1px rgba(63,187,132,.55); }
.status-dot.is-amber { background: var(--warm); }
/* The Apps tab's billing state (billing on): links to the Billing tab. */
.app-billing { color: inherit; text-decoration: none; }
.app-billing:hover { text-decoration: underline; }
.app-billing-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }


/* The platform's own footer (base.html) — the policy links every platform
   page carries. The editor hides it. On a short page it sits at the bottom
   of the window, not right under the content: only pages that have the
   footer become a full-height column, so the editor's layout is untouched
   (and a browser without :has() just keeps the footer under the content). */
body:has(> .platform-footer) { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body:has(> .platform-footer) > main { flex: 1 0 auto; width: 100%; }
.platform-footer { border-top: 1px solid var(--border); color: var(--ink-muted); font-size: 13px; }
.platform-footer .shell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 20px; }
.platform-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.platform-footer a { color: var(--ink-muted); text-decoration: none; }
.platform-footer a:hover { color: var(--ink); text-decoration: underline; }

/* Policy pages: long-form reading text with the other policies alongside. */
.policy-layout { display: grid; grid-template-columns: minmax(0, 760px) 200px; gap: 56px; align-items: start; }
.policy-nav { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.policy-nav a { color: var(--ink-muted); text-decoration: none; }
.policy-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.policy-updated { color: var(--ink-muted); font-size: 14px; margin: 0 0 28px; }
.prose { max-width: 68ch; line-height: 1.65; }
.prose h2 { font-size: 19px; margin: 32px 0 8px; }
.prose h3 { font-size: 16px; margin: 22px 0 6px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent-strong); }
.prose .summary { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.prose .contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.prose .contact-card p { margin: 4px 0; }
@media (max-width: 760px) {
  .policy-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .policy-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px 14px; order: -1; }
}
/* Help pages (builder/help/): the policy layout, with screenshots and steps. */
.help-shot { margin: 18px 0 24px; }
.help-shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.help-shot figcaption { color: var(--ink-muted); font-size: 13px; margin-top: 6px; }
.prose .help-steps { counter-reset: step; list-style: none; padding-left: 0; }
.prose .help-steps > li { counter-increment: step; position: relative; padding-left: 34px; }
.prose .help-steps > li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-alt); border: 1px solid var(--border); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.prose .help-tip { border-left: 3px solid var(--accent-strong); padding: 4px 0 4px 14px; color: var(--ink-muted); }
.dg-records { display: grid; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 6px 0 22px; font-size: 14px; }
.dg-rec { display: grid; grid-template-columns: minmax(0, 1.3fr) 80px minmax(0, 2fr); gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.dg-rec.is-head { border-top: 0; background: var(--surface-alt); font-weight: 600; font-size: 13px; }
@media (max-width: 560px) { .dg-rec { grid-template-columns: 1fr; gap: 2px; } .dg-rec.is-head { display: none; } }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.help-card { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); text-decoration: none; }
.help-card:hover { border-color: var(--accent-strong); }
.help-card strong { display: block; margin-bottom: 4px; }
.help-card span { color: var(--ink-muted); font-size: 14px; }
form .row-check label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
form .row-check input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; }

/* Account settings (account_settings.html, account_delete.html). */
.account-section { padding-block: 24px; border-top: 1px solid var(--border); max-width: 560px; }
.account-section:first-of-type { border-top: 0; padding-top: 8px; }
.account-section h2 { font-size: 18px; margin: 0 0 6px; }
/* An agency request that's been sent (account_settings.html). */
.agency-sent { margin: 10px 0 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.agency-sent p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.agency-more > summary { cursor: pointer; margin: 0 0 10px; font-size: 14px; color: var(--accent); }
.not-found { padding-block: 48px; max-width: 560px; }
/* Your AI (mcp_server): connecting the owner's own AI, and what waits for their OK. */
.ai-connect, .ai-connection { max-width: 620px; }
.ai-connect fieldset, .ai-connection fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 0; }
.ai-connect legend, .ai-connection legend { font-weight: 600; padding: 0 4px; }
.ai-connect label, .ai-connection label { display: block; margin: 6px 0; line-height: 1.45; }
.ai-connect label .muted, .ai-connection label .muted { display: block; margin-left: 24px; }
.ai-connection { padding: 4px 0 18px; border-bottom: 1px solid var(--border); }
.ai-connection h3 { margin: 8px 0 0; font-size: 16px; }
.ai-names-ack { margin: 6px 0 0 24px; }
.ai-names-ack ul { margin: 4px 0 8px; padding-left: 18px; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ai-waiting { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ai-waiting:target { border-color: var(--accent); }
.ai-waiting p { margin: 0 0 8px; }
.ai-summary { line-height: 1.55; }
.ai-decided > summary { cursor: pointer; margin: 10px 0; color: var(--accent); }
.ai-server-url { display: inline-block; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border);
  overflow-wrap: anywhere; user-select: all; }
.form-error { color: var(--warm); }
.muted { color: var(--ink-muted); font-size: 14px; }
.helptext { color: var(--ink-muted); font-size: 12px; line-height: 1.5; }
.helptext ul { margin: 4px 0 0; padding-left: 18px; }
.btn.danger { background: #b4361f; border-color: #b4361f; color: #fff; }
.btn.danger:hover { background: #962b18; border-color: #962b18; }
.delete-summary { line-height: 1.7; }
.form-actions { display: flex; gap: 10px; align-items: center; }

/* The claim page's address search (claim.html). */
.address-search { display: flex; gap: 8px; align-items: stretch; margin-top: 6px; max-width: 560px; flex-wrap: wrap; }
.address-field { flex: 1 1 280px; display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); overflow: hidden; }
.address-field:focus-within { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
.address-field input[type=text] { border: 0; border-radius: 0; flex: 1 1 auto; min-width: 0; font-size: 16px; padding: 10px 4px 10px 12px; background: transparent; }
.address-field input[type=text]:focus-visible { outline: none; }
.address-suffix { padding: 0 12px 0 0; color: var(--ink-muted); font-size: 16px; white-space: nowrap; }
.address-status { min-height: 1.5em; margin: 10px 0 6px; font-size: 14px; color: var(--ink-muted); }
.address-status.is-free { color: var(--accent-strong); font-weight: 600; }
.address-status.is-taken { color: var(--warm); }
.address-suggestions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.suggestion-chip { font: inherit; font-size: 13px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface-alt); color: var(--ink); cursor: pointer; }
.suggestion-chip:hover { border-color: var(--accent); }
.btn.go-live { margin-top: 8px; font-size: 15px; padding: 11px 18px; }
@media (max-width: 480px) {
  .address-suffix { font-size: 14px; }
  .address-field input[type=text] { font-size: 15px; }
}

/* The editor's Sharing panel (editor.html): a mock of the link preview card
   WhatsApp/Facebook/X show, followed live by the fields under it. */
.share-card { border: 1px solid var(--border-strong); border-radius: 10px; overflow: hidden; background: var(--surface); margin: 6px 0 8px; }
.share-card-image {
  position: relative; display: block; width: 100%; aspect-ratio: 1200 / 630; padding: 0; border: 0;
  background: var(--surface-alt); cursor: pointer; overflow: hidden;
}
.share-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.share-card-image-cue {
  position: absolute; inset: auto 8px 8px auto; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(0, 0, 0, .65); color: #fff; opacity: 0; transition: opacity .15s;
}
.share-card-image:hover .share-card-image-cue, .share-card-image:focus-visible .share-card-image-cue { opacity: 1; }
.share-card-image-cue.is-empty { inset: 50% auto auto 50%; transform: translate(-50%, -50%); opacity: 1; background: none; color: var(--accent-strong); font-size: 14px; }
.share-card.is-small { display: flex; align-items: stretch; }
.share-card.is-small .share-card-image { width: 96px; flex: 0 0 96px; aspect-ratio: 1; }
.share-card.is-small .share-card-image img { object-fit: contain; padding: 8px; }
.share-card-text { padding: 10px 12px; min-width: 0; }
.share-card-domain { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-muted); }
.share-card-title { font-weight: 700; font-size: 14px; margin: 2px 0; overflow-wrap: anywhere; }
.share-card-description { font-size: 13px; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.share-hint { font-size: 12px; color: var(--ink-muted); margin: 0 0 10px; }
.share-form textarea { resize: vertical; }

/* Side panels (base.html's language list): a <dialog> sliding in from the
   right, the page dimmed behind it. */
dialog.side-drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: none; width: min(380px, 100vw);
  padding: 0; border: 0; border-left: 1px solid var(--border); background: var(--surface); color: var(--ink);
  box-shadow: -12px 0 32px rgba(0, 0, 0, .25); overflow-y: auto;
}
dialog.side-drawer[open] { animation: drawer-in .2s ease-out; }
dialog.side-drawer::backdrop { background: rgba(0, 0, 0, .35); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.side-drawer[open] { animation: none; } }
.side-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; position: sticky; top: 0; background: var(--surface); }
.side-drawer-head h2 { margin: 0; font-size: 20px; }
.side-drawer-close { background: none; border: 0; font-size: 26px; line-height: 1; color: var(--ink-muted); cursor: pointer; padding: 4px 8px; }
.side-drawer-close:hover { color: var(--ink); }
.side-drawer-lede { margin: 0; padding: 0 20px 12px; color: var(--ink-muted); font-size: 13px; }
.language-list { list-style: none; margin: 0; padding: 0 12px 20px; }
.language-option {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; padding: 12px 10px;
  border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: left;
}
.language-option:hover { background: var(--surface-alt); }
.language-native { font-size: 17px; }
.language-english { font-size: 13px; color: var(--ink-muted); }
.language-option.is-current { background: var(--surface-alt); box-shadow: inset 3px 0 0 var(--accent); }
.language-option.is-current .language-native { font-weight: 700; color: var(--accent-strong); }

/* The site-language choice on a template's page (template_detail.html). */
.site-language-choice { display: grid; gap: 6px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.site-language-choice select {
  font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); color: var(--ink);
}
.site-language-choice small { font-weight: 400; color: var(--ink-muted); font-size: 12.5px; }

/* Account settings: the email's confirmation state, with its resend button. */
.email-status { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; font-size: 14px; color: var(--ink-muted); }

/* A site staff have taken down (builder/moderation.py): the dashboard's
   status tag and the editor's notice. */
.takedown-tag { font-size: 12px; font-weight: 600; color: var(--warm); text-decoration: none; border: 1px solid var(--error-border); background: var(--error-bg); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.update-of { margin-top: 3px; font-size: 12.5px; color: var(--accent-strong); }
.dashboard-table tr.is-update td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.review-tag { font-size: 12px; font-weight: 600; color: var(--ink); border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.takedown-panel { border-color: var(--error-border); background: var(--error-bg); }

/* The Suggestions page: the person's own earlier suggestions. */
.suggestion-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.suggestion-list li { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.suggestion-text { margin-top: 4px; overflow-wrap: anywhere; }

/* The staff numbers page. */
.table-scroll { overflow-x: auto; }
table.numbers { border-collapse: collapse; margin: 8px 0 24px; font-size: 14px; }
table.numbers th, table.numbers td { border-bottom: 1px solid var(--border); padding: 6px 12px 6px 0; text-align: left; white-space: nowrap; }
table.numbers td + td, table.numbers th + th { text-align: right; }


/* Staff two-step login setup. */
.staff-2fa-steps { max-width: 620px; line-height: 1.6; }
.staff-2fa-qr-box { margin: 8px 0 12px; }
.staff-2fa-qr-box .staff-2fa-qr { display: block; border-radius: 8px; }
.staff-2fa-key code { font-size: 20px; letter-spacing: .08em; padding: 6px 10px; display: inline-block; background: var(--surface-alt); border-radius: 6px; }
/* The designs list's page bar (_designs_pager.html): a pill stuck to the
   bottom of the screen while the list is in view, settling under the last
   row at the end. Only the pill takes clicks, so the cards beside it don't
   lose theirs. On a phone the steps keep their arrows and drop their words. */
.designs-pager { position: sticky; bottom: 0; z-index: 50; display: flex; justify-content: center; margin-top: 28px; padding: 14px 0 16px; pointer-events: none; }
.designs-pager-bar {
  pointer-events: auto; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; max-width: 100%;
  padding: 6px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, .45);
}
.designs-pager-num, .designs-pager-step, .designs-pager-gap {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.designs-pager-step { padding: 0 16px; }
a.designs-pager-num:hover, a.designs-pager-step:hover { background: var(--surface-alt); }
a.designs-pager-num:focus-visible, a.designs-pager-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.designs-pager-num.is-current { background: var(--accent); color: #fff; }
.designs-pager-step.is-disabled { color: var(--ink-muted); opacity: .55; }
.designs-pager-gap { min-width: 20px; padding: 0; color: var(--ink-muted); font-weight: 400; }
@media (max-width: 560px) {
  .designs-pager-num, .designs-pager-step { min-width: 34px; height: 34px; padding: 0 8px; font-size: 14px; }
  .designs-pager-step-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* Phones: Pricing stays in the footer, so the top bar keeps one row. */
@media (max-width: 480px) { nav.top .nav-pricing { display: none; } }

/* The editor's link to the site's Domain page (site_domains). */
.editor-domain-link { margin: 0 0 10px; font-size: 13.5px; }
.editor-domain-link a { text-decoration: none; }
.site-domain-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ink-muted); }

/* The "Report a website" page (report_abuse.html). */
.report-page { max-width: 640px; }
.report-reasons { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.report-reasons legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.report-reason { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 400; }
.report-reason input { margin-top: 3px; flex: none; }
.report-reason:has(input:checked) { border-color: var(--accent); }

/* The Designs page's search (gallery.html) and a design's "Same design,
   other businesses" list (template_detail.html; builder/template_map.py). */
.gallery-intro { margin: 0 0 18px; color: var(--ink-muted); max-width: 640px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.same-layout ul { list-style: none; margin: 8px 0 0; padding: 0; }
.same-layout li { padding: 5px 0; border-top: 1px solid var(--border); }
.same-layout li:first-child { border-top: 0; }

/* An "Update site" copy's bar (editor.html): what it is, preview/live links,
   then publish, schedule (a pop-over with a date-and-time picker and quick
   choices) or discard — one compact row, wrapping on narrow screens. */
.update-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px;
  margin: 0 0 14px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.update-bar-text { display: flex; align-items: center; gap: 12px; min-width: 0; }
.update-bar-text strong { display: block; font-size: 15px; line-height: 1.25; }
.update-bar-tag {
  flex: none; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.update-bar-sub { display: block; font-size: 13px; color: var(--ink-muted); }
.update-bar-sub a { color: var(--accent-strong); text-decoration: none; font-weight: 600; }
.update-bar-sub a:hover { text-decoration: underline; }
.update-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.update-bar-actions form { margin: 0; }
.update-discard { background: transparent; color: #b3261e; border: 1px solid transparent; box-shadow: none; }
.update-discard:hover { background: rgba(179, 38, 30, .08); border-color: rgba(179, 38, 30, .3); color: #b3261e; }
.update-schedule { position: relative; }
.update-schedule > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.update-schedule > summary::-webkit-details-marker { display: none; }
.update-schedule > summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.update-schedule-pop {
  position: absolute; z-index: 60; right: 0; top: calc(100% + 8px); width: 290px; display: grid; gap: 10px;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  box-shadow: 0 14px 34px rgba(0,0,0,.22);
}
.update-schedule-pop label { font-size: 13px; font-weight: 600; }
.update-schedule-pop input[type="datetime-local"] {
  width: 100%; box-sizing: border-box; height: 40px; padding: 0 10px; border: 1px solid var(--border-strong);
  border-radius: 9px; background: var(--surface-alt); color: var(--ink); font: inherit; font-size: 15px;
  color-scheme: light dark;
}
.update-schedule-pop input[type="datetime-local"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.update-schedule-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.update-chip {
  padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: 12.5px; cursor: pointer;
}
.update-chip:hover { border-color: var(--accent); }
.update-chip.is-picked { background: var(--accent); border-color: var(--accent); color: #fff; }
.update-schedule-zone { margin: -4px 0 0; font-size: 12px; color: var(--ink-muted); }
.update-schedule-zone:empty { display: none; }
@media (max-width: 640px) {
  .update-bar-actions { width: 100%; }
  .update-schedule-pop { right: auto; left: 0; width: min(290px, calc(100vw - 48px)); }
}

/* Staff: visitors from ads (staff_visitors.html). */
.visits { display: grid; gap: 8px; margin: 16px 0 32px; }
.visit { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.visit.has-outcome { border-color: var(--accent); }
.visit summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.visit-when { font-weight: 600; }
.visit-meta { color: var(--ink-muted); font-size: 14px; }
.visit-tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--accent); color: var(--bg); }
.visit-steps { margin: 10px 0 4px; padding-left: 0; list-style: none; font-size: 14px; display: grid; gap: 4px; }
.visit-steps li { overflow-wrap: anywhere; }
.visit-steps .is-action { font-weight: 600; }
.visit-after { display: inline-block; min-width: 3.5em; color: var(--ink-muted); font-variant-numeric: tabular-nums; font-weight: 400; }

/* The greeter bubble for visitors who aren't signed in (_greeter.html,
   greeter.js), bottom right like the signed-in ✦ assistant; under a corner
   announcement (z-index 110) and the big promotion box (a <dialog>). */
.gr-launch { position: fixed; right: 16px; bottom: 16px; z-index: 105; display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px 11px 13px; border: 0; border-radius: 999px; background: var(--accent); color: var(--bg);
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.gr-launch:hover { filter: brightness(1.06); }
.greeter.is-open .gr-launch { display: none; }
.gr-panel { position: fixed; right: 16px; bottom: 16px; z-index: 106; width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 18px 48px rgba(0, 0, 0, .28);
  animation: gr-in .28s ease-out; }
.gr-panel[hidden] { display: none; }
@keyframes gr-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gr-panel { animation: none; } }
.gr-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--border); }
.gr-mark { border-radius: 8px; }
.gr-title { margin: 0; font-weight: 700; flex: 1; }
.gr-sound, .gr-close { border: 0; background: none; color: var(--ink-muted); font: inherit; font-size: 18px; line-height: 1;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.gr-close { font-size: 24px; }
.gr-sound:hover, .gr-close:hover { background: var(--surface-alt); color: var(--ink); }
.gr-sound-off, .greeter.is-muted .gr-sound-on { display: none; }
.greeter.is-muted .gr-sound-off { display: inline; }
.gr-body { padding: 12px 14px 14px; display: grid; gap: 8px; }
.gr-msg { margin: 0; padding: 9px 12px; border-radius: 4px 14px 14px 14px; background: var(--surface-alt); font-size: 15px;
  line-height: 1.45; justify-self: start; }
.gr-label { margin: 4px 0 0; font-size: 13px; font-weight: 600; }
.gr-designs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.gr-designs a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 10px;
  color: inherit; text-decoration: none; font-size: 14px; line-height: 1.2; min-width: 0; }
.gr-designs a:hover, .gr-designs a:focus-visible { border-color: var(--ink-muted); background: var(--surface-alt); }
.gr-swatch { flex: none; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); }
.gr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gr-actions .btn { flex: 1; text-align: center; }
@media (max-width: 560px) {
  .gr-launch-label { display: none; }
  .gr-launch { padding: 13px; }
  .gr-panel { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}
@media print { .greeter { display: none; } }

/* The newest notification kept in sight (notifications/_pinned.html). */
.pinned-notice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 18px; padding: 14px 16px;
  border: 1px solid var(--success-border); border-left: 4px solid var(--accent); border-radius: 10px; background: var(--success-bg); }
.pinned-notice[hidden] { display: none; }
.pinned-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pinned-text p { margin: 6px 0 0; }
.pinned-links { font-size: 14px; }
.pinned-close { border: 0; background: none; color: var(--ink-muted); font-size: 22px; line-height: 1; cursor: pointer;
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; }
.pinned-close:hover { color: var(--ink); background: var(--surface-alt); }
.pinned-home { max-width: 1120px; margin: 16px auto 0; padding: 0 16px; }

/* The menu's order (editor.html's menu-order script): a grip over the menu
   link under the pointer, dragged along the bar; a line where it will land. */
.menu-grip {
  position: fixed; z-index: 10000; width: 22px; height: 22px; padding: 0; border: 1px solid rgba(255,255,255,.7);
  border-radius: 6px; background: #1f8f5f; color: #fff; font: 14px/1 system-ui, sans-serif; cursor: grab; touch-action: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.menu-grip:active { cursor: grabbing; }
.menu-drop-marker { position: fixed; z-index: 9999; width: 3px; border-radius: 2px; background: #1f8f5f; pointer-events: none; }
.live-preview .sib-site-nav .is-menu-dragging { opacity: .35; }
/* A page the owner added: its tab's × deletes it. */
.page-tab-delete { display: inline-flex; margin: 0 6px 0 -6px; }
.page-tab-delete button {
  border: 0; background: transparent; color: var(--ink-muted); font-size: 16px; line-height: 1; padding: 2px 4px; border-radius: 4px; cursor: pointer;
}
.page-tab-delete button:hover { color: #b42318; background: rgba(180,35,24,.08); }
/* A menu link this page hides (Page.menu): kept, faded, to show again. */
.live-preview .sib-site-nav :is([data-page-hidden], [data-site-hidden]) { opacity: .35 !important; text-decoration: line-through; }

/* "+ Add a section" where two sections meet on the editor's canvas. */
.section-add-line { position: fixed; z-index: 1000; height: 0; border-top: 2px dashed #3fbb84; pointer-events: none; }
.section-add-line[hidden] { display: none; }
.section-add-btn {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%); pointer-events: auto;
  padding: 5px 12px; border: 0; border-radius: 999px; background: #3fbb84; color: #fff; white-space: nowrap;
  font: 600 12.5px/1.2 -apple-system, "Segoe UI", sans-serif; box-shadow: 0 2px 10px rgba(0,0,0,.25); cursor: pointer;
}
.section-add-btn:hover, .section-add-btn:focus-visible { background: #2f9d6d; }
.section-add-pop .scp-title { cursor: default; }
.section-add-pop .add-section-row { display: flex; flex-direction: column; gap: 4px; }
.section-add-pop .add-section-row select { width: 100%; }

/* Staff: who visits us (staff_visitors.html). */
.visits-show { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.visits-show a { padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 14px; }
.visits-show a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.visits-totals { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.visits-total { padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.visits-total strong { font-size: 18px; }
.visits-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 0 0 24px; }
.visits-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; min-width: 0; }
.visits-box h2 { margin: 0 0 8px; font-size: 15px; }
.visits-days, .visits-counts { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.visits-days th, .visits-counts th { text-align: left; font-weight: 400; padding: 2px 8px 2px 0; overflow-wrap: anywhere; }
.visits-days th { white-space: nowrap; width: 1%; }
.visits-days td, .visits-counts td { padding: 2px 0; text-align: right; font-variant-numeric: tabular-nums; }
.visits-days td:nth-child(2) { width: 100%; text-align: left; padding-right: 8px; }
.visits-bar { display: block; height: 8px; min-width: 2px; border-radius: 4px; background: var(--accent); }
.visits-counts + .visits-counts { margin-top: 8px; }
/* The colour picker's file browser: where it is, the folders inside, more. */
.scp-picker-crumbs { margin: 2px 0 6px; font-size: 12px; color: var(--ink-muted); }
.scp-picker-crumbs button { padding: 0; border: 0; background: none; color: #2f9d6d; font: inherit; text-decoration: underline; cursor: pointer; }
.scp-picker-folders { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.scp-picker-folders button { padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-alt); color: var(--ink); font-size: 12px; cursor: pointer; }
.scp-picker-folders button:hover { border-color: #3fbb84; }
.scp-picker-more { margin-top: 6px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: none; color: var(--ink); font-size: 12px; cursor: pointer; }
.scp-picker-group[hidden] { display: none; }

/* The designs list (home.html, gallery.html): the kinds of business in a
   side panel (_business_picker.html, builder/verticals.py) and the designs
   beside it, always four to a row — three rows a page (DESIGNS_PER_PAGE) —
   filling the width, so a wider screen shows bigger previews rather than
   more of them (the founder's call, 2026-11-09). Two to a row on a tablet,
   one on a phone, where the panel folds into a bar above the designs. */
.designs-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.designs-layout.no-side { grid-template-columns: minmax(0, 1fr); }
.designs-main { min-width: 0; }
.gallery-main .designs-main .grid.tcards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; margin-top: 0; }
.designs-side {
  position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px 12px;
}
.designs-side-summary { display: none; }
.business-list fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.business-list-title { padding: 0 6px 8px; font-weight: 700; font-size: 15px; }
.business-option { display: flex; align-items: flex-start; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; line-height: 1.35; }
.business-option:hover { background: var(--surface-alt); }
.business-option input { margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.business-option:has(input:checked) { background: var(--surface-alt); font-weight: 600; }
.business-picker-go { margin: 8px 6px 0; }
.business-picker-go[hidden], .business-other[hidden] { display: none; }
.business-other { display: flex; flex-direction: column; gap: 8px; margin: 10px 6px 0; }
.business-other label { font-size: 13px; font-weight: 600; }
.business-other input[type="text"] { width: 100%; min-width: 0; }
.business-picker-note { margin: 12px 6px 0; color: var(--ink-muted); font-size: 13px; line-height: 1.45; }
.business-picker-note.is-error { color: var(--danger, #b42318); }
@media (max-width: 1100px) {
  .gallery-main .designs-main .grid.tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .designs-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 760px) {
  .designs-layout, .designs-layout.no-side { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .gallery-main .designs-main .grid.tcards { grid-template-columns: minmax(0, 1fr); }
  .designs-side { position: static; max-height: none; overflow: visible; padding: 0; }
  .designs-side-summary {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px;
    padding: 12px 14px; cursor: pointer; font-weight: 700; list-style: none;
  }
  .designs-side-summary::-webkit-details-marker { display: none; }
  .designs-side-summary::after { content: "▾"; color: var(--ink-muted); }
  .designs-side[open] .designs-side-summary::after { content: "▴"; }
  .designs-side-current { font-weight: 500; color: var(--ink-muted); margin-left: auto; }
  .business-list, .business-other, .business-picker-note { padding: 0 8px 12px; }
  .business-list-title { display: none; }
}
.design-business-note { margin: -4px 0 14px; color: var(--ink-muted); }

/* Pages for each kind of business (builder/business_pages.py, 2026-11-17) */
.bp { max-width: 1240px; margin: 0 auto; }
.bp-head { max-width: 760px; margin: 8px 0 28px; }
.bp-head h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; margin: 6px 0 12px; }
.bp-kicker { margin: 0; font-size: 14px; }
.bp-kicker a { color: var(--ink-muted); }
.bp-title { font-size: 22px; margin: 34px 0 14px; }
.bp-more { margin: 18px 0 0; }
.bp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 40px 0 0; counter-reset: bp; }
.bp-steps li { counter-increment: bp; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); display: grid; gap: 6px; }
.bp-steps li::before { content: counter(bp); font-weight: 700; color: var(--accent-strong); }
.bp-steps span { color: var(--ink-muted); }
.bp-faq details { padding: 12px 0; border-bottom: 1px solid var(--border); max-width: 760px; }
.bp-faq summary { cursor: pointer; font-weight: 600; }
.bp-others ul, .bp-kinds { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.bp-others a, .bp-kinds a { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--ink); }
.bp-kinds a { padding: 14px 20px; font-size: 17px; }
.bp-others a:hover, .bp-kinds a:hover { border-color: var(--accent-strong); }

/* Our own blog (builder/platform_blog.py, 2026-11-17) */
.pb { max-width: 1240px; margin: 0 auto; }
.pb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.pb-card { display: grid; gap: 8px; align-content: start; padding: 0 0 16px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--ink); text-decoration: none; }
.pb-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.pb-card > :not(img) { padding: 0 16px; }
.pb-card > :first-child:not(img) { padding-top: 16px; }
.pb-card strong { font-size: 18px; line-height: 1.3; }
.pb-card span { color: var(--ink-muted); font-size: 14.5px; }
.pb-meta { color: var(--ink-muted); font-size: 13.5px; }
.pb-post { max-width: 760px; margin: 0 auto; }
.pb-cover { width: 100%; border-radius: 14px; margin: 10px 0 20px; }
.pb-body img { max-width: 100%; height: auto; border-radius: 10px; }
.pb-pager { display: flex; justify-content: space-between; gap: 16px; margin: 28px 0; }

/* An app's tab in the editor: its pages, and its layout and box look
   (builder/app_texts.py). */
.app-tab-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 10px; }
.app-tab-views { display: inline-flex; gap: 6px; }
.app-tab-views .device-btn { text-decoration: none; }
.app-tab-layouts { align-items: center; margin-top: 0; }
.app-tab-layouts label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.app-tab-label { font-size: 13px; font-weight: 600; margin-right: 2px; }
.app-tab-layouts button[aria-pressed="true"] { outline: 2px solid #2f6a43; outline-offset: 1px; }
.editable-app [data-app-text]:hover { outline: 1px dashed currentColor; outline-offset: 2px; }
.editable-app [data-app-text]:focus { outline: 2px solid #2f6a43; outline-offset: 2px; }
