/* =========================================================================
   Creator Collective 2 — one stylesheet for the whole product.
   Mobile first. Theme colours (--brand, --accent, --brand-deep …) are
   printed by the layout from includes/ui/themes.php; light/dark surfaces
   live here. Sections: fonts · tokens · base · layout shells · components
   · member app · marketing · admin compatibility.
   ========================================================================= */

/* ---- fonts (self-hosted, OFL — see assets/fonts/LICENSE.txt) ---------- */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/onest-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/onest-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url('../fonts/bricolage-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap; src: url('../fonts/bricolage-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- tokens ------------------------------------------------------------ */
:root {
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', 'Onest', system-ui, sans-serif;

  --bg: #F6F5FA;
  --surface: #FFFFFF;
  --surface-2: #F0EEF6;
  --surface-3: #E8E5F0;
  --text: #16141F;
  --muted: #625E73;
  --faint: #8C879E;
  --line: #E4E1EC;
  --line-strong: #CFCADB;
  --link: var(--brand-text);
  --btn: var(--brand);
  --on-btn: var(--on-brand);
  --tint: rgba(var(--brand-rgb), .09);
  --tint-strong: rgba(var(--brand-rgb), .16);
  --accent-tint: rgba(var(--accent-rgb), .18);
  --ok: #12805C; --ok-bg: #E3F6EE;
  --warn: #9A5B00; --warn-bg: #FFF3D6;
  --bad: #C2283B; --bad-bg: #FDE7EA;
  --info: #2B5FC7; --info-bg: #E6EEFD;

  --r-xs: 6px; --r-sm: 10px; --r: 14px; --r-lg: 22px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(22, 20, 31, .06), 0 1px 1px rgba(22, 20, 31, .03);
  --shadow-2: 0 10px 30px -12px rgba(22, 20, 31, .22);
  --shadow-3: 0 24px 60px -20px rgba(22, 20, 31, .35);
  --side-w: 264px;
  --top-h: 60px;
  --tab-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
  --check-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
:root[data-mode="dark"] {
  --check-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23140f1f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --bg: #0F0E15; --surface: #17151F; --surface-2: #201D2B; --surface-3: #2A2638;
  --text: #F2F0F8; --muted: #A9A4BA; --faint: #7D7890; --line: #2C2838; --line-strong: #3D384D;
  --link: var(--brand-light); --btn: var(--brand-light); --on-btn: var(--on-brand-light);
  --tint: rgba(var(--brand-rgb), .2); --tint-strong: rgba(var(--brand-rgb), .32);
  --ok: #5FD3A5; --ok-bg: rgba(18, 128, 92, .22);
  --warn: #F3C063; --warn-bg: rgba(154, 91, 0, .25);
  --bad: #FF8394; --bad-bg: rgba(194, 40, 59, .25);
  --info: #8DB0FF; --info-bg: rgba(43, 95, 199, .25);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, .7); --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-mode="auto"] {
    --check-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23140f1f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
    --bg: #0F0E15; --surface: #17151F; --surface-2: #201D2B; --surface-3: #2A2638;
    --text: #F2F0F8; --muted: #A9A4BA; --faint: #7D7890; --line: #2C2838; --line-strong: #3D384D;
    --link: var(--brand-light); --btn: var(--brand-light); --on-btn: var(--on-brand-light);
    --tint: rgba(var(--brand-rgb), .2); --tint-strong: rgba(var(--brand-rgb), .32);
    --ok: #5FD3A5; --ok-bg: rgba(18, 128, 92, .22);
    --warn: #F3C063; --warn-bg: rgba(154, 91, 0, .25);
    --bad: #FF8394; --bad-bg: rgba(194, 40, 59, .25);
    --info: #8DB0FF; --info-bg: rgba(43, 95, 199, .25);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 12px 30px -12px rgba(0, 0, 0, .7); --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

/* ---- base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.6rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
code, kbd, pre { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .9em; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: 12px 14px; border-radius: var(--r-sm); }
:focus-visible { outline: 3px solid rgba(var(--brand-rgb), .55); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-tint); }
[hidden] { display: none !important; }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mode-light { display: none; }
:root[data-mode="dark"] .mode-dark { display: none; }
:root[data-mode="dark"] .mode-light { display: inline-block; }
@media (prefers-color-scheme: dark) { :root[data-mode="auto"] .mode-dark { display: none; } :root[data-mode="auto"] .mode-light { display: inline-block; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.hide-lg {}
@media (min-width: 1024px) { .hide-lg { display: none !important; } }
@media (max-width: 1023.98px) { .hide-sm { display: none !important; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.demo-ribbon { background: var(--accent); color: var(--on-accent); font-size: .85rem; padding: 7px 16px; text-align: center; display: flex; gap: 8px; justify-content: center; align-items: center; font-weight: 600; }

/* ---- buttons ----------------------------------------------------------- */
.btn { --b: var(--btn); --o: var(--on-btn); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1.5px solid transparent; background: var(--surface-2); color: var(--text); font: 600 .95rem/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .12s var(--ease), background .15s, box-shadow .15s, border-color .15s; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
.btn:hover { text-decoration: none; background: var(--surface-3); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--b); color: var(--o); box-shadow: 0 6px 18px -8px rgba(var(--brand-rgb), .8); }
.btn-primary:hover { background: var(--b); filter: brightness(1.06); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent); filter: brightness(1.05); }
.btn-ghost, .btn-outline, .btn-secondary { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover, .btn-outline:hover, .btn-secondary:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: var(--bad); filter: brightness(1.08); }
.btn-danger-outline { background: transparent; color: var(--bad); border-color: currentColor; }
.btn-success { background: var(--ok); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 13px; font-size: .86rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.icon-btn:hover { background: var(--tint); text-decoration: none; }
.icon-btn .ic { width: 22px; height: 22px; }
.link-btn { border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; padding: 0; display: inline-flex; gap: 6px; align-items: center; }
.dot-count, .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font: 700 .68rem/1 var(--font); }
.icon-btn .dot-count { position: absolute; top: 3px; right: 1px; border: 2px solid var(--surface); }

/* ---- forms ------------------------------------------------------------- */
label, .label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.field-row, .form-row { display: grid; gap: 0 16px; }
@media (min-width: 720px) { .field-row, .form-row { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); } }
input:not([type]), input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="search"], input[type="tel"], input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea, .input {
  width: 100%; min-height: 46px; padding: 11px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: 400 1rem/1.4 var(--font); transition: border-color .15s, box-shadow .15s; appearance: none;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--btn); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .16); }
input[type="file"] { font: inherit; color: var(--muted); max-width: 100%; width: 100%; }
input[type="file"]::file-selector-button { font: 600 .9rem var(--font); border: 1.5px solid var(--line-strong); background: var(--surface-2); color: var(--text); border-radius: var(--r-pill); padding: 8px 14px; margin-right: 10px; cursor: pointer; }
input[type="color"] { width: 54px; height: 46px; padding: 3px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface); cursor: pointer; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; accent-color: var(--btn); vertical-align: -4px; margin: 0 8px 0 0; }
input[type="checkbox"]:not(.switch), input[type="radio"] { -webkit-appearance: none; appearance: none; flex: none; display: inline-grid; place-items: center; border: 2px solid var(--line-strong); background: var(--surface); border-radius: 6px; cursor: pointer; transition: background .12s, border-color .12s; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:not(.switch):hover, input[type="radio"]:hover { border-color: var(--btn); }
input[type="checkbox"]:not(.switch):checked { background: var(--btn) var(--check-img) center / 15px no-repeat; border-color: var(--btn); }
input[type="radio"]:checked { border-color: var(--btn); box-shadow: inset 0 0 0 4px var(--surface); background: var(--btn); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 3px solid var(--tint-strong); outline-offset: 2px; }
.hint, .setting-description, .help-text { display: block; font-size: .84rem; color: var(--muted); margin-top: 6px; font-weight: 400; }
.check, .checkbox-label { display: flex; align-items: flex-start; gap: 4px; font-weight: 500; cursor: pointer; }
.check input { margin-top: 2px; }
.check .hint { margin-top: 2px; }
.input-group { display: flex; gap: 8px; }
.input-group > input { flex: 1; min-width: 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 44px; height: 26px; border-radius: 13px; background: var(--line-strong); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .18s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--btn); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(var(--brand-rgb), .5); outline-offset: 2px; }

/* ---- alerts, badges, chips -------------------------------------------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 16px; background: var(--info-bg); color: var(--text); border: 1px solid transparent; font-size: .95rem; }
.alert > .ic { color: var(--info); margin-top: 1px; }
.alert-success { background: var(--ok-bg); } .alert-success > .ic { color: var(--ok); }
.alert-error, .alert-danger { background: var(--bad-bg); } .alert-error > .ic, .alert-danger > .ic { color: var(--bad); }
.alert-warning { background: var(--warn-bg); } .alert-warning > .ic { color: var(--warn); }
.badge, .pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; line-height: 1.5; }
.badge-success, .badge-active, .badge-completed, .badge-published, .badge-approved, .badge-healthy, .pill-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warning, .badge-pending, .badge-pending_review, .badge-draft, .badge-under_review, .badge-notified, .badge-response_pending, .pill-warn { background: var(--warn-bg); color: var(--warn); }
.badge-error, .badge-danger, .badge-rejected, .badge-suspended, .badge-expelled, .badge-failed, .badge-revoked, .pill-bad { background: var(--bad-bg); color: var(--bad); }
.badge-admin, .badge-super_admin, .badge-moderator, .badge-info, .pill-brand { background: var(--tint); color: var(--link); }
.badge-dismissed, .badge-archived, .badge-closed { background: var(--surface-2); color: var(--faint); }
.pill-accent { background: var(--accent-tint); color: var(--text); }
.pf { --pf: #6B6880; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pf); color: #fff; flex: none; }
.pf .ic { width: 55%; height: 55%; }
.pf-xs { width: 20px; height: 20px; } .pf-sm { width: 28px; height: 28px; } .pf-lg { width: 48px; height: 48px; } .pf-xl { width: 64px; height: 64px; }
.pf-img { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.pf-img img { width: 70%; height: 70%; object-fit: contain; }
:root[data-mode="dark"] .pf:not(.pf-img) { box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.pf-chip { --pf: #6B6880; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--pf) 12%, var(--surface)); color: var(--text); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text); font-weight: 600; font-size: .88rem; text-decoration: none; cursor: pointer; }
.chip:hover { text-decoration: none; border-color: var(--btn); }
.chip.on, .chip[aria-pressed="true"], .chip[aria-current="page"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---- avatars ----------------------------------------------------------- */
.av { --av-h: 260; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: hsl(var(--av-h) 55% 88%); color: hsl(var(--av-h) 45% 28%); font: 700 .9rem/1 var(--font-display); }
:root[data-mode="dark"] .av { background: hsl(var(--av-h) 35% 28%); color: hsl(var(--av-h) 60% 86%); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-xs { width: 24px; height: 24px; font-size: .62rem; } .av-sm { width: 34px; height: 34px; font-size: .78rem; } .av-lg { width: 64px; height: 64px; font-size: 1.3rem; } .av-xl { width: 104px; height: 104px; font-size: 2rem; }
.av-stack { display: flex; } .av-stack .av { box-shadow: 0 0 0 2px var(--surface); } .av-stack .av + .av { margin-left: -6px; }

/* ---- panels, lists, tables -------------------------------------------- */
.panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-1); margin-bottom: 16px; min-width: 0; }
@media (min-width: 720px) { .panel, .card { padding: 22px; } }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head, .card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2, .panel-head h3, .card-header h2, .card-header h3 { margin: 0; font-size: 1.08rem; }
.card-body { min-width: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li, .list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.list > li:first-child, .list-row:first-child { border-top: 0; }
.list-row .grow strong, .list > li .grow strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-responsive, .table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table, .table-wrap table, .data-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th, .table td, .data-table th, .data-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th, .data-table th { font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table td { overflow-wrap: anywhere; }
@media (max-width: 719.98px) {
  .table-stack thead { display: none; }
  .table-stack tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table-stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 5px 4px; }
  .table-stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: .82rem; }
}
.empty, .empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 34px 18px; color: var(--muted); }
.empty-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; background: var(--tint); color: var(--link); margin-bottom: 6px; }
.empty-ic .ic { width: 28px; height: 28px; }
.empty strong { color: var(--text); font-family: var(--font-display); font-size: 1.12rem; }
.empty p { margin: 0 0 8px; max-width: 42ch; }
.empty-state i { display: none; }
.progress, .progress-bar { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress > span, .progress-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--btn), var(--accent)); transition: width .4s var(--ease); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: var(--r-pill); border: 0; background: none; color: var(--muted); font: 600 .9rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.tabs .on, .tabs [aria-current="page"], .tabs [aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.stat-grid, .stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (min-width: 900px) { .stat-grid, .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat, .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; box-shadow: var(--shadow-1); }
.stat b, .stat-info h3 { font: 700 1.6rem/1.1 var(--font-display); margin: 0; letter-spacing: -.02em; }
.stat span, .stat-info p { color: var(--muted); font-size: .84rem; margin: 0; }
.stat-card { flex-direction: row; align-items: center; gap: 12px; }
.stat-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--tint); color: var(--link); flex: none; }
.stat-icon i { display: none; }
.stat-icon::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }

/* ---- sheets, toasts, dialogs ------------------------------------------ */
.sheet { position: fixed; z-index: 80; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow: auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 18px calc(24px + var(--safe-b)); box-shadow: var(--shadow-3); transform: translateY(100%); transition: transform .26s var(--ease); }
.sheet.open { transform: none; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 14px; }
.sheet-title { font-size: 1.1rem; margin-bottom: 14px; }
@media (min-width: 720px) { .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: min(520px, 92vw); border-radius: var(--r-lg); transform: translate(-50%, -46%) scale(.96); opacity: 0; transition: transform .2s var(--ease), opacity .2s; pointer-events: none; padding: 22px; } .sheet.open { transform: translate(-50%, -50%); opacity: 1; pointer-events: auto; } .sheet-grip { display: none; } }
.backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(10, 8, 18, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.backdrop.open { opacity: 1; pointer-events: auto; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-grid a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 14px 6px; border-radius: var(--r); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .84rem; font-weight: 600; line-height: 1.25; }
.quick-grid a:hover { background: var(--tint); }
.q-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--btn); color: var(--on-btn); }
.toasts { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tab-h) + 16px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(420px, 92vw); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 24px; } }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow-3); font-weight: 500; animation: toast-in .25s var(--ease); pointer-events: auto; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
dialog.modal { border: 0; border-radius: var(--r-lg); padding: 22px; width: min(560px, 94vw); max-height: 88vh; background: var(--surface); color: var(--text); box-shadow: var(--shadow-3); }
dialog.modal::backdrop { background: rgba(10, 8, 18, .5); }

/* =========================================================================
   App shell (members + admin)
   ========================================================================= */
.app { min-height: 100vh; }
.side { position: fixed; z-index: 75; top: 0; bottom: 0; left: 0; width: min(var(--side-w), 86vw); display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .25s var(--ease); }
.side.open { transform: none; box-shadow: var(--shadow-3); }
:root[data-chrome="dark"] .side { background: var(--brand-deep); color: var(--on-deep); border-right: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px 18px; }
.side-tag { margin: 0 18px 4px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; color: var(--accent-text); }
:root[data-chrome="dark"] .side-tag { color: var(--accent-light); }
.side-nav { flex: 1; overflow-y: auto; padding: 4px 10px 14px; scrollbar-width: thin; }
.side-group { font-size: .74rem; font-weight: 700; color: var(--faint); padding: 14px 10px 6px; }
:root[data-chrome="dark"] .side-group { color: color-mix(in srgb, var(--on-deep) 55%, transparent); }
.side-link { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--r-sm); color: inherit; text-decoration: none; font-weight: 500; font-size: .95rem; }
.side-link .ic { opacity: .8; }
.side-link:hover { background: var(--tint); text-decoration: none; }
:root[data-chrome="dark"] .side-link:hover { background: rgba(255,255,255,.07); }
.side-link.on { background: var(--tint-strong); color: var(--link); font-weight: 700; }
.side-link.on .ic { opacity: 1; }
:root[data-chrome="dark"] .side-link.on { background: rgba(255,255,255,.12); color: var(--on-deep); box-shadow: inset 3px 0 0 var(--accent); }
.side-link .count { margin-left: auto; }
.side-foot { display: flex; align-items: center; gap: 4px; padding: 12px 10px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); }
:root[data-chrome="dark"] .side-foot { border-top-color: rgba(255,255,255,.1); }
.me-chip { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-sm); color: inherit; text-decoration: none; }
.me-chip:hover { background: var(--tint); text-decoration: none; }
.me-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me-meta strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-meta small { font-size: .76rem; opacity: .7; }
.scrim { position: fixed; inset: 0; z-index: 74; background: rgba(10, 8, 18, .45); opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.side-close { display: inline-grid; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.logo-on-dark { display: none !important; }
:root[data-mode="dark"] .logo-on-light { display: none !important; }
:root[data-mode="dark"] .logo-on-dark { display: block !important; }
@media (prefers-color-scheme: dark) { :root[data-mode="auto"] .logo-on-light { display: none !important; } :root[data-mode="auto"] .logo-on-dark { display: block !important; } }
.brand-logo { height: 34px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.brand-name { font: 800 1.08rem/1 var(--font-display); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-stretch: 92%; }
.brand-mark { width: 34px; height: 34px; flex: none; display: block; --mark-mid: var(--brand); --mark-mid: color-mix(in srgb, var(--brand) 50%, var(--accent)); overflow: visible; }

.main { min-width: 0; padding-bottom: calc(var(--tab-h) + 20px + var(--safe-b)); }
.top { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 8px; height: var(--top-h); padding: 0 8px 0 14px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top-brand .brand-name { font-size: 1rem; }
.top-brand .brand-logo { height: 28px; }
.top-title { font-size: 1.05rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-brand + .top-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.top-me { margin-left: 6px; display: inline-flex; border-radius: 50%; }
.content { padding: 16px 14px 0; display: grid; gap: 20px; max-width: 1180px; margin: 0 auto; }
.content .col { min-width: 0; }
.rail { min-width: 0; }
@media (min-width: 720px) { .content { padding: 22px 24px 0; } }
.tabbar { position: fixed; z-index: 65; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 100%; border: 0; background: none; color: var(--muted); text-decoration: none; font: 600 .7rem var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tabbar .ic { width: 24px; height: 24px; }
.tabbar .on { color: var(--link); }
.tabbar .on .ic { stroke-width: 2.3; }
.tabbar .tab-plus { justify-self: center; width: 54px; height: 54px; border-radius: 18px; background: var(--btn); color: var(--on-btn); box-shadow: 0 10px 22px -8px rgba(var(--brand-rgb), .9); transform: translateY(-10px); }
.tabbar .tab-plus .ic { width: 26px; height: 26px; stroke-width: 2.4; }
@media (min-width: 1024px) {
  .side { transform: none; width: var(--side-w); box-shadow: none !important; }
  .side-close, .scrim { display: none; }
  .main { margin-left: var(--side-w); padding-bottom: 40px; }
  .tabbar { display: none; }
  .top { padding: 0 20px 0 28px; }
  .top-title { font-size: 1.2rem; }
  .content { padding: 26px 28px 0; }
  .content.has-aside { grid-template-columns: minmax(0, 1fr) 320px; max-width: 1240px; align-items: start; }
  .content.has-aside .rail { position: sticky; top: calc(var(--top-h) + 20px); }
  .content.wide { max-width: none; }
}
@media (max-width: 1023.98px) { .rail { order: 2; } }

/* =========================================================================
   Member app pieces
   ========================================================================= */
.hello { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.hello h2 { margin: 0; font-size: 1.35rem; }
.hello p { margin: 2px 0 0; color: var(--muted); }

/* Today card — the day's platform, the signature element of the app */
.today { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 20px; margin-bottom: 18px; background: var(--brand-deep); color: var(--on-deep); box-shadow: var(--shadow-2); isolation: isolate; }
.today::before { content: ''; position: absolute; inset: auto -60px -90px auto; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .55), transparent 65%); z-index: -1; }
.today-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem; opacity: .85; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .7); animation: rec 1.8s infinite; }
@keyframes rec { 70% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); } }
.today-day { font: 800 clamp(2rem, 1.4rem + 3vw, 3rem)/1 var(--font-display); font-stretch: 85%; letter-spacing: var(--display-tracking, -.03em); margin: 8px 0 6px; }
.today-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .92rem; opacity: .9; margin-bottom: 14px; }
.today .btn-primary { --b: var(--accent); --o: var(--on-accent); box-shadow: none; }
.today .btn-ghost { color: var(--on-deep); border-color: color-mix(in srgb, var(--on-deep) 35%, transparent); }
.today .btn-ghost:hover { background: rgba(255,255,255,.08); }
.today-pfs { display: flex; gap: 8px; margin-top: 2px; }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; list-style: none; margin: 0 0 18px; padding: 0; }
.week li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 2px 9px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); min-width: 0; text-align: center; }
.week .wk-day { font-size: .72rem; font-weight: 700; color: var(--muted); }
.week .wk-name { font-size: .7rem; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.week .is-today { background: var(--text); border-color: var(--text); }
.week .is-today .wk-day, .week .is-today .wk-name { color: var(--bg); }
.week .is-done { opacity: .62; }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; color: transparent; }
.checklist .done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist .done .grow { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.checklist .tick .ic { width: 15px; height: 15px; stroke-width: 3; }

.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; box-shadow: var(--shadow-1); overflow: hidden; }
.post.is-mine-due { border-color: rgba(var(--brand-rgb), .45); box-shadow: 0 0 0 3px var(--tint), var(--shadow-1); }
.post-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.post-head .grow strong { display: block; font-size: .95rem; }
.post-head .grow small { color: var(--muted); }
.post-body { padding: 10px 16px 14px; }
.post-body h3 { font-size: 1.2rem; margin: 6px 0 6px; }
.post-text { color: var(--text); overflow-wrap: anywhere; }
.post-text p:last-child { margin-bottom: 0; }
.post-media { display: block; width: 100%; max-height: 460px; object-fit: cover; background: var(--surface-2); }
.post-foot { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-top: 1px solid var(--line); }
.post-foot .btn { min-height: 38px; background: transparent; color: var(--muted); font-weight: 600; }
.post-foot .btn:hover { background: var(--surface-2); color: var(--text); }
.post-foot .btn.on { color: var(--link); }
.post-section { padding: 14px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.post-section:has(+ .post-foot) { border-bottom: 0; }
.deadline { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.deadline.soon { color: var(--warn); }
.deadline.over { color: var(--bad); }
.assign { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px dashed var(--line-strong); }
.assign:first-child { border-top: 0; }
.assign .grow a { font-weight: 600; overflow-wrap: anywhere; }
.assign.done .grow { color: var(--muted); }
.mine-link { display: flex; align-items: center; gap: 8px; font-size: .9rem; overflow-wrap: anywhere; }

.creator-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.creator { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.creator-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.creator-top .grow strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-top .grow a { color: inherit; text-decoration: none; }
.creator-bio { font-size: .9rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.creator-links { display: flex; flex-direction: column; gap: 6px; }
.follow-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.follow-row a.handle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; font-weight: 600; }

.level { display: flex; align-items: center; gap: 14px; }
.level-ring { --p: 40; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; flex: none; }
.level-ring > span { width: 50px; height: 50px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font: 800 .9rem/1 var(--font-display); }
.streak { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--warn); }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 700; text-align: right; }
.rail .panel h3 { font-size: 1rem; }

.profile-cover { height: 150px; border-radius: var(--r-lg); background: var(--brand-deep) center / cover no-repeat; position: relative; overflow: hidden; }
.profile-cover:not([style*="url"])::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 85% 120%, rgba(var(--accent-rgb), .7), transparent 55%), radial-gradient(circle at 10% -20%, rgba(var(--brand-rgb), .9), transparent 50%); }
@media (min-width: 720px) { .profile-cover { height: 200px; } }
.profile-id { display: flex; align-items: flex-end; gap: 14px; margin: -48px 0 16px 14px; position: relative; flex-wrap: wrap; }
.profile-id .av { box-shadow: 0 0 0 5px var(--bg); }
.profile-id h1 { margin: 0; font-size: 1.5rem; }
.profile-id .grow { padding-bottom: 6px; min-width: 200px; }

.cal { display: grid; gap: 10px; }
@media (min-width: 900px) { .cal { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.cal-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-height: 110px; min-width: 0; }
.cal-day.is-today { border-color: var(--btn); box-shadow: 0 0 0 3px var(--tint); }
.cal-day h3 { font-size: .9rem; margin: 0 0 8px; display: flex; justify-content: space-between; gap: 6px; }
.cal-task { display: block; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); text-decoration: none; font-size: .84rem; font-weight: 600; margin-top: 6px; border-left: 3px solid var(--pf, var(--btn)); overflow-wrap: anywhere; }
.cal-task:hover { text-decoration: none; background: var(--tint); }

.chat { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface-2); overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--btn); color: var(--on-btn); border-radius: 18px 18px 6px 18px; }
.bubble small { display: block; opacity: .7; font-size: .72rem; margin-top: 4px; }
.convo { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-sm); color: inherit; text-decoration: none; }
.convo:hover, .convo.on { background: var(--tint); text-decoration: none; }
.convo .grow { min-width: 0; }
.convo .grow strong, .convo .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.convo .grow span { color: var(--muted); font-size: .86rem; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }

.notif { display: flex; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.notif:first-child { border-top: 0; }
.notif.unread { background: var(--tint); }
.notif:hover { text-decoration: none; background: var(--surface-2); }
.notif-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-3); color: var(--link); flex: none; }
.notif .grow strong { display: block; font-size: .95rem; }
.notif .grow p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

.board-rank { font: 800 1.1rem/1 var(--font-display); width: 28px; text-align: center; color: var(--muted); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; margin-bottom: 18px; }
.podium > div { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: var(--r) var(--r) 0 0; background: var(--surface); border: 1px solid var(--line); text-align: center; min-width: 0; }
.podium .p1 { padding-top: 22px; background: linear-gradient(180deg, var(--accent-tint), var(--surface)); }
.podium strong { font-size: .88rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium .place { font: 800 1.4rem/1 var(--font-display); }

.rich-editor { border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; }
.rich-editor:focus-within { border-color: var(--btn); box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .16); }
.rich-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.rich-bar button { border: 0; background: none; color: var(--text); min-width: 34px; height: 32px; border-radius: 6px; cursor: pointer; font: 700 .85rem var(--font); }
.rich-bar button:hover { background: var(--surface-3); }
.rich-area { min-height: 160px; padding: 12px 14px; outline: none; overflow-wrap: anywhere; }
.rich-area:empty::before { content: attr(data-placeholder); color: var(--faint); }

/* =========================================================================
   Marketing site
   ========================================================================= */
.site-head { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-head.scrolled { border-bottom-color: var(--line); }
.site-head-in { display: flex; align-items: center; gap: 18px; height: 68px; }
.site-nav { display: none; gap: 4px; margin-left: 10px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .94rem; padding: 8px 12px; border-radius: var(--r-pill); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.site-cta { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.site-cta .btn { min-height: 40px; }
@media (min-width: 1024px) { .site-nav { display: flex; } }
.sheet-nav { display: flex; flex-direction: column; }
.sheet-nav a { padding: 14px 6px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; font: 700 1.1rem var(--font-display); }
.sheet-nav a:first-child { border-top: 0; }
.site-main { min-height: 50vh; }
.section { padding: 64px 0; }
.section-tight { padding: 40px 0; }
@media (min-width: 900px) { .section { padding: 96px 0; } }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--brand-deep); color: var(--on-deep); }
.section-dark .muted, .section-dark p { color: color-mix(in srgb, var(--on-deep) 78%, transparent); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); font-stretch: 88%; letter-spacing: -.025em; }
.section-head p { font-size: 1.08rem; color: var(--muted); }
.section-dark .section-head p { color: color-mix(in srgb, var(--on-deep) 78%, transparent); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.hero { position: relative; overflow: hidden; padding: 36px 0 56px; }
@media (min-width: 900px) { .hero { padding: 72px 0 96px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.hero h1 { font-size: clamp(2.5rem, 1.5rem + 5vw, 4.6rem); line-height: .98; font-weight: 800; font-stretch: 80%; letter-spacing: -.035em; margin-bottom: 20px; max-width: 14ch; }
.hero-sub { font-size: clamp(1.05rem, .98rem + .4vw, 1.25rem); color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-proof { display: flex; align-items: center; gap: 12px; margin-top: 26px; color: var(--muted); font-size: .92rem; }

/* The rotation dial: seven days, one platform each, today on air */
.rotation { position: relative; background: var(--brand-deep); color: var(--on-deep); border-radius: 28px; padding: 22px 18px 18px; box-shadow: var(--shadow-3); isolation: isolate; overflow: hidden; }
.rotation::before { content: ''; position: absolute; width: 360px; height: 360px; right: -140px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .45), transparent 62%); z-index: -1; }
.rotation-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; font-size: .9rem; }
.rotation-head span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.rot-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rot-days li { display: grid; grid-template-columns: 52px 38px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 16px; background: rgba(255,255,255,.06); }
:root[data-chrome="light"] .rot-days li { background: rgba(255,255,255,.08); }
.rot-days .d { font-weight: 700; font-size: .85rem; opacity: .7; }
.rot-days .n { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rot-days .s { font-size: .78rem; opacity: .7; white-space: nowrap; }
.rot-days .is-today { background: var(--surface); color: var(--text); transform: scale(1.03); box-shadow: var(--shadow-2); }
.rot-days .is-today .d { opacity: 1; color: var(--link); }
.rot-days .is-today .s { opacity: 1; color: var(--bad); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.rot-days .is-today .s::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: rec 1.8s infinite; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { position: relative; padding: 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--bg); font: 800 1.05rem/1 var(--font-display); margin-bottom: 14px; }
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }

.features { display: grid; gap: 16px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feature { padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.feature .f-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--tint); color: var(--link); margin-bottom: 14px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }
.feature-big { grid-column: 1 / -1; display: grid; gap: 22px; align-items: center; background: var(--brand-deep); color: var(--on-deep); border: 0; }
.feature-big p { color: color-mix(in srgb, var(--on-deep) 80%, transparent); }
.feature-big .f-ic { background: rgba(255,255,255,.1); color: var(--accent-light); }
@media (min-width: 900px) { .feature-big { grid-template-columns: 1fr 1fr; padding: 34px; } }

.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.flip > :first-child { order: 2; } }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .ic { color: var(--ok); margin-top: 2px; }
.section-dark .ticks .ic { color: var(--accent-light); }

.platform-wall { display: flex; flex-wrap: wrap; gap: 10px; }
.platform-wall .pf-chip { font-size: .95rem; padding: 5px 16px 5px 5px; }
.platform-wall .pf-chip .pf { width: 30px; height: 30px; }

.mock { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-3); padding: 14px; max-width: 420px; margin: 0 auto; color: var(--text); }
.mock .post { box-shadow: none; margin: 0; }

.pricing { display: grid; gap: 16px; }
@media (min-width: 900px) { .pricing { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.price { display: flex; flex-direction: column; gap: 14px; padding: 26px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line); position: relative; }
.price.featured { border-color: var(--btn); box-shadow: 0 0 0 4px var(--tint), var(--shadow-2); }
.price .tag { position: absolute; top: 0; left: 22px; transform: translateY(-50%); background: var(--btn); color: var(--on-btn); font-weight: 700; box-shadow: 0 0 0 4px var(--bg); }
.price h3 { margin: 0; font-size: 1.2rem; }
.price .amount { font: 800 2.4rem/1 var(--font-display); letter-spacing: var(--display-tracking, -.03em); }
.price .amount small { font: 500 .95rem var(--font); color: var(--muted); letter-spacing: 0; }
.price ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; align-content: start; }
.price li { display: flex; gap: 8px; font-size: .95rem; }
.price li .ic { color: var(--ok); margin-top: 2px; }

.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font: 700 1.08rem/1.35 var(--font-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 14px; font: 400 1.6rem/1 var(--font); color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 18px; color: var(--muted); max-width: 68ch; }

.cta-band { border-radius: 28px; padding: 40px 24px; background: var(--btn); color: var(--on-btn); text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.cta-band::after { content: ''; position: absolute; width: 420px; height: 420px; left: -120px; bottom: -260px; border-radius: 50%; background: rgba(var(--accent-rgb), .55); z-index: -1; filter: blur(10px); }
.cta-band h2 { font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.7rem); font-stretch: 85%; letter-spacing: var(--display-tracking, -.03em); max-width: 20ch; margin: 0 auto 12px; }
.cta-band p { max-width: 50ch; margin: 0 auto 22px; opacity: .9; }
.cta-band .btn { background: var(--on-btn); color: var(--btn); }
@media (min-width: 900px) { .cta-band { padding: 64px 40px; } }

.prose { max-width: 72ch; font-size: 1.04rem; line-height: 1.7; overflow-wrap: anywhere; }
.prose h2 { margin-top: 1.6em; } .prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--r); }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--accent); color: var(--muted); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; }
.page-hero { padding-top: 40px; padding-bottom: 24px; }
@media (min-width: 900px) { .page-hero { padding-top: 72px; padding-bottom: 36px; } }
.page-hero h1 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 3.6rem); font-stretch: 82%; letter-spacing: var(--display-tracking, -.03em); max-width: 18ch; line-height: 1.02; }
.page-hero p { font-size: 1.12rem; color: var(--muted); max-width: 56ch; }

.posts { display: grid; gap: 18px; }
@media (min-width: 720px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .posts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; color: inherit; text-decoration: none; min-width: 0; }
.post-card:hover { text-decoration: none; border-color: var(--line-strong); }
.post-card .cover { aspect-ratio: 16 / 9; background: var(--surface-3) center / cover; }
.post-card .cover:not([style]) { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); }
.post-card .pc-body { padding: 16px 18px 20px; }
.post-card h3 { font-size: 1.15rem; margin: 6px 0 8px; }
.post-card p { color: var(--muted); font-size: .94rem; margin: 0; }

.site-foot { background: var(--brand-deep); color: var(--on-deep); margin-top: 0; padding: 56px 0 calc(28px + var(--safe-b)); }
.foot-grid { display: grid; gap: 30px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foot-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 900px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .foot-grid > :first-child { grid-column: auto; } }
.foot-grid h3 { font-size: .9rem; margin-bottom: 12px; opacity: .7; font-family: var(--font); font-weight: 700; }
.foot-grid a { display: block; color: inherit; text-decoration: none; padding: 5px 0; opacity: .9; }
.foot-grid a:hover { opacity: 1; text-decoration: underline; }
.foot-brand p { opacity: .75; max-width: 36ch; margin-top: 12px; }
.foot-grid .brand { display: inline-flex; padding: 0; opacity: 1; }
.foot-social { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.foot-social a { display: inline; }
.foot-base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: .88rem; opacity: .8; }
.foot-base .link-btn { color: inherit; }

/* ---- auth --------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(380px, 44%) 1fr; } }
.auth-art { display: none; position: relative; overflow: hidden; background: var(--brand-deep); color: var(--on-deep); padding: 36px 44px; isolation: isolate; }
.auth-art::before { content: ''; position: absolute; width: 520px; height: 520px; right: -220px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .5), transparent 62%); z-index: -1; }
@media (min-width: 1024px) { .auth-art { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-quote { font: 800 clamp(2rem, 1.2rem + 2vw, 3rem)/1.02 var(--font-display); font-stretch: 82%; letter-spacing: var(--display-tracking, -.03em); max-width: 13ch; margin-bottom: 30px; }
.mini-week { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; }
.mini-week li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; opacity: .6; }
.mini-week .is-today { opacity: 1; }
.mini-week .is-today .pf { box-shadow: 0 0 0 3px var(--brand-deep), 0 0 0 5px var(--accent); }
.auth-main { display: flex; flex-direction: column; padding: 16px 16px calc(32px + var(--safe-b)); }
.auth-top { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
@media (min-width: 1024px) { .auth-top { justify-content: flex-end; } }
.auth-card { width: 100%; max-width: 460px; margin: auto; padding: 20px 0; }
.auth-card h1 { font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem); font-stretch: 88%; letter-spacing: -.025em; margin-bottom: 6px; }
.auth-card .lead { color: var(--muted); margin-bottom: 24px; }
.auth-switch { margin-top: 22px; color: var(--muted); text-align: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--faint); font-size: .85rem; margin: 18px 0; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pick-platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 8px; }
.pick { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: .92rem; margin: 0; }
.pick input { position: absolute; opacity: 0; }
.pick:has(input:checked) { border-color: var(--btn); background: var(--tint); }
.pick:has(input:focus-visible) { outline: 3px solid rgba(var(--brand-rgb), .5); outline-offset: 2px; }
.pf-link-field { display: none; }
.pf-link-field.show { display: block; }

/* ---- theme picker (Admin → Appearance, Settings) ---------------------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.swatch { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; margin: 0; font-weight: 600; font-size: .86rem; background: var(--surface); }
.swatch input { position: absolute; opacity: 0; }
.swatch:has(input:checked) { border-color: var(--btn); box-shadow: 0 0 0 3px var(--tint); }
.swatch:has(input:focus-visible) { outline: 3px solid rgba(var(--brand-rgb), .5); }
.sw-prev { display: flex; height: 46px; border-radius: 9px; overflow: hidden; }
.sw-prev i { flex: 1; } .sw-prev i:first-child { flex: .9; } .sw-prev i:last-child { flex: .45; }
.mode-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-pick label { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; margin: 0; text-align: center; font-size: .88rem; }
.mode-pick input { position: absolute; opacity: 0; }
.mode-pick label:has(input:checked) { border-color: var(--btn); background: var(--tint); }

/* =========================================================================
   Admin compatibility (v1 admin markup inside the new shell)
   ========================================================================= */
.content-header { margin-bottom: 18px; }
.content-header h1 { margin-bottom: 4px; }
.content-header p { color: var(--muted); margin: 0; }
.form-group { margin-bottom: 16px; }
.form-group small { display: block; color: var(--muted); margin-top: 6px; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.checkbox-group label { display: flex; align-items: center; font-weight: 500; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form select, .inline-form input { width: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.text-muted { color: var(--muted); }
.content-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.health-grid, .plans-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.health-card, .plan-card, .review-card, .review-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.health-ok { color: var(--ok); } .health-warning { color: var(--warn); }
.review-header, .review-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.checklist-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.plan-price { font: 800 1.8rem var(--font-display); }
.plan-features { padding-left: 18px; }
.score-high { color: var(--ok); } .score-medium { color: var(--warn); } .score-low { color: var(--bad); }
.content-scroll { overflow-x: auto; }
i.fas, i.fab, i.far, i.fa, i.fa-solid, i.fa-brands { display: none; }

.compare td, .compare thead th { white-space: nowrap; text-align: center; }
.compare tbody th { min-width: 150px; font-weight: 600; }
.cron-fields { display: inline-flex; gap: 4px; }
.cron-fields span { display: flex; flex-direction: column; align-items: center; min-width: 40px; padding: 4px 6px; border-radius: 8px; background: var(--surface-2); }
.cron-fields small { font-size: .66rem; color: var(--muted); }
.cron-fields code { font-size: .82rem; font-weight: 700; }
.kv dd { overflow-wrap: anywhere; }
.panel .stat-grid .stat { box-shadow: none; background: var(--surface-2); border-color: transparent; }
.filter-bar { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.filter-bar > :first-child { grid-column: 1 / -1; }
.filter-bar .btn { grid-column: 1 / -1; }
@media (min-width: 900px) { .filter-bar { grid-template-columns: 2fr 1fr 1fr 1fr auto; } .filter-bar > :first-child, .filter-bar .btn { grid-column: auto; } }
.req { padding: 14px 0; border-top: 1px solid var(--line); }
.req:first-of-type { border-top: 0; }
.req-links { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 12px 0; font-size: .9rem; }
.req-links dt { color: var(--muted); font-weight: 600; }
.req-links dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.legend { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; align-items: end; height: 170px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.bar-pair span { width: min(12px, 42%); min-height: 2px; border-radius: 4px 4px 1px 1px; }
.bar-col small { font-size: .7rem; color: var(--muted); }
.list a.grow, .list a.row { text-decoration: none; color: inherit; }
.list a.grow:hover strong, .list a.row:hover strong { text-decoration: underline; }
.list a.grow small, .list a.row small { display: block; }
.rota { display: grid; gap: 12px; }
@media (min-width: 1100px) { .rota { grid-template-columns: 1fr 1fr; } }
.rota-day { margin: 0; min-width: 0; }
.rota-day.is-today { border-color: var(--btn); box-shadow: 0 0 0 3px var(--tint); }
.rota-head { padding: 0; margin-bottom: 10px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--surface-2); border-radius: var(--r-pill); margin-bottom: 12px; }
.seg label { margin: 0; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; justify-content: center; align-items: center; min-height: 36px; border-radius: var(--r-pill); font-weight: 600; font-size: .86rem; color: var(--muted); cursor: pointer; text-align: center; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.seg input:focus-visible + span { outline: 3px solid rgba(var(--brand-rgb), .5); }
.rota-note { margin: 0; }
.sticky-actions { position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 12px); z-index: 5; margin-top: 16px; display: flex; justify-content: flex-end; }
.sticky-actions .btn { box-shadow: var(--shadow-3); }
@media (min-width: 1024px) { .sticky-actions { bottom: 16px; } }
/* ---- Admin → Appearance ---- */
.appearance { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.appearance-main { display: grid; gap: 16px; min-width: 0; }
.appearance-main .panel { margin: 0; }
@media (min-width: 1100px) { .appearance { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .appearance-side { position: sticky; top: 84px; } }
.sub { font: 700 .86rem var(--font); color: var(--muted); margin: 14px 0 8px; }
.custom-colours.is-active { border-color: var(--btn); box-shadow: 0 0 0 3px var(--tint); }
.swatch-inline { flex-direction: row; padding: 6px 12px; }
.swatch-inline input { position: static; opacity: 1; accent-color: var(--btn); }
.label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.brand-uploads { display: grid; gap: 14px; }
.brand-up { display: flex; gap: 14px; align-items: flex-start; }
.brand-prev { flex: none; width: 96px; height: 64px; border-radius: var(--r-sm); border: 1px dashed var(--line-strong); display: grid; place-items: center; background: var(--surface-2); overflow: hidden; padding: 6px; }
.brand-prev.on-dark { background: var(--brand-deep); }
.brand-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.preview { border-radius: 30px; border: 8px solid var(--text); background: var(--bg); overflow: hidden; box-shadow: var(--shadow-3); max-width: 320px; margin: 0 auto; }
.pv-top { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.pv-top strong { flex: 1; font: 800 .95rem var(--font-display); }
.pv-top .brand-mark { width: 26px; height: 26px; }
.pv-body { padding: 12px; display: grid; gap: 10px; }
.pv-today { border-radius: 18px; padding: 14px; background: var(--brand-deep); color: var(--on-deep); display: grid; gap: 2px; }
.pv-today small { opacity: .7; }
.pv-today b { font: 800 1.3rem var(--font-display); }
.pv-rec { font-size: .8rem; color: var(--accent-light); font-weight: 700; }
.pv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 8px; }
.pv-card p { margin: 0; font-weight: 600; }
.pv-card .pill { justify-self: start; }
.pv-tabs { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; justify-items: center; padding: 8px 4px 10px; background: var(--surface); border-top: 1px solid var(--line); color: var(--muted); }
.pv-tabs .on { color: var(--link); }
.pv-plus { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--btn); color: var(--on-btn); }
.api-list > li { padding: 9px 0; align-items: flex-start; }
.api-m { flex: none; min-width: 64px; text-align: center; font: 700 .72rem/1 ui-monospace, monospace; padding: 5px 6px; border-radius: 6px; background: var(--surface-2); color: var(--muted); margin-top: 2px; }
.api-get { background: var(--ok-bg); color: var(--ok); }
.api-post { background: var(--tint); color: var(--link); }
.api-patch { background: var(--warn-bg); color: var(--warn); }
/* v1 admin tables: scroll sideways on phones instead of breaking words */
.table-responsive table, .table-wrap table { min-width: 600px; }
.table-wrap table.compare { min-width: 0; }
.table th, .table td, .data-table th, .data-table td { overflow-wrap: normal; word-break: normal; }
.content-header h1 { display: none; }
.content-header { margin-bottom: 12px; }
.blog-layout { display: grid; gap: 28px; }
@media (min-width: 1024px) { .blog-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .blog-side { position: sticky; top: 90px; } }
.blog-main { min-width: 0; }
.blog-side { display: grid; gap: 14px; }
.side-widget h2 { font-size: 1rem; margin-bottom: 10px; }
.side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-list a { font-weight: 600; }
/* ---- Admin → Email & SMS ---- */
.tpl-edit { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.tpl-form { display: grid; gap: 16px; min-width: 0; }
.tpl-form .panel { margin: 0; }
@media (min-width: 1200px) { .tpl-edit { grid-template-columns: minmax(0, 1fr) 460px; align-items: start; } .tpl-preview { position: sticky; top: 84px; } }
.tpl-preview iframe { width: 100%; height: 620px; border: 1px solid var(--line); border-radius: var(--r); background: #F1F0F5; }
.sms-bubble { margin-top: 12px; max-width: 320px; padding: 10px 14px; border-radius: 18px 18px 18px 4px; background: var(--surface-2); font-size: .92rem; line-height: 1.45; }
.sms-bubble small { display: block; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
/* Brand icons inside platform badges */
.pf { color: var(--pf-on, #fff); }
.pf .ic.brand { width: 54%; height: 54%; }
:root[data-mode="dark"] .pf-dark { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); }
@media (prefers-color-scheme: dark) { :root[data-mode="auto"] .pf-dark { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.28); } }
.social-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.social-icons a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); color: inherit; opacity: .9; }
.social-icons a:hover { opacity: 1; background: rgba(255,255,255,.18); }
.social-icons .ic { width: 18px; height: 18px; }
.free-pill { display: inline-flex; align-items: center; gap: 8px; margin: -6px 0 22px; padding: 7px 14px; border-radius: var(--r-pill); background: rgba(var(--accent-rgb), .18); color: var(--text); font-weight: 700; font-size: .92rem; }
.free-pill .ic { color: var(--accent-text); }
.check-grid { display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.check-grid .check { margin: 0; }

/* ---- templates library and pickers -------------------------------------- */
.tpl-picker { margin: 0 0 18px; padding: 14px; border-radius: var(--r); background: var(--surface-2); }
.tpl-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; margin: 0 -2px; scrollbar-width: thin; }
.tpl-card { flex: 0 0 156px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; padding: 6px 6px 9px; border-radius: var(--r-sm); border: 2px solid transparent; background: var(--surface); color: var(--text); font: inherit; font-size: .84rem; font-weight: 650; line-height: 1.25; text-align: left; cursor: pointer; box-shadow: var(--shadow-1); }
.tpl-card img, .tpl-noimg { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 7px; display: grid; place-items: center; background: var(--tint); color: var(--link); }
.tpl-card > span:last-child { padding: 0 3px; }
.tpl-card:hover { border-color: var(--line-strong); }
.tpl-card.on { border-color: var(--btn); }
.tpl-card:focus-visible { outline: 3px solid var(--tint-strong); outline-offset: 2px; }
.tpl-image-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.tpl-image-row img { width: 168px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.ann-thumb { width: 72px; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 8px; flex: none; }
.mention { font-weight: 700; color: var(--link); background: var(--tint); padding: 0 4px; border-radius: 5px; text-decoration: none; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tpl-tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.tpl-tile > img, .tpl-tile > .tpl-noimg { border-radius: 0; }
.tpl-tile .tpl-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tpl-tile .tpl-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 10px; }
.tpl-tile.off { opacity: .55; }
.week-grid { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.week-grid li { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.week-grid li strong { width: 40px; flex: none; color: var(--muted); font-weight: 650; }

/* ---- help widget and live chat ---------------------------------------- */
.help-w { position: fixed; z-index: 70; right: 16px; bottom: calc(16px + var(--safe-b)); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.help-w > * { pointer-events: auto; }
.shell-app .help-w { bottom: calc(var(--tab-h) + 14px + var(--safe-b)); }
@media (min-width: 1024px) { .shell-app .help-w { bottom: 24px; right: 24px; } .help-w { right: 24px; bottom: 24px; } }
.help-fab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 52px; padding: 0 20px 0 16px; border: 0; border-radius: var(--r-pill); background: var(--btn); color: var(--on-btn); font: 700 .95rem var(--font); box-shadow: var(--shadow-3); cursor: pointer; order: 2; }
.help-fab .ic { width: 22px; height: 22px; }
.help-fab:focus-visible { outline: 3px solid var(--tint-strong); outline-offset: 3px; }
.shell-app .help-fab { height: 46px; padding: 0 14px; }
.shell-app .help-fab span { display: none; }
@media (min-width: 1024px) { .shell-app .help-fab span { display: inline; } .shell-app .help-fab { padding: 0 18px 0 14px; } }
.help-w.is-open .help-fab { background: var(--text); color: var(--bg); }
.help-dot { position: absolute; top: 4px; right: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.help-panel { order: 1; width: min(380px, calc(100vw - 32px)); max-height: min(620px, calc(100dvh - 120px)); display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: var(--shadow-3); overflow: hidden; animation: help-in .18s var(--ease); }
.shell-app .help-panel { max-height: min(620px, calc(100dvh - var(--tab-h) - 110px)); }
@keyframes help-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .help-panel { animation: none; } }
.help-head { display: flex; gap: 10px; align-items: flex-start; padding: 16px 14px 14px 18px; background: var(--brand-deep, #1A1430); color: #fff; }
.help-head h2 { margin: 0; font: 700 1.12rem/1.2 var(--font-display); }
.help-head p { margin: 4px 0 0; font-size: .86rem; opacity: .78; }
.help-head .icon-btn { color: inherit; flex: none; }
.help-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
.help-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 46px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface); }
.help-search:focus-within { border-color: var(--btn); box-shadow: 0 0 0 3px var(--tint); }
.help-search .ic { color: var(--muted); flex: none; }
.help-search input { flex: 1; border: 0; background: none; outline: 0; font: inherit; color: inherit; min-width: 0; height: 100%; padding: 0; }
.help-results { display: flex; flex-direction: column; gap: 8px; }
.help-results:empty { display: none; }
.help-hit { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.help-hit summary { padding: 11px 12px; font-weight: 650; cursor: pointer; list-style-position: outside; margin-left: 14px; }
.help-ans { padding: 0 14px 12px; font-size: .92rem; line-height: 1.55; color: var(--text); }
.help-ans > :first-child { margin-top: 0; }
.help-ans img { max-width: 100%; height: auto; border-radius: 8px; }
.help-more { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-top: auto; padding-top: 4px; }
.help-more p { margin: 0; }
.help-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 80px; }
.msg { max-width: 86%; padding: 9px 12px 6px; border-radius: 16px; font-size: .93rem; line-height: 1.45; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg time { display: block; font-size: .7rem; opacity: .65; margin-top: 2px; text-align: right; }
.msg-who { display: block; font-size: .74rem; font-weight: 700; color: var(--link); margin-bottom: 1px; }
.msg.from-visitor { align-self: flex-end; background: var(--btn); color: var(--on-btn); border-bottom-right-radius: 5px; }
.msg.from-staff { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.msg.from-system { align-self: center; max-width: 100%; background: none; color: var(--muted); font-size: .82rem; text-align: center; padding: 2px 8px; }
.msg.from-system time { display: none; }
.help-start .field { margin-bottom: 10px; }
.help-send { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); margin: 0 -14px -14px; padding: 10px 10px 10px 14px; background: var(--surface); position: sticky; bottom: -14px; }
.help-send textarea { flex: 1; resize: none; min-height: 42px; max-height: 140px; border-radius: 21px; padding: 10px 14px; }
.help-send .icon-btn { background: var(--btn); color: var(--on-btn); width: 42px; height: 42px; border-radius: 50%; flex: none; }
.shell-admin .help-w { display: none; }

/* Admin → Live chat */
.chat-admin { display: grid; gap: 16px; }
@media (min-width: 1024px) { .chat-admin { grid-template-columns: 320px minmax(0, 1fr); align-items: start; } }
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-list a { display: flex; gap: 10px; padding: 12px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; align-items: flex-start; }
.chat-list a:hover { background: var(--surface-2); text-decoration: none; }
.chat-list a[aria-current] { background: var(--tint); }
.chat-list .unread strong::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }
.chat-thread .help-msgs { max-height: 56vh; min-height: 240px; padding: 4px 2px; }
.chat-thread .msg.from-visitor { align-self: flex-start; background: var(--surface-2); color: var(--text); border-bottom-left-radius: 5px; border-bottom-right-radius: 16px; }
.chat-thread .msg.from-staff { align-self: flex-end; background: var(--btn); color: var(--on-btn); border-bottom-right-radius: 5px; border-bottom-left-radius: 16px; }
.chat-thread .msg.from-staff .msg-who { color: inherit; opacity: .8; }
.chat-reply { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.chat-reply textarea { flex: 1; min-height: 46px; }
@media (max-width: 1023.98px) { [data-hide-phone] { display: none; } }
.help-search input, .help-search input:focus { border: 0 !important; box-shadow: none !important; outline: 0; background: none; min-height: 0; }
.help-search input::-webkit-search-cancel-button { cursor: pointer; }
.help-ans > a { display: inline-block; margin-top: 8px; }
.help-hit summary::marker { color: var(--muted); }

/* Admin → Appearance: font pairings */
.font-picks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.font-pick { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.font-pick:hover { border-color: var(--line-strong); }
.font-pick input { position: absolute; opacity: 0; pointer-events: none; }
.font-pick:has(input:checked) { border-color: var(--btn); box-shadow: 0 0 0 3px var(--tint); }
.font-pick:has(input:focus-visible) { outline: 3px solid var(--tint-strong); outline-offset: 2px; }
.fp-sample { font-family: var(--fp-d); font-weight: 800; font-size: 1.35rem; line-height: 1.1; letter-spacing: var(--fp-t); }
.fp-text { font-family: var(--fp-b); font-size: .88rem; color: var(--muted); line-height: 1.45; }
.fp-name { font-size: .8rem; margin-top: 4px; }

/* Artwork: sign-in panel, page headings */
.auth-visual { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 18px 0; }
.auth-visual img { width: 100%; max-width: 560px; height: 100%; max-height: 520px; object-fit: contain; filter: drop-shadow(0 30px 40px rgba(0,0,0,.25)); }
.auth-art.has-photo { background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.05) 35%, rgba(0,0,0,.72)), var(--auth-photo) center / cover no-repeat, var(--brand-deep); }
.auth-art.has-photo::before { display: none; }
.page-hero { position: relative; }
@media (min-width: 1100px) {
  .page-hero:not(.no-art)::after { content: ''; position: absolute; right: 24px; top: 30px; width: 350px; height: 230px; background: url('/assets/art/page-art.webp') center / contain no-repeat; pointer-events: none; }
  .page-hero:not(.no-art) h1, .page-hero:not(.no-art) > p { max-width: min(56ch, calc(100% - 380px)); }
}

/* Help widget results (links to articles) */
a.help-hit { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; text-decoration: none; color: var(--text); }
a.help-hit:hover { border-color: var(--btn); text-decoration: none; }
a.help-hit strong { font-size: .95rem; line-height: 1.3; }
a.help-hit .small { color: var(--muted); line-height: 1.45; }
a.help-hit .help-cat { font-size: .74rem; font-weight: 600; }
a.help-hit.is-best { border-color: var(--btn); background: var(--tint); }
.help-best { align-self: flex-start; font-size: .7rem; font-weight: 800; color: var(--on-btn); background: var(--btn); padding: 2px 8px; border-radius: var(--r-pill); margin-bottom: 2px; }

/* Help centre */
.kb-hero { background: var(--brand-deep); color: var(--on-deep, #fff); padding: 56px 0 64px; position: relative; overflow: hidden; isolation: isolate; }
.kb-hero::before { content: ''; position: absolute; width: 620px; height: 620px; right: -200px; top: -320px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--accent-rgb), .45), transparent 62%); z-index: -1; }
.kb-hero::after { content: ''; position: absolute; right: 4%; bottom: -30px; width: 340px; height: 224px; background: url('/assets/art/page-art.webp') center / contain no-repeat; z-index: -1; opacity: .95; display: none; }
@media (min-width: 1100px) { .kb-hero::after { display: block; } }
.kb-hero.in-app { border-radius: var(--r-lg); padding: 36px 28px 40px; margin-bottom: 20px; }
.kb-hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); font-stretch: 84%; letter-spacing: var(--display-tracking, -.03em); margin: 0 0 6px; }
.kb-hero p { opacity: .82; margin: 0 0 22px; font-size: 1.05rem; }
.kb-search { display: flex; align-items: center; gap: 8px; max-width: 640px; padding: 6px 6px 6px 14px; border-radius: var(--r-pill); background: var(--surface); border: 1.5px solid var(--line-strong); color: var(--text); }
.kb-search:focus-within { border-color: var(--btn); box-shadow: 0 0 0 4px var(--tint); }
.kb-search .ic { color: var(--muted); flex: none; }
.kb-search input, .kb-search input:focus { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: none; min-height: 40px; padding: 0 4px; }
.kb-search .btn { border-radius: var(--r-pill); }
.kb-search-big { padding: 8px 8px 8px 18px; box-shadow: var(--shadow-3); border-color: transparent; }
.kb-search-big input { font-size: 1.08rem; min-height: 46px; }
.kb-wrap { padding-bottom: 56px; }
.kb-cats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin: 28px 0 8px; }
.kb-cat { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.kb-cat:hover { border-color: var(--btn); text-decoration: none; transform: translateY(-2px); }
.kb-cat strong { font: 700 1.1rem var(--font-display); margin-top: 6px; }
.kb-count { color: var(--link); font-weight: 600; margin-top: 6px; }
.kb-cat-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--link); flex: none; }
.kb-h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); font-stretch: 88%; letter-spacing: var(--display-tracking, -.03em); margin: 10px 0 16px; }
.kb-h2 { font-size: 1.3rem; margin: 32px 0 12px; }
.kb-cat-head { display: flex; gap: 14px; align-items: center; margin: 14px 0 20px; }
.kb-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }
@media (min-width: 900px) { .kb-list-2 { grid-template-columns: 1fr 1fr; } }
.kb-list a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; }
.kb-list a:hover { border-color: var(--btn); text-decoration: none; }
.kb-list a span { flex: 1; }
.kb-list a .ic:first-child { color: var(--link); }
.kb-list a .ic:last-child { color: var(--faint); }
.kb-results { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 10px; max-width: 760px; }
.kb-results a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.kb-results a:hover { border-color: var(--btn); text-decoration: none; }
.kb-results strong { font-size: 1.05rem; }
.kb-results .small:last-child { color: var(--muted); }
.crumbs { color: var(--muted); padding-top: 20px; }
.crumbs a { color: var(--muted); }
.kb-layout { display: grid; gap: 24px; margin-top: 8px; }
@media (min-width: 1024px) { .kb-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .kb-side { position: sticky; top: calc(var(--top-h) + 16px); } }
.kb-article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; min-width: 0; }
@media (min-width: 720px) { .kb-article { padding: 34px 40px; } }
.kb-article h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); font-stretch: 88%; letter-spacing: var(--display-tracking, -.03em); margin: 0 0 6px; line-height: 1.08; }
.kb-body { margin-top: 18px; font-size: 1.04rem; }
.kb-matched { display: flex; gap: 6px; align-items: center; color: var(--link); background: var(--tint); padding: 8px 12px; border-radius: var(--r-sm); margin: 0 0 18px; }
.kb-vote { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.kb-vote-q { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.kb-vote-yes { color: var(--ok); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.kb-side { display: grid; gap: 14px; min-width: 0; }
.kb-side .kb-search { max-width: none; }
.kb-side .kb-search .btn { display: none; }
.kb-contact { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.kb-side .kb-contact { margin-top: 0; }
.kb-side .kb-contact .btn { flex: 1; justify-content: center; }
.h3 { font-size: 1.05rem; margin: 0 0 10px; }
.kb-edit { display: grid; gap: 16px; }
@media (min-width: 1024px) { .kb-edit { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; } .kb-edit-side { position: sticky; top: calc(var(--top-h) + 16px); } }
.kb-edit-side { display: grid; gap: 14px; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick label { cursor: pointer; }
.icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.icon-pick span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1.5px solid var(--line); color: var(--muted); }
.icon-pick input:checked + span { border-color: var(--btn); background: var(--tint); color: var(--link); }
.icon-pick input:focus-visible + span { outline: 3px solid var(--tint-strong); }
@media (min-width: 720px) { .blog-main .posts { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); } }
.w-image { width: 100%; height: auto; border-radius: var(--r-sm); display: block; }
.w-html { overflow-wrap: anywhere; }
.w-html iframe, .w-html img, .w-html video { max-width: 100%; }
.side-widget .panel-head h2, .side-widget .panel-head h3 { margin: 0; font-size: 1rem; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-grid a { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .85rem; text-decoration: none; }
.quick-grid a .ic { color: var(--link); }
.quick-grid a:hover { background: var(--tint); text-decoration: none; }
.w-cover { width: 100%; aspect-ratio: 1200/630; object-fit: cover; border-radius: var(--r-sm); margin-bottom: 10px; display: block; }
.w-rank .board-rank { width: 22px; }
.widgets-admin { display: grid; gap: 16px; }
@media (min-width: 1100px) { .widgets-admin { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } }
.widget-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.widget-rows li { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.widget-rows li.off { background: var(--surface-2); }
.widget-rows li.off strong, .widget-rows li.off .kb-cat-ic { opacity: .6; }
.widget-rows .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.widget-catalog { display: grid; gap: 8px; }
.widget-card { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
textarea.mono { font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
