/*
 * Goji Cloud admin design system (docs/ui/DESIGN_SYSTEM.md).
 * One stylesheet for every admin screen: tokens, base, layout, components, utilities, print.
 * Hand-written, no build step (the host has no node). No page-specific CSS: add a component instead.
 * Admin views carry no inline style="" or <style> (CSP-ready, test-enforced): use the utilities in §5.
 */

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
    color-scheme: light;

    /* ----------------------------------------------------------------------
       Goji brand palette (docs/ui/GOJI_COLOR_TOKENS.md). Sampled from the Goji.my logo; the --goji-logo-* values are
       the logo itself (marks, dots, charts), the others are the UI shades tuned for WCAG AA text contrast.
       Pages never use raw colours: they use the semantic --color-* / --tone-* names below.
       ---------------------------------------------------------------------- */
    --goji-logo-blue: #004ebf;      /* pocket */
    --goji-logo-sky: #0087ee;       /* cloud / top edge */
    --goji-logo-purple: #5d0d7e;    /* "Goji" */
    --goji-logo-green: #52981b;     /* ".my" */
    --goji-logo-orange: #fc9d3c;    /* squares */

    --goji-primary: #0a58ca;        /* buttons, links, focus, selection (white on it 6.4:1) */
    --goji-primary-hover: #004ebf;  /* = logo blue */
    --goji-primary-active: #003f9e;
    --goji-primary-soft: #eaf2fd;
    --goji-primary-border: #bcd5f6;

    --goji-navy: #0b2557;           /* sidebar top (20 Nov 2026: darker, as Dhading Update) */
    --goji-navy-deep: #071b3c;      /* sidebar from 40 % down, head */
    --goji-navy-text: #ffffff;
    --goji-navy-text-2: #c9d6ea;    /* nav items (11:1 on the deep navy) */
    --goji-navy-label: #8fa6cc;     /* group labels (6.4:1) */
    --goji-navy-hover: rgba(255, 255, 255, .07);
    --goji-navy-active: #174de0;    /* current page: the solid blue pill (white on it 6.1:1) */
    --goji-navy-border: rgba(255, 255, 255, .12);
    --goji-navy-indicator: #6cbcff; /* active marker, from the cloud blue */
    --goji-section-head: #1355c9;   /* heading band of the Website settings section cards (owner, 25 Nov 2026; white on it 6.5:1) */
    /* Dashboard charts (20 Nov 2026, after Dhading Update): bar gradient and the empty track. */
    --chart-bar-top: #3373f2;
    --chart-bar-bottom: #1631b8;
    --chart-track: #edf1f8;
    --chart-alt: #c3d5fb;          /* the second series of a report chart (light bar beside the blue one) */
    /* Overview shortcut band (20 Nov 2026, as Dhading Update): deep navy to bright blue. */
    --overview-from: #0c2a86;
    --overview-to: #3a78f2;

    /* Admin top bar (17 Nov 2026): a brand-blue band; white text on it is 6.9:1 at the darker end, 4.9:1 at the lighter. */
    --topbar-from: #0a44b0;
    --topbar-to: #1b63de;
    --topbar-text: #ffffff;
    --topbar-text-2: #dce8ff;
    --topbar-line: rgba(255, 255, 255, .5);
    --topbar-hover: rgba(255, 255, 255, .14);
    --topbar-field: #ffffff;
    --topbar-field-text: #0f1b2d;
    --topbar-field-hint: #5b6880;
    --topbar-badge-ring: #0a44b0;
    /* Dark mode pass (owner, 30 Nov 2026): the same light values, now tokens so the dark theme can restyle them. */
    --topbar-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 4px 14px -8px rgba(8, 30, 80, .45);
    --topbar-avatar-ink: var(--goji-primary);
    --side-edge: var(--goji-navy-deep);
    --preview-light-side: #0b2557;
    --goji-primary-on-white: #0a58ca;
    --btn-primary-bg: var(--color-brand);
    --btn-primary-fg: var(--color-brand-ink);
    --btn-primary-hover: var(--color-brand-hover);
    --btn-primary-active: var(--color-brand-active);
    --btn-soft-hover: #dceafc;
    --btn-soft-active: #cfe1fb;

    /* Sign-in screens (layouts/auth): deep brand night sky behind the card, glows from the logo's cloud and purple. */
    --auth-sky-1: #061d4f;
    --auth-sky-2: #0a2f7a;
    --auth-sky-3: #030f2e;
    --auth-glow-blue: rgba(0, 135, 238, .38);
    --auth-glow-purple: rgba(93, 13, 126, .42);
    --auth-dots: rgba(255, 255, 255, .07);
    --auth-panel-text: #ffffff;
    --auth-panel-text-2: #c9d8f4;
    --auth-chip: rgba(255, 255, 255, .1);
    --auth-chip-border: rgba(255, 255, 255, .18);

    --goji-purple: #5d0d7e;         /* secondary accent: platform context, review, premium (never a primary action) */
    --goji-purple-soft: #f4eaf9;
    --goji-purple-border: #dcc3ea;
    --goji-purple-on-navy: #e5ccf6;

    --goji-green: #3d7414;          /* success text (logo green is for icons/dots: 3.6:1 is too low for text) */
    --goji-green-soft: #eef6e7;
    --goji-green-border: #c5e1ad;

    --goji-orange: #a3530a;         /* warning / attention / support mode text */
    /* Social platform marks (Auto Social account faces, 28 Nov 2026) */
    --brand-facebook: #1877f2; --brand-instagram: #d62976; --brand-telegram: #229ed9; --brand-google: #1a73e8;
    --goji-orange-soft: #fff4e8;
    --goji-orange-border: #f8cf9c;

    --goji-danger: #b42318;         /* genuine danger only */
    --goji-danger-soft: #fdedec;
    --goji-danger-border: #f6c6c2;
    --goji-danger-solid: #c62828;
    --goji-danger-solid-hover: #a61f1f;

    --goji-bg: #f3f6fa;             /* cloud-white page background */
    --goji-surface: #ffffff;
    --goji-surface-muted: #f7f9fc;
    --goji-surface-3: #edf1f7;
    --goji-border: #e2e8f0;
    --goji-border-strong: #cbd5e1;
    /* Account → Appearance previews: a picture of each theme looks the same whatever theme is on (25 Nov 2026). */
    --preview-dark-bg: #0c111b;
    --preview-dark-surface: #182032;
    --preview-dark-line: #34405a;
    --preview-dark-side: #070b14;
    --goji-text: #0f1b2d;
    --goji-text-2: #33415c;
    --goji-text-muted: #5b6880;     /* 5.2:1 on the page background */
    --goji-text-faint: #66718a;     /* 4.5:1 on the page background */
    --goji-code-bg: #0f1b2d;        /* the editor's HTML code view (dark panel) */
    --goji-code-text: #e7eaf0;
    --goji-code-label: #a9c1ee;

    /* Editions: accents/badges only, never page colours */
    --goji-edition-travel: #0b7a64;  --goji-edition-travel-soft: #e6f5f1;
    --goji-edition-news: #5d0d7e;    --goji-edition-news-soft: #f4eaf9;

    /* Charts: logo order, then neutrals */
    --chart-1: #0a58ca; --chart-2: #7b2ca8; --chart-3: #52981b; --chart-4: #e8862a; --chart-5: #4ba3f2; --chart-6: #94a3b8;

    /* Colour: neutrals */
    --color-bg: var(--goji-bg);
    --color-surface: var(--goji-surface);
    --color-surface-2: var(--goji-surface-muted);
    --color-surface-3: var(--goji-surface-3);
    --color-border: var(--goji-border);
    --color-border-strong: var(--goji-border-strong);
    --color-text: var(--goji-text);
    --color-text-2: var(--goji-text-2);
    --color-muted: var(--goji-text-muted);
    --color-faint: var(--goji-text-faint);
    --color-overlay: rgba(8, 25, 56, .45);

    /* Colour: brand (primary action) */
    --color-brand: var(--goji-primary);
    --color-brand-hover: var(--goji-primary-hover);
    --color-brand-active: var(--goji-primary-active);
    --color-brand-ink: #ffffff;
    --color-brand-soft: var(--goji-primary-soft);
    --color-brand-text: var(--goji-primary);

    /* Colour: platform console accent (Goji purple: context, not actions) */
    --color-platform: var(--goji-purple);
    --color-platform-soft: var(--goji-purple-soft);
    --color-platform-ink: #ffffff;

    /* Colour: tones (status pills, badges, alerts, toasts) — one semantic system for the whole SaaS */
    --tone-neutral: #475569;            --tone-neutral-soft: #f1f4f8;            --tone-neutral-border: var(--goji-border);
    --tone-info: var(--goji-primary);   --tone-info-soft: var(--goji-primary-soft); --tone-info-border: var(--goji-primary-border);
    --tone-review: var(--goji-purple);  --tone-review-soft: var(--goji-purple-soft); --tone-review-border: var(--goji-purple-border);
    --tone-success: var(--goji-green);  --tone-success-soft: var(--goji-green-soft); --tone-success-border: var(--goji-green-border);
    --tone-warning: var(--goji-orange); --tone-warning-soft: var(--goji-orange-soft); --tone-warning-border: var(--goji-orange-border);
    --tone-danger: var(--goji-danger);  --tone-danger-soft: var(--goji-danger-soft); --tone-danger-border: var(--goji-danger-border);
    --tone-muted: var(--goji-text-muted); --tone-muted-soft: #f5f7fa;            --tone-muted-border: var(--goji-border);
    --tone-brand: var(--goji-primary);  --tone-brand-soft: var(--goji-primary-soft); --tone-brand-border: var(--goji-primary-border);
    /* Marks (dots, icons, progress) may use the brighter logo colours: 3:1 is enough for non-text. */
    --tone-success-mark: var(--goji-logo-green);
    --tone-warning-mark: var(--goji-logo-orange);
    --tone-info-mark: var(--goji-primary);
    --color-danger-solid: var(--goji-danger-solid);
    --color-danger-solid-hover: var(--goji-danger-solid-hover);

    /* Typography */
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --text-xs: .75rem;     /* 12px */
    --text-sm: .8125rem;   /* 13px */
    --text-base: .875rem;  /* 14px */
    --text-md: .9375rem;   /* 15px */
    --text-lg: 1.0625rem;  /* 17px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --weight-regular: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* Spacing (4px grid) */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;

    /* Radii, borders, shadows */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 999px;
    --border-width: 1px;
    --shadow-xs: 0 1px 2px rgba(15, 27, 45, .04);
    --shadow-sm: 0 1px 3px rgba(15, 27, 45, .07), 0 1px 2px rgba(15, 27, 45, .03);
    --shadow-md: 0 8px 20px -6px rgba(15, 27, 45, .14), 0 2px 6px -2px rgba(15, 27, 45, .05);
    --shadow-lg: 0 20px 44px -12px rgba(8, 25, 56, .28);

    /* Focus ring */
    --focus-color: rgba(10, 88, 202, .32);
    --focus-ring: 0 0 0 3px var(--focus-color);

    /* Layers */
    --z-base: 1;
    --z-sticky: 20;
    --z-topbar: 30;
    --z-sidebar: 40;
    --z-backdrop: 50;
    --z-dropdown: 60;
    --z-modal: 70;
    --z-toast: 80;
    --z-tooltip: 90;

    /* Layout */
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 68px;
    --topbar-height: 52px; /* 24 Nov 2026 (owner): a slimmer top bar (was 60px) */
    --content-max: 1280px;
    --gutter: var(--space-5); /* 20 px side padding, as Dhading Update (owner, 22 Nov 2026; was 32 px) */
    --control-height: 36px;
    --control-height-sm: 30px;
    --control-height-lg: 42px;
    --duration: .16s;
    --ease: cubic-bezier(.2, .7, .3, 1);

    /* Context accent: brand in a client's admin, violet in the platform console */
    --accent: var(--color-brand);
    --accent-soft: var(--color-brand-soft);
    --accent-ink: var(--color-brand-ink);

    /* Legacy aliases (pre-UI-1 names, kept so older markup keeps rendering) */
    --bg: var(--color-bg);
    --surface: var(--color-surface);
    --surface-2: var(--color-surface-2);
    --border: var(--color-border);
    --text: var(--color-text);
    --muted: var(--color-muted);
    --brand: var(--color-brand);
    --brand-ink: var(--color-brand-ink);
    --brand-soft: var(--color-brand-soft);
    --ok: var(--tone-success);
    --ok-soft: var(--tone-success-soft);
    --warn: var(--tone-warning);
    --warn-soft: var(--tone-warning-soft);
    --danger: var(--tone-danger);
    --danger-soft: var(--tone-danger-soft);
    --radius: var(--radius-lg);
    --shadow: var(--shadow-xs);
    --font: var(--font-sans);
    /* Story editor picture bar and "?" notes (22 Nov 2026). */
    --goji-imgbar-bg: #16213a;
    --goji-imgbar-muted: #cbd5e1;
    --goji-imgbar-text: #e2e8f0;
    --goji-imgbar-accent: #fbbf24;
    --goji-imgbar-danger: #dc2626;
    --goji-imgbar-dot: #f97316;
    --goji-imgbar-dot-on: #22c55e;
    --goji-ink-strong: #0f172a;
    --goji-imgbar-save: #f59e0b;
    --goji-imgbar-save-text: #1f2937;
}

/* Dark theme: chosen per member in the account menu (data-theme on <html>: light — the default —, dark, or system). */
:root[data-theme="dark"] {
    --chart-track: rgba(255, 255, 255, .09);
    --chart-alt: rgba(150, 185, 255, .38);
    color-scheme: dark;
    --color-bg: #0c111b;
    --color-surface: #121826;
    --color-surface-2: #182032;
    --color-surface-3: #1f293d;
    --color-border: #263045;
    --color-border-strong: #34405a;
    --color-text: #eef1f6;
    --color-text-2: #cdd3df;
    --color-muted: #98a2b3;
    --color-faint: #8590a3; /* AA on dark surfaces */
    --color-overlay: rgba(0, 0, 0, .6);
    --color-brand: #5b8cff;
    --color-brand-hover: #7aa2ff;
    --color-brand-ink: #0b1220;
    --color-brand-soft: #18264a;
    --color-brand-text: #9bb8ff;
    --color-platform: #a78bfa;
    --color-platform-soft: #251a45;
    --color-platform-ink: #120a26;
    --tone-neutral: #cdd3df;  --tone-neutral-soft: #1f293d; --tone-neutral-border: #34405a;
    --tone-info: #84caff;     --tone-info-soft: #0f2742;    --tone-info-border: #1d4b7a;
    --tone-success: #75e0a7;  --tone-success-soft: #0d2b1e; --tone-success-border: #1b5a3c;
    --tone-warning: #fec84b;  --tone-warning-soft: #33250b; --tone-warning-border: #6b4a12;
    --tone-danger: #fda29b;   --tone-danger-soft: #3a1512;  --tone-danger-border: #7a271a;
    --tone-muted: #98a2b3;    --tone-muted-soft: #161d2c;   --tone-muted-border: #263045;
    --tone-brand: #9bb8ff;    --tone-brand-soft: #18264a;   --tone-brand-border: #2c4280;
    --tone-review: #d8b4fe;   --tone-review-soft: #2a1640;   --tone-review-border: #5b2d82;
    --color-danger-solid: #f04438;
    --color-danger-solid-hover: #d92d20;
    --focus-color: rgba(91, 140, 255, .55);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
    --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, .6);
    --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
    --topbar-from: #0f1524;
    --topbar-to: #111a2e;
    --topbar-text-2: #98a2b3;
    --topbar-line: rgba(255, 255, 255, .14);
    --topbar-hover: rgba(255, 255, 255, .06);
    --topbar-shadow: 0 1px 0 #1f2738;
    --topbar-avatar-ink: #9bb8ff;
    /* Sidebar, overview band and settings heading bands (owner, 30 Nov 2026: the light blues looked unmatched). */
    --goji-navy: #111827;
    --goji-navy-deep: #0e1420;
    --goji-navy-text: #eef1f6;
    --goji-navy-text-2: #b8c1d1;
    --goji-navy-label: #7e8aa0;
    --goji-navy-hover: rgba(255, 255, 255, .05);
    --goji-navy-active: #1f3d8a;
    --goji-navy-border: rgba(255, 255, 255, .08);
    --goji-navy-indicator: #7aa2ff;
    --side-edge: #1c2436;
    --goji-section-head: #1c2943;
    --btn-primary-bg: #3366e6;
    --btn-primary-fg: #ffffff;
    --btn-primary-hover: #4475f0;
    --btn-primary-active: #2a57cc;
    --btn-soft-hover: #1f2f5a;
    --btn-soft-active: #263a6e;
    --overview-from: #121d38;
    --overview-to: #1e3568;
    --topbar-field: #182032;
    --topbar-field-text: #eef1f6;
    --topbar-field-hint: #98a2b3;
    --topbar-badge-ring: #0f1524;
}

/* "System" (account menu): the same dark tokens when the device asks for dark. Keep in sync with the block above
   (ThemeTokensTest compares them). */
@media (prefers-color-scheme: dark) {
    :root[data-theme="system"] {
        --chart-track: rgba(255, 255, 255, .09);
        --chart-alt: rgba(150, 185, 255, .38);
        color-scheme: dark;
        --color-bg: #0c111b;
        --color-surface: #121826;
        --color-surface-2: #182032;
        --color-surface-3: #1f293d;
        --color-border: #263045;
        --color-border-strong: #34405a;
        --color-text: #eef1f6;
        --color-text-2: #cdd3df;
        --color-muted: #98a2b3;
        --color-faint: #8590a3; /* AA on dark surfaces */
        --color-overlay: rgba(0, 0, 0, .6);
        --color-brand: #5b8cff;
        --color-brand-hover: #7aa2ff;
        --color-brand-ink: #0b1220;
        --color-brand-soft: #18264a;
        --color-brand-text: #9bb8ff;
        --color-platform: #a78bfa;
        --color-platform-soft: #251a45;
        --color-platform-ink: #120a26;
        --tone-neutral: #cdd3df;  --tone-neutral-soft: #1f293d; --tone-neutral-border: #34405a;
        --tone-info: #84caff;     --tone-info-soft: #0f2742;    --tone-info-border: #1d4b7a;
        --tone-success: #75e0a7;  --tone-success-soft: #0d2b1e; --tone-success-border: #1b5a3c;
        --tone-warning: #fec84b;  --tone-warning-soft: #33250b; --tone-warning-border: #6b4a12;
        --tone-danger: #fda29b;   --tone-danger-soft: #3a1512;  --tone-danger-border: #7a271a;
        --tone-muted: #98a2b3;    --tone-muted-soft: #161d2c;   --tone-muted-border: #263045;
        --tone-brand: #9bb8ff;    --tone-brand-soft: #18264a;   --tone-brand-border: #2c4280;
        --tone-review: #d8b4fe;   --tone-review-soft: #2a1640;   --tone-review-border: #5b2d82;
        --color-danger-solid: #f04438;
        --color-danger-solid-hover: #d92d20;
        --focus-color: rgba(91, 140, 255, .55);
        --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, .5);
        --shadow-md: 0 8px 20px -6px rgba(0, 0, 0, .6);
        --shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
        --topbar-from: #0f1524;
        --topbar-to: #111a2e;
        --topbar-text-2: #98a2b3;
        --topbar-line: rgba(255, 255, 255, .14);
        --topbar-hover: rgba(255, 255, 255, .06);
        --topbar-shadow: 0 1px 0 #1f2738;
        --topbar-avatar-ink: #9bb8ff;
        /* Sidebar, overview band and settings heading bands (owner, 30 Nov 2026: the light blues looked unmatched). */
        --goji-navy: #111827;
        --goji-navy-deep: #0e1420;
        --goji-navy-text: #eef1f6;
        --goji-navy-text-2: #b8c1d1;
        --goji-navy-label: #7e8aa0;
        --goji-navy-hover: rgba(255, 255, 255, .05);
        --goji-navy-active: #1f3d8a;
        --goji-navy-border: rgba(255, 255, 255, .08);
        --goji-navy-indicator: #7aa2ff;
        --side-edge: #1c2436;
        --goji-section-head: #1c2943;
        --btn-primary-bg: #3366e6;
        --btn-primary-fg: #ffffff;
        --btn-primary-hover: #4475f0;
        --btn-primary-active: #2a57cc;
        --btn-soft-hover: #1f2f5a;
        --btn-soft-active: #263a6e;
        --overview-from: #121d38;
        --overview-to: #1e3568;
        --topbar-field: #182032;
        --topbar-field-text: #eef1f6;
        --topbar-field-hint: #98a2b3;
        --topbar-badge-ring: #0f1524;
    }
}

/* Platform console: blue stays the interaction colour (BRAND-2); the Goji purple only marks the context. */
[data-plane="platform"] { --context-accent: var(--goji-purple); }


/* Website admin, Dhading look (19 Nov 2026, owner: "same to same"): self-hosted DM Sans (text) and Manrope (headings),
   both SIL OFL 1.1 (public/fonts/OFL.txt); Devanagari falls back to the system's Nepali font, as on Dhading. The --dh-*
   tokens default to the theme's own colours (dark mode keeps working) and take Dhading's values in the light theme. */
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-latin.woff2") format("woff2"); font-weight: 100 1000; font-style: normal; font-display: swap; 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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Mukta (OFL), the story font of the news editor as Dhading Update (owner, 22 Nov 2026); loaded only where used. */
@font-face { font-family: "Mukta"; src: url("../fonts/mukta-devanagari-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Mukta"; src: url("../fonts/mukta-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; 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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Mukta"; src: url("../fonts/mukta-devanagari-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839, U+A8E0-A8FF; }
@font-face { font-family: "Mukta"; src: url("../fonts/mukta-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; 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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-latin.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; 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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root[data-plane="site"] {
    --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", sans-serif;
    --font-head: Manrope, "DM Sans", system-ui, sans-serif;
    --dh-bg: var(--color-bg); --dh-surface: var(--color-surface); --dh-ink: var(--color-text); --dh-text: var(--color-text-2);
    --dh-muted: var(--color-muted); --dh-royal: var(--color-brand); --dh-royal-d: var(--color-brand-hover);
    --dh-border: var(--color-border); --dh-border-2: var(--color-border); --dh-mist: var(--color-surface-2);
    --dh-sky: var(--color-brand-soft); --dh-thumb: var(--color-surface-2); --dh-hover: var(--color-surface-2);
    --dh-ok: var(--tone-success); --dh-ok-bg: var(--tone-success-soft); --dh-red: var(--tone-danger); --dh-red-d: var(--tone-danger);
    --dh-drop: var(--color-border-strong); --dh-overlay: rgba(0, 0, 0, .5);
}
:root[data-plane="site"][data-theme="light"] {
    --dh-bg: #eaeaea; --dh-surface: #ffffff; --dh-ink: #063583; --dh-text: #22324c; --dh-muted: #5b6880;
    --dh-royal: #174de0; --dh-royal-d: #102eb1; --dh-border: #dce5ef; --dh-border-2: #eaf0f7; --dh-mist: #f4f8fc;
    --dh-sky: #e8f7ff; --dh-thumb: #eef2f8; --dh-hover: #f8faff; --dh-ok: #16804a; --dh-ok-bg: #e8f6ee;
    --dh-red: #d92d20; --dh-red-d: #b42318; --dh-drop: #b9c7d9;
    --color-bg: var(--dh-bg); --color-border: var(--dh-border);
    /* Page background #eaeaea (owner's final choice, 26 Nov 2026; it was #b8b8b8 for a day). Muted text and links keep
       their normal colours (4.7:1 and 5.6:1 on the page); only the faint text is a shade darker here (4.6:1). */
    --color-faint: #5e6980;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body {
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--color-brand-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { color: var(--color-text); line-height: var(--leading-tight); font-weight: var(--weight-semibold); }
h1 { font-size: var(--text-2xl); margin: 0; letter-spacing: -.01em; }
h2 { font-size: var(--text-lg); margin: 0 0 var(--space-3); }
h3 { font-size: var(--text-md); margin: 0 0 var(--space-2); }
h4 { font-size: var(--text-base); margin: 0 0 var(--space-2); }
p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--space-3); padding-left: var(--space-5); }
img, svg { max-width: 100%; }
/* Inline icons default to the text size; components set their own sizes below (later rules win). */
svg[aria-hidden="true"] { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
img { height: auto; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-5) 0; }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: .92em; }
code { background: var(--color-surface-2); border-radius: var(--radius-xs); padding: 1px 5px; }
pre { background: var(--color-surface-2); border-radius: var(--radius-md); padding: var(--space-3); overflow: auto; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: var(--weight-semibold); font-size: var(--text-base); margin-bottom: var(--space-2); }
details > summary { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--color-brand-soft); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--space-3); top: -60px; z-index: var(--z-tooltip); background: var(--color-surface); color: var(--color-text); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.skip-link:focus { top: var(--space-3); }

/* ==========================================================================
   3. Layout: shell, sidebar, top bar, page header, content
   ========================================================================== */
.shell { --shell-side: var(--sidebar-width); display: grid; grid-template-columns: var(--shell-side) minmax(0, 1fr); min-height: 100vh; }
/*
 * The sidebar is sticky and one viewport tall; on a page taller than the viewport the shell paints the whole first
 * column navy (with the sidebar's 1 px edge) so the navigation never ends in a white strip. Desktop only: below
 * 1024 px the sidebar is an off-canvas drawer and the column does not exist.
 */
@media (min-width: 1024px) {
    .shell {
        background: linear-gradient(to right, var(--goji-navy) calc(var(--shell-side) - 1px), var(--side-edge) calc(var(--shell-side) - 1px), var(--side-edge) var(--shell-side), transparent var(--shell-side)) no-repeat;
    }
}
.main { min-width: 0; display: flex; flex-direction: column; }
.content { width: 100%; max-width: var(--content-max); padding: var(--space-6) var(--gutter) var(--space-12); display: grid; gap: var(--space-5); align-content: start; }
.content > * { min-width: 0; }

/* Sidebar: Goji navy navigation (BRAND-2). Everything inside reads the --goji-navy-* tokens. */
.side {
    position: sticky; top: 0; height: 100vh; overflow: hidden;
    display: flex; flex-direction: column;
    background: var(--goji-navy-deep) linear-gradient(180deg, var(--goji-navy), var(--goji-navy-deep) 40%); color: var(--goji-navy-text-2); border-right: 1px solid var(--side-edge);
    z-index: var(--z-sidebar);
    --focus-color: rgba(255, 255, 255, .55);
}
.side :focus-visible { outline-color: var(--goji-navy-text); }
.side-head { padding: var(--space-4) var(--space-4) var(--space-3); display: grid; gap: var(--space-3); background: transparent; border-bottom: 1px solid var(--goji-navy-border); }
.side-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: var(--space-3) var(--space-3) var(--space-6); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.side-foot { border-top: 1px solid var(--goji-navy-border); padding: var(--space-3) var(--space-4); font-size: var(--text-sm); color: var(--goji-navy-label); }
.side-foot a { color: var(--goji-navy-text-2); }
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--color-text); font-weight: var(--weight-semibold); font-size: var(--text-md); min-width: 0; }
.side .brand { color: var(--goji-navy-text); letter-spacing: -.005em; }
.brand:hover { text-decoration: none; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name small { font-weight: var(--weight-medium); color: var(--goji-navy-label); }
/* The Goji mark (the logo's pocket + cloud, unaltered) on a white tile so it stays legible on navy. */
.brand-mark {
    width: 32px; height: 32px; flex: none; border-radius: var(--radius-md); background: #fff;
    display: grid; place-items: center; overflow: hidden; color: var(--goji-primary-on-white);
    font-size: .95rem; font-weight: var(--weight-bold); box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
.brand-mark img { width: 26px; height: 26px; display: block; }
/* A client's own website as the sidebar brand (one website only): its logo, or its first letter on the white tile. */
.site-brand-letter { font-size: 1rem; color: var(--goji-primary-on-white); }
.site-brand-logo { flex: none; display: grid; place-items: center; height: 44px; max-width: 200px; }
.site-brand-logo img { display: block; max-height: 44px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.site-brand-logo.is-tile { padding: 4px 8px; border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.site-brand-logo.is-tile img { max-height: 28px; }
.plane-tag { display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.side .plane-tag { color: var(--goji-purple-on-navy); }
/* Platform console: same navy, plus the Goji purple as a thin context line and the staff tag. */
[data-plane="platform"] .side-head { box-shadow: inset 0 3px 0 var(--goji-purple); }

/* Site switcher (a native <details>: works without JS) */
.switch { position: relative; border: 1px solid var(--goji-navy-border); border-radius: var(--radius-md); background: rgba(255, 255, 255, .06); }
.switch > summary, .switch-static { list-style: none; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); min-height: 44px; }
.switch > summary { cursor: pointer; }
.switch > summary::-webkit-details-marker { display: none; }
.switch > summary:hover { background: var(--goji-navy-hover); border-radius: var(--radius-md); }
.switch-avatar { width: 28px; height: 28px; flex: none; border-radius: var(--radius-sm); display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: var(--goji-navy-text); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.switch-text { display: grid; min-width: 0; line-height: 1.25; flex: 1; }
.switch .label { font-size: var(--text-xs); color: var(--goji-navy-label); }
.switch .name { color: var(--goji-navy-text); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.switch .switch-caret { color: var(--goji-navy-label); flex: none; width: 16px; height: 16px; }
.switch[open] .switch-caret { transform: rotate(180deg); }
.switch ul { list-style: none; margin: 0; padding: var(--space-1); display: grid; gap: 1px; border-top: 1px solid var(--goji-navy-border); max-height: 50vh; overflow-y: auto; }
.switch li a { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius-sm); color: var(--goji-navy-text-2); }
.switch li a:hover { background: var(--goji-navy-hover); color: var(--goji-navy-text); text-decoration: none; }
.switch li a[aria-current="true"] { color: var(--goji-navy-text); font-weight: var(--weight-semibold); }
.switch li.switch-sep { border-top: 1px solid var(--goji-navy-border); margin-top: var(--space-1); padding-top: var(--space-1); }
/* Support mode in the sidebar: the same warm language as the banner. */
.switch-support { border-color: var(--tone-warning-border); background: var(--tone-warning-soft); }
.switch-support .label { color: var(--tone-warning); font-weight: var(--weight-semibold); }
.switch-support .name { color: var(--goji-text); }
.switch-support .switch-avatar { background: var(--goji-logo-orange); color: #fff; }

/* Navigation groups */
.nav-group { margin-top: var(--space-4); }
.nav-group:first-child { margin-top: 0; }
.nav-group-head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); width: 100%;
    border: 0; background: none; font: inherit; cursor: pointer; text-align: left;
    padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm);
    font-size: 11px; font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .08em; color: var(--goji-navy-label);
}
.nav-group-head:hover { color: var(--goji-navy-text); }
.nav-group-head svg { width: 14px; height: 14px; transition: transform var(--duration) var(--ease); }
.nav-group[data-collapsed="true"] .nav-group-head svg { transform: rotate(-90deg); }
.nav-group[data-collapsed="true"] .nav { display: none; }
.nav-section { font-size: 11px; font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .08em; color: var(--goji-navy-label); padding: var(--space-3) var(--space-2) var(--space-1); }
.nav { display: grid; gap: 2px; margin-top: var(--space-1); }
.nav a {
    position: relative; display: flex; align-items: center; gap: var(--space-3); min-height: 40px;
    padding: 9px 12px; border-radius: 10px; font-size: 14px;
    color: var(--goji-navy-text-2); font-weight: var(--weight-semibold);
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.nav a:hover { background: var(--goji-navy-hover); color: var(--goji-navy-text); text-decoration: none; }
.nav a.active { background: var(--goji-navy-active); color: var(--goji-navy-text); font-weight: var(--weight-semibold); box-shadow: 0 6px 16px rgba(23, 77, 224, .35); }
/* Flat sidebar (an edition's sidebar config): sub-pages open under their item. */
.nav-flat { margin-top: 0; }
.nav-item.has-sub { position: relative; display: grid; }
.nav-item.has-sub > a { padding-right: 40px; }
.nav-sub > summary { position: absolute; top: 0; right: 0; width: 38px; height: 40px; display: grid; place-items: center; list-style: none; cursor: pointer; color: var(--goji-navy-text-2); border-radius: 10px; }
.nav-sub > summary::-webkit-details-marker { display: none; }
.nav-sub > summary:hover { background: var(--goji-navy-hover); color: var(--goji-navy-text); }
.nav-sub > summary svg { width: 15px; height: 15px; transition: transform var(--duration) var(--ease); }
.nav-sub[open] > summary svg { transform: rotate(90deg); }
.nav-item.has-sub > a.active ~ .nav-sub > summary { color: var(--goji-navy-text); }
.nav-sub-list { display: grid; gap: 1px; margin: 4px 0 6px 21px; padding-left: 12px; border-left: 1px solid var(--goji-navy-border); }
.nav-sub-list a { min-height: 34px; padding: 7px 10px; font-size: 13.5px; font-weight: var(--weight-medium); box-shadow: none; }
.nav-sub-list a.active { background: var(--goji-navy-hover); color: var(--goji-navy-text); box-shadow: none; font-weight: var(--weight-semibold); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav a.active svg { opacity: 1; }
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Collapsed desktop sidebar (icons only), remembered per browser */
@media (min-width: 1024px) {
    /* Owner, 24 Nov 2026: the room the sidebar gives up goes to the page (content and header grow by the same width). */
    [data-sidebar="collapsed"] .shell { --shell-side: var(--sidebar-collapsed-width); --content-max: calc(1280px + var(--sidebar-width) - var(--sidebar-collapsed-width)); }
    [data-sidebar="collapsed"] .side-head { padding-left: var(--space-3); padding-right: var(--space-3); }
    [data-sidebar="collapsed"] .brand-name,
    [data-sidebar="collapsed"] .plane-tag,
    [data-sidebar="collapsed"] .switch-text,
    [data-sidebar="collapsed"] .switch-caret,
    [data-sidebar="collapsed"] .switch ul,
    [data-sidebar="collapsed"] .nav-group-head,
    [data-sidebar="collapsed"] .nav-label,
    [data-sidebar="collapsed"] .nav-sub,
    [data-sidebar="collapsed"] .side-foot { display: none; }
    [data-sidebar="collapsed"] .nav-item.has-sub > a { padding-right: 8px; }
    [data-sidebar="collapsed"] .switch { border: 0; }
    [data-sidebar="collapsed"] .site-brand-logo { max-width: 40px; }
    [data-sidebar="collapsed"] .switch > summary, [data-sidebar="collapsed"] .switch-static { justify-content: center; padding: var(--space-1); }
    [data-sidebar="collapsed"] .nav-group[data-collapsed="true"] .nav { display: grid; }
    [data-sidebar="collapsed"] .nav-group + .nav-group { border-top: 1px solid var(--goji-navy-border); padding-top: var(--space-2); }
    [data-sidebar="collapsed"] .nav a { justify-content: center; padding: 8px; }
    [data-sidebar="collapsed"] .nav a.active::before { left: -12px; }
}

/* Top bar (17 Nov 2026): brand-blue band — collapse, search, date, Visit Website, bell, account. */
.topbar {
    position: sticky; top: 0; z-index: var(--z-topbar);
    display: flex; align-items: center; gap: var(--space-3); min-height: var(--topbar-height);
    padding: 6px var(--gutter) 6px calc(var(--gutter) - var(--space-3)); color: var(--topbar-text);
    background: linear-gradient(90deg, var(--topbar-from), var(--topbar-to));
    box-shadow: var(--topbar-shadow);
}
.topbar .btn.ghost { --btn-fg: var(--topbar-text); --btn-hover: var(--topbar-hover); color: var(--topbar-text); }
.topbar .btn.ghost:hover { background: var(--topbar-hover); color: var(--topbar-text); }
.topbar :focus-visible { outline-color: var(--topbar-text); }
.topbar-context { display: flex; align-items: center; gap: var(--space-2); min-width: 0; flex: 1; font-size: var(--text-md); }
.topbar-context b { color: var(--topbar-text); font-weight: var(--weight-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; flex: none; }
.topbar .topbar-toggle { display: none; }
.topbar .topbar-collapse { display: inline-flex; }
/* The slim bar (24 Nov 2026): its icon buttons (sidebar, bell) at 34 px like the Visit Website button. */
.topbar .btn.icon { width: 34px; min-height: 34px; height: 34px; }

/* Quick search: a white field; results open under it (topbar.js), Enter opens the full results page. */
.topbar-search { position: relative; flex: 1 1 420px; max-width: 650px; min-width: 0; margin: 0; }
.topbar-search input[type="search"] {
    width: 100%; height: 36px; padding: 0 44px 0 40px; border: 0; border-radius: var(--radius-md);
    background: var(--topbar-field); color: var(--topbar-field-text); font: inherit; font-size: var(--text-base);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.topbar-search input[type="search"]::placeholder { color: var(--topbar-field-hint); opacity: 1; }
.topbar-search input[type="search"]:focus { outline: 3px solid rgba(255, 255, 255, .55); outline-offset: 1px; }
.topbar-search input::-webkit-search-cancel-button { cursor: pointer; }
.topbar-search .topbar-search-icon { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--topbar-field-hint); pointer-events: none; }
.topbar-search-key {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%); min-width: 22px; padding: 1px 6px;
    border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface-2); color: var(--color-muted);
    font: 600 var(--text-xs)/1.5 var(--font-sans); text-align: center; pointer-events: none;
}
.topbar-search input:focus ~ .topbar-search-key, .topbar-search input:not(:placeholder-shown) ~ .topbar-search-key { display: none; }
.topbar-search-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: var(--z-dropdown); max-height: min(70vh, 520px); overflow: auto;
    padding: var(--space-2); background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.search-group + .search-group { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.search-group-label { padding: 4px 10px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-faint); text-transform: uppercase; letter-spacing: .05em; }
.search-hit { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--color-text); line-height: 1.35; }
.search-hit:hover, .search-hit.is-active { background: var(--color-brand-soft); text-decoration: none; }
.search-hit b { font-weight: var(--weight-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit span { font-size: var(--text-sm); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-note { padding: 10px; margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
.search-all { display: block; margin-top: var(--space-2); padding: 9px 10px; border-top: 1px solid var(--color-border); font-weight: var(--weight-medium); }

/* Today: Bikram Sambat first (Nepali digits), then the English date. */
.topbar-date { margin: 0; white-space: nowrap; color: var(--topbar-text-2); font-size: var(--text-sm); }
.topbar-date b { color: var(--topbar-text); font-weight: var(--weight-semibold); }

/* Visit Website: an outlined white button. */
.topbar .topbar-visit {
    --btn-bg: transparent; --btn-fg: var(--topbar-text); --btn-border: var(--topbar-line); --btn-hover: var(--topbar-hover);
    height: 34px; padding: 0 14px; gap: var(--space-2); border-radius: var(--radius-md); font-weight: var(--weight-semibold); font-size: var(--text-sm);
    background: transparent; color: var(--topbar-text); border: 1px solid var(--topbar-line); white-space: nowrap;
}
.topbar .topbar-visit:hover { background: var(--topbar-hover); color: var(--topbar-text); text-decoration: none; }
.topbar .topbar-visit svg { width: 15px; height: 15px; }

/* Account: white avatar, name with the role under it. */
.account > summary { list-style: none; }
.account-trigger { display: inline-flex; align-items: center; gap: var(--space-2); padding: 2px 6px 2px 2px; border-radius: var(--radius-md); color: var(--topbar-text); cursor: pointer; }
.account-trigger:hover { background: var(--topbar-hover); }
.topbar .avatar { width: 32px; height: 32px; background: var(--topbar-field); color: var(--topbar-avatar-ink); font-size: var(--text-base); font-weight: var(--weight-bold); }
.account-text { display: grid; line-height: 1.15; min-width: 0; text-align: left; font-size: var(--text-sm); }
.account-name { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: var(--weight-semibold); color: var(--topbar-text); }
.account-role { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--text-xs); color: var(--topbar-text-2); }
.topbar .account-caret { width: 16px; height: 16px; transition: transform var(--duration) var(--ease); }
.account[open] .account-caret { transform: rotate(90deg); }
.avatar { width: 30px; height: 30px; flex: none; border-radius: var(--radius-full); display: inline-grid; place-items: center; background: var(--color-surface-3); color: var(--color-text-2); font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.avatar.lg { width: 44px; height: 44px; font-size: var(--text-lg); border-radius: var(--radius-md); }
.account-card { padding: var(--space-2) var(--space-3) var(--space-3); border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-1); display: grid; line-height: 1.3; }
.account-card b { color: var(--color-text); }
.account-card span { color: var(--color-muted); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; }
.dropdown-menu.account-menu { min-width: 290px; padding: var(--space-2); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); top: calc(100% + 10px); }
.account-menu .account-card, .account-menu .account-visit { display: none; }
.account-menu > a, .account-menu > form > button { padding: 11px 14px; font-size: var(--text-md); color: var(--color-text); border-radius: var(--radius-md); }
/* Two-factor sign-in off (owner, 30 Nov 2026): a dot on the avatar and an "2FA off" pill next to My profile. */
.topbar .avatar { position: relative; }
.account-tfa-dot { position: absolute; top: -2px; right: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--tone-warning-mark); box-shadow: 0 0 0 2px var(--topbar-from, var(--color-surface)); }
.account-menu > a.account-profile { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.account-tfa-pill { display: inline-flex; align-items: center; gap: 4px; flex: none; padding: 2px 8px; border-radius: var(--radius-full); border: 1px solid var(--tone-warning-border); background: var(--tone-warning-soft); color: var(--tone-warning); font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.5; }
.account-tfa-pill svg { width: 12px; height: 12px; }
.theme-picker { padding: var(--space-2) var(--space-2) var(--space-1); }
.theme-picker-label { display: block; margin-bottom: var(--space-2); padding: 0 6px; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-muted); }
.theme-switch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; padding: 4px; border-radius: var(--radius-full); background: var(--color-surface-2); }
.dropdown-menu .theme-switch button {
    justify-content: center; padding: 8px 10px; border-radius: var(--radius-full); border: 1px solid transparent;
    color: var(--color-muted); font-size: var(--text-md); font-weight: var(--weight-medium);
}
.dropdown-menu .theme-switch button:hover { background: var(--color-surface); color: var(--color-text); }
.dropdown-menu .theme-switch button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-brand-text); border-color: var(--color-brand-border, var(--color-border)); box-shadow: var(--shadow-xs); font-weight: var(--weight-semibold); }

/* Page header */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-6) var(--gutter) 0; max-width: var(--content-max); }
.page-header + .content { padding-top: var(--space-5); }
.page-heading { display: grid; gap: var(--space-1); min-width: 0; }
.page-heading h1, .page-heading > * { overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.page-subtitle { color: var(--color-muted); font-size: var(--text-md); margin: 0; }
.page-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.page-actions form { margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; font-size: var(--text-sm); color: var(--color-muted); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-1); }
.breadcrumbs li + li::before { content: "/"; color: var(--color-faint); }
.breadcrumbs a { color: var(--color-muted); }
.breadcrumbs a:hover { color: var(--color-text); }
.breadcrumbs [aria-current="page"] { color: var(--color-text-2); }

/* Super Admin support mode banner: always visible, warm Goji orange (attention, not danger) */
.support-banner {
    position: sticky; top: 0; z-index: calc(var(--z-topbar) + 1);
    display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
    padding: var(--space-2) var(--gutter); min-height: 44px;
    background: var(--tone-warning-soft); color: var(--tone-warning);
    border-bottom: 1px solid var(--tone-warning-border); box-shadow: inset 4px 0 0 var(--goji-logo-orange);
    font-size: var(--text-sm);
}
.support-banner-text { font-weight: var(--weight-semibold); color: #6b3505; }
.support-banner-action { margin-left: auto; }
.support-banner .btn { --btn-bg: #fff; --btn-fg: #6b3505; --btn-border: var(--goji-orange-border); --btn-hover: #fffaf3; }
.support-banner + .topbar { top: 44px; }

/* The date needs room: one line on wide screens, two lines (BS over English) on laptops, hidden below. */
@media (max-width: 1439.98px) {
    .topbar-date time { display: grid; line-height: 1.25; font-size: var(--text-sm); }
    .topbar-date-sep { display: none; }
}
@media (max-width: 1279.98px) { .topbar-date { display: none; } }

/* Off-canvas sidebar on small screens (works without JS through :target) */
.side-backdrop { display: none; }
@media (max-width: 1023.98px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .side {
        position: fixed; inset: 0 auto 0 0; width: min(86vw, var(--sidebar-width)); height: 100%;
        transform: translateX(-102%); transition: transform var(--duration) var(--ease);
        box-shadow: var(--shadow-lg); visibility: hidden;
    }
    .side:target, [data-nav-open="true"] .side { transform: none; visibility: visible; }
    .side-backdrop { display: block; position: fixed; inset: 0; z-index: var(--z-backdrop); background: var(--color-overlay); opacity: 0; pointer-events: none; transition: opacity var(--duration) var(--ease); }
    .side:target ~ .side-backdrop, [data-nav-open="true"] .side-backdrop { opacity: 1; pointer-events: auto; }
    .side { z-index: calc(var(--z-backdrop) + 1); }
    .topbar .topbar-toggle { display: inline-flex; }
    /* The menu button, bigger on phones (owner, 26 Nov 2026): a 26px icon in a 44px button. */
    .topbar .btn.icon.topbar-toggle { width: 44px; height: 44px; min-width: 44px; min-height: 44px; margin-left: -4px; justify-content: center; }
    .topbar .topbar-toggle svg { width: 26px; height: 26px; stroke-width: 2.2; }
    .topbar .topbar-collapse { display: none; }
    :root { --gutter: var(--space-5); }
    .topbar-visit-text, .topbar-search-key { display: none; }
    .topbar .topbar-visit { width: 44px; padding: 0; justify-content: center; }
}
@media (max-width: 639.98px) {
    :root { --gutter: var(--space-4); }
    h1 { font-size: var(--text-xl); }
    .topbar { gap: var(--space-2); min-height: var(--topbar-height); padding-top: 6px; padding-bottom: 6px; }
    .topbar-search input[type="search"] { height: 38px; padding-left: 40px; padding-right: 12px; font-size: var(--text-base); }
    .topbar-search .topbar-search-icon { left: 12px; }
    .topbar-actions { gap: var(--space-1); }
    .account-text, .topbar .account-caret, .topbar .topbar-visit { display: none; }
    .account-trigger { padding: 2px; }
    .topbar .avatar { width: 32px; height: 32px; }
    .account-menu .account-card { display: grid; }
    .account-menu .account-visit { display: flex; }
    .page-header { align-items: flex-start; }
    .page-actions { width: 100%; }
}

/* ==========================================================================
   4. Components
   ========================================================================== */

/* 4.1 Card */
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--space-5); min-width: 0; }
.card > h2:first-child, .card-title { color: var(--color-text); }
.card > h2:first-child, .card-title { font-size: var(--text-md); font-weight: var(--weight-semibold); margin: 0 0 var(--space-3); }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.card-header h2, .card-header h3 { margin: 0; font-size: var(--text-md); }
.card-header p { margin: var(--space-1) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
.card-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.card-footer { margin: var(--space-4) calc(-1 * var(--space-5)) calc(-1 * var(--space-5)); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border); background: var(--color-surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); display: flex; gap: var(--space-2); align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.card.flush { padding: 0; }
.card.flush > .card-header { padding: var(--space-4) var(--space-5) 0; }
.card.flush > .table-wrap { border: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card.flush > .card-footer { margin: 0; }
.card.subtle { background: var(--color-surface-2); box-shadow: none; }
.card.muted-card { opacity: .82; }
a.card { display: block; color: inherit; transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
a.card:hover { text-decoration: none; border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
.danger-zone { border-color: var(--tone-danger-border); }
.danger-zone > h2:first-child { color: var(--tone-danger); }

/* 4.2 Grids and stats */
.grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); align-items: start; }
.grid.tight { gap: var(--space-3); }
.grid-2 { display: grid; gap: var(--space-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cards { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.grid-tiles { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.grid-options { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid-aside { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
@media (max-width: 1023.98px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-aside { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 639.98px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); gap: var(--space-3); }
.stat { background: var(--color-surface-2); border-radius: var(--radius-md); padding: var(--space-3); min-width: 0; color: var(--color-muted); font-size: var(--text-sm); }
.stat b { color: var(--color-text); }
.stat b { display: block; font-size: var(--text-xl); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.stat-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); display: grid; gap: var(--space-1); min-width: 0; box-shadow: var(--shadow-xs); }
.stat-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.stat-card-head svg { width: 30px; height: 30px; padding: 7px; border-radius: var(--radius-md); background: var(--tone-brand-soft); color: var(--tone-brand); }
.stat-card.is-attention { box-shadow: inset 3px 0 0 var(--goji-logo-orange), var(--shadow-xs); }
.stat-card.is-attention .stat-card-head svg { background: var(--tone-warning-soft); color: var(--tone-warning); }
/* Metric tiles inside a dashboard panel: flat, no box-in-a-box */
.card .stat-card { border: 0; box-shadow: none; background: var(--color-surface-2); padding: var(--space-3) var(--space-4); }
.card .stat-card .stat-card-value { font-size: var(--text-xl); }
.card .stat-card-head svg { width: 26px; height: 26px; padding: 6px; background: var(--color-surface); }
.stat-card-value { font-size: var(--text-3xl); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; color: var(--color-text); }
.stat-card-foot { font-size: var(--text-sm); color: var(--color-muted); display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-2); }
.stat-card a.stat-card-link { font-size: var(--text-sm); }
.delta { font-weight: var(--weight-semibold); font-size: var(--text-xs); padding: 1px 6px; border-radius: var(--radius-full); }
.delta.up { color: var(--tone-success); background: var(--tone-success-soft); }
.delta.down { color: var(--tone-danger); background: var(--tone-danger-soft); }
progress.bar { width: 100%; min-width: 80px; height: 8px; accent-color: var(--color-brand); vertical-align: middle; }

/* 4.3 Buttons */
.btn {
    --btn-bg: var(--color-surface); --btn-fg: var(--color-text-2); --btn-border: var(--color-border-strong); --btn-hover: var(--color-surface-2);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: var(--control-height); padding: 0 var(--space-4);
    border: 1px solid var(--btn-border); border-radius: var(--radius-md); background: var(--btn-bg); color: var(--btn-fg);
    font: inherit; font-size: var(--text-base); font-weight: var(--weight-medium); line-height: 1.2; white-space: nowrap;
    cursor: pointer; text-decoration: none; user-select: none; box-shadow: var(--shadow-xs);
    transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn:hover { background: var(--btn-hover); text-decoration: none; color: var(--btn-fg); }
.btn:active { transform: translateY(.5px); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.primary { --btn-bg: var(--btn-primary-bg); --btn-fg: var(--btn-primary-fg); --btn-border: var(--btn-primary-bg); --btn-hover: var(--btn-primary-hover); }
.btn.primary:hover { border-color: var(--btn-primary-hover); }
.btn.primary:active { background: var(--btn-primary-active); border-color: var(--btn-primary-active); }
/* Row-level primary actions (tables, lists): the same blue, lighter weight so a column of them stays calm. */
.btn.primary-soft { --btn-bg: var(--tone-brand-soft); --btn-fg: var(--tone-brand); --btn-border: var(--tone-brand-border); --btn-hover: var(--btn-soft-hover); box-shadow: none; }
.btn.primary-soft:active { --btn-hover: var(--btn-soft-active); }
.btn.secondary { --btn-bg: var(--color-surface); }
.btn.ghost { --btn-bg: transparent; --btn-border: transparent; --btn-hover: var(--color-surface-2); box-shadow: none; }
.btn.danger { --btn-fg: var(--tone-danger); --btn-border: var(--tone-danger-border); --btn-hover: var(--tone-danger-soft); }
.btn.destructive { --btn-bg: var(--color-danger-solid); --btn-fg: #fff; --btn-border: var(--color-danger-solid); --btn-hover: var(--color-danger-solid-hover); }
.btn.platform { --btn-bg: var(--color-platform); --btn-fg: var(--color-platform-ink); --btn-border: var(--color-platform); --btn-hover: var(--color-platform); }
.btn.small, .btn.sm { min-height: var(--control-height-sm); padding: 0 var(--space-3); font-size: var(--text-sm); border-radius: var(--radius-sm); gap: var(--space-1); }
.btn.large, .btn.lg { min-height: var(--control-height-lg); padding: 0 var(--space-5); font-size: var(--text-md); }
.btn.icon { padding: 0; width: var(--control-height); }
.btn.icon.small { width: var(--control-height-sm); }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"], .btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; box-shadow: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--btn-fg); border-right-color: transparent; animation: goji-spin .7s linear infinite;
}
.btn.is-busy { pointer-events: none; opacity: .8; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.btn-group .btn:last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.btn-group .btn + .btn { margin-left: -1px; }
.link-button { border: 0; background: none; padding: 0; font: inherit; color: var(--color-brand-text); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
.link-button.danger { color: var(--tone-danger); }

/* 4.4 Forms */
form.stack, .stack { display: grid; gap: var(--space-4); max-width: 640px; }
.stack.wide, form.stack.wide { max-width: none; }
.card.stack, form.card.stack { max-width: none; }
.form-section { display: grid; gap: var(--space-4); padding-top: var(--space-5); border-top: 1px solid var(--color-border); }
.form-section:first-child { padding-top: 0; border-top: 0; }
.form-section > h2, .form-section > h3 { margin: 0; }
.form-row { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: start; }
.form-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; margin-top: var(--space-1); }
.form-actions.end { justify-content: flex-end; }
.form-actions.sticky { position: sticky; bottom: 0; background: var(--color-surface); padding: var(--space-3) 0; border-top: 1px solid var(--color-border); z-index: var(--z-sticky); }
label { display: grid; gap: 6px; font-weight: var(--weight-medium); font-size: var(--text-base); color: var(--color-text-2); }
label .hint, .hint { font-weight: var(--weight-regular); color: var(--color-muted); font-size: var(--text-sm); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-label { font-weight: var(--weight-medium); color: var(--color-text-2); display: inline-flex; gap: var(--space-1); align-items: baseline; flex-wrap: wrap; }
.field-required { color: var(--tone-danger); font-weight: var(--weight-semibold); }
.field-optional { color: var(--color-faint); font-weight: var(--weight-regular); font-size: var(--text-sm); }
.field-help { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-regular); margin: 0; }
.field-error { color: var(--tone-danger); font-size: var(--text-sm); font-weight: var(--weight-medium); margin: 0; }
/* Older module markup: span.error / p.error / ul.errors / .alert.error mean the same as .field-error / .alert.danger. */
.error { color: var(--tone-danger); font-size: var(--text-sm); font-weight: var(--weight-medium); }
ul.errors { color: var(--tone-danger); font-size: var(--text-sm); margin: 0; padding-left: var(--space-5); }
.field-foot { display: flex; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.field-counter { color: var(--color-faint); font-size: var(--text-xs); font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }
.field-counter.is-over { color: var(--tone-danger); font-weight: var(--weight-semibold); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], input[type=url],
input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=week], input[type=color], select, textarea, .input {
    font: inherit; font-size: var(--text-base); color: var(--color-text); background: var(--color-surface);
    min-height: var(--control-height); padding: 6px 10px; width: 100%;
    border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-xs);
    transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
input[type=color] { padding: 3px; width: 56px; }
input[type=file] { font: inherit; font-size: var(--text-sm); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; margin-right: var(--space-3); padding: 6px 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-2); cursor: pointer; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select[multiple] { background-image: none; padding-right: 10px; }
textarea { min-height: 104px; resize: vertical; line-height: var(--leading-normal); }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--color-faint); }
input:focus, select:focus, textarea:focus, .input:focus { outline: none; border-color: var(--color-brand); box-shadow: var(--focus-ring); }
input:disabled, select:disabled, textarea:disabled { background: var(--color-surface-2); color: var(--color-muted); cursor: not-allowed; box-shadow: none; }
input[readonly], textarea[readonly] { background: var(--color-surface-2); }
::placeholder { color: var(--color-faint); opacity: 1; }
.is-invalid, input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--tone-danger) !important; }
.is-invalid:focus, [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--tone-danger-soft) !important; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--color-brand); cursor: pointer; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.check { display: flex; gap: var(--space-2); align-items: flex-start; font-weight: var(--weight-regular); color: var(--color-text); cursor: pointer; }
.check.inline-check { display: inline-flex; margin-right: var(--space-3); }
.check > span { display: grid; gap: 2px; }
.input-group { display: flex; align-items: stretch; }
.input-group > input { border-radius: 0; flex: 1; min-width: 0; }
.input-group > :first-child { border-radius: var(--radius-md) 0 0 var(--radius-md); }
.input-group > :last-child { border-radius: 0 var(--radius-md) var(--radius-md) 0; }
.input-addon { display: inline-flex; align-items: center; padding: 0 var(--space-3); background: var(--color-surface-2); border: 1px solid var(--color-border-strong); color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.input-group > .input-addon:first-child { border-right: 0; }
.input-group > .input-addon:last-child { border-left: 0; }

/* Toggle switch: <input type="checkbox" class="toggle"> */
input[type=checkbox].toggle {
    appearance: none; -webkit-appearance: none; width: 36px; height: 20px; margin: 1px 0 0; border-radius: var(--radius-full);
    background: var(--color-border-strong); position: relative; transition: background var(--duration) var(--ease); cursor: pointer;
}
input[type=checkbox].toggle::after {
    content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
    background: #fff; box-shadow: var(--shadow-sm); transition: transform var(--duration) var(--ease);
}
input[type=checkbox].toggle:checked { background: var(--color-brand); }
input[type=checkbox].toggle:checked::after { transform: translateX(16px); }
input[type=checkbox].toggle:disabled { opacity: .5; cursor: not-allowed; }
.toggle-field { display: flex; align-items: flex-start; gap: var(--space-3); justify-content: space-between; font-weight: var(--weight-regular); color: var(--color-text); }
.toggle-field > span { display: grid; gap: 2px; }

/* Choice cards (radio / checkbox lists) */
.choices { display: grid; gap: var(--space-2); }
.choice { display: flex; gap: var(--space-3); align-items: flex-start; border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-weight: var(--weight-regular); color: var(--color-text); cursor: pointer; transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease); }
.choice:hover { border-color: var(--color-border-strong); }
.choice:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); }
.choice b { display: block; font-weight: var(--weight-semibold); }
.choice .hint { display: block; margin-top: 2px; }
.perm-group { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2); align-content: start; }
.perm-group h3 { margin: 0 0 var(--space-1); font-size: var(--text-base); }
details.perm-group > summary { font-weight: var(--weight-semibold); }

/* 4.5 Tables */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); -webkit-overflow-scrolling: touch; }
.card .table-wrap { border-radius: var(--radius-md); }
.table-wrap > .table { min-width: 640px; }
.table-wrap.fit > .table { min-width: 0; }
.table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
.table th, .table td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
/* Codes, handles and addresses keep their width in a table (they wrap only when nothing else fits). */
.table td.mono, .table td .mono { overflow-wrap: break-word; }
.table thead th { position: sticky; top: 0; background: var(--color-surface-2); color: var(--color-muted); font-weight: var(--weight-semibold); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.table tbody th { color: var(--color-muted); font-weight: var(--weight-medium); }
.table tbody tr:last-child > td, .table tbody tr:last-child > th { border-bottom: 0; }
.table tbody tr:hover > td { background: color-mix(in srgb, var(--tone-brand-soft) 45%, transparent); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table .row-title { font-weight: var(--weight-semibold); color: var(--color-text); }
.table .row-meta { color: var(--color-muted); font-size: var(--text-sm); }
.card > .table { margin: 0; }
.card > .table:not(.summary) thead th { background: transparent; }
.table.summary th { width: 34%; }
/* Two-column summary tables (label · value) are never wider than their card: values wrap. */
.table.summary { table-layout: fixed; }
.table.summary td, .table.summary th { overflow-wrap: anywhere; }
.table.compact th, .table.compact td { padding: 6px 8px; }
.table .cal-cell { height: 64px; }
.actions-cell { white-space: nowrap; text-align: right; width: 1%; }
.actions-cell .row { flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
.actions-cell select { width: auto; min-height: var(--control-height-sm); padding-top: 2px; padding-bottom: 2px; font-size: var(--text-sm); }
.sort-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.sort-link:hover { color: var(--color-text); text-decoration: none; }
.sort-link svg { width: 12px; height: 12px; opacity: .6; }
.sort-link[aria-sort] svg { opacity: 1; color: var(--color-brand); }
/* Stacked mode: rows become cards below 640px (cells need data-label) */
@media (max-width: 639.98px) {
    .table-wrap.stack-mobile { border: 0; background: none; overflow: visible; }
    .table-wrap.stack-mobile > .table { min-width: 0; }
    .table.stack-mobile thead, .table-wrap.stack-mobile thead { display: none; }
    .table.stack-mobile, .table.stack-mobile tbody, .table.stack-mobile tr, .table.stack-mobile td,
    .table-wrap.stack-mobile .table, .table-wrap.stack-mobile tbody, .table-wrap.stack-mobile tr, .table-wrap.stack-mobile td { display: block; width: 100%; }
    .table-wrap.stack-mobile tr, .table.stack-mobile tr { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
    .table-wrap.stack-mobile td, .table.stack-mobile td { border: 0; padding: 6px 0; display: grid; grid-template-columns: minmax(90px, 35%) minmax(0, 1fr); gap: var(--space-3); }
    .table-wrap.stack-mobile td[data-label]::before, .table.stack-mobile td[data-label]::before { content: attr(data-label); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
    .table-wrap.stack-mobile td:not([data-label]), .table.stack-mobile td:not([data-label]) { grid-template-columns: minmax(0, 1fr); }
    .table-wrap.stack-mobile .actions-cell, .table.stack-mobile .actions-cell { text-align: left; width: 100%; }
    .table-wrap.stack-mobile .actions-cell .row, .table.stack-mobile .actions-cell .row { justify-content: flex-start; flex-wrap: wrap; }
    .table-wrap.stack-mobile tbody tr:hover > td { background: none; }
    /* Long unbreakable values (keys, addresses, file names) wrap inside a stacked cell instead of widening the page. */
    .table-wrap.stack-mobile td > *, .table.stack-mobile td > * { min-width: 0; overflow-wrap: anywhere; }
}

/* 4.6 Lists */
.list-row { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
.list-row:last-child { border-bottom: 0; }
.list-row > :first-child { min-width: 0; overflow-wrap: anywhere; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.columns-3 { columns: 3 160px; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.timeline li { display: grid; gap: 2px; padding-left: var(--space-4); border-left: 2px solid var(--color-border); }
.activity-list { list-style: none; margin: 0; padding: 0; display: grid; }
.activity-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
.activity-list li:last-child { border-bottom: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); margin-top: 7px; box-shadow: 0 0 0 3px var(--color-surface); }
/* Timeline markers by event family (presentation only; set from the event key in the view) */
.activity-list li[data-tone="success"] .activity-dot { background: var(--goji-logo-green); }
.activity-list li[data-tone="info"] .activity-dot { background: var(--tone-brand); }
.activity-list li[data-tone="review"] .activity-dot { background: var(--tone-review); }
.activity-list li[data-tone="warning"] .activity-dot { background: var(--goji-logo-orange); }
.activity-list li[data-tone="danger"] .activity-dot { background: var(--goji-danger); }
.activity-text { display: grid; gap: 1px; min-width: 0; }
.activity-text b { font-weight: var(--weight-medium); color: var(--color-text); }
.activity-time { color: var(--color-faint); font-size: var(--text-sm); white-space: nowrap; }
.event-key { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-faint); overflow-wrap: anywhere; }
.note-item { border-top: 1px solid var(--color-border); padding-top: var(--space-2); margin-top: var(--space-2); }
.nested { margin-left: var(--space-8); }
@media (max-width: 639.98px) { .nested { margin-left: var(--space-4); } }

/* 4.7 Badges and status pills */
.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: var(--radius-full);
    font-size: var(--text-xs); font-weight: var(--weight-medium); line-height: 1.6; white-space: nowrap; vertical-align: middle;
    background: var(--tone-neutral-soft); color: var(--tone-neutral); border: 1px solid var(--tone-neutral-border);
}
.badge.ok, .badge.success { background: var(--tone-success-soft); color: var(--tone-success); border-color: var(--tone-success-border); }
.badge.warn, .badge.warning { background: var(--tone-warning-soft); color: var(--tone-warning); border-color: var(--tone-warning-border); }
.badge.danger { background: var(--tone-danger-soft); color: var(--tone-danger); border-color: var(--tone-danger-border); }
.badge.brand { background: var(--tone-brand-soft); color: var(--tone-brand); border-color: var(--tone-brand-border); }
.badge.info { background: var(--tone-info-soft); color: var(--tone-info); border-color: var(--tone-info-border); }
.badge.review { background: var(--tone-review-soft); color: var(--tone-review); border-color: var(--tone-review-border); }
.badge.muted { background: var(--tone-muted-soft); color: var(--tone-muted); border-color: var(--tone-muted-border); }
.badge.edition-travel { background: var(--goji-edition-travel-soft); color: var(--goji-edition-travel); border-color: transparent; }
.badge.edition-news { background: var(--goji-edition-news-soft); color: var(--goji-edition-news); border-color: transparent; }
.badge .btn.small { min-height: 18px; padding: 0 4px; border: 0; box-shadow: none; background: transparent; font-size: var(--text-xs); }
.status {
    --tone: var(--tone-neutral); --tone-soft: var(--tone-neutral-soft); --tone-border: var(--tone-neutral-border);
    display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 7px; border-radius: var(--radius-full);
    font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.7; white-space: nowrap; vertical-align: middle;
    color: var(--tone); background: var(--tone-soft); border: 1px solid var(--tone-border);
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.status.has-icon::before { display: none; }
.status svg { width: 12px; height: 12px; flex: none; }
/* Long status texts wrap on phones instead of widening the page. */
@media (max-width: 639.98px) { .status, .badge { white-space: normal; max-width: 100%; } }
.status.tone-info { --tone: var(--tone-info); --tone-soft: var(--tone-info-soft); --tone-border: var(--tone-info-border); }
.status.tone-review { --tone: var(--tone-review); --tone-soft: var(--tone-review-soft); --tone-border: var(--tone-review-border); }
.status.tone-success { --tone: var(--tone-success); --tone-soft: var(--tone-success-soft); --tone-border: var(--tone-success-border); }
.status.tone-warning { --tone: var(--tone-warning); --tone-soft: var(--tone-warning-soft); --tone-border: var(--tone-warning-border); }
.status.tone-danger { --tone: var(--tone-danger); --tone-soft: var(--tone-danger-soft); --tone-border: var(--tone-danger-border); }
.status.tone-muted { --tone: var(--tone-muted); --tone-soft: var(--tone-muted-soft); --tone-border: var(--tone-muted-border); }
.status.tone-brand { --tone: var(--tone-brand); --tone-soft: var(--tone-brand-soft); --tone-border: var(--tone-brand-border); }

/* 4.8 Alerts and toasts */
.alert { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); font-size: var(--text-base); border: 1px solid var(--tone-neutral-border); background: var(--tone-neutral-soft); color: var(--tone-neutral); }
.alert > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert-body { display: grid; gap: 2px; min-width: 0; }
.alert-title { font-weight: var(--weight-semibold); }
.alert.ok, .alert.success { background: var(--tone-success-soft); color: var(--tone-success); border-color: var(--tone-success-border); }
.alert.danger, .alert.error { background: var(--tone-danger-soft); color: var(--tone-danger); border-color: var(--tone-danger-border); }
.alert.error.small, p.error { display: block; }
.alert.warn, .alert.warning { background: var(--tone-warning-soft); color: var(--tone-warning); border-color: var(--tone-warning-border); }
.alert.info { background: var(--tone-info-soft); color: var(--tone-info); border-color: var(--tone-info-border); }
.alert ul { margin: 0; padding-left: 18px; }
.toasts { position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: var(--z-toast); display: grid; gap: var(--space-2); width: min(380px, calc(100vw - 2 * var(--space-4))); pointer-events: none; }
.toast {
    pointer-events: auto; display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4);
    background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-left: 4px solid var(--tone-neutral);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md); font-size: var(--text-base);
    animation: goji-toast-in .16s var(--ease); font-weight: var(--weight-medium);
}
.toast.tone-success { border-left-color: var(--tone-success-mark); }
.toast.tone-danger { border-left-color: var(--tone-danger); }
.toast.tone-warning { border-left-color: var(--tone-warning-mark); }
.toast.tone-info { border-left-color: var(--tone-info); }
.toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast-close { border: 0; background: none; color: var(--color-faint); cursor: pointer; padding: 0 2px; font: inherit; font-size: var(--text-lg); line-height: 1; }
.toast-close:hover { color: var(--color-text); }
.toast.is-leaving { opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
@media (max-width: 639.98px) { .toasts { right: var(--space-4); left: var(--space-4); bottom: var(--space-4); width: auto; } }

/* 4.9 Tabs (links between server pages, or [data-goji-tabs] panels) */
.tabs { display: flex; gap: var(--space-1); flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--color-border); scrollbar-width: thin; }
.tabs a, .tabs [role="tab"], .tabs button {
    display: inline-flex; align-items: center; gap: var(--space-2); white-space: nowrap;
    padding: var(--space-2) var(--space-3); margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
    color: var(--color-muted); font: inherit; font-weight: var(--weight-medium); cursor: pointer;
}
.tabs a:hover, .tabs [role="tab"]:hover { color: var(--color-text); text-decoration: none; }
.tabs a.active, .tabs a[aria-current="page"], .tabs [role="tab"][aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .badge { margin-left: 2px; }
.tabs.pills { border-bottom: 0; gap: var(--space-1); }
.tabs.pills a, .tabs.pills [role="tab"] { border: 1px solid transparent; border-radius: var(--radius-md); margin: 0; }
.tabs.pills a.active, .tabs.pills [role="tab"][aria-selected="true"] { background: var(--accent-soft); border-color: transparent; }
.tabs.small a { padding: 4px var(--space-2); font-size: var(--text-sm); }
.nav-stack { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); min-width: 0; }
[role="tabpanel"]:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-md); }

/* 4.10 Steps (wizards) */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li > a, .steps li > span { display: inline-flex; align-items: center; gap: var(--space-2); padding: 5px 12px 5px 6px; border-radius: var(--radius-full); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.steps li > a::before, .steps li > span::before { content: counter(step); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-surface-2); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.steps li.done > a { color: var(--tone-success); border-color: var(--tone-success-border); }
.steps li.done > a::before { background: var(--tone-success-soft); content: "\2713"; }
.steps li.current > span { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: var(--weight-semibold); }
.steps li.current > span::before { background: var(--accent); color: var(--accent-ink); }

/* 4.11 Dropdown menu (a native <details>; JS closes it on outside click and Escape) */
.menu, .dropdown { position: relative; display: inline-block; }
.menu > summary, .dropdown > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker, .dropdown > summary::-webkit-details-marker { display: none; }
.menu > ul, .dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-dropdown);
    list-style: none; margin: 0; padding: var(--space-1); min-width: 200px; max-width: min(320px, 90vw);
    background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    text-align: left;
}
.dropdown.align-left > .dropdown-menu, .menu.align-left > ul { right: auto; left: 0; }
.dropdown.drop-up > .dropdown-menu { top: auto; bottom: calc(100% + 6px); }
.dropdown-menu.is-floating { position: fixed; right: auto; bottom: auto; } /* placed by dropdown.js inside scrolling tables */
.menu li a, .menu li button, .dropdown-menu a, .dropdown-menu button, .dropdown-item {
    display: flex; align-items: center; gap: var(--space-2); width: 100%; padding: 7px 10px; border-radius: var(--radius-sm);
    color: var(--color-text-2); background: none; border: 0; font: inherit; font-size: var(--text-base); text-align: left; cursor: pointer; white-space: nowrap;
}
.menu li a:hover, .menu li button:hover, .dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--color-surface-2); color: var(--color-text); text-decoration: none; }
.dropdown-menu .danger, .menu li .danger { color: var(--tone-danger); }
.dropdown-menu .danger:hover { background: var(--tone-danger-soft); color: var(--tone-danger); }
.dropdown-menu svg { width: 16px; height: 16px; flex: none; opacity: .8; }
.dropdown-menu form { margin: 0; }
.dropdown-sep { height: 1px; background: var(--color-border); margin: var(--space-1) 0; }
.dropdown-label { padding: 6px 10px 2px; font-size: var(--text-xs); color: var(--color-faint); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .05em; }

/* 4.12 Modal, drawer, confirmation */
dialog { color: var(--color-text); }
dialog.modal, dialog.drawer {
    border: 1px solid var(--color-border); padding: 0; background: var(--color-surface); box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 2 * var(--space-6)); overflow: hidden;
}
dialog.modal { width: min(520px, calc(100vw - 2 * var(--space-4))); border-radius: var(--radius-xl); margin: auto; }
dialog.modal.wide { width: min(760px, calc(100vw - 2 * var(--space-4))); }
dialog.modal[open], dialog.drawer[open] { display: flex; flex-direction: column; animation: goji-pop .16s var(--ease); }
/* While a pop-up or side panel is open the page behind it stays still (owner, 26 Nov 2026): it scrolled under the
   finger on phones. The gutter keeps desktop pages from shifting when their scrollbar goes. */
html:has(dialog.modal:modal, dialog.drawer:modal) { overflow: hidden; scrollbar-gutter: stable; }
html:has(dialog.modal:modal, dialog.drawer:modal) body { overflow: hidden; overscroll-behavior: none; }
dialog.modal, dialog.drawer { overscroll-behavior: contain; }
dialog::backdrop { background: var(--color-overlay); }
dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; width: min(480px, 100vw); border-radius: var(--radius-xl) 0 0 var(--radius-xl); }
dialog.drawer[open] { animation: goji-slide-in .2s var(--ease); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); padding: var(--space-5) var(--space-5) var(--space-2); }
.modal-header h2 { margin: 0; font-size: var(--text-lg); }
.modal-header p { margin: var(--space-1) 0 0; color: var(--color-muted); font-size: var(--text-sm); }
.modal-body { padding: var(--space-3) var(--space-5) var(--space-5); overflow-y: auto; display: grid; gap: var(--space-4); }
.modal-footer { display: flex; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border); background: var(--color-surface-2); }
.modal-close { border: 0; background: none; color: var(--color-faint); cursor: pointer; padding: 4px; border-radius: var(--radius-sm); line-height: 0; }
.modal-close:hover { color: var(--color-text); background: var(--color-surface-2); }
.modal-close svg { width: 18px; height: 18px; }
.modal-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-danger-soft); color: var(--tone-danger); flex: none; }
.modal-icon svg { width: 20px; height: 20px; }
.modal-icon.tone-warning { background: var(--tone-warning-soft); color: var(--tone-warning); }
.modal-icon.tone-info { background: var(--tone-info-soft); color: var(--tone-info); }
.confirm-head { display: flex; gap: var(--space-4); align-items: flex-start; }
.confirm-message { color: var(--color-text-2); white-space: pre-line; }
@media (max-width: 639.98px) {
    dialog.modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--radius-xl) var(--radius-xl) 0 0; max-height: 92vh; }
    .modal-footer .btn { flex: 1; }
}

/* 4.13 Tooltip: data-goji-tooltip="Text" (CSS only; never the only carrier of information) */
[data-goji-tooltip] { position: relative; }
[data-goji-tooltip]:hover::after, [data-goji-tooltip]:focus-visible::after {
    content: attr(data-goji-tooltip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%);
    z-index: var(--z-tooltip); padding: 4px 8px; border-radius: var(--radius-sm); background: var(--goji-text); color: #fff;
    font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-md);
}
.side [data-goji-tooltip]:hover::after { display: none; }
@media (min-width: 1024px) {
    [data-sidebar="collapsed"] .side .nav a[data-goji-tooltip]:hover::after { display: block; left: calc(100% + 10px); bottom: auto; top: 50%; transform: translateY(-50%); }
}

/* 4.14 Pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); font-size: var(--text-sm); color: var(--color-muted); }
.pagination-pages { display: flex; align-items: center; gap: var(--space-1); flex-wrap: wrap; }
.pagination .page-current { min-width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent); font-weight: var(--weight-semibold); }

/* 4.15 Search and filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.filter-bar > * { margin: 0; }
.filter-bar select { width: auto; min-width: 140px; max-width: 100%; }
.filter-bar .btn { flex: none; }
.search-input { position: relative; flex: 1 1 260px; max-width: 380px; min-width: 0; }
.search-input svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--color-faint); pointer-events: none; }
.search-input input { padding-left: 34px; }
.filter-bar .filter-clear { color: var(--color-muted); font-size: var(--text-sm); }
.filter-bar .filter-count { margin-left: auto; color: var(--color-muted); font-size: var(--text-sm); }
.search-row input[type=search] { max-width: 320px; }
.search-row select { width: auto; }
@media (max-width: 639.98px) { .search-input { max-width: none; flex-basis: 100%; } .filter-bar select { flex: 1 1 140px; } .filter-bar .filter-count { margin-left: 0; width: 100%; } }

/* 4.16 Empty state, skeleton, spinner */
.empty { text-align: center; padding: var(--space-8) var(--space-4); color: var(--color-muted); }
.empty-state { display: grid; justify-items: center; text-align: center; gap: var(--space-2); padding: var(--space-10) var(--space-4); color: var(--color-muted); }
.empty-state-icon { width: 44px; height: 44px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--tone-brand-soft); color: var(--tone-brand); margin-bottom: var(--space-1); }
.empty-state-icon svg { width: 22px; height: 22px; }
.empty-state h3 { margin: 0; color: var(--color-text); font-size: var(--text-md); }
.empty-state p { margin: 0; max-width: 46ch; }
.empty-state .btn { margin-top: var(--space-2); }
.card.empty-state { padding: var(--space-10) var(--space-5); }
.skeleton { display: block; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-surface-3) 37%, var(--color-surface-2) 63%); background-size: 400% 100%; animation: goji-shimmer 1.4s ease infinite; min-height: 12px; }
.skeleton.line { height: 12px; margin: 6px 0; }
.skeleton.title { height: 20px; width: 40%; }
.skeleton.block { height: 96px; }
.spinner { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--color-border-strong); border-right-color: var(--color-brand); animation: goji-spin .7s linear infinite; vertical-align: middle; }
[aria-busy="true"] > .busy-hide { visibility: hidden; }

/* 4.17 Site cards (My Sites) */
.site-card { display: grid; gap: var(--space-4); align-content: space-between; }
.site-card-head { display: flex; gap: var(--space-3); align-items: flex-start; min-width: 0; }
.site-card-title { display: grid; gap: 2px; min-width: 0; flex: 1; }
.site-card-title b { font-size: var(--text-md); color: var(--color-text); overflow-wrap: anywhere; }
.site-card-title span { color: var(--color-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.site-card-meta { display: grid; gap: var(--space-1); margin: 0; font-size: var(--text-sm); }
.site-card-meta div { display: flex; justify-content: space-between; gap: var(--space-3); }
.site-card-meta dt { color: var(--color-muted); }
.site-card-meta dd { margin: 0; color: var(--color-text-2); text-align: right; overflow-wrap: anywhere; min-width: 0; }
.site-card-foot { display: flex; gap: var(--space-2); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.site-card.is-quiet { background: var(--color-surface-2); box-shadow: none; }
.site-card.is-quiet .avatar, .site-card.is-quiet .site-card-title b { opacity: .7; }
.site-card.platform-card { border-color: var(--tone-brand-border); background: linear-gradient(180deg, var(--color-platform-soft), var(--color-surface) 70%); }
.site-card.platform-card .avatar { background: var(--color-platform); color: var(--color-platform-ink); }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin: var(--space-2) 0 calc(-1 * var(--space-2)); }
.section-title h2 { margin: 0; font-size: var(--text-md); }

/* 4.18 Misc */
.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.thumb.lg { width: 120px; height: 90px; }
.thumb.fluid { width: 100%; height: auto; max-width: 100%; }
.kbd, kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--color-border-strong); border-bottom-width: 2px; border-radius: var(--radius-xs); font-size: var(--text-xs); background: var(--color-surface); }
.figure-reset { margin: 0; }
.definition { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr); gap: var(--space-2) var(--space-4); margin: 0; }
.definition dt { color: var(--color-muted); }
.definition dd { margin: 0; overflow-wrap: anywhere; }
.copy-field { display: flex; gap: var(--space-2); }

/* 4.19 Media library and picker (<x-goji::media-browser>, <x-goji::media-picker>; media-library.js) */
.media-browser { display: grid; gap: var(--space-3); min-width: 0; }
.media-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.media-toolbar select { width: auto; min-width: 0; max-width: 100%; flex: 0 1 auto; }
.media-toolbar .search-input { flex: 1 1 220px; max-width: none; }
.media-toolbar .media-upload-visibility { margin-left: auto; }
.media-bulkbar, .media-queue { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.media-bulkbar [data-mb-count] { font-weight: var(--weight-semibold); margin-right: auto; }
.media-queue { display: grid; gap: var(--space-2); background: var(--color-surface); }
.media-queue[hidden], .media-bulkbar[hidden] { display: none; }
.media-queue-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); }
.media-queue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); max-height: 220px; overflow-y: auto; }
.queue-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto auto; gap: var(--space-1) var(--space-3); align-items: center; padding: 4px 0; border-top: 1px solid var(--color-border); }
.queue-row:first-child { border-top: 0; }
.queue-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.queue-row progress { width: 100%; height: 6px; accent-color: var(--color-brand); }
.queue-state { color: var(--color-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.queue-row[data-state="ready"] .queue-state { color: var(--tone-success); }
.queue-row[data-state="failed"] .queue-state { color: var(--tone-danger); font-weight: var(--weight-semibold); }
.queue-actions { display: inline-flex; gap: var(--space-1); }
.queue-note { grid-column: 1 / -1; margin: 0; font-size: var(--text-xs); }
@media (max-width: 639.98px) { .queue-row { grid-template-columns: minmax(0, 1fr) auto; } .queue-row progress { grid-column: 1 / -1; grid-row: 2; } }
.media-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; min-width: 0; }
.media-layout.has-details { grid-template-columns: minmax(0, 1fr) 340px; }
.media-main { position: relative; min-width: 0; border-radius: var(--radius-lg); }
.media-main.is-dragover { outline: 2px dashed var(--color-brand); outline-offset: 4px; }
.media-grid { list-style: none; margin: 0; padding: 2px; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); outline: none; border-radius: var(--radius-md); }
.media-grid:focus-visible { box-shadow: var(--focus-ring); }
.media-tile { position: relative; display: grid; gap: 6px; padding: 6px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; min-width: 0; user-select: none; }
.media-tile:hover { border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
.media-tile[aria-selected="true"] { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--color-brand); }
.media-grid:focus-visible .media-tile.is-active, .media-grid:focus .media-tile.is-active { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.media-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); background: var(--color-surface-2); overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-doc { display: inline-grid; justify-items: center; gap: 2px; color: var(--color-muted); }
.media-doc svg { width: 28px; height: 28px; }
.media-doc b { font-size: var(--text-xs); letter-spacing: .04em; }
.media-doc.large svg { width: 56px; height: 56px; }
.media-tile-text { display: grid; min-width: 0; }
.media-name { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { font-size: var(--text-xs); color: var(--color-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-grid[data-view="grid"] .media-meta { display: none; }
.media-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; }
.media-check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--color-surface); border: 1px solid var(--color-border-strong); color: transparent; }
.media-check svg { width: 14px; height: 14px; }
.media-tile[aria-selected="true"] .media-check { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-brand-ink); }
.media-grid[data-view="list"] { grid-template-columns: minmax(0, 1fr); gap: 0; border: 1px solid var(--color-border); background: var(--color-surface); }
.media-grid[data-view="list"] .media-tile { grid-template-columns: 48px minmax(0, 1fr) auto 28px; align-items: center; border: 0; border-top: 1px solid var(--color-border); border-radius: 0; padding: 6px var(--space-3); }
.media-grid[data-view="list"] .media-tile:first-child { border-top: 0; }
.media-grid[data-view="list"] .media-tile[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--color-brand); background: var(--accent-soft); }
.media-grid[data-view="list"] .media-thumb { width: 48px; height: 36px; aspect-ratio: auto; }
.media-grid[data-view="list"] .media-doc svg { width: 18px; height: 18px; }
.media-grid[data-view="list"] .media-doc b { display: none; }
.media-grid[data-view="list"] .media-badges, .media-grid[data-view="list"] .media-check { position: static; }
.media-status { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-muted); min-height: 1.2em; }
.media-more { display: flex; justify-content: center; }
.media-sentinel { height: 1px; }
.media-drop-overlay { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: var(--space-2); background: color-mix(in srgb, var(--color-brand-soft) 88%, transparent); border: 2px dashed var(--color-brand); border-radius: var(--radius-lg); color: var(--color-brand-text); font-weight: var(--weight-semibold); pointer-events: none; }
.media-drop-overlay[hidden] { display: none; }
.media-drop-overlay svg { width: 32px; height: 32px; }
.media-details { position: sticky; top: calc(var(--topbar-height) + var(--space-4)); display: grid; gap: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); padding: var(--space-4); max-height: calc(100vh - var(--topbar-height) - 2 * var(--space-4)); overflow-y: auto; outline: none; }
.media-details[hidden] { display: none; }
.media-details-head { display: flex; justify-content: space-between; gap: var(--space-2); align-items: flex-start; }
.media-details-head h2 { margin: 0; font-size: var(--text-md); overflow-wrap: anywhere; }
.media-details-body { display: grid; gap: var(--space-3); }
.media-preview { display: grid; place-items: center; min-height: 120px; border-radius: var(--radius-md); background: var(--color-surface-2); overflow: hidden; }
.media-preview img { max-width: 100%; max-height: 260px; object-fit: contain; display: block; }
.media-facts { font-size: var(--text-sm); grid-template-columns: minmax(90px, 36%) minmax(0, 1fr); }
.media-details-form[aria-busy="true"] { opacity: .6; pointer-events: none; }
.media-usage h3 { margin: 0 0 var(--space-1); font-size: var(--text-sm); }
.media-details-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
@media (max-width: 1023.98px) {
    .media-layout.has-details { grid-template-columns: minmax(0, 1fr); }
    .media-details.is-overlay { position: fixed; inset: 0 0 0 auto; top: 0; width: min(420px, 100vw); max-height: none; height: 100vh; z-index: var(--z-modal); border-radius: var(--radius-xl) 0 0 var(--radius-xl); box-shadow: var(--shadow-lg); }
}
@media (max-width: 639.98px) {
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--space-2); }
    .media-toolbar select { flex: 1 1 140px; }
    .media-toolbar .media-upload-visibility { margin-left: 0; }
    .media-toolbar [data-mb-upload] { flex: 1 1 auto; }
}
dialog.modal.media-picker { width: min(1180px, calc(100vw - 2 * var(--space-6))); height: min(820px, calc(100vh - 2 * var(--space-6))); }
.media-picker-body { grid-template-rows: auto minmax(0, 1fr); overflow: hidden; flex: 1; gap: var(--space-3); }
.media-picker-panel { min-height: 0; overflow-y: auto; padding: 2px; }
.media-picker-body > .tabs { overflow: visible; }
.media-picker-panel .media-details { top: 0; max-height: none; }
.media-picker-footer { align-items: center; }
.media-picker-summary { margin-right: auto; color: var(--color-muted); font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.media-dropzone { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-12) var(--space-4); border: 2px dashed var(--color-border-strong); border-radius: var(--radius-lg); text-align: center; background: var(--color-surface-2); }
.media-dropzone p { margin: 0; }
.media-dropzone > svg { width: 36px; height: 36px; color: var(--color-faint); }
.media-dropzone.is-dragover { border-color: var(--color-brand); background: var(--color-brand-soft); }
.media-dropzone-title { font-size: var(--text-lg); font-weight: var(--weight-semibold); }
.media-picker-clear { white-space: nowrap; }
.media-picker-clear[hidden] { display: none; }
.media-total { white-space: nowrap; }
@media (max-width: 639.98px) {
    dialog.modal.media-picker { width: 100vw; height: 94vh; }
    .media-picker-summary { flex: 1 1 100%; }
}

/* 4.20 Media fields (<x-goji::media-field>, <x-goji::media-gallery>; media-picker.js) */
.media-field { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); min-width: 0; }
.media-field-preview { display: flex; align-items: center; gap: var(--space-3); flex: 1 1 220px; min-width: 0; }
.media-field-preview img, .media-field-preview .media-doc { width: 72px; height: 54px; border-radius: var(--radius-sm); object-fit: cover; background: var(--color-surface-2); flex: none; display: grid; place-items: center; }
.media-field-name { display: grid; gap: 2px; min-width: 0; font-size: var(--text-sm); color: var(--color-text-2); }
.media-field-empty { color: var(--color-faint); font-size: var(--text-sm); }
.media-field-missing { display: inline-flex; gap: var(--space-1); align-items: center; color: var(--tone-warning); font-size: var(--text-sm); }
.media-field-missing svg { width: 16px; height: 16px; }
.media-field-actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.media-field-nojs { display: grid; gap: 4px; flex-basis: 100%; }
.has-error > .media-field, .has-error > .media-gallery { border-color: var(--tone-danger); }
.media-gallery { display: grid; gap: var(--space-2); padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); min-width: 0; }
.media-gallery-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.media-gallery-list:empty { display: none; }
.media-gallery-item { display: grid; gap: 4px; padding: 4px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); cursor: grab; min-width: 0; }
.media-gallery-item.is-dragging { opacity: .45; border-style: dashed; }
.media-gallery-name { font-size: var(--text-xs); color: var(--color-muted); }
.media-gallery-tools { display: flex; justify-content: space-between; }
.media-gallery-empty { margin: 0; }
.media-gallery-list .media-gallery-item:first-child { border-color: var(--color-brand); }

/* 4.21 Rich-text editor (<x-goji::editor>; editor.js + vendor/goji-tiptap.min.js) */
.editor { display: grid; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); min-width: 0; }
.editor:focus-within { border-color: var(--focus-color); box-shadow: var(--focus-ring); }
.has-error > .editor { border-color: var(--tone-danger); }
.editor-toolbar { position: sticky; top: var(--topbar-height); z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px var(--space-2); padding: 4px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-2); border-radius: var(--radius-md) var(--radius-md) 0 0; }
.editor-toolbar[hidden] { display: none; }
.editor-group { display: inline-flex; align-items: center; gap: 2px; padding-left: var(--space-2); border-left: 1px solid var(--color-border); }
.editor-group-end { margin-left: auto; }
.editor-block { width: auto; min-height: var(--control-height-sm); padding-top: 0; padding-bottom: 0; font-size: var(--text-sm); }
.editor-btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 30px; height: 30px; padding: 0 6px; border: 1px solid transparent; border-radius: var(--radius-sm); background: none; color: var(--color-text-2); cursor: pointer; font: inherit; font-size: var(--text-sm); }
.editor-btn svg { width: 16px; height: 16px; }
.editor-btn:hover { background: var(--color-surface-3); color: var(--color-text); }
.editor-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.editor-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--tone-brand-border); }
.editor-btn:disabled, .editor-menu button:disabled { opacity: .4; cursor: not-allowed; }
.editor-menu > summary { list-style: none; }
.editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-2); border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.editor-bar[hidden] { display: none; }
.editor-bar input[type=text], .editor-bar input[type=url] { flex: 1 1 220px; width: auto; min-height: var(--control-height-sm); }
.editor-bar .field-error { flex-basis: 100%; }
.editor-surface { min-width: 0; }
.editor-surface[hidden] { display: none; }
.editor-content { min-height: 220px; max-height: 70vh; overflow-y: auto; padding: var(--space-3) var(--space-4); outline: none; line-height: 1.6; color: var(--color-text); overflow-wrap: anywhere; }
.editor-content > :first-child { margin-top: 0; }
.editor-compact .editor-content, .editor-compact .editor-source { min-height: 140px; }
.editor-content h2 { font-size: var(--text-xl); margin: 1.2em 0 .4em; }
.editor-content h3 { font-size: var(--text-lg); margin: 1.1em 0 .4em; }
.editor-content h4 { font-size: var(--text-md); margin: 1em 0 .3em; }
.editor-content p { margin: 0 0 .8em; }
.editor-content blockquote { margin: 0 0 .8em; padding-left: var(--space-4); border-left: 3px solid var(--color-border-strong); color: var(--color-text-2); }
.editor-content table { border-collapse: collapse; width: 100%; margin: 0 0 .8em; table-layout: fixed; }
.editor-content th, .editor-content td { border: 1px solid var(--color-border-strong); padding: 6px 8px; vertical-align: top; min-width: 60px; }
.editor-content th { background: var(--color-surface-2); text-align: left; }
.editor-content .selectedCell { background: var(--accent-soft); }
.editor-content hr { border: 0; border-top: 2px solid var(--color-border); margin: 1.2em 0; }
.editor-content hr.ProseMirror-selectednode, .editor-content .ProseMirror-selectednode { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.editor-content p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--color-faint); float: left; height: 0; pointer-events: none; }
.editor-media, .editor-gallery { margin: 0 0 .8em; padding: 6px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.editor-media img { display: block; max-width: 100%; max-height: 360px; margin: 0 auto; border-radius: var(--radius-sm); }
.editor-media figcaption, .editor-gallery figcaption { margin-top: 4px; font-size: var(--text-sm); text-align: center; color: var(--color-text-2); }
.editor-media figcaption.is-hint, .editor-gallery figcaption.is-hint { color: var(--color-faint); font-size: var(--text-xs); }
.editor-gallery-grid { display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.editor-gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-xs); display: block; }
.editor-media-missing { display: grid; place-items: center; min-height: 80px; color: var(--color-muted); font-size: var(--text-sm); }
/* An embed in the story: a head strip (what it is, its address — it selects and drags the block) above the live
   player, as readers get it (owner, 26 Nov 2026). .editor-player is the player's box, by shape. */
.editor-embed { display: grid; gap: 6px; margin: 0 0 .8em; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.editor-embed__head { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; padding: 0 2px; cursor: grab; }
.editor-embed__head strong { flex: none; }
.editor-embed__head a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-muted); font-size: var(--text-xs); }
.editor-embed__caption { margin: 0; text-align: center; color: var(--color-muted); }
.editor-embed__caption[hidden] { display: none; }
.editor-content .editor-embed.ProseMirror-selectednode { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.editor-player { position: relative; width: 100%; margin: 0 auto; overflow: hidden; border-radius: var(--radius-sm); background: #000; }
.editor-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.editor-player.is-wide { aspect-ratio: 16 / 9; }
.editor-player.is-tall { width: min(100%, 300px); aspect-ratio: 9 / 16; }
.editor-player.is-post { width: min(100%, 500px); height: 560px; background: var(--color-surface); }
.editor-player.is-audio { height: 352px; background: transparent; }
.editor-player.is-audio:has(iframe[src^="https://open.spotify.com/embed/track/"]), .editor-player.is-audio:has(iframe[src^="https://open.spotify.com/embed/episode/"]) { height: 152px; }
.editor-player.is-map { height: 320px; background: var(--color-surface); }
/* The same player in the embed pop-up, a little smaller so the buttons stay in view. */
.editor-embed-preview { display: grid; justify-items: center; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.editor-embed-preview[hidden] { display: none; }
.editor-embed-preview .editor-player.is-wide { width: min(100%, 440px); }
.editor-embed-preview .editor-player.is-tall { width: min(100%, 200px); }
.editor-embed-preview .editor-player.is-post { height: 380px; }
.editor-embed-preview .editor-player.is-map { height: 240px; }
/* The editor's forms are windows of their own (owner, 26 Nov 2026): link, embed (address, chips, the live player,
   start time, caption) and table size. A window's help sits behind the "?" beside its heading (.modal-title-row). */
dialog.modal.editor-embed-dialog { width: min(640px, calc(100vw - 2 * var(--space-4))); }
dialog.modal.editor-table-dialog { width: min(440px, calc(100vw - 2 * var(--space-4))); }
.editor-dialog-form { gap: var(--space-3); }
.editor-dialog-form input[type=text] { width: 100%; }
.editor-dialog-form .field-error { margin: 0; }
.editor-dialog-form .field-error[hidden] { display: none; }
.editor-dialog-form .field-help { margin: 0; }
.editor-dialog .modal-footer { align-items: center; }
.modal-title-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; flex: 1 1 auto; }
.modal-title-row > p { flex: 1 1 100%; }
.modal-title-row .goji-tip__box { left: 0; right: auto; top: calc(100% + 6px); width: max-content; max-width: min(440px, 100%); }
.editor-embed-dialog .editor-embed-preview .editor-player.is-wide { width: 100%; }
/* Phase 6B-D: pictures pasted from other websites (a card — nothing is loaded from the other site), Nepali typing. */
.editor-outside { display: grid; gap: 2px; margin: 0 0 .8em; padding: var(--space-3); border: 1px dashed var(--tone-warning-border, var(--color-border-strong)); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); overflow-wrap: anywhere; }
.editor-outside.is-failed { border-color: var(--tone-danger); }
.editor-outside-bar { background: var(--color-surface-2); }
.editor-outside-bar > span { flex: 1 1 240px; }
/* "News link" cards (editor rebuild 18 Nov 2026): a block in the story and the embed pop-up's text-only preview. */
/* A link card in the story, as readers get it (owner, 26 Nov 2026): picture left, then title, summary, site. */
.editor-linkcard { display: grid; gap: var(--space-3) var(--space-4); grid-template-columns: 1fr; align-items: center; margin: 0 0 .8em; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-left: 4px solid var(--color-brand); border-radius: var(--radius-lg); background: var(--color-surface); font-size: var(--text-sm); box-shadow: var(--shadow-sm); }
.editor-linkcard.has-image { grid-template-columns: minmax(140px, 34%) minmax(0, 1fr); }
.editor-linkcard__media { align-self: start; }
.editor-linkcard__media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); }
.editor-linkcard__media.is-loading { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--color-surface-2) 25%, var(--color-border) 50%, var(--color-surface-2) 75%) 0 0 / 300% 100%; animation: goji-shimmer 1.4s linear infinite; }
.editor-linkcard__text { display: grid; gap: 4px; min-width: 0; }
.editor-linkcard__title { font-size: var(--text-md); line-height: 1.35; color: var(--color-text); overflow-wrap: anywhere; }
.editor-linkcard__desc { color: var(--color-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.editor-linkcard__site { font-weight: var(--weight-semibold); color: var(--color-text-2); }
.editor-linkcard__site::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 50%; border: 2px solid currentColor; opacity: .7; }
.editor-linkcard__url { font-size: var(--text-xs); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-linkcard.is-pending .editor-linkcard__title { color: var(--color-muted); font-weight: var(--weight-semibold); }
.editor-content .editor-linkcard.ProseMirror-selectednode { outline: 3px solid var(--color-brand); outline-offset: 3px; }
@media (max-width: 560px) { .editor-linkcard.has-image { grid-template-columns: 1fr; } }
.editor-linkcard.is-preview { display: grid; gap: 2px; margin: 0; }
.editor-linkcard-preview { display: grid; gap: var(--space-2); }
.ned-share__preview { display: block; width: 100%; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.editor-btn-glyph { font-size: 15px; line-height: 1; font-weight: 600; }
.editor-btn.is-live { background: var(--accent-soft); color: var(--accent); }
.field-bs { margin-top: 4px; }
.nepali-typing .modal-body > .tabs { overflow: visible; }
.nepali-typing .nt-panel { display: grid; gap: var(--space-3); padding-top: var(--space-3); }
.nepali-typing .nt-panel[hidden] { display: none; }
.nepali-typing .nt-panes { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.nepali-typing .nt-panes .field { margin: 0; }
.nepali-typing .nt-actions, .nepali-typing .nt-options { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center; }
.nepali-typing .nt-story { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; justify-content: space-between; }
.nepali-typing .nt-story[hidden] { display: none; }
.nepali-typing .nt-live { align-items: flex-start; }
.nepali-typing .nt-live > span { display: grid; gap: 2px; }
/* Phones (owner, 26 Nov 2026): the typing tools float in the middle of the screen, at most 97% of its width and
   height, rounded on every side, instead of a sheet stuck to the top and bottom edges. */
@media (max-width: 639.98px) {
    dialog.modal.wide.nepali-typing { width: 97vw; max-width: 97vw; max-height: 97vh; max-height: 97dvh; margin: auto; border-radius: var(--radius-xl); }
    .nepali-typing .modal-header { padding: var(--space-4) var(--space-4) var(--space-2); }
    .nepali-typing .modal-body { padding: var(--space-2) var(--space-4) var(--space-4); }
    .nepali-typing .modal-footer { padding: var(--space-3) var(--space-4); }
}
.nepali-typing .nt-sheet-body { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin: var(--space-2) 0; }
.nepali-typing .nt-sheet-body dl { display: grid; gap: 2px; margin: 0; font-size: var(--text-sm); }
.nepali-typing .nt-sheet-body dl > div { display: flex; justify-content: space-between; gap: var(--space-2); border-bottom: 1px solid var(--color-border); }
.nepali-typing .nt-sheet-body dt { font-family: var(--font-mono); }
.nepali-typing .nt-sheet-body dd { margin: 0; }
.editor-source { border: 0; border-radius: var(--radius-md); min-height: 220px; font-family: var(--font-sans); }
.editor.is-ready .editor-source, .editor.is-source .editor-source { border-radius: 0 0 var(--radius-md) var(--radius-md); font-family: var(--font-mono); font-size: var(--text-sm); }
.editor-source:focus { box-shadow: none; }
.editor-status { margin: 0; padding: 4px var(--space-3); border-top: 1px solid var(--color-border); }
/* Stage 2 of the Dhading-style editor: Add Media above the toolbar, text buttons, pop-ups (link, embed, table size),
   table and picture bars, HTML code view, word count footer, full screen. */
.editor-top { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); border-bottom: 1px solid var(--color-border); }
.editor-top[hidden] { display: none; }
.editor-top .btn svg { width: 16px; height: 16px; }
.editor-group:first-child { border-left: 0; padding-left: 0; }
.editor-btn--text { min-width: 32px; font-weight: var(--weight-bold); font-size: var(--text-sm); }
.editor-pop { display: grid; gap: var(--space-2); padding: var(--space-3); border-bottom: 1px solid var(--color-border); background: var(--color-surface); box-shadow: inset 0 -1px 0 var(--color-border); }
.editor-pop[hidden] { display: none; }
.editor-pop__title { margin: 0; font-weight: var(--weight-bold); font-size: var(--text-sm); color: var(--color-text); }
.editor-pop input[type=text], .editor-pop input[type=url] { width: 100%; min-height: var(--control-height-sm); }
.editor-pop__field { margin: 0; display: grid; gap: 2px; }
.editor-pop__row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: end; }
.editor-pop__row .editor-pop__field { flex: 1 1 180px; }
.editor-pop__row .editor-pop__field[hidden] { display: none; }
.editor-pop__checks, .editor-pop__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.editor-pop__actions { gap: var(--space-2); }
.editor-pop__search { position: relative; }
.editor-pop__results { list-style: none; margin: 4px 0 0; padding: 4px; max-height: 280px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.editor-pop__results[hidden] { display: none; }
.editor-pop__results [role=option] { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--space-2); align-items: baseline; padding: 6px var(--space-2); border-radius: var(--radius-sm); cursor: pointer; }
.editor-pop__results [role=option]:hover, .editor-pop__results [role=option][aria-selected="true"] { background: var(--accent-soft); }
.editor-pop__badge { grid-row: span 2; align-self: start; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--tone-brand-soft); color: var(--tone-brand); font-size: var(--text-xs); font-weight: var(--weight-bold); }
.editor-pop__result-title { font-size: var(--text-sm); color: var(--color-text); overflow-wrap: anywhere; }
.editor-pop__result-meta { font-size: var(--text-xs); color: var(--color-muted); }
.editor-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.editor-chip { padding: 2px 8px; border: 1px solid var(--color-border); border-radius: 999px; font-size: var(--text-xs); color: var(--color-muted); background: var(--color-surface-2); }
.editor-chip.is-on { border-color: var(--tone-brand-border); background: var(--tone-brand-soft); color: var(--tone-brand); font-weight: var(--weight-bold); }
.editor-pop .field-error { margin: 0; }
.editor-pop .field-error[hidden] { display: none; }
.editor-pop--table { justify-items: start; }
/* The table window's size grid fills the window (owner, 26 Nov 2026: no empty space at its right). */
.editor-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; width: 100%; }
.editor-grid > [role=row] { display: contents; }
.editor-grid__cell { width: 100%; height: auto; aspect-ratio: 1; padding: 0; border: 1px solid var(--color-border-strong); border-radius: 4px; background: var(--color-surface); cursor: pointer; }
.editor-table-size { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-2); }
.editor-table-size__field { display: grid; gap: 2px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-text-2); }
.editor-table-size__field input { width: 84px; min-height: var(--control-height-sm); }
.editor-table-size__by { padding-bottom: 8px; color: var(--color-muted); }
.editor-table-size > p { align-self: center; text-align: right; }
.editor-table-styles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.editor-table-style { display: grid; gap: 4px; justify-items: stretch; padding: 6px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-2); font: inherit; font-size: var(--text-xs); font-weight: var(--weight-semibold); text-align: center; cursor: pointer; }
.editor-table-style:hover { border-color: var(--color-border-strong); }
.editor-table-style[aria-pressed="true"] { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--accent-soft); color: var(--color-brand-text); }
.editor-table-style__preview { display: block; height: 34px; border: 1px solid var(--color-border-strong); border-radius: 4px; background-color: var(--color-surface);
    background-image: linear-gradient(var(--color-surface-2), var(--color-surface-2)), repeating-linear-gradient(to bottom, transparent 0 10px, var(--color-border-strong) 10px 11px);
    background-size: 100% 11px, 100% 100%; background-repeat: no-repeat, repeat; }
.editor-table-style__preview.is-striped { background-image: linear-gradient(var(--color-border), var(--color-border)), repeating-linear-gradient(to bottom, var(--color-surface) 0 11px, var(--color-surface-2) 11px 22px); }
.editor-table-style__preview.is-bordered { background-image: linear-gradient(var(--color-surface-2), var(--color-surface-2)), repeating-linear-gradient(to bottom, transparent 0 10px, var(--color-border-strong) 10px 11px), repeating-linear-gradient(to right, transparent 0 calc(33.4% - 1px), var(--color-border-strong) calc(33.4% - 1px) 33.4%);
    background-size: 100% 11px, 100% 100%, 100% 100%; background-repeat: no-repeat, repeat, repeat; }
.editor-table-style__preview.is-plain { border-style: dashed; border-color: var(--color-border); background-image: linear-gradient(var(--color-surface-2), var(--color-surface-2)); background-size: 100% 11px; background-repeat: no-repeat; }
.editor-table-paste { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); background: var(--color-surface-2); }
.editor-table-paste > summary { cursor: pointer; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text-2); }
.editor-table-paste[open] { display: grid; gap: var(--space-2); }
.editor-table-paste textarea { width: 100%; min-height: 96px; font-family: var(--font-mono, monospace); font-size: var(--text-xs); white-space: pre; overflow: auto; }
@media (max-width: 420px) { .editor-table-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.editor-grid__cell.is-on { background: var(--accent-soft); border-color: var(--color-brand); }
.editor-grid__cell:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.editor-bar--table, .editor-bar--media { background: var(--color-surface-2); }
.editor-seg { display: inline-flex; gap: 2px; padding: 0 var(--space-1); border-left: 1px solid var(--color-border); }
.editor-seg[hidden], .editor-bar [hidden] { display: none; }
.editor-content .editor-media.is-size-s { width: 33%; }
.editor-content .editor-media.is-size-m { width: 50%; }
.editor-content .editor-media.is-size-l { width: 75%; }
.editor-content .editor-media.is-align-center { margin-left: auto; margin-right: auto; }
.editor-content .editor-media.is-align-left { float: left; margin: 0 var(--space-4) var(--space-2) 0; }
.editor-content .editor-media.is-align-right { float: right; margin: 0 0 var(--space-2) var(--space-4); }
.editor-content .editor-media.is-align-left:not([class*="is-size-"]), .editor-content .editor-media.is-align-right:not([class*="is-size-"]) { width: 50%; }
.editor-content::after { content: ""; display: block; clear: both; }
.editor-content .has-text-align-center { text-align: center; }
.editor-content .has-text-align-right { text-align: right; }
.editor-content .has-text-align-justify { text-align: justify; }
.editor-content table.is-striped tbody tr:nth-child(even) td { background: var(--color-surface-2); }
.editor-content table.is-bordered th, .editor-content table.is-bordered td { border-width: 2px; }
/* Plain tables have no lines on the website (site.css); the editor keeps faint dashed ones so the cells stay findable. */
.editor-content table.is-plain th, .editor-content table.is-plain td { border-style: dashed; border-color: var(--color-border); }
.editor-bar__group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-left: var(--space-2); border-left: 1px solid var(--color-border); }
.editor-code-head { margin: 0; padding: 6px var(--space-3); background: var(--goji-code-bg); color: var(--goji-code-label); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: .08em; text-transform: uppercase; }
.editor-code-head[hidden] { display: none; }
.editor.is-source .editor-source { min-height: 420px; padding: var(--space-3); background: var(--goji-code-bg); color: var(--goji-code-text); caret-color: var(--goji-code-text); border-radius: 0; }
.editor-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--space-4); padding: 6px var(--space-3); border-top: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--color-muted); }
.editor-foot[hidden] { display: none; }
.editor-fs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.editor-fs-head[hidden] { display: none; }
.editor-fs-head__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--space-3); min-width: 0; }
.editor-fs-head__label { font-size: var(--text-xs); font-weight: var(--weight-bold); letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted); }
.editor-fs-head__title { font-size: var(--text-lg); color: var(--color-text); overflow-wrap: anywhere; }
.editor-fs-head__count { font-size: var(--text-sm); color: var(--color-muted); }
.editor-fs-head kbd { margin-left: 4px; padding: 0 4px; border: 1px solid var(--color-border-strong); border-radius: 3px; font-size: var(--text-xs); }
html.editor-fullscreen-on { overflow: hidden; }
.editor.is-fullscreen { position: fixed; inset: 0; z-index: calc(var(--z-backdrop) + 5); display: flex; flex-direction: column; border: 0; border-radius: 0; box-shadow: none; overflow: hidden; }
.editor.is-fullscreen .editor-toolbar { position: static; border-radius: 0; }
.editor.is-fullscreen .editor-surface, .editor.is-fullscreen .editor-source { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.editor.is-fullscreen .editor-content { max-height: none; min-height: 100%; max-width: 860px; margin: 0 auto; padding: var(--space-5) var(--space-4) 120px; font-size: var(--text-md); }
.ned-publish__actions.is-docked.is-fullscreen { z-index: calc(var(--z-backdrop) + 6); }
@media (max-width: 809.98px) {
    /* The toolbar becomes a grid of equal buttons (Dhading below ~810px). */
    .editor-toolbar { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 2px; }
    .editor-toolbar[hidden] { display: none; }
    .editor-toolbar .editor-group { display: contents; }
    .editor-toolbar .editor-btn { width: 100%; }
}
@media (max-width: 639.98px) {
    .editor-group { border-left: 0; padding-left: 0; }
    .editor-group-end { margin-left: 0; }
    .editor-content { padding: var(--space-3); }
    .editor-content .editor-media[class*="is-size-"], .editor-content .editor-media.is-align-left, .editor-content .editor-media.is-align-right { float: none; width: 100%; margin: 0 0 .8em; }
}

/* 4.22 Dashboard (tenant dashboard areas: stats · main · side; see DashboardController) */
.dashboard { display: grid; gap: var(--space-5); }
.dashboard-stats { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.dashboard-stat-group { display: contents; }
/* More figures than one row holds: at most N per row (set by the dashboard view) so rows fill evenly (8 → 4 + 4). */
@media (min-width: 640px) {
    .dashboard-stats[data-stat-columns="4"] { grid-template-columns: repeat(auto-fit, minmax(max(170px, calc((100% - 3 * var(--space-3)) / 4)), 1fr)); }
    .dashboard-stats[data-stat-columns="5"] { grid-template-columns: repeat(auto-fit, minmax(max(170px, calc((100% - 4 * var(--space-3)) / 5)), 1fr)); }
}
.dashboard-body { display: grid; gap: var(--space-5); align-items: start; }
.dashboard-body.has-side { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
/* Overview: one wide main column (lists, chart, activity) and a summary column, like the newsroom reference (17 Nov 2026). */
.dashboard-main { display: grid; gap: var(--space-5); align-content: start; min-width: 0; }
.dashboard-main > * { min-width: 0; }
.dashboard-side { display: grid; gap: var(--space-5); align-content: start; }
.dashboard-card { display: grid; align-content: start; gap: var(--space-3); }
.dashboard-card > .card-title { margin: 0; }
.dashboard-card .empty-state { padding: var(--space-6) var(--space-3); }
.dashboard-more { display: flex; justify-content: flex-end; gap: var(--space-3); flex-wrap: wrap; font-size: var(--text-sm); margin: 0; }
@media (max-width: 1199.98px) {
    .dashboard-body.has-side { grid-template-columns: minmax(0, 1fr); }
    .dashboard-side { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); align-items: start; }
}
@media (max-width: 639.98px) { .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-card.is-attention { border-left: 3px solid var(--tone-warning); }

/* Website Overview (owner decision, 17 Nov 2026; the same layout for every sector). */
.page-actions .overview-add { border-radius: var(--radius-full); padding-inline: var(--space-5); font-weight: var(--weight-semibold); box-shadow: 0 6px 16px -8px rgba(10, 68, 176, .7); }
/* Phones (owner, 26 Nov 2026): a page heading with ONE button (Overview + Add news, News + Add news, Categories + Add
   category, Edit news + its views pill, …) keeps it on the same line, heading left and button right, whenever both
   fit; a long heading
   still lets it drop under. Pages with several actions keep them on their own line under the heading. */
@media (max-width: 639.98px) {
    .page-header:has(> .page-actions > :only-child) { align-items: center; }
    .page-header:has(> .page-actions > :only-child) > .page-actions { width: auto; flex: none; }
    .page-actions > :only-child { white-space: nowrap; }
    .page-actions .overview-add { padding-inline: var(--space-4); }
}
.overview-actions {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px;
    padding: var(--space-4); border-radius: 18px; background: linear-gradient(100deg, var(--overview-from) 0%, var(--overview-to) 100%);
    box-shadow: 0 12px 28px -16px rgba(8, 30, 80, .85);
}
.overview-action {
    display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 92px; padding: var(--space-4) 6px;
    border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06);
    color: var(--topbar-text); font-size: 14px; font-weight: var(--weight-semibold); text-align: center; line-height: 1.25; white-space: nowrap;
    transition: background var(--duration) var(--ease), transform var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.overview-action svg { width: 22px; height: 22px; }
.overview-action:hover { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .32); color: var(--topbar-text); text-decoration: none; transform: translateY(-1px); }
.overview-action:focus-visible { outline: 3px solid var(--topbar-text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .overview-action, .overview-action:hover { transition: none; transform: none; } }

/* Overview figures: icon tile on the left, the number, its name, then a short note; the whole card opens the list. */
.dashboard-stats .stat-card {
    position: relative; grid-template-columns: 42px minmax(0, 1fr); grid-template-areas: "icon value" "icon label" "icon foot";
    column-gap: var(--space-3); row-gap: 1px; align-items: center; padding: var(--space-4); border-radius: var(--radius-lg);
}
.dashboard-stats .stat-card > * { grid-column: 2; }
.dashboard-stats .stat-card-head { display: contents; }
.dashboard-stats .stat-card-head > span { grid-area: label; color: var(--color-text); font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: 1.3; }
.dashboard-stats .stat-card-head svg { grid-area: icon; align-self: center; width: 42px; height: 42px; padding: 11px; border-radius: 12px; }
.dashboard-stats .stat-card-value { grid-area: value; font-size: 1.625rem; line-height: 1.1; }
.dashboard-stats .stat-card-foot { grid-area: foot; font-size: var(--text-xs); line-height: 1.35; }
.dashboard-stats .stat-card a.stat-card-link { position: static; font-size: 0; }
.dashboard-stats .stat-card a.stat-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.dashboard-stats .stat-card:has(a.stat-card-link):hover { border-color: var(--color-brand-border, var(--color-border-strong)); box-shadow: var(--shadow-sm); }
.dashboard-stats .stat-card:has(a.stat-card-link:focus-visible) { outline: 3px solid var(--focus-color); outline-offset: 2px; }
.stat-card[data-tone="success"] .stat-card-head svg { background: var(--tone-success-soft); color: var(--tone-success); }
.stat-card[data-tone="brand"] .stat-card-head svg { background: var(--tone-brand-soft); color: var(--tone-brand); }
.stat-card[data-tone="review"] .stat-card-head svg { background: var(--tone-review-soft); color: var(--tone-review); }
.stat-card[data-tone="neutral"] .stat-card-head svg { background: var(--tone-neutral-soft); color: var(--tone-neutral); }
.stat-card[data-tone="warning"] .stat-card-head svg, .stat-card.is-attention .stat-card-head svg { background: var(--tone-warning-soft); color: var(--tone-warning); }

/* Platform → Nepali calendar: the 12 month inputs of one BS year, each with the AD date it starts on. */
.calendar-today { margin: 0; font-size: var(--text-lg); }
.calendar-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
.calendar-month { display: grid; gap: 4px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.calendar-month > span:first-child { font-weight: var(--weight-semibold); color: var(--color-text); }
.calendar-month input { max-width: 90px; }
tr.is-current > * { background: var(--color-brand-soft); }

/* Settings → Maintenance → "See the maintenance page": the visitors' card inside the admin. */
.mt-preview { display: grid; place-items: center; padding: var(--space-6) var(--space-4); border: 1px dashed var(--color-border); border-radius: var(--radius-xl); background: radial-gradient(circle at 20% 0%, var(--color-brand-soft), transparent 55%), var(--color-surface-2); }
.mt-preview .mt-card { width: 100%; max-width: 560px; padding: 40px 32px; text-align: center; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 20px; box-shadow: var(--shadow-md); }
.mt-preview .mt-logo { display: block; max-width: 220px; max-height: 72px; width: auto; height: auto; margin: 0 auto 24px; object-fit: contain; }
.mt-preview .mt-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--color-brand); color: var(--color-brand-ink); font-size: 26px; font-weight: 700; }
.mt-preview .mt-site { margin: 8px 0 24px; font-weight: 600; color: var(--color-muted); }
.mt-preview .mt-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--color-brand-soft); color: var(--color-brand-text); }
.mt-preview .mt-icon svg { width: 26px; height: 26px; }
.mt-preview .mt-title { margin: 16px 0 8px; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.2; }
.mt-preview .mt-text { margin: 0 auto; max-width: 44ch; color: var(--color-muted); }
.mt-preview .mt-back { margin: 24px 0 0; padding: 12px 16px; border-radius: 12px; background: var(--color-brand-soft); }
.mt-preview .mt-back span { color: var(--color-muted); }
.mt-preview .mt-contact { margin: 16px 0 0; font-size: var(--text-sm); color: var(--color-muted); word-break: break-word; }
@media (max-width: 480px) { .mt-preview .mt-card { padding: 32px 20px; } }

/* Lists in the Dhading Update style (17 Nov 2026): pill tabs, a search + order bar, "N of N", rich rows. */
.tabs.pills { gap: var(--space-2); border-bottom: 0; }
.tabs.pills a { border: 1px solid var(--color-border); border-radius: 999px; padding: 8px 16px; background: var(--color-surface); font-weight: var(--weight-semibold); }
.tabs.pills a.active { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-brand-ink); }
.tabs.pills a.active .badge { background: color-mix(in srgb, var(--color-brand-ink) 22%, transparent); color: var(--color-brand-ink); border-color: transparent; }
/* Phones (owner, 26 Nov 2026, Categories): a short row of pills (up to 4) wraps onto a second line instead of running off
   the screen behind a grey scrollbar; a long row still scrolls sideways, without the scrollbar. */
@media (max-width: 639.98px) {
    .tabs.pills { scrollbar-width: none; }
    .tabs.pills::-webkit-scrollbar { display: none; }
    .tabs.pills:not(:has(> :nth-child(5))) { flex-wrap: wrap; overflow: visible; }
    .tabs.pills a { padding: 7px 14px; }
}
.list-toolbar { display: flex; gap: var(--space-3); align-items: center; margin: var(--space-4) 0 var(--space-3); }
.list-search { position: relative; flex: 1 1 auto; min-width: 0; }
.list-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }
.list-search input[type="search"] { width: 100%; height: 48px; padding-left: 42px; border-radius: var(--radius-lg); }
.list-toolbar select { flex: 0 0 240px; width: 240px; height: 48px; border-radius: var(--radius-lg); }
.list-count { margin: 0 0 var(--space-3) 4px; color: var(--color-muted); }
.list-count b { color: var(--color-text); }
.cat-list { list-style: none; margin: 0; padding: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
/* QA 24 Nov 2026: no overflow hidden — it cut the rows' "…" menus off (tags, categories, authors, comments); the end rows round their own corners. */
.cat-list > .cat-row:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.cat-list > .cat-row:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.cat-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border); }
.cat-row:first-child { border-top: 0; }
.cat-row:hover { background: var(--color-surface-2); }
.cat-row.is-child { padding-left: calc(var(--space-5) + 36px); }
.cat-row.is-hidden .cat-name, .cat-row.is-hidden .cat-avatar { opacity: .55; }
.cat-avatar { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; font-size: 26px; font-weight: 700; border: 2px solid; }
.cat-row.is-child .cat-avatar { width: 48px; height: 48px; font-size: 20px; }
.cat-avatar.tone-success { background: var(--tone-success-soft); color: var(--tone-success); border-color: var(--tone-success-border); }
.cat-avatar.tone-info { background: var(--tone-info-soft); color: var(--tone-info); border-color: var(--tone-info-border); }
.cat-avatar.tone-review { background: var(--tone-review-soft); color: var(--tone-review); border-color: var(--tone-review-border); }
.cat-avatar.tone-warning { background: var(--tone-warning-soft); color: var(--tone-warning); border-color: var(--tone-warning-border); }
.cat-avatar.tone-brand { background: var(--tone-brand-soft); color: var(--tone-brand); border-color: var(--tone-brand-border); }
.cat-avatar.tone-danger { background: var(--tone-danger-soft); color: var(--tone-danger); border-color: var(--tone-danger-border); }
.cat-main { flex: 1; min-width: 0; }
.cat-name { display: inline-block; font-size: 1.35rem; font-weight: 700; line-height: 1.3; color: var(--color-text); }
.cat-name:hover { color: var(--color-brand-text); text-decoration: none; }
.cat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-2); margin-top: 6px; }
.cat-path { color: var(--color-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.cat-stories { display: grid; justify-items: center; min-width: 96px; padding: 8px 12px; border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text); line-height: 1.15; }
.cat-stories:hover { text-decoration: none; background: var(--color-brand-soft); }
.cat-stories b { font-size: 1.35rem; color: var(--color-brand-text); }
.cat-stories span { font-size: var(--text-xs); color: var(--color-muted); }
.cat-visibility { min-width: 84px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--tone-muted-border); background: var(--tone-muted-soft); color: var(--tone-muted); font-weight: var(--weight-semibold); cursor: pointer; }
.cat-visibility.is-on { border-color: var(--tone-success-border); background: var(--tone-success-soft); color: var(--tone-success); }
.cat-open:empty { visibility: hidden; }
@media (max-width: 899.98px) {
    .cat-row { flex-wrap: wrap; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
    .cat-row.is-child { padding-left: calc(var(--space-4) + 20px); }
    .cat-avatar { width: 44px; height: 44px; font-size: 18px; }
    .cat-main { flex-basis: calc(100% - 60px); }
    .cat-name { font-size: 1.1rem; }
    .cat-stories { min-width: 0; grid-auto-flow: column; gap: 4px; align-items: baseline; padding: 4px 10px; }
    .cat-stories b { font-size: 1rem; }
    .list-toolbar { flex-wrap: wrap; }
    .list-toolbar select { flex: 1 1 100%; width: 100%; }
}
.cat-within { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 var(--space-3); }
.cat-within a { display: inline-flex; align-items: center; gap: 4px; }
.cat-within svg { width: 16px; height: 16px; }
.cat-under { color: var(--color-muted); font-size: var(--text-sm); }
.cat-children { font-size: var(--text-sm); font-weight: var(--weight-semibold); }

/* News list in the Dhading Update style (17 Nov 2026). */
.btn.success { --btn-bg: var(--tone-success-soft); --btn-fg: var(--tone-success); --btn-border: var(--tone-success-border); --btn-hover: var(--tone-success-soft); font-weight: var(--weight-semibold); }
.story-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-3); padding: 0; background: none; border: 0; }
.story-bulk .list-count { margin: 0 auto 0 4px; }
/* The action bar floats at the bottom only while stories are ticked (Dhading style). */
.story-bulk-bar { display: none; position: fixed; left: 50%; bottom: var(--space-5); z-index: 40; transform: translateX(-50%); align-items: center; gap: var(--space-3);
    padding: 10px 14px; border-radius: 999px; background: var(--color-text); color: var(--color-surface); box-shadow: var(--shadow-md); }
.story-bulk[data-has-selection] .story-bulk-bar { display: flex; }
.story-bulk-count { font-weight: var(--weight-semibold); white-space: nowrap; }
.story-bulk-bar select { height: 36px; }
.story-list { list-style: none; margin: 0; padding: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
.story-list > .story-row:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.story-list > .story-row:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.story-row { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border); }
.story-row:first-child { border-top: 0; }
.story-row:hover { background: var(--color-surface-2); }
.story-check { width: 20px; height: 20px; flex: none; }
.story-thumb { display: grid; place-items: center; width: 140px; height: 88px; flex: none; overflow: hidden; border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-faint); }
.story-thumb img { width: 100%; height: 100%; object-fit: cover; }
.story-thumb svg { width: 28px; height: 28px; }
.story-main { flex: 1; min-width: 0; }
.story-title { display: block; font-size: 1.3rem; font-weight: 700; line-height: 1.35; color: var(--color-brand-text); }
.story-title:hover { text-decoration: underline; }
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--space-3); margin-top: 8px; color: var(--color-muted); font-size: var(--text-sm); }
.story-category { font-weight: 700; color: var(--color-brand-text); }
.story-stat { display: inline-flex; align-items: center; gap: 4px; }
.story-stat svg { width: 15px; height: 15px; }
.story-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); flex: none; max-width: 420px; }
.story-showing { margin: var(--space-4) 0 var(--space-2); text-align: center; color: var(--color-muted); }
.story-filters select { flex: 0 0 200px; width: 200px; }
/* Below 1280px (26 Nov 2026): four 200px filters left the search box 0px wide and pushed the last filter off the
   screen. The search takes its own line, the filters share the next one. */
@media (max-width: 1279.98px) {
    .story-filters { flex-wrap: wrap; }
    .story-filters .list-search { flex: 1 1 100%; }
    .story-filters select { flex: 1 1 160px; width: auto; min-width: 0; }
}
@media (max-width: 1099.98px) {
    .story-row { flex-wrap: wrap; }
    .story-actions { flex: 1 1 100%; max-width: none; justify-content: flex-start; padding-left: 156px; }
}
@media (max-width: 699.98px) {
    .story-row { gap: var(--space-3); padding: var(--space-3) var(--space-4); }
    .story-thumb { width: 88px; height: 60px; }
    .story-title { font-size: 1.05rem; }
    .story-actions { padding-left: 0; }
    .story-filters select { flex: 1 1 100%; width: 100%; }
}

/* Article form "Also in": long lists (local levels) get a filter and scroll. */
.also-in-filter { width: 100%; max-width: 360px; }
.grid-options.is-long { max-height: 280px; overflow-y: auto; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
/* System settings → Default categories (Super Admin). */
.taxonomy-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-5); align-items: start; margin-top: var(--space-4); }
.taxonomy-toolbar { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); }
.taxonomy-search { flex: 1; }
.taxonomy-search input[type="search"] { width: 100%; }
.taxonomy-depth-2 { padding-left: 20px; }
.taxonomy-depth-3 { padding-left: 40px; }
#taxonomy-form { position: sticky; top: calc(var(--topbar-height) + var(--space-4)); }
.demo-toolbar { flex-wrap: wrap; justify-content: space-between; }
.demo-thumb { display: block; width: 96px; height: 54px; object-fit: cover; border-radius: var(--radius-sm); background: var(--color-surface-2); }
.demo-counts { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; }
@media (max-width: 1023.98px) {
    .taxonomy-layout { grid-template-columns: minmax(0, 1fr); }
    #taxonomy-form { position: static; }
}

/* Settings page (17 Nov 2026): a sectioned left menu with search, a header per group and a sticky save bar. */
.settings-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.settings-nav {
    position: sticky; top: calc(var(--topbar-height) + var(--space-4)); max-height: calc(100vh - var(--topbar-height) - 2 * var(--space-4));
    overflow-y: auto; padding: var(--space-3); background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.settings-menu > summary { display: none; }
.settings-find { position: relative; margin-bottom: var(--space-2); }
.settings-find svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--color-muted); pointer-events: none; }
.settings-find input[type="search"] { width: 100%; height: 38px; padding-left: 34px; }
.settings-nav-section + .settings-nav-section { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.settings-nav-label { margin: var(--space-2) 10px var(--space-1); font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--color-faint); }
.settings-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: var(--space-2); padding: 7px 10px; border-radius: var(--radius-md); color: var(--color-text-2); font-size: var(--text-sm); line-height: 1.3; }
.settings-nav a:hover { background: var(--color-surface-2); color: var(--color-text); text-decoration: none; }
.settings-nav a.is-active { background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: var(--weight-semibold); box-shadow: inset 3px 0 0 var(--color-brand); }
.settings-nav a svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.settings-nav a span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-nav a .settings-nav-go { width: 14px; height: 14px; opacity: .45; }
.settings-find-empty { margin: var(--space-2) 10px 0; }
.settings-main { display: grid; gap: var(--space-5); min-width: 0; max-width: 880px; }
.settings-head { display: flex; align-items: flex-start; gap: var(--space-3); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border); }
.settings-head-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--color-brand-soft); color: var(--color-brand-text); }
.settings-head-icon svg { width: 22px; height: 22px; }
.settings-head .card-title { margin: 0 0 2px; }
.settings-head-text { margin: 0; color: var(--color-muted); }
.settings-card .toggle-field { padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.settings-save { gap: var(--space-3); }
@media (max-width: 639.98px) { .settings-save > span { display: none; } }
@media (max-width: 1023.98px) {
    .settings-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
    .settings-nav { position: static; max-height: none; overflow: visible; }
    .settings-menu > summary { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; list-style: none; font-weight: var(--weight-semibold); color: var(--color-text); }
    .settings-menu > summary::-webkit-details-marker { display: none; }
    .settings-menu > summary svg { width: 18px; height: 18px; }
    .settings-menu[open] > summary { margin-bottom: var(--space-3); }
    .settings-menu .settings-menu-caret { margin-left: auto; transition: transform var(--duration) var(--ease); }
    .settings-menu[open] .settings-menu-caret { transform: rotate(180deg); }
}

/* Settings → Maintenance panel. */
.maintenance-status { display: grid; gap: var(--space-2); justify-items: start; }
.maintenance-status .badge { font-size: var(--text-sm); padding: 4px 10px; }
.maintenance-panel[data-state="on"] { border-left: 4px solid var(--tone-warning); }
.maintenance-new-link { display: grid; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-md); background: var(--tone-success-soft); border: 1px solid var(--tone-success-border); }
.maintenance-new-link input { min-width: 0; }
.maintenance-link-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); margin: 0; }
.maintenance-link-form label { display: grid; gap: 4px; flex: 1 1 200px; }
.maintenance-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--gutter); background: var(--tone-warning-soft); color: var(--tone-warning); border-bottom: 1px solid var(--tone-warning-border); font-size: var(--text-sm); }
.maintenance-banner b { color: var(--color-text); }
.maintenance-banner a { font-weight: var(--weight-semibold); }

/* Overview cards: the title with its "See all" link or a short note on the right. */
.dashboard-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); min-width: 0; }
.dashboard-card-head .card-title { margin: 0; }
.dashboard-card-link { flex: none; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.dashboard-card-note { flex: none; font-size: var(--text-sm); color: var(--color-muted); }
@media (max-width: 639.98px) {
    .overview-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); padding: var(--space-3); }
    .overview-action { min-height: 80px; font-size: var(--text-sm); padding: var(--space-3) var(--space-1); }
    .dashboard-stats .stat-card { grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--space-3); padding: var(--space-4); }
    .dashboard-stats .stat-card-head svg { width: 40px; height: 40px; padding: 10px; border-radius: 12px; }
    .dashboard-stats .stat-card-value { font-size: var(--text-2xl); }
}
.stat-card-breakdown { list-style: none; margin: var(--space-1) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px var(--space-3); font-size: var(--text-sm); }
.stat-card-breakdown b { font-variant-numeric: tabular-nums; }
/* Compact rows for dashboard lists: title + meta on the left, status / figure on the right */
.item-list { list-style: none; margin: 0; padding: 0; display: grid; }
.item-list > li { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); min-width: 0; }
.item-list > li:last-child { border-bottom: 0; }
.item-main { display: grid; gap: 1px; min-width: 0; }
.item-main > :first-child { font-weight: var(--weight-medium); color: var(--color-text); overflow-wrap: anywhere; }
.item-meta { color: var(--color-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.item-side { display: grid; justify-items: end; gap: 4px; flex: none; text-align: right; }
@media (max-width: 639.98px) { .item-list > li { flex-wrap: wrap; } .item-side { justify-items: start; text-align: left; } }

/* 4.23 Detail pages: balanced panel columns, facts, setting rows, meters, inline forms, danger box, chips */
/* Two columns of stacked cards (each column is a .panel-col), one column below 1200 px (the sidebar takes room). */
.panel-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.panel-col { display: grid; gap: var(--space-5); align-content: start; min-width: 0; }
@media (max-width: 1199.98px) { .panel-grid { grid-template-columns: minmax(0, 1fr); } }
/* Page subtitle with chips: edition · status · primary domain */
.page-meta { display: inline-flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.page-meta { max-width: 100%; }
.page-meta-link { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); max-width: 100%; min-width: 0; }
.page-meta-link .truncate { min-width: 0; }
.page-meta-link svg { width: 13px; height: 13px; }
/* Key facts (a .definition list): label column, quiet separators */
.definition.facts { gap: 0 var(--space-4); }
.definition.facts dt, .definition.facts dd { padding: var(--space-2) 0; border-bottom: 1px solid var(--color-border); }
.definition.facts dt { font-size: var(--text-sm); }
.definition.facts dt:last-of-type, .definition.facts dd:last-of-type { border-bottom: 0; }
@media (max-width: 639.98px) {
    .definition.facts { grid-template-columns: minmax(0, 1fr); }
    .definition.facts dt { border-bottom: 0; padding-bottom: 0; }
}
/* A row of settings: label + meta on the left, a control (switch, pill) on the right */
.setting-list { display: grid; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); min-width: 0; }
.setting-row:last-child { border-bottom: 0; }
.setting-list.compact .setting-row { padding: var(--space-2) 0; }
/* Two columns of rows on wide cards (a long module list stays short); one column below 900 px */
@media (min-width: 900px) {
    .setting-list.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-8); }
    .setting-list.two-up > .setting-row:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
/* A host in a list row keeps one line: long names end in an ellipsis (full name in the title) */
.domain-list .list-row { flex-wrap: nowrap; }
.domain-host { min-width: 0; flex: 1 1 auto; }
.domain-host .truncate { min-width: 0; }
.domain-list .badge, .domain-list .status { white-space: nowrap; flex: none; }
.setting-text { display: grid; gap: 2px; min-width: 0; }
.setting-label { font-weight: var(--weight-medium); color: var(--color-text); overflow-wrap: anywhere; }
.setting-meta { color: var(--color-faint); font-size: var(--text-xs); overflow-wrap: anywhere; }
.setting-meta .mono { font-size: var(--text-xs); }
.setting-control { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; flex: none; }
.setting-state { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-muted); min-width: 22px; text-align: right; }
.setting-control[aria-busy="true"] .toggle { opacity: .55; cursor: progress; }
/* A disclosure under a list (e.g. the always-on modules) */
.disclosure { margin-top: var(--space-3); border-top: 1px solid var(--color-border); padding-top: var(--space-3); }
.disclosure > summary { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--color-muted); list-style: none; display: inline-flex; align-items: center; gap: var(--space-1); }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before { content: "\203A"; display: inline-block; width: 12px; font-size: var(--text-md); line-height: 1; transition: transform var(--duration) var(--ease); }
.disclosure[open] > summary::before { transform: rotate(90deg); }
.disclosure > summary:hover { color: var(--color-text); }
.disclosure[open] > summary { margin-bottom: var(--space-2); }
/* Usage against a limit: a thin bar + the figure */
.meter-col { width: 34%; }
.meter-cell { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 120px; vertical-align: middle; margin-right: var(--space-2); }
progress.meter { appearance: none; -webkit-appearance: none; flex: 1; width: 100%; min-width: 64px; height: 6px; border: 0; border-radius: var(--radius-full); background: var(--color-surface-3); overflow: hidden; color: var(--tone-brand); accent-color: var(--tone-brand); }
progress.meter::-webkit-progress-bar { background: var(--color-surface-3); border-radius: var(--radius-full); }
progress.meter::-webkit-progress-value { background: currentColor; border-radius: var(--radius-full); }
progress.meter::-moz-progress-bar { background: currentColor; border-radius: var(--radius-full); }
progress.meter.is-near { color: var(--goji-logo-orange); accent-color: var(--goji-logo-orange); }
progress.meter.is-over { color: var(--tone-danger); accent-color: var(--tone-danger); }
.meter-value { font-size: var(--text-xs); color: var(--color-muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
/* Inline form: a growing control + checkboxes + a button on one line (wraps on phones) */
.inline-form { display: flex; align-items: center; gap: var(--space-2) var(--space-3); flex-wrap: wrap; margin: 0; }
.inline-form > input:not([type=checkbox]):not([type=radio]), .inline-form > select { width: auto; flex: 1 1 180px; min-width: 0; }
.inline-form > .check { align-items: center; white-space: nowrap; }
.inline-form .btn { flex: none; }
.add-row { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px dashed var(--color-border); }
/* The current status above its actions */
.status-summary { display: grid; gap: var(--space-2); justify-items: start; }
/* A clearly separated destructive action inside a card */
.danger-box { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); flex-wrap: wrap; border: 1px solid var(--tone-danger-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); }
.danger-box-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 220px; }
.danger-box-text h3 { margin: 0; font-size: var(--text-base); color: var(--tone-danger); }
.danger-box-text p { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
/* Active filter chips under a filter bar */
.filter-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.filter-chip { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px 4px 2px 10px; border-radius: var(--radius-full); background: var(--tone-brand-soft); color: var(--tone-brand); border: 1px solid var(--tone-brand-border); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.filter-chip a { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: inherit; }
.filter-chip a:hover { background: var(--color-surface); text-decoration: none; }
.filter-chip svg { width: 12px; height: 12px; }
/* List cells: a title over a meta line; long hosts stay on one line with an ellipsis */
.cell-title { display: grid; gap: 2px; min-width: 0; }
.cell-title .row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; }
.cell-title .row-meta a { color: var(--color-muted); }
.cell-title .row-meta a:hover { color: var(--color-text); }
.cell-host { display: block; max-width: 10.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-mono); font-size: var(--text-sm); }
.row-actions { display: flex; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; align-items: center; }
@media (max-width: 639.98px) {
    .table-wrap.stack-mobile .row-actions, .table.stack-mobile .row-actions { justify-content: flex-start; flex-wrap: wrap; }
    /* Pills and chips keep their own width in a stacked cell (a grid item would stretch to the column). */
    .table-wrap.stack-mobile td > .badge, .table-wrap.stack-mobile td > .status { justify-self: start; }
    .cell-host { max-width: 100%; }
}

/* Editor safety (Phase 6B-C): lock / session banners, pre-publish checks, revision compare, bulk bar, attention bell. */
.editor-banner[hidden], .alert[hidden] { display: none; }
.publish-box { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.checklist-item { display: flex; gap: var(--space-2); align-items: flex-start; font-size: var(--text-sm); color: var(--color-text); }
.checklist-item > svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.checklist-item.is-warning > svg { color: var(--tone-warning); }
.checklist-item.is-danger > svg, .checklist-item.is-danger { color: var(--tone-danger); }
.checklist-item.is-info > svg { color: var(--tone-info); }
.publish-checks .tone-success-text > svg { width: 16px; height: 16px; vertical-align: -3px; }
.diff-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); }
.diff-col { min-width: 0; display: grid; gap: var(--space-2); align-content: start; }
.diff-col > h3 { margin: 0; }
.diff-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); min-height: 2.5em; }
del.diff-del { text-decoration: line-through; text-decoration-thickness: 2px; background: var(--tone-danger-soft); color: var(--tone-danger); border-radius: 2px; }
ins.diff-add { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; background: var(--tone-success-soft); color: var(--tone-success); border-radius: 2px; }
@media (max-width: 899.98px) { .diff-grid { grid-template-columns: minmax(0, 1fr); } }
.bulk-bar { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin: 0 0 var(--space-3); }
.bulk-bar select { max-width: 100%; }
.col-check { width: 40px; }
@media (max-width: 639.98px) { .table-wrap.stack-mobile td.col-check, .table-wrap.stack-mobile th.col-check { display: block; } }
.attention-trigger { position: relative; }
.attention-count { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--color-danger-solid); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: var(--weight-semibold); }
.topbar .attention-trigger { width: 40px; height: 40px; }
.topbar .attention-trigger svg { width: 22px; height: 22px; }
.topbar .attention-count { top: 4px; right: 3px; box-shadow: 0 0 0 2px var(--topbar-badge-ring); }
.attention-count[hidden] { display: none; }
.attention-menu { min-width: 300px; padding: var(--space-2); border-radius: var(--radius-lg); }
.attention-head { padding: 6px 10px 10px; border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-1); color: var(--color-text); }
.attention-menu a { display: flex; gap: var(--space-2); align-items: center; }
.attention-empty { padding: var(--space-2) var(--space-3); }
/* 4.24 Wide lists (Clients, platform Overview): a quiet sub-label under a column title, one-line titles and hosts with
   the full value in the tooltip, a status with a meta line, compact row actions; stack="md" turns rows into cards
   at 768 px and below, headed by the td.stack-head cell. */
.table thead th .th-sub { display: block; margin-top: 1px; font-weight: var(--weight-medium); text-transform: none; letter-spacing: 0; color: var(--color-faint); }
.table thead th .th-sub::before { content: "· "; }
.clients-table th, .clients-table td { padding-left: 10px; padding-right: 10px; vertical-align: middle; }
.clients-table th.col-website { width: 34%; }
.clients-table th.col-client { width: 15%; }
.clients-table .cell-title { min-width: 12rem; }
/* width 0 + min-width 100%: long names and hosts never widen the column; they end in an ellipsis (full value in title). */
.clients-table .row-title, .clients-table .cell-host { display: block; width: 0; min-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-client { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; min-width: 7rem; max-width: 14rem; overflow-wrap: anywhere; }
.cell-host.faint { font-family: inherit; }
.cell-status { display: grid; gap: 4px; justify-items: start; }
.cell-status time, .cell-status .small { color: var(--color-muted); white-space: nowrap; }
.badge.plan-chip { max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.badge.edition-corporate { background: var(--tone-brand-soft); color: var(--tone-brand); border-color: transparent; }
.badge.edition-commerce { background: var(--tone-warning-soft); color: var(--tone-warning); border-color: transparent; }
@media (max-width: 768px) {
    .table-wrap.stack-md { border: 0; background: none; overflow: visible; }
    .card.flush > .table-wrap.stack-md { padding: 0 var(--space-4) var(--space-1); }
    .table-wrap.stack-md > .table { min-width: 0; }
    .table-wrap.stack-md thead { display: none; }
    .table-wrap.stack-md .table, .table-wrap.stack-md tbody, .table-wrap.stack-md td { display: block; width: 100%; }
    .table-wrap.stack-md tr { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3); }
    .table-wrap.stack-md td { border: 0; padding: 6px 0; display: grid; grid-template-columns: minmax(90px, 32%) minmax(0, 1fr); gap: var(--space-3); align-items: start; }
    .table-wrap.stack-md td[data-label]::before { content: attr(data-label); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
    .table-wrap.stack-md td:not([data-label]) { grid-template-columns: minmax(0, 1fr); }
    .table-wrap.stack-md td > * { min-width: 0; overflow-wrap: anywhere; }
    .table-wrap.stack-md td > .badge, .table-wrap.stack-md td > .status { justify-self: start; }
    .table-wrap.stack-md tbody tr:hover > td { background: none; }
    /* The card opens with its head cell (no label) and ends with the actions (full width, no label). */
    .table-wrap.stack-md td.stack-head { order: -1; grid-template-columns: minmax(0, 1fr); padding-bottom: var(--space-2); margin-bottom: var(--space-1); border-bottom: 1px solid var(--color-border); }
    .table-wrap.stack-md td.stack-head::before, .table-wrap.stack-md td.actions-cell::before { content: none; }
    .table-wrap.stack-md td.actions-cell { grid-template-columns: minmax(0, 1fr); text-align: left; width: 100%; margin-top: var(--space-1); padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
    .table-wrap.stack-md .row-actions { justify-content: flex-start; flex-wrap: wrap; }
    .table-wrap.stack-md .cell-title, .table-wrap.stack-md .cell-client { min-width: 0; max-width: none; }
    .table-wrap.stack-md .row-title, .table-wrap.stack-md .cell-host { width: auto; min-width: 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
    .table-wrap.stack-md .cell-client { display: block; }
    .table-wrap.stack-md .cell-status { grid-auto-flow: column; justify-content: start; align-items: center; gap: var(--space-2); }
}
/* ==========================================================================
   5. Utilities (use instead of inline styles)
   ========================================================================== */
.muted { color: var(--color-muted); }
.faint { color: var(--color-faint); }
.small { font-size: var(--text-sm); }
.xsmall { font-size: var(--text-xs); }
.mono { font-family: var(--font-mono); font-size: var(--text-sm); overflow-wrap: anywhere; }
.strong { font-weight: var(--weight-semibold); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.break { overflow-wrap: anywhere; }
.tone-danger-text { color: var(--tone-danger); }
.tone-success-text { color: var(--tone-success); }
.inline { display: inline; margin: 0; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.row.space-between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.nowrap { flex-wrap: nowrap; }
.row > form { margin: 0; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1 1 auto; min-width: 0; }
.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); } .gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.mt { margin-top: var(--space-3); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: var(--space-1); } .mt-2 { margin-top: var(--space-2); } .mt-4 { margin-top: var(--space-4); } .mt-5 { margin-top: var(--space-5); }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: var(--space-2); } .mb-3 { margin-bottom: var(--space-3); }
.m-0 { margin: 0; }
.pl-4 { padding-left: var(--space-4); }
.list-reset { list-style: none; padding: 0; margin: 0; }
.max-w-none { max-width: none; }
.max-w-form { max-width: 720px; }
.w-auto { width: auto; }
.w-xs { width: 80px; max-width: 100%; }
.w-sm { width: 110px; max-width: 100%; }
.w-md { width: 160px; max-width: 100%; }
.w-lg { width: 260px; max-width: 100%; }
.w-xl { width: 360px; max-width: 100%; }
.w-num { width: 90px; max-width: 100%; }
.w-full { width: 100%; }
.w-third { width: 34%; }
.input-narrow { max-width: 260px; }
.col-narrow { width: 90px; }
.hide-mobile { }
@media (max-width: 639.98px) { .hide-mobile { display: none !important; } }
.show-mobile { display: none !important; }
@media (max-width: 639.98px) { .show-mobile { display: initial !important; } }

/* ==========================================================================
   6. Auth pages, error pages, print sheets
   ========================================================================== */
/* Sign-in screens: night-sky brand background, a brand panel on wide screens, one card everywhere. */
.auth-body { margin: 0; background: var(--auth-sky-3); }
.auth {
    min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; align-items: center;
    padding: var(--space-6) var(--space-4); gap: var(--space-8); position: relative; overflow: hidden; isolation: isolate;
    background:
        radial-gradient(900px 520px at 12% 8%, var(--auth-glow-blue), transparent 62%),
        radial-gradient(780px 520px at 92% 96%, var(--auth-glow-purple), transparent 60%),
        linear-gradient(155deg, var(--auth-sky-2) 0%, var(--auth-sky-1) 45%, var(--auth-sky-3) 100%);
}
.auth::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: radial-gradient(var(--auth-dots) 1px, transparent 1.4px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }

/* Brand panel (hidden on narrow screens: the card carries the brand there). */
.auth-panel { display: none; color: var(--auth-panel-text); max-width: 520px; justify-self: end; padding-right: var(--space-6); }
.auth-panel-brand { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-10, 40px); }
.auth-panel-mark .brand-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--auth-panel-text); display: inline-grid; place-items: center; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45); }
.auth-panel-mark .brand-mark img { width: 30px; height: 30px; }
.auth-panel-name { font-size: var(--text-xl); font-weight: 700; letter-spacing: -.01em; }
.auth-panel-title { font-size: clamp(28px, 3vw, 40px); line-height: 1.12; font-weight: 750; letter-spacing: -.02em; margin: 0 0 var(--space-4); color: var(--auth-panel-text); }
.auth-panel-lead { font-size: var(--text-lg, 17px); color: var(--auth-panel-text-2); margin: 0 0 var(--space-8); max-width: 42ch; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.auth-points li { display: flex; align-items: center; gap: var(--space-3); color: var(--auth-panel-text); font-weight: 500; }
.auth-points svg { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--auth-chip); border: 1px solid var(--auth-chip-border); color: var(--goji-navy-indicator); }
.auth-panel-foot { margin: var(--space-10, 40px) 0 0; font-size: var(--text-xs); color: var(--auth-panel-text-2); }

/* Card */
.auth-main { display: grid; justify-items: center; gap: var(--space-4); width: 100%; }
.auth .auth-card { width: 100%; max-width: 440px; padding: var(--space-8); border: 0; border-radius: 20px;
    box-shadow: 0 30px 70px -20px rgba(1, 8, 30, .65), 0 0 0 1px rgba(255, 255, 255, .06); animation: auth-rise .45s cubic-bezier(.2, .8, .2, 1) both; }
.auth .auth-brand { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-6); }
.auth .auth-brand .brand-name { font-weight: 700; }
.auth-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    font-size: var(--text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--color-brand-text); background: var(--color-brand-soft); }
.auth-badge svg { width: 14px; height: 14px; }
.auth h1, .auth .auth-title { font-size: 28px; line-height: 1.2; font-weight: 750; letter-spacing: -.02em; margin: 0 0 var(--space-2); }
.auth-head { margin-bottom: var(--space-6); }
.auth-subtitle { margin: 0; color: var(--color-text-2); }
.auth form.stack { max-width: none; }
.auth .auth-card > .alert { margin-bottom: var(--space-4); }

/* Fields with a leading icon */
.auth-field { display: grid; gap: 6px; }
.auth-field > label, .auth-label-row label { font-weight: 600; font-size: var(--text-sm); color: var(--color-text); }
.auth-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.auth-link { font-size: var(--text-sm); font-weight: 600; }
.auth-input { position: relative; display: block; }
.auth-input > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--color-text-3, var(--color-text-2)); pointer-events: none; }
.auth .auth-input input { width: 100%; height: 50px; padding-left: 44px; border-radius: 12px; font-size: 16px; background: var(--color-surface-2, var(--color-surface)); transition: border-color .15s, box-shadow .15s, background .15s; }
.auth .auth-input input:focus { background: var(--color-surface); }
.auth .auth-input.auth-has-reveal input { padding-right: 76px; }
.auth-reveal { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); height: 36px; padding: 0 12px; border: 0; border-radius: 8px;
    background: transparent; color: var(--color-brand-text); font: inherit; font-size: var(--text-sm); font-weight: 600; cursor: pointer; }
.auth-reveal:hover { background: var(--color-brand-soft); }
.auth-reveal:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* Password fields of the other sign-in screens (plain labels): the reveal button sits inside the label's input row. */
.auth label.auth-has-reveal { position: relative; }
.auth label.auth-has-reveal input { padding-right: 76px; }
.auth label.auth-has-reveal .auth-reveal { top: auto; bottom: 7px; transform: none; }
.auth-caps { margin: 4px 0 0; font-size: var(--text-xs); font-weight: 600; color: var(--tone-warning); }

/* Submit */
.auth .auth-submit { width: 100%; justify-content: center; }
.auth .auth-submit { height: 50px; margin-top: var(--space-2); border-radius: 12px; font-size: 16px; font-weight: 650;
    background: linear-gradient(180deg, var(--goji-logo-sky), var(--color-brand)); border-color: var(--color-brand);
    box-shadow: 0 10px 24px -10px var(--auth-glow-blue); }
.auth .auth-submit:hover { background: linear-gradient(180deg, var(--color-brand), var(--color-brand-hover)); }
.auth .is-busy { opacity: .8; cursor: progress; }

/* My profile (account menu): who, name form, access and security lines. */
.profile-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); min-width: 0; }
.profile-head .avatar.lg { background: var(--color-brand-soft); color: var(--color-brand-text); }
.profile-who { display: grid; min-width: 0; line-height: 1.3; }
.profile-who b { color: var(--color-text); font-size: var(--text-md); overflow-wrap: anywhere; }
.profile-who span { color: var(--color-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.profile-section { margin: var(--space-6) 0 var(--space-2); font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); }
.profile-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.profile-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 12px; min-width: 0; }
.profile-list li + li { border-top: 1px solid var(--color-border); }
.profile-list li > span:first-child { display: grid; min-width: 0; color: var(--color-text); overflow-wrap: anywhere; }
.profile-list small { color: var(--color-muted); font-size: var(--text-xs); }
.profile-list a { white-space: nowrap; font-weight: var(--weight-medium); }
.auth-foot { margin: 0; font-size: var(--text-xs); color: var(--auth-panel-text-2); text-align: center; }
.auth-foot a { color: var(--auth-panel-text); font-weight: 600; }

@keyframes auth-rise { from { transform: translateY(10px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .auth .auth-card { animation: none; } }
@media (min-width: 960px) {
    .auth { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: var(--space-8) clamp(32px, 6vw, 96px); }
    .auth-panel { display: block; }
    .auth-main { justify-items: start; }
}
@media (max-width: 480px) {
    .auth { padding: var(--space-4) var(--space-3); align-items: start; }
    .auth .auth-card { padding: var(--space-6) var(--space-5); border-radius: 16px; }
    .auth h1, .auth .auth-title { font-size: 24px; }
}
.error-page { min-height: 100vh; display: grid; place-items: center; padding: var(--space-6) var(--space-4); }
.error-card { width: 100%; max-width: 480px; text-align: center; display: grid; gap: var(--space-3); justify-items: center; }
.error-code { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: var(--radius-full); }
.error-card h1 { font-size: var(--text-2xl); }
.error-card p { color: var(--color-muted); margin: 0; }
.error-actions { display: flex; gap: var(--space-2); justify-content: center; flex-wrap: wrap; margin-top: var(--space-2); }
body.print-page { background: #fff; color: #111; color-scheme: light; }
.print-sheet { max-width: 780px; margin: var(--space-6) auto; padding: 0 var(--space-4); }
.print-sheet h1 { font-size: var(--text-xl); margin: 0 0 var(--space-1); color: #111; }
.print-sheet h2 { font-size: var(--text-md); margin: var(--space-5) 0 var(--space-2); padding-bottom: 2px; border-bottom: 1px solid #ccc; color: #111; }
.print-sheet table { width: 100%; border-collapse: collapse; }
.print-sheet th, .print-sheet td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #ddd; vertical-align: top; }
.print-sheet .muted { color: #666; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 3px 0; }
.checklist li::before { content: "\2610  "; }
.checklist li.done::before { content: "\2611  "; }
@media print {
    body { background: #fff; color: #000; }
    .noprint, .side, .topbar, .support-banner, .toasts, .page-actions { display: none !important; }
    .shell { display: block; background: none; }
    .card { border: 0; box-shadow: none; padding: 0; }
    .print-sheet { margin: 0; }
}

/* ==========================================================================
   7. Motion
   ========================================================================== */
@keyframes goji-spin { to { transform: rotate(360deg); } }
@keyframes goji-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes goji-toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes goji-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes goji-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Phase 2: compact shared task surfaces, retaining the existing brand tokens. */
.platform-entry { margin-bottom: var(--space-5); max-width: 680px; }
.drawer-close { display: none; }
[data-goji-context-nav] { margin-bottom: var(--space-4); flex-wrap: wrap; }
#main[aria-busy="true"] { opacity: .65; cursor: progress; }
.dashboard .activity-list { max-height: 320px; overflow-y: auto; }
@media (max-width: 1023.98px) {
    /* A round cross at the right of the logo row (owner, 26 Nov 2026): no line of its own above the logo. */
    .side-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-2); }
    .side-head > * { grid-column: 1 / -1; }
    .side-head > .brand { grid-column: 1; grid-row: 1; min-width: 0; }
    .side-head > .drawer-close { grid-column: 2; grid-row: 1; }
    .drawer-close { display: grid; place-items: center; width: 40px; height: 40px; flex: none;
        border-radius: 50%; border: 1px solid var(--goji-navy-border); background: var(--goji-navy-hover); color: var(--goji-navy-text); }
    .drawer-close:hover, .drawer-close:focus-visible { background: var(--goji-navy-border); }
    .drawer-close svg { width: 22px; height: 22px; }
    [data-nav-open="true"] body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Live coverage desk (news.live, Phase 6C-D): prefix live-desk- (grepped: unused elsewhere). */
.live-desk-cards { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.live-desk-card { display: grid; gap: 6px; align-content: start; margin: 0; }
.live-desk-card__title { margin: 0; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.live-desk-head { display: grid; gap: 10px; }
.live-desk-actions { flex-wrap: wrap; align-items: flex-start; }
.live-desk-more { position: relative; }
.live-desk-more > summary { list-style: none; cursor: pointer; }
.live-desk-more > summary::-webkit-details-marker { display: none; }
.live-desk-more__panel { margin-top: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); min-width: min(320px, 90vw); }
.live-desk-team { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.live-desk-updates { list-style: none; margin: 0; padding: 0; }
.live-desk-update { display: grid; gap: 6px; padding: 12px 16px; border-top: 1px solid var(--border); }
.live-desk-update.is-pinned { background: var(--surface-2); }
.live-desk-update__title { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.live-desk-update__actions { flex-wrap: wrap; align-items: flex-start; }


/* News topics (news.topics, Phase 6C-E): prefix topic- (grepped: unused elsewhere). */
.topic-layout { display: grid; gap: 16px; align-items: start; }
@media (min-width: 1024px) { .topic-layout { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); } }
.topic-row { align-items: center; flex-wrap: nowrap; }
.topic-thumb { width: 56px; height: 40px; flex: 0 0 56px; object-fit: cover; border-radius: var(--radius-sm, 4px); background: var(--surface-2); }
.topic-thumb--empty { display: inline-block; border: 1px dashed var(--border); }
.topic-order { width: 5.5rem; }
.topic-choices { max-height: 18rem; overflow-y: auto; padding-right: 4px; }


/* News newsletter (news.newsletter, Phase 6C-F): prefix nwl- (grepped: unused elsewhere; "nl-" belongs to the news list). */
.nwl-head { align-items: center; }
.nwl-na { color: var(--color-muted); }
.nwl-activity, .nwl-history, .nwl-checklist, .nwl-story-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nwl-activity li, .nwl-history li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.nwl-history li:last-child, .nwl-activity li:last-child { border-bottom: 0; }
.nwl-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.nwl-facts dt { color: var(--color-muted); }
.nwl-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 639.98px) { .nwl-facts { grid-template-columns: minmax(0, 1fr); } .nwl-facts dd { margin-bottom: 6px; } }
.nwl-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.nwl-block { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px 16px; margin: 0; display: grid; gap: 10px; min-width: 0; }
.nwl-block legend { font-weight: var(--weight-semibold); padding: 0 6px; }
.nwl-block__tools, .nwl-add { justify-content: flex-start; }
.nwl-story-q { flex: 1 1 220px; min-width: 0; }
.nwl-story-results li { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.nwl-checklist li { padding-left: 22px; position: relative; overflow-wrap: anywhere; }
.nwl-checklist li::before { content: "!"; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; font-size: 11px; line-height: 16px; text-align: center; color: #fff; background: var(--color-danger-solid); }
.nwl-checklist li.is-warning::before { background: var(--tone-warning); }
.nwl-choice { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; }
.nwl-choice > span { display: grid; gap: 2px; }
.nwl-swatch { width: 22px; height: 22px; flex: 0 0 22px; padding: 0; border: 1px solid var(--color-border); border-radius: 4px; background: none; cursor: default; }
.nwl-template-layout { display: grid; gap: var(--space-5); align-items: start; }
@media (min-width: 1280px) { .nwl-template-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.nwl-frames { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) { .nwl-frames { grid-template-columns: minmax(0, 640px) 380px; } }
.nwl-frame { margin: 0; display: grid; gap: 6px; min-width: 0; }
.nwl-frame iframe { width: 100%; height: 720px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.nwl-frame--phone iframe { max-width: 360px; }
.nwl-text { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; margin: 0; padding: 12px; background: var(--color-surface-2); border-radius: var(--radius-md); font-size: var(--text-sm); }

/* news.polls / news.reactions (Phase 6C-G): poll overview, option rows, result bars (a <progress>: no inline style). */
.poll-overview-grid { display: grid; gap: 16px; align-items: start; margin-top: 16px; }
@media (min-width: 1024px) { .poll-overview-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.poll-card-pad { padding: var(--space-4) var(--space-4) 0; }
.poll-option-row[hidden] { display: none; }
.poll-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.poll-facts dt { color: var(--color-muted); }
.poll-facts dd { margin: 0; }
.poll-bars { display: grid; gap: 10px; }
.poll-bar__label { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.poll-bar__meter { display: block; width: 100%; height: 10px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 5px; background: var(--color-surface-2); overflow: hidden; }
.poll-bar__meter::-webkit-progress-bar { background: var(--color-surface-2); border-radius: 5px; }
.poll-bar__meter::-webkit-progress-value { background: var(--color-brand); border-radius: 5px; }
.poll-bar__meter::-moz-progress-bar { background: var(--color-brand); border-radius: 5px; }

/* Phase 6C-H1 news.wire (Agencies & sources): host names wrap on phones; credential method groups. */
.wire-host { font-size: .85em; overflow-wrap: anywhere; word-break: break-all; }
.wire-secret { border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px; }
.wire-secret > summary { cursor: pointer; font-weight: 600; }
.wire-secret[open] > summary { margin-bottom: 8px; }
/* Phase 6C-H2 news.wire (Agency news): review queue, preview, original payload. */
.wire-flags { margin-top: 4px; }
.wire-upload > summary { cursor: pointer; }
.wire-headline { font-size: 1.15rem; line-height: 1.35; overflow-wrap: anywhere; }
.wire-preview { overflow-wrap: anywhere; }
.wire-preview img, .wire-preview iframe { max-width: 100%; }
.wire-raw { max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: .8em; background: var(--color-surface-2); padding: 8px; border-radius: 6px; }
.wire-map-row { align-items: end; }

/* R-2 S-3 (C-2): TipTap's base ProseMirror rules, copied verbatim from the vendored bundle (its injected <style>).
   Under an admin CSP the editor no longer injects them (injectCSS: false), so they live here; with the CSP off they are
   harmless duplicates of the injected copy. */
.ProseMirror {
  position: relative;
}

.ProseMirror {
  word-wrap: break-word;
  white-space: pre-wrap;
  white-space: break-spaces;
  -webkit-font-variant-ligatures: none;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
}

.ProseMirror [contenteditable="false"] {
  white-space: normal;
}

.ProseMirror [contenteditable="false"] [contenteditable="true"] {
  white-space: pre-wrap;
}

.ProseMirror pre {
  white-space: pre-wrap;
}

img.ProseMirror-separator {
  display: inline !important;
  border: none !important;
  margin: 0 !important;
  width: 0 !important;
  height: 0 !important;
}

.ProseMirror-gapcursor {
  display: none;
  pointer-events: none;
  position: absolute;
  margin: 0;
}

.ProseMirror-gapcursor:after {
  content: "";
  display: block;
  position: absolute;
  top: -2px;
  width: 20px;
  border-top: 1px solid black;
  animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
}

@keyframes ProseMirror-cursor-blink {
  to {
    visibility: hidden;
  }
}

.ProseMirror-hideselection *::selection {
  background: transparent;
}

.ProseMirror-hideselection *::-moz-selection {
  background: transparent;
}

.ProseMirror-hideselection * {
  caret-color: transparent;
}

.ProseMirror-focused .ProseMirror-gapcursor {
  display: block;
}

/* ---- News article form in two columns (ned-*, Stage 1 of the Dhading-style editor; Add and Edit) ---------------- */
.ned-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-5); align-items: start; }
.ned-main, .ned-side { min-width: 0; display: grid; gap: var(--space-4); align-content: start; }
.ned-plain { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-4); }
.ned-card { display: grid; gap: var(--space-3); }
.ned-card__title { margin: 0; font-size: var(--text-base); font-weight: var(--weight-bold); color: var(--color-text); }
.ned-card--editor .field { margin: 0; }
.ned-title { width: 100%; resize: none; overflow: hidden; min-height: 56px; font-size: var(--text-2xl); font-weight: var(--weight-bold); line-height: 1.35; padding: var(--space-3) var(--space-4); }
.ned-address { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; font-size: var(--text-sm); color: var(--color-muted); }
.ned-address__label { font-weight: var(--weight-semibold); color: var(--color-text-2); }
.ned-address__value { font-family: var(--font-mono); overflow-wrap: anywhere; min-width: 0; }
.ned-address__field[hidden] { display: none; }
.ned-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-muted); cursor: pointer; }
.ned-icon-btn svg { width: 16px; height: 16px; }
.ned-icon-btn:hover, .ned-icon-btn:focus-visible { border-color: var(--color-brand); color: var(--color-brand-text); background: var(--color-brand-soft); }
.ned-icon-btn[aria-expanded="true"] { border-color: var(--color-brand); background: var(--color-brand); color: var(--color-brand-ink); }
.ned-counter { font-variant-numeric: tabular-nums; }
.ned-counter.is-over { color: var(--tone-warning); font-weight: var(--weight-semibold); }

.ned-publish__head { display: flex; align-items: center; gap: var(--space-2); }
.ned-publish__head .ned-card__title { flex: 1; }
.ned-flags { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ned-flags:empty { display: none; }
.ned-publish__fields { display: grid; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.ned-publish__fields[hidden] { display: none; }
.ned-facts { margin: 0; display: grid; gap: var(--space-1); font-size: var(--text-sm); }
.ned-facts > div { display: flex; gap: var(--space-2); justify-content: space-between; }
.ned-facts dt { color: var(--color-muted); }
.ned-facts dd { margin: 0; text-align: right; }
.ned-publish__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.ned-publish__actions.is-single { grid-template-columns: minmax(0, 1fr); }
.ned-publish__actions .btn { width: 100%; justify-content: center; white-space: nowrap; padding-inline: var(--space-3); }
/* A long main label ("Send for review") gets the room it needs; the second button keeps the rest (26 Nov 2026). */
.ned-publish__actions:has(> [data-ned-main="submit"]) { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.ned-publish__why { display: flex; gap: var(--space-2); align-items: flex-start; margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--tone-info-soft); color: var(--color-text-2); font-size: var(--text-sm); line-height: 1.45; }
.ned-publish__why svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--tone-info); }
.ned-publish__why a { display: inline-block; font-weight: var(--weight-semibold); }
.ned-publish__actions.is-docked { position: fixed; left: 0; right: 0; bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); z-index: var(--z-sticky); width: min(340px, calc(100vw - 24px)); margin: 0 auto; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); }
body.ned-has-dock .content { padding-bottom: 96px; }
.ned-publish__more { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.ned-checks { border-top: 1px solid var(--color-border); padding-top: var(--space-3); display: grid; gap: var(--space-2); }
.ned-checks > summary { cursor: pointer; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text-2); }

.ned-ticks__head { display: flex; align-items: baseline; gap: var(--space-2); }
.ned-ticks__head .ned-card__title { flex: 1; min-width: 0; }
.ned-count { font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-brand-text); white-space: nowrap; }
.ned-count[hidden] { display: none; }
.ned-add { padding: 0; border: 0; background: none; font: inherit; font-size: var(--text-xs); font-weight: var(--weight-bold); color: var(--color-brand-text); cursor: pointer; }
.ned-add:hover { text-decoration: underline; text-underline-offset: 3px; }
.ned-add[hidden] { display: none; }
.ned-search { width: 100%; }
.ned-ticks__list { max-height: 280px; overflow: auto; display: grid; gap: 1px; padding: var(--space-1); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.ned-ticks.has-error .ned-ticks__list { border-color: var(--tone-danger); }
.ned-tick { display: flex; align-items: center; gap: var(--space-2); padding: 6px var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-sm); cursor: pointer; }
.ned-tick:hover { background: var(--color-surface-2); }
.ned-tick[hidden] { display: none; }
.ned-tick input { width: 16px; height: 16px; flex: none; accent-color: var(--color-brand); }
.ned-tick__label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ned-tick.is-new { background: var(--color-brand-soft); }
.ned-main-btn { display: none; flex: none; margin-left: auto; padding: 2px var(--space-2); border: 0; border-radius: var(--radius-full); background: transparent; font: inherit; font-size: var(--text-xs); line-height: 1.4; color: var(--color-brand-text); cursor: pointer; }
.ned-main-btn:hover { background: var(--color-brand-soft); }
.ned-main-btn.is-main { display: inline-block; background: var(--color-brand); color: var(--color-brand-ink); cursor: default; }
.js .ned-tick:has(input:checked):hover .ned-main-btn, .js .ned-tick:has(input:checked) .ned-main-btn:focus-visible { display: inline-block; }
@media (hover: none) { .js .ned-tick:has(input:checked) .ned-main-btn { display: inline-block; } }
.ned-quick[hidden] { display: none; }
.ned-fold > summary { cursor: pointer; }
.ned-credit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9rem); gap: var(--space-2); }

/* Stage 3: folding side cards (On the site, Topic / series, Search & social sharing), checks with Fix, tag chips. */
.ned-fold__summary { position: relative; display: grid; gap: 2px; min-height: 32px; padding-right: 48px; list-style: none; }
.ned-fold__summary::-webkit-details-marker { display: none; }
/* The open/close button sits at the top right, level with the card title, as a round button (owner, 22 Nov 2026). */
.ned-fold__summary::before { content: ""; position: absolute; top: -4px; right: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; transition: background-color .15s ease; }
.ned-fold__summary::after { content: ""; position: absolute; top: 5px; right: 11px; width: 8px; height: 8px; border-right: 2px solid var(--color-text-2); border-bottom: 2px solid var(--color-text-2); transform: rotate(45deg); transition: transform .15s ease, top .15s ease; }
/* No ring (owner, 24 Nov 2026): only a soft round background on hover. */
.ned-fold__summary:hover::before { background: var(--color-surface-2); }
.ned-fold__summary:focus-visible { outline: none; }
.ned-fold__summary:focus-visible::before { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.ned-fold[open] > .ned-fold__summary::after { top: 9px; transform: rotate(-135deg); }
.ned-fold__line { font-size: var(--text-xs); color: var(--color-muted); overflow-wrap: anywhere; }
.ned-fold__body { display: grid; gap: var(--space-3); padding-top: var(--space-2); }
.ned-switch .field { margin: 0; }
.ned-views { font-variant-numeric: tabular-nums; }
.ned-views__window { color: var(--color-faint); }
.ned-checks .checklist-item { align-items: flex-start; }
.ned-check__text { flex: 1; min-width: 0; }
.ned-fix { flex: none; }
.ned-fix[hidden], .ned-checks__off[hidden] { display: none; }
.ned-checks__off { display: flex; align-items: center; gap: var(--space-2); color: var(--color-muted); }
.ned-flash { animation: ned-flash 1.8s ease; border-radius: var(--radius-md); }
@keyframes ned-flash { 0%, 60% { box-shadow: 0 0 0 3px var(--tone-warning-border); background-color: var(--tone-warning-soft); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .ned-flash { animation-duration: .01s; outline: 3px solid var(--tone-warning-border); } }
.media-field.is-cover { display: grid; gap: var(--space-2); padding: 0; border: 0; background: none; }
.media-field.is-cover .media-field-preview { display: grid; place-items: center; min-height: 168px; aspect-ratio: 16 / 9; padding: var(--space-3); border: 2px dashed var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface-2); text-align: center; overflow: hidden; }
.media-field.is-cover [data-mf-cover] { cursor: pointer; }
.media-field.is-cover [data-mf-cover]:hover { border-color: var(--color-brand); background: var(--color-brand-soft); }
.media-field.is-cover.has-image .media-field-preview { padding: 0; border-style: solid; place-items: stretch; }
.media-field.is-cover.has-image .media-field-preview img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.media-field.is-cover.has-image .media-field-name { display: none; }
.ned-serp { display: grid; gap: 2px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.ned-serp p { margin: 0; overflow-wrap: anywhere; }
.ned-serp__head { display: flex; align-items: center; gap: var(--space-2); min-width: 0; margin-bottom: 2px; }
.ned-serp__icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface-2);
  color: var(--color-muted); font-size: 13px; font-weight: var(--weight-semibold); overflow: hidden; }
.ned-serp__icon img { display: block; width: 18px; height: 18px; object-fit: contain; }
.ned-serp__who { display: grid; gap: 1px; min-width: 0; }
.ned-serp__site { font-size: var(--text-sm); color: var(--color-text-2); }
.ned-serp__url { font-size: var(--text-xs); color: var(--color-muted); }
.ned-serp__title { font-size: var(--text-lg); color: var(--color-brand-text); line-height: 1.3; }
.ned-serp__text { font-size: var(--text-sm); color: var(--color-text-2); }
.ned-tags { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-2); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); }
.ned-tags:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-soft); }
.ned-tags [data-ned-tags-select][hidden] { display: none; }
.ned-tags__chips { display: contents; list-style: none; }
.ned-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px var(--space-2); border-radius: var(--radius-full); background: var(--color-brand-soft); color: var(--color-brand-text); font-size: var(--text-sm); }
.ned-chip__remove { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: var(--radius-full); background: transparent; color: inherit; font: inherit; line-height: 1; cursor: pointer; }
.ned-chip__remove:hover, .ned-chip__remove:focus-visible { background: var(--color-brand); color: var(--color-brand-ink); }
.ned-tags__input { flex: 1 1 140px; min-width: 120px; border: 0; padding: 6px var(--space-1); background: transparent; box-shadow: none; }
.ned-tags__input:focus { outline: none; box-shadow: none; }
.ned-tags__list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: var(--z-dropdown, 30); max-height: 260px; overflow: auto; margin: 0; padding: var(--space-1); list-style: none; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-lg); }
.ned-tags__list[hidden] { display: none; }
.ned-tags__option { padding: 6px var(--space-2); border-radius: var(--radius-sm); font-size: var(--text-sm); cursor: pointer; }
.ned-tags__option.is-active, .ned-tags__option:hover { background: var(--color-brand-soft); color: var(--color-brand-text); }
.ned-tags__option.is-create { font-weight: var(--weight-semibold); }

@media (max-width: 1099.98px) {
    .ned-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .ned-title { font-size: var(--text-xl); }
}

/* ---- Menu builder (core.menus edit: menu-builder.js) ------------------------------------------------------------ */
/* The builder uses the whole page width (24 Nov 2026: the .stack cap of 640 px left the right side empty). */
.menu-builder, .menu-builder .stack { max-width: none; }
.menu-builder__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: var(--space-4); align-items: start; }
.menu-builder__side { position: sticky; top: var(--space-4); }
.menu-builder__head p { margin: var(--space-1) 0 0; }
.menu-builder__bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.menu-builder__bar > :first-child { flex: 1 1 12rem; }
.menu-tree { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.menu-tree .menu-tree { margin: var(--space-2) 0 0 var(--space-8); }
.menu-tree .menu-tree:empty { margin-top: 0; }
.menu-node__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.menu-node__row.is-off { background: var(--color-surface-2); border-style: dashed; }
.menu-node__row.is-off .menu-node__label { color: var(--color-muted); }
.menu-node.is-dragging > .menu-node__row { opacity: .5; }
.menu-node__row.is-drop-before { box-shadow: 0 -3px 0 var(--color-brand); }
.menu-node__row.is-drop-after { box-shadow: 0 3px 0 var(--color-brand); }
.menu-node__row.is-drop-inside { border-color: var(--color-brand); background: var(--color-brand-soft); }
.menu-node__handle { display: inline-grid; place-items: center; width: 28px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-muted); cursor: grab; }
.menu-node__handle:hover { background: var(--color-surface-2); color: var(--color-text); }
.menu-node__handle:active { cursor: grabbing; }
.menu-node__main { flex: 1 1 220px; min-width: 0; display: grid; gap: 2px; }
.menu-node__label { width: 100%; font-weight: var(--weight-medium); }
.menu-node__link { font-size: var(--text-xs); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-node__flag { align-items: center; font-size: var(--text-sm); white-space: nowrap; }
.menu-node__tools { display: flex; gap: 2px; margin-left: auto; }
.menu-node__tools .btn:disabled { opacity: .35; }
.menu-node__delete { color: var(--tone-danger); }
.menu-node__edit { margin: var(--space-1) 0 0 var(--space-8); }
.menu-node__edit > summary { cursor: pointer; font-size: var(--text-sm); color: var(--color-brand-text); }
.menu-node__edit[open] > form { margin-top: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.menu-picker__groups { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.menu-picker__groups:empty { display: none; }
.menu-picker__chip { padding: 2px var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-2); font-size: var(--text-xs); cursor: pointer; }
.menu-picker__chip[aria-pressed="true"] { border-color: var(--tone-brand-border); background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: var(--weight-semibold); }
.menu-picker__results { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow-y: auto; display: grid; gap: 2px; }
.menu-picker__results:empty { display: none; }
.menu-picker__result { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
.menu-picker__result:hover { background: var(--color-surface-2); }
.menu-picker__text { display: grid; min-width: 0; font-size: var(--text-sm); }
.menu-picker__kind { font-size: var(--text-xs); color: var(--color-muted); }
.menu-picker--inline .menu-picker__results { max-height: 220px; }
html:not(.js) .menu-picker, html:not(.js) .menu-node__tools, html:not(.js) .menu-builder__bar, html:not(.js) .menu-node__handle { display: none; }
@media (max-width: 1099.98px) {
    .menu-builder__grid { grid-template-columns: minmax(0, 1fr); }
    .menu-builder__side { position: static; }
}
@media (max-width: 639.98px) {
    .menu-tree .menu-tree, .menu-node__edit { margin-left: var(--space-4); }
    .menu-node__tools { margin-left: 0; }
}

/* ---- Menus list cards + builder place strip + live preview (owner, 24 Nov 2026) --------------------------------- */
.menu-cards__note { margin: 0 0 var(--space-3); }
.menu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: var(--space-4); }
.menu-card { display: flex; flex-direction: column; gap: var(--space-3); max-width: none; transition: border-color .15s, box-shadow .15s; }
.menu-card:hover { border-color: var(--tone-brand-border); box-shadow: var(--shadow-sm); }
.menu-card.is-unused { background: var(--color-surface-2); border-style: dashed; }
.menu-card__head { display: flex; align-items: center; gap: var(--space-3); }
.menu-card__icon { display: inline-grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--color-brand-soft); color: var(--color-brand-text); }
.menu-card__icon svg { width: 20px; height: 20px; }
.menu-card__icon.is-footer { background: var(--tone-info-soft); color: var(--tone-info); }
.menu-card__icon.is-legal { background: var(--tone-neutral-soft); color: var(--tone-neutral); }
.menu-card.is-unused .menu-card__icon { background: var(--tone-muted-soft); color: var(--tone-muted); }
.menu-card__title { display: grid; gap: 2px; min-width: 0; }
.menu-card__title h2 { margin: 0; font-size: var(--text-md); }
.menu-card__title h2 a { color: var(--color-text); text-decoration: none; }
.menu-card__title h2 a:hover { color: var(--color-brand-text); }
.menu-card__place { font-size: var(--text-xs); color: var(--tone-success); font-weight: var(--weight-semibold); }
.menu-card__place::before { content: "● "; }
.menu-card__place.is-off { color: var(--color-muted); font-weight: var(--weight-regular); }
.menu-card__place.is-off::before { content: "○ "; }
.menu-card__preview { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-height: 52px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.menu-card__preview.is-header { background: var(--tone-brand-soft); border-color: var(--tone-brand-border); }
.menu-card__preview.is-footer { flex-direction: column; align-items: flex-start; gap: 2px; }
.menu-card__preview.is-legal { gap: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.menu-card__link { color: var(--color-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.menu-card__preview.is-header .menu-card__link { padding: 2px var(--space-2); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); font-weight: var(--weight-medium); }
.menu-card__empty { color: var(--color-muted); font-style: italic; }
.menu-card__more { padding: 0 var(--space-2); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.menu-card__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); margin-top: auto; }

.menu-place { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--tone-success-border); border-radius: var(--radius-md); background: var(--tone-success-soft); color: var(--tone-success); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.menu-place__dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: currentColor; }
.menu-place.is-off { border-color: var(--tone-warning-border); background: var(--tone-warning-soft); color: var(--tone-warning); }
.menu-place__count { margin-left: auto; padding: 1px var(--space-2); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-2); font-weight: var(--weight-semibold); }

.menu-live__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.menu-live__head h2 { font-size: var(--text-md); }
.menu-live__frame { min-height: 64px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); overflow: hidden; }
.menu-live__frame ul { list-style: none; margin: 0; padding: 0; }
.menu-live__empty { margin: 0; color: var(--color-muted); font-style: italic; }
.menu-live__link { color: var(--color-text); }
.menu-live__ext, .menu-live__caret { color: var(--color-muted); font-size: var(--text-xs); }
.menu-live__frame.is-header { background: var(--color-brand); border-color: var(--color-brand); padding: var(--space-2); }
.menu-live__bar { display: flex; flex-wrap: wrap; gap: 2px; }
.menu-live__item { position: relative; }
.menu-live__item > .menu-live__link { display: inline-block; padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); color: var(--color-brand-ink); font-weight: var(--weight-semibold); }
.menu-live__item > .menu-live__link .menu-live__ext, .menu-live__item > .menu-live__link .menu-live__caret { color: inherit; opacity: .75; }
.menu-live__item:hover > .menu-live__link, .menu-live__item:focus-within > .menu-live__link { background: var(--color-brand-soft); color: var(--color-brand-text); }
.menu-live__sub { display: grid; gap: 2px; margin: 2px 0 var(--space-1) var(--space-2) !important; padding: var(--space-1) var(--space-2) !important; border-radius: var(--radius-sm); background: var(--color-surface); box-shadow: var(--shadow-xs); font-size: var(--text-xs); }
.menu-live__heading { display: block; margin-bottom: var(--space-1); font-size: var(--text-sm); }
.menu-live__heading:empty { display: none; }
.menu-live__col { display: grid; gap: 4px; }
.menu-live__col .menu-live__link { color: var(--color-text-2); }
.menu-live__col-sub { display: grid; gap: 2px; margin: 2px 0 0 var(--space-3) !important; font-size: var(--text-xs); }
.menu-live__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-size: var(--text-xs); }
.menu-live__sep { color: var(--color-muted); }
html:not(.js) .menu-live, html:not(.js) .menu-place__count { display: none; }
/* ---- Homepage sections builder (news.homepage: homepage-builder.js) --------------------------------------------- */
.hp-jump { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-2); margin-bottom: var(--space-4); font-size: var(--text-sm); }
.hp-jump a { padding: 2px var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-2); text-decoration: none; }
.hp-jump a:hover { border-color: var(--tone-brand-border); color: var(--color-brand-text); }
.hp-builder { margin-bottom: var(--space-6); }
.hp-builder__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.hp-builder__head p { margin: var(--space-1) 0 0; }
.hp-builder__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.hp-add, .hp-save { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.hp-add select { width: auto; max-width: 100%; }
.hp-status, .save-status { font-size: var(--text-sm); color: var(--color-muted); }
.hp-status.is-busy, .save-status.is-busy { color: var(--color-text-2); }
.hp-status.is-ok, .save-status.is-ok { color: var(--tone-success); }
.hp-status.is-error, .save-status.is-error { color: var(--tone-danger); font-weight: var(--weight-semibold); }
.hp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.hp-row { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-xs); }
.hp-row.is-off { background: var(--color-surface-2); border-style: dashed; }
.hp-row.is-off .hp-row__title { color: var(--color-muted); }
.hp-row.is-dragging { opacity: .5; }
.hp-row.is-drop-before { box-shadow: 0 -3px 0 var(--color-brand); }
.hp-row.is-drop-after { box-shadow: 0 3px 0 var(--color-brand); }
.hp-row__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); }
.hp-row__handle { display: inline-grid; place-items: center; width: 28px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-muted); cursor: grab; }
.hp-row__handle:hover { background: var(--color-surface-2); color: var(--color-text); }
.hp-row__handle:active { cursor: grabbing; }
.hp-row__main { flex: 1 1 240px; min-width: 0; display: grid; gap: 2px; }
.hp-row__title { font-weight: var(--weight-semibold); }
.hp-row__heading { font-weight: 400; color: var(--color-text-2); }
.hp-row__meta { font-size: var(--text-xs); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-row__meta:empty { display: none; }
.hp-row__note { font-size: var(--text-xs); color: var(--tone-warning); }
.hp-row__switch { margin: 0; }
.hp-row__tools { display: flex; gap: 2px; margin-left: auto; }
.hp-row__tools .btn:disabled { opacity: .35; }
.hp-row__delete { color: var(--tone-danger); }
.hp-row__more { padding: 0 var(--space-3) var(--space-2) calc(var(--space-6) + 28px); }
.hp-row__more > summary { cursor: pointer; font-size: var(--text-sm); color: var(--color-brand-text); }
.hp-row__fields { display: grid; gap: var(--space-3); margin-top: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.hp-field { display: grid; gap: var(--space-1); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.hp-field input, .hp-field select, .hp-field textarea { font-weight: 400; }
.hp-field--num input { max-width: 8rem; }
.hp-field.has-error input, .hp-field.has-error select, .hp-field.has-error textarea { border-color: var(--tone-danger); }
.hp-row__style { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3) var(--space-6); }
.hp-layouts, .hp-tones { margin: 0; padding: 0; border: 0; min-width: 0; }
.hp-layouts legend, .hp-tones legend { padding: 0; margin-bottom: var(--space-1); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.hp-layouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); }
.hp-layout { position: relative; display: grid; align-content: start; gap: 2px; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; font-size: var(--text-sm); }
.hp-layout:hover { border-color: var(--tone-brand-border); }
.hp-layout:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); box-shadow: 0 0 0 1px var(--color-brand); }
.hp-layout:has(input:focus-visible), .hp-tone:has(input:focus-visible) { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.hp-layout input, .hp-tone input { position: absolute; opacity: 0; pointer-events: none; }
.hp-layout__name { font-weight: var(--weight-semibold); }
.hp-layout__note { font-size: var(--text-xs); color: var(--color-muted); }
.hp-layout__art { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; height: 44px; margin-bottom: var(--space-1); }
.hp-layout__art span { border-radius: var(--radius-xs); background: var(--color-surface-3); }
.hp-layout__art span:first-child { grid-row: 1 / 3; background: var(--tone-brand-soft); }
.hp-layout__art--grid, .hp-layout__art--cards, .hp-layout__art--gallery, .hp-layout__art--tiles, .hp-layout__art--photo, .hp-layout__art--columns { grid-template-columns: 1fr 1fr 1fr; grid-template-rows: 1fr; }
.hp-layout__art--grid span:first-child, .hp-layout__art--cards span:first-child, .hp-layout__art--gallery span:first-child, .hp-layout__art--tiles span:first-child, .hp-layout__art--photo span:first-child, .hp-layout__art--columns span:first-child { grid-row: auto; }
.hp-layout__art--banner, .hp-layout__art--spotlight { grid-template-columns: 1fr 1fr; grid-template-rows: 2fr 1fr; }
.hp-layout__art--banner span:first-child, .hp-layout__art--spotlight span:first-child { grid-row: auto; grid-column: 1 / 3; }
.hp-layout__art--compact, .hp-layout__art--numbered, .hp-layout__art--wire { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr 1fr; }
.hp-layout__art--compact span:first-child, .hp-layout__art--numbered span:first-child, .hp-layout__art--wire span:first-child { grid-row: auto; background: var(--color-surface-3); }
.hp-tones { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.hp-tones legend { width: 100%; }
.hp-tone { position: relative; display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); font-size: var(--text-sm); cursor: pointer; }
.hp-tone::before { content: ""; width: 12px; height: 12px; border-radius: var(--radius-full); background: var(--color-brand); }
.hp-tone--accent::before { background: var(--tone-warning); }
.hp-tone--dark::before { background: var(--color-text); }
.hp-tone:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); font-weight: var(--weight-semibold); }
.hp-row__ads { margin: 0; }
.hp-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
html:not(.js) .hp-list, html:not(.js) .hp-builder__bar { display: none; }
@media (max-width: 639.98px) {
    .hp-row__tools { margin-left: 0; }
    .hp-row__more { padding-left: var(--space-3); }
}

/* news.ads: the Advertisements board (admin/board, ads-board.js; Dhading Update, 20 Nov 2026): state cards, search + area
   pills, "Inactive ads" + "How it works" on the left (300px, sticky), positions in two columns (CSS columns). */
.adb { display: grid; gap: var(--space-4); }
.adb-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); }
.adb-kpi { display: grid; gap: 2px; justify-items: start; text-align: left; padding: var(--space-4) var(--space-5); background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); cursor: pointer; font: inherit; color: var(--dh-muted); }
.adb-kpi:hover { border-color: var(--dh-royal); }
.adb-kpi[aria-pressed="true"] { border-color: var(--dh-royal); box-shadow: inset 0 0 0 1px var(--dh-royal), var(--shadow-xs); }
.adb-kpi__n { font-family: var(--font-head); font-size: var(--text-3xl); font-weight: var(--weight-bold); line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--dh-ink); }
.adb-kpi--all .adb-kpi__n { color: var(--dh-royal); }
.adb-kpi--live .adb-kpi__n { color: var(--dh-ok); }
.adb-kpi--off .adb-kpi__n { color: var(--dh-muted); }
.adb-kpi--scheduled .adb-kpi__n { color: var(--tone-review); }
.adb-kpi--attention .adb-kpi__n { color: var(--tone-warning); }
.adb-kpi__label { font-size: var(--text-sm); font-weight: var(--weight-medium); }
.adb-tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.adb-tools__search { position: relative; flex: 1 1 260px; max-width: 420px; }
.adb-tools__search svg { position: absolute; left: var(--space-3); top: 50%; transform: translateY(-50%); color: var(--dh-muted); pointer-events: none; }
.adb-tools__search input { width: 100%; padding-left: calc(var(--space-3) + 1.6em); border-radius: var(--radius-full); background: var(--dh-surface); }
.adb-areas { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--radius-full); }
.adb-areas button { border: 0; background: transparent; padding: var(--space-1) var(--space-3); border-radius: var(--radius-full); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--dh-muted); cursor: pointer; }
.adb-areas button:hover { color: var(--dh-ink); background: var(--dh-mist); }
.adb-areas button[aria-pressed="true"] { background: var(--dh-royal); color: var(--color-brand-ink); }
.adb-tools__fold { margin-left: auto; display: flex; gap: var(--space-4); }
.adb-link { border: 0; background: none; padding: 0; font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--dh-royal); cursor: pointer; }
.adb-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.adb__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-3); }
.adb__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.adb__side { position: sticky; top: var(--space-4); display: grid; gap: var(--space-3); min-width: 0; }
.adb__inactive { padding: var(--space-4); background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.adb__title { font-family: var(--font-head); font-weight: var(--weight-bold); font-size: var(--text-md); color: var(--dh-ink); margin: 0 0 var(--space-1); }
.adb__note { font-size: var(--text-sm); color: var(--dh-muted); margin: 0 0 var(--space-3); }
.adb-help { padding: var(--space-4); background: var(--dh-mist); border: 1px solid var(--dh-border-2); border-radius: var(--radius-lg); font-size: var(--text-sm); color: var(--dh-muted); }
.adb-help ul { margin: 0; padding-left: var(--space-4); display: grid; gap: var(--space-1); }
.adb__places { min-width: 0; display: grid; gap: var(--space-3); }
.adb__columns { columns: 2; column-gap: var(--space-3); }
.adb-pos { display: inline-block; width: 100%; break-inside: avoid; margin: 0 0 var(--space-3); background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.adb-pos__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); cursor: pointer; list-style: none; }
.adb-pos__head::-webkit-details-marker { display: none; }
.adb-pos__title { font-family: var(--font-head); font-weight: var(--weight-bold); color: var(--dh-ink); overflow-wrap: anywhere; }
.adb-pos__count { margin-left: auto; min-width: 1.8em; padding: 0 var(--space-2); border-radius: var(--radius-full); background: var(--dh-mist); color: var(--dh-ink); font-size: var(--text-xs); font-weight: var(--weight-semibold); text-align: center; line-height: 1.7; }
.adb-pos__chevron { display: inline-flex; color: var(--dh-muted); transition: transform .15s ease; }
.adb-pos[open] .adb-pos__chevron { transform: rotate(180deg); }
.adb-pos__body { display: grid; gap: var(--space-2); padding: 0 var(--space-4) var(--space-3); }
.adb-pos__desc { margin: 0; font-size: var(--text-xs); color: var(--dh-muted); }
.adb-pos__empty { padding: var(--space-4); border: 1px dashed var(--dh-drop); border-radius: var(--radius-md); text-align: center; font-size: var(--text-sm); color: var(--dh-muted); }
.adb-pos__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--dh-border-2); font-size: var(--text-sm); color: var(--dh-muted); }
.adb-pos__live b { color: var(--dh-ok); }
.adb-pos__add { font-weight: var(--weight-semibold); color: var(--dh-royal); }
.adb-area { display: inline-flex; align-items: center; padding: 0 var(--space-2); border: 1px solid transparent; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.7; }
.adb-area--site { background: var(--tone-danger-soft); color: var(--tone-danger); border-color: var(--tone-danger-border); }
.adb-area--home { background: var(--dh-sky); color: var(--dh-royal); border-color: var(--tone-info-border); }
.adb-area--article { background: var(--tone-neutral-soft); color: var(--tone-neutral); border-color: var(--tone-neutral-border); }
.adb__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); min-height: var(--space-2); }
.adb__empty { display: none; margin: 0; }
.is-empty .adb__empty { display: block; }
.adb__inactive .adb__empty { font-size: var(--text-sm); color: var(--dh-muted); }
.adb__noslot, .adb__nomatch, .adb__empty-board { margin: 0; }
.adb.is-dragging .adb__list { min-height: 40px; }
.adb-row { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--radius-md); }
.adb-row[draggable="true"] { cursor: grab; }
.adb-row:hover { border-color: var(--dh-drop); }
.adb-row.is-dragging { opacity: .5; border-style: dashed; }
.adb-row__handle { flex: none; width: 10px; height: 16px; background-image: radial-gradient(circle, var(--dh-muted) 1.2px, transparent 1.6px); background-size: 5px 5px; }
.adb-row__thumb { flex: none; width: 56px; height: 40px; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius-sm); background: var(--dh-thumb); color: var(--dh-muted); font-family: var(--font-head); font-size: var(--text-sm); }
.adb-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.adb-row__main { display: grid; gap: 2px; min-width: 0; flex: 1; }
.adb-row__name { font-weight: var(--weight-semibold); color: var(--dh-ink); overflow-wrap: anywhere; }
.adb-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); font-size: var(--text-xs); }
.adb-row__reasons { display: contents; }
.adb-row__site { color: var(--dh-muted); overflow-wrap: anywhere; }
.adb-row__last { display: none; font-size: var(--text-xs); color: var(--dh-muted); overflow-wrap: anywhere; }
.adb__inactive .adb-row__last { display: block; }
/* The narrow Inactive column: the switch and "⋯" go under the name instead of beside it. */
.adb__inactive .adb-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: start; }
.adb__inactive .adb-row__handle { grid-column: 1; align-self: center; }
.adb__inactive .adb-row__thumb { grid-column: 2; grid-row: 1; }
.adb__inactive .adb-row__main { grid-column: 3; grid-row: 1; }
.adb__inactive .adb-row__tools { grid-column: 3; justify-self: start; }
.adb-row__tools { display: flex; align-items: center; gap: var(--space-1); flex: none; }
.adb-row__switch { display: inline-flex; cursor: pointer; }
.adb-row__more { position: relative; }
.adb-row__more > summary { list-style: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); color: var(--dh-muted); }
.adb-row__more > summary::-webkit-details-marker { display: none; }
.adb-row__more > summary:hover, .adb-row__more[open] > summary { background: var(--dh-mist); color: var(--dh-ink); }
.adb-row__menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: var(--z-dropdown); display: grid; gap: var(--space-2); width: 15rem; padding: var(--space-3); background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); }
.adb-row__to { width: 100%; font-size: var(--text-sm); }
.adb-row__steps { display: flex; gap: var(--space-1); }
html:not(.js) .adb-row__tools { display: none; }
.adb-chip { display: inline-flex; align-items: center; padding: 0 var(--space-2); border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: 1.7; background: var(--tone-muted-soft); color: var(--tone-muted); }
.adb-chip--success { background: var(--dh-ok-bg); color: var(--dh-ok); }
.adb-chip--review { background: var(--tone-review-soft); color: var(--tone-review); }
.adb-chip--warning { background: var(--tone-warning-soft); color: var(--tone-warning); }
@media (max-width: 1299.98px) {
    .adb__columns { columns: 1; }
}
@media (max-width: 1099.98px) {
    .adb-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 899.98px) {
    .adb__layout { grid-template-columns: minmax(0, 1fr); }
    .adb__side { position: static; }
    .adb-tools__fold { margin-left: 0; }
}
@media (max-width: 559.98px) {
    .adb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .adb-kpi { padding: var(--space-3); }
    .adb-row { flex-wrap: wrap; }
    .adb-row__menu { width: min(15rem, 80vw); }
}

/* news.ads: the advertisement form (admin/ads/form): Content | Schedule tabs in a two-column grid, the side card with the
   preview. The Image / Text fields follow the chosen type without JS (:has) and with it (ads-board.js sets hidden). */
.adf__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.adf__fields { margin: 0; }
/* Owner, 29 Nov 2026: Name | Position, then Type (both choices side by side) | Active. */
.adf__type { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.adf__type > .field-error { grid-column: 1 / -1; }
.adf__active { align-self: start; }
.adf__active .toggle-field { justify-content: flex-start; align-items: center; }
.adf__type--wide { grid-column: 1 / -1; }
/* Side panel: the Active switch beside the heading, sized to it (owner, 29 Nov 2026). */
.modal-header .has-panel-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); }
.adf-head__switch { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-lg); line-height: 1.3; color: var(--color-text); cursor: pointer; }
.adf-head__switch input[type=checkbox].toggle { width: 34px; height: 19px; margin: 0; flex: none; }
.adf-head__switch input[type=checkbox].toggle::after { top: 2px; left: 2px; width: 15px; height: 15px; }
.adf-head__switch input[type=checkbox].toggle:checked::after { transform: translateX(15px); }
/* Side panel: Cancel / Save in a bar on the bottom edge (offset = the panel body's bottom padding, as the module panel). */
.adf__bar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) 0 var(--space-5); background: var(--color-surface);
    border-top: 1px solid var(--color-border); position: sticky; bottom: calc(var(--space-5) * -1); z-index: 2; box-shadow: 0 -8px 16px -12px rgba(15, 23, 42, .25); }
.adf__bar .btn { min-width: 120px; }
.adf__form:has(input[name="type"][value="text"]:checked) [data-adf-fields="image"],
.adf__form:has(input[name="type"][value="image"]:checked) [data-adf-fields="text"] { display: none; }
.adf__aside { position: sticky; top: var(--space-4); }
.adf__state { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0; }
.adf-preview { display: grid; gap: var(--space-1); }
.adf-preview__label { margin: 0; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--dh-muted); text-transform: uppercase; letter-spacing: .04em; }
.adf-preview__frame { display: grid; place-items: center; min-height: 80px; padding: var(--space-2); overflow: hidden; background: var(--dh-mist); border: 1px dashed var(--dh-drop); border-radius: var(--radius-md); }
.adf-preview__frame img { max-width: 100%; max-height: 220px; width: auto; border-radius: var(--radius-sm); }
.adf-preview__text { display: grid; gap: 2px; text-align: center; color: var(--dh-ink); overflow-wrap: anywhere; }
.adf-preview[data-type="image"] .adf-preview__text, .adf-preview[data-type="text"] .adf-preview__frame img { display: none; }
.adf-preview__host { font-size: var(--text-xs); color: var(--dh-muted); overflow-wrap: anywhere; }
.adf-preview__host::after { content: " ↗"; }
@media (max-width: 1023.98px) {
    .adf__aside { position: static; }
}
@media (max-width: 767.98px) {
    .adf__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Category / tag / author edit pages (news-articles admin.partials.record-side): Save / Back / URL / dates card, Delete card */
.rec-side__actions { display: grid; gap: var(--space-2); }
.rec-side__facts dt, .rec-side__facts dd { font-size: var(--text-sm); }
.rec-side__link { overflow-wrap: anywhere; }
.rec-side--danger { border-color: var(--tone-danger-border); }
.rec-side--danger .card-header h2 { color: var(--tone-danger); }
.rec-slug .input-addon { display: block; align-content: center; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.rec-slug .input-group > input { min-width: 10ch; }

/* Authors / Journalists list and author form (news-articles admin.authors, Dhading Update style, 20 Nov 2026): the
   list reuses the cat-* rows (photo or initials in the circle); the form puts a square photo beside the name fields,
   three links a row, and a sticky Save card on the right (one column on small screens). */
.aut-avatar.has-photo { overflow: hidden; padding: 0; }
.aut-avatar img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.aut-profile { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.aut-photo .media-field.is-cover .media-field-preview { aspect-ratio: 1 / 1; min-height: 0; border-color: var(--dh-border); background: var(--dh-mist); color: var(--dh-muted); }
.aut-photo .media-field.is-cover [data-mf-cover]:hover { border-color: var(--dh-royal); }
.aut-bio > .field-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.aut-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); align-items: start; }
.aut-more > summary { margin-bottom: var(--space-3); font-weight: var(--weight-semibold); color: var(--dh-royal); cursor: pointer; }
.aut-aside { position: sticky; top: var(--space-4); }
.aut-side__stories { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.aut-side__danger { padding-top: var(--space-3); border-top: 1px solid var(--dh-border); }
@media (max-width: 1023.98px) {
    .aut-aside { position: static; }
}
@media (max-width: 899.98px) {
    .aut-profile { grid-template-columns: minmax(0, 1fr); }
    .aut-photo { max-width: 220px; }
    .aut-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599.98px) {
    .aut-links { grid-template-columns: minmax(0, 1fr); }
}

/* ---- News article Edit page head and "Review & notes" (ned-head-*, ned-review-*; Dhading-style editor) ---------- */
.ned-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-1); }
.ned-head__views { display: inline-flex; align-items: center; gap: 4px; padding: 2px var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ned-head__views svg { width: 14px; height: 14px; }
.ned-head__address { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-width: 0; font-size: var(--text-sm); }
.ned-head__label { font-weight: var(--weight-semibold); color: var(--color-text-2); }
.ned-head__url { font-family: var(--font-mono); overflow-wrap: anywhere; min-width: 0; }
.ned-head__note { font-size: var(--text-xs); color: var(--color-faint); }
.ned-head__copy[hidden] { display: none; }
.ned-editor-meta a { font-weight: var(--weight-semibold); }
.ned-review__state { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--tone-warning-soft); color: var(--tone-warning); }
.ned-review__assign { display: grid; gap: var(--space-2); }
.ned-review__assign .field { margin: 0; }
.ned-review__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: center; }
.ned-review__changes { justify-self: start; }
.ned-thread { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); max-height: 360px; overflow: auto; }
.ned-note { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.ned-note.is-changes { border-color: var(--tone-warning-border); background: var(--tone-warning-soft); }
.ned-note__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2); font-size: var(--text-xs); }
.ned-note__text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.ned-compose { display: grid; gap: var(--space-2); }
.ned-compose textarea { width: 100%; resize: vertical; }
.ned-compose__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }

/* ---- News → Website settings (news-articles admin.website-settings.edit; ws-*): tab strip, one card per tab ---------- */
.ws-tabs { margin-bottom: var(--space-4); }
.ws-card { max-width: 880px; }
.ws-card + .ws-card { margin-top: var(--space-4); }
.ws-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--space-4); }
.ws-tile { margin: 0; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.ws-tile .media-field { flex-wrap: wrap; }
.ws-note { margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); }
.ws-heading { padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.ws-heading-title { margin: 0; font-size: var(--text-base); font-weight: var(--weight-semibold); }
/* Platform → Modules: "Manage" side panel (24 Nov 2026) and the module page; the client list only counts while
   "Selected clients only" is chosen, and warns when nobody is ticked. */
dialog.drawer.module-drawer { width: min(640px, 100vw); }
.module-page { max-width: 760px; }
.module-panel { max-width: none; }
.module-panel__head { display: grid; gap: var(--space-3); }
.module-panel__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-2); margin: 0; }
.module-panel__facts div { padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.module-panel__facts dt { font-size: var(--text-xs); color: var(--color-muted); }
.module-panel__facts dd { margin: 0; font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.module-panel__form { display: grid; gap: var(--space-4); }
.module-panel__switches { display: grid; gap: var(--space-2); }
.module-panel__client-list { display: grid; gap: var(--space-1); max-height: 300px; overflow: auto; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.module-panel__clients { transition: opacity .15s var(--ease); }
.module-panel__form:not(:has(input[name="mode"][value="selected"]:checked)) .module-panel__clients { opacity: .5; }
.module-panel__nobody { display: none; color: var(--color-danger-solid); }
.module-panel__form:has(input[name="mode"][value="selected"]:checked):not(:has(input[name="clients[]"]:checked)) .module-panel__nobody { display: block; }
.module-panel__save, .aa-panel__save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: var(--space-3) 0 0; background: var(--color-surface); border-top: 1px solid var(--color-border); }
/* In a side panel the Save bar stays at the bottom edge while the rest scrolls: the offset equals the panel body's
   bottom padding (.modal-body), so nothing shows below the bar. */
dialog.drawer .module-panel__save, dialog.drawer .aa-panel__save { position: sticky; bottom: calc(var(--space-5) * -1); z-index: 1;
    padding-bottom: var(--space-5); box-shadow: 0 -8px 16px -12px rgba(15, 23, 42, .25); }
/* Platform → Appearance access, website exceptions (24 Nov 2026): every website as a row with "Manage" (side panel). */
.aa-websites { max-width: none; }
.aa-sites { display: grid; border: 1px solid var(--color-border); border-radius: var(--radius-md); max-height: 520px; overflow: auto; }
.aa-site { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3); border-top: 1px solid var(--color-border); }
.aa-site:first-child { border-top: 0; }
.aa-site__name { display: grid; }
.aa-site__levels { display: flex; flex-wrap: wrap; gap: var(--space-1); }
@media (max-width: 640px) { .aa-site { grid-template-columns: minmax(0, 1fr) auto; } .aa-site__levels { grid-column: 1 / -1; grid-row: 2; } }
dialog.drawer.aa-drawer { width: min(560px, 100vw); }
.aa-panel { max-width: none; }
.aa-panel__form { display: grid; gap: var(--space-3); }
.aa-panel__part .field { margin: 0; }
/* News → Rashifal (24 Nov 2026): the day and status (hero), a toolbar, the twelve sign cards and a Save bar. */
.rs { display: grid; gap: var(--space-4); }
.rs-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: var(--space-5); align-items: center;
    background: linear-gradient(120deg, var(--color-brand-soft), var(--color-surface) 70%); }
.rs-hero__date { display: grid; gap: 2px; }
.rs-hero__kicker { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--color-muted); font-weight: var(--weight-semibold); }
.rs-hero__bs { font-size: 1.6rem; line-height: 1.25; color: var(--color-brand-text); }
.rs-hero__ad { color: var(--color-muted); }
.rs-hero__status { display: grid; gap: var(--space-2); justify-items: start; }
.rs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.rs-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.rs-chip.is-live { background: var(--color-brand-soft); color: var(--color-brand-text); }
.rs-chip.is-off { background: var(--color-surface-3); color: var(--color-muted); }
.rs-progress { display: grid; gap: 4px; width: min(280px, 100%); }
.rs-progress__bar { width: 100%; height: 8px; }
.rs-hero__share { display: grid; gap: var(--space-2); justify-items: end; }
.rs-share-links { display: flex; flex-wrap: wrap; gap: 6px; }
.rs-net { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text); cursor: pointer; }
.rs-net svg { width: 18px; height: 18px; }
.rs-net:hover, .rs-net:focus-visible { border-color: var(--color-brand); color: var(--color-brand); }
.rs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.rs-toolbar .btn svg { width: 16px; height: 16px; }
.rs-toolbar__note { margin-left: auto; }
.rs-form { display: grid; gap: var(--space-4); max-width: none; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.rs-card { display: grid; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface);
    transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.rs-card:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-soft); }
.rs-card__head { display: flex; align-items: center; gap: var(--space-3); }
.rs-card__icon { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--color-brand-soft); }
.rs-card__icon img { width: 36px; height: 36px; }
.rs-card__name { display: grid; flex: 1; min-width: 0; cursor: text; }
.rs-card__name b { font-size: 1.15rem; }
.rs-card__name span { font-size: var(--text-xs); color: var(--color-muted); }
.rs-card__done { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--color-brand-ink); background: var(--color-brand); visibility: hidden; }
.rs-card.is-filled .rs-card__done { visibility: visible; }
.rs-card textarea { width: 100%; min-height: 120px; resize: vertical; line-height: 1.7; }
.rs-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.rs-card__actions { display: inline-flex; gap: 4px; }
.rs-mini { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-muted); cursor: pointer; }
.rs-mini svg { width: 16px; height: 16px; }
.rs-mini:hover, .rs-mini:focus-visible { color: var(--color-brand); border-color: var(--color-brand); }
.rs-save { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: 0 -8px 20px -14px rgba(15, 23, 42, .35); }
#rs-paste textarea { width: 100%; line-height: 1.7; }
@media (max-width: 900px) { .rs-hero { grid-template-columns: minmax(0, 1fr); } .rs-hero__share { justify-items: start; } }
@media (max-width: 480px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } .rs-toolbar__note { margin-left: 0; } }
/* News → Advertisements: an ad opens in a side panel (24 Nov 2026); the form and its preview card stack in it. */
dialog.drawer.ad-drawer { width: min(760px, 100vw); }
dialog.drawer.ad-drawer .grid-aside { grid-template-columns: minmax(0, 1fr); }
dialog.drawer.ad-drawer .adf__aside { position: static; max-width: none; }
dialog.drawer.ad-drawer .adf { gap: var(--space-4); }
/* Platform → Clients: "Edit" side panel and the edit page (24 Nov 2026). */
dialog.drawer.client-drawer { width: min(560px, 100vw); }
.client-edit-page { max-width: 760px; }
.client-edit { max-width: none; }
.client-edit__form { display: grid; gap: var(--space-4); }
.client-edit__save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: var(--space-3) 0 0; background: var(--color-surface); border-top: 1px solid var(--color-border); }
dialog.drawer .client-edit__save { position: sticky; bottom: calc(var(--space-5) * -1); z-index: 1; padding-bottom: var(--space-5); box-shadow: 0 -8px 16px -12px rgba(15, 23, 42, .25); }
.client-edit__fixed summary { cursor: pointer; color: var(--color-muted); }
/* Platform → Appearance access: a level that differs from Goji's recommendation (edition rows). */
.aa-differs { outline: 1px dashed var(--color-border-strong); outline-offset: 1px; }
/* Settings → Appearance (24 Nov 2026): its parts as pills under the Settings tabs, the unpublished-changes bar. */
.appearance-tabs { margin-bottom: var(--space-4); }
.appearance-draft { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
/* Appearance → Theme, "Your theme" (24 Nov 2026): a sketch of the website in its own colours (--tp-* set from data by
   data-goji-vars) beside the theme's details. Decorative only (aria-hidden); the real page opens in a new tab. */
.theme-current { margin-bottom: var(--space-4); }
.theme-current__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.theme-preview { margin: 0; display: grid; gap: var(--space-2); }
.theme-preview__shot { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--color-border); }
.theme-preview__frame { --tp-primary: var(--color-brand); --tp-secondary: var(--color-text); --tp-accent: var(--color-brand-hover); --tp-font: inherit;
    display: grid; gap: 8px; padding: 0 0 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: #fff; overflow: hidden;
    font-family: var(--tp-font); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.theme-preview__frame i, .theme-preview__frame span { display: block; }
.tp-browser { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: var(--color-surface-2); border-bottom: 1px solid var(--color-border); }
.tp-browser span { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); }
.tp-browser em { margin-left: 8px; flex: 1; font-style: normal; font-size: 11px; color: var(--color-muted); background: #fff; border-radius: 6px; padding: 2px 8px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tp-topbar { display: flex; gap: 6px; padding: 5px 12px; margin-top: -8px; background: var(--tp-secondary); }
.tp-topbar i { height: 5px; width: 44px; border-radius: 3px; background: rgba(255, 255, 255, .45); }
.tp-topbar i.tp-accent, .tp-side i.tp-accent { background: var(--tp-accent); }
.tp-masthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 12px; min-height: 44px; }
.tp-masthead img { max-height: 40px; max-width: 45%; object-fit: contain; }
.tp-masthead b { font-size: 18px; color: var(--tp-primary); font-family: var(--tp-font); }
.tp-ad { width: 46%; height: 30px; border-radius: 4px; background: repeating-linear-gradient(45deg, var(--color-surface-2), var(--color-surface-2) 6px, var(--color-surface-3) 6px, var(--color-surface-3) 12px); }
.tp-nav { display: flex; gap: 8px; padding: 8px 12px; background: var(--tp-primary); }
.tp-nav i { height: 6px; width: 38px; border-radius: 3px; background: rgba(255, 255, 255, .75); }
.tp-body { display: grid; grid-template-columns: 1.7fr 1fr; gap: 10px; padding: 0 12px; }
.tp-lead { display: grid; gap: 5px; }
.tp-img { height: 70px; border-radius: 5px; background: linear-gradient(135deg, color-mix(in srgb, var(--tp-primary) 35%, #fff), color-mix(in srgb, var(--tp-accent) 30%, #fff)); }
.tp-lead b { font-size: 12px; line-height: 1.3; color: var(--tp-secondary); font-family: var(--tp-font); }
.tp-lead i, .tp-side i { height: 5px; border-radius: 3px; background: var(--color-surface-3); }
.tp-lead i:last-child { width: 70%; }
.tp-side { display: grid; gap: 7px; align-content: start; padding-left: 8px; border-left: 3px solid var(--tp-accent); }
.tp-side i.tp-accent { width: 40%; }
.tp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 12px; }
.tp-cards span { height: 32px; border-radius: 5px; background: var(--color-surface-2); border-top: 3px solid var(--tp-primary); }
.tp-footer { display: flex; gap: 10px; padding: 12px; margin-bottom: -10px; background: var(--tp-secondary); }
.tp-footer i { height: 5px; flex: 1; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.theme-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-4); margin: 0; }
.theme-facts dt { font-weight: var(--weight-semibold); color: var(--color-muted); }
.theme-facts dd { margin: 0; overflow-wrap: anywhere; }
.theme-swatches { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.theme-swatches li { display: flex; align-items: center; gap: var(--space-2); }
.theme-swatch { --sw: #ccc; width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--sw); border: 1px solid rgba(15, 23, 42, .15); }
@media (max-width: 900px) { .theme-current__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .theme-facts { grid-template-columns: minmax(0, 1fr); } .theme-facts dd { margin-bottom: var(--space-2); } }
/* A section box of a tab (General: Website, Contact information, Stories and dates, …). */
.ws-section { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.ws-section > .ws-heading { padding: 0 0 var(--space-2); border-top: 0; border-bottom: 1px solid var(--color-border); }
.ws-section > .field, .ws-section > .toggle { margin: 0; }
@media (max-width: 640px) { .ws-section { padding: var(--space-3); } }
.ws-info p { overflow-wrap: anywhere; }
/* A Website settings tab with sections (General; owner 25 Nov 2026: "it all reads as one block — a background per
   section, no white page background"). The form is no card: each section is a card of its own with a heading band,
   straight under the tab strip (no title block, no section links: "more than needed"), and Save stays in reach. */
.ws-card.ws-card--sections { --ws-pad: var(--space-5); gap: var(--space-4); padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.ws-card--sections > .ws-section { gap: var(--space-4); padding: var(--ws-pad); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-xs); }
/* The heading band is the blue the owner chose (--goji-section-head) with white text; it covers the card's own top border. */
.ws-card--sections > .ws-section > .ws-heading { position: relative; display: flex; align-items: center; gap: var(--space-2); margin: calc(var(--ws-pad) * -1 - 1px) calc(var(--ws-pad) * -1 - 1px) 0; padding: var(--space-3) var(--ws-pad); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--goji-section-head); color: var(--goji-navy-text); }
.ws-card--sections .ws-heading-title { font-size: var(--text-md); color: var(--goji-navy-text); }
.ws-card--sections .ws-heading .goji-tip { border-color: var(--goji-navy-text); background: transparent; color: var(--goji-navy-text); opacity: .8; }
.ws-card--sections .ws-heading .goji-tip:hover, .ws-card--sections .ws-heading .goji-tip[aria-expanded="true"] { opacity: 1; }
.ws-card--sections .ws-heading .goji-tip__box { left: var(--ws-pad); right: auto; top: calc(100% + 4px); width: max-content; max-width: min(360px, calc(100% - 2 * var(--ws-pad))); }
/* Design credit (platform console: Appearance access and the client page; owner, 25 Nov 2026). The name and link of a
   website's own credit show only while "Its own name and link" is chosen. */
.crd-now { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); }
.crd-pair, .crd-own { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: var(--space-3); }
.crd-form .crd-own { display: none; }
.crd-form:has(input[name="credit_mode"][value="custom"]:checked) .crd-own { display: grid; }
.crd-exceptions { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.crd-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.crd-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); overflow-wrap: anywhere; }
@media (max-width: 640px) { .crd-pair, .crd-own { grid-template-columns: minmax(0, 1fr); } }
/* Team strip editor (Website settings → General; owner, 25 Nov 2026): the switches, one row per person (photo,
   position, name, link, show / move / remove) and a preview of the strip as the website prints it. */
.tms-editor { display: grid; gap: var(--space-4); }
.tms-options { display: grid; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.tms-options .toggle-field { padding: 0; border: 0; background: none; }
.tms-layout { margin: 0; padding: 0; border: 0; }
.tms-list { display: grid; gap: var(--space-2); }
.tms-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.tms-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.tms-row.is-dragging { opacity: .55; border-style: dashed; border-color: var(--color-brand); }
.tms-row.is-off { background: var(--color-surface-2); }
.tms-row.is-off .tms-fields, .tms-row.is-off .tms-photo { opacity: .55; }
.tms-photo, .tms-photo.media-field { display: grid; justify-items: center; gap: 4px; margin: 0; padding: 0; border: 0; background: none; }
.tms-photo__preview { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface-2); }
.tms-photo__preview img { width: 100%; height: 100%; object-fit: cover; }
.tms-photo__preview .media-field-empty { padding: 0 4px; font-size: 11px; line-height: 1.2; text-align: center; color: var(--color-muted); }
.tms-photo .media-field-name, .tms-photo .media-doc { display: none; }
.tms-photo__actions { display: flex; gap: 4px; }
.tms-photo__actions .btn.small { min-height: 26px; padding: 0 8px; font-size: 12px; }
.tms-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--space-2); min-width: 0; }
.tms-fields input { width: 100%; min-width: 0; }
.tms-fields .tms-url { grid-column: 1 / -1; font-size: var(--text-sm); }
.tms-moves { display: inline-flex; align-items: center; gap: 2px; }
.tms-eye { position: relative; display: grid; place-items: center; width: 30px; height: 30px; margin: 0; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--color-brand-text); cursor: pointer; }
.tms-eye input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tms-eye__icon { display: grid; place-items: center; }
.tms-eye__icon svg { width: 16px; height: 16px; }
.tms-eye:hover { border-color: var(--color-border); background: var(--color-surface-2); }
.tms-eye:has(input:not(:checked)) { color: var(--color-faint); }
.tms-eye:has(input:not(:checked)) .tms-eye__icon { text-decoration: line-through; opacity: .6; }
.tms-eye:has(input:focus-visible) { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.tms-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--space-1); }
.tms-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-2); font-size: var(--text-sm); cursor: pointer; }
.tms-chip:hover, .tms-chip:focus-visible { border-style: solid; border-color: var(--color-brand); color: var(--color-brand-text); }
.tms-preview-card { display: grid; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.tms-preview-title { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text-2); }
.tms-preview-title svg { width: 15px; height: 15px; }
.tms-preview { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface); min-height: 56px; align-items: center; }
.tms-person { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.tms-person__photo { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--radius-full); object-fit: cover; }
.tms-person__photo--initial { background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: var(--weight-semibold); }
.tms-person__text { display: grid; line-height: 1.3; min-width: 0; }
.tms-person__role { font-size: var(--text-xs); color: var(--color-muted); }
.tms-person__name { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.tms-person__name.is-link { color: var(--color-brand-text); text-decoration: underline; }
.tms-preview--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-2); }
.tms-preview--cards .tms-person { flex-direction: column; padding: var(--space-3) var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); text-align: center; }
.tms-preview--cards .tms-person__photo { width: 56px; height: 56px; }
@media (max-width: 640px) {
    /* Phones: the handle and the move buttons on one line, then the photo with its buttons, then the fields. */
    .tms-row { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2); padding: var(--space-2); }
    .tms-row .tms-moves { grid-column: 2; grid-row: 1; justify-self: end; }
    .tms-row .tms-photo { grid-column: 1 / -1; grid-row: 2; grid-auto-flow: column; justify-content: start; justify-items: start; align-items: center; gap: var(--space-2); }
    .tms-row .tms-fields { grid-column: 1 / -1; grid-row: 3; grid-template-columns: minmax(0, 1fr); }
    .tms-photo__preview { width: 44px; height: 44px; }
}
/* Field labels of Website settings, every tab: 16px (owner, 25 Nov 2026). */
.ws-card--sections .field-label { font-size: 1rem; }
/* Label left, control and help right (owner, 25 Nov 2026: "160px, on every tab"): each field is one row with a
   hairline between rows. Phones keep the label above the control. Tiles, the team and the social editors keep their
   own layout (they are not direct .field children of a section). */
.ws-card--sections > .ws-section > :not(.ws-heading) + .field, .ws-card--sections > .ws-section > .field + .toggle-field { padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
@media (min-width: 641px) {
    .ws-card--sections > .ws-section > .field { grid-template-columns: 160px minmax(0, 1fr); column-gap: var(--space-5); align-items: start; }
    .ws-card--sections > .ws-section > .field > .field-label, .ws-card--sections > .ws-section > .field > .field-label-row { grid-column: 1; grid-row: 1 / span 3; padding-top: 9px; overflow-wrap: anywhere; }
    .ws-card--sections > .ws-section > .field > :not(.field-label):not(.field-label-row) { grid-column: 2; }
}
.ws-card--sections > .ws-save { position: sticky; bottom: var(--space-3); z-index: var(--z-sticky); margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-md); }
@media (max-width: 640px) {
    .ws-card.ws-card--sections { --ws-pad: var(--space-3); gap: var(--space-3); }
    .ws-card--sections > .ws-save { bottom: var(--space-2); padding: var(--space-2) var(--space-3); }
    .ws-card--sections > .ws-save .btn { width: 100%; }
    .ws-card--sections > .ws-save .small { display: none; }   /* phones: the button alone, the sections stay readable */
}
.ws-locked { margin-top: calc(var(--space-2) * -1); }
.ws-save { flex-wrap: wrap; align-items: center; gap: var(--space-3); }

/* Media picker (19 Nov 2026, owner: "clean, no unnecessary things"): inside a picker the details panel keeps the
   essentials — alt, title, caption, credit, description, Save, Used in, Copy URL, Delete. Folder, download, replace and
   visibility stay on the Media screen. */
.media-browser[data-mode="picker"] [data-field="folder"],
.media-browser[data-mode="picker"] [data-d-download],
.media-browser[data-mode="picker"] [data-d-replace],
.media-browser[data-mode="picker"] [data-d-visibility] { display: none !important; }
.seo-advanced { border-top: 1px solid var(--border); padding-top: var(--space-2); }
.seo-advanced > summary { cursor: pointer; font-weight: 600; color: var(--muted); list-style: revert; }
.seo-advanced[open] > summary { margin-bottom: var(--space-2); }


/* ==========================================================================
   Website admin, Dhading look (19 Nov 2026, owner: same fonts, sizes, boxes, buttons and background as Dhading Update)
   ========================================================================== */
[data-plane="site"] body { background: var(--dh-bg); font-size: 14.5px; }
[data-plane="site"] .page-heading h1 { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--dh-ink); letter-spacing: -.01em; }

/* -- News list (Dhading .nl-*) -- */
.story-list { list-style: none; margin: 0; padding: 0; background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 16px; }
.story-list .story-row { display: grid; grid-template-columns: 28px 112px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border: 0; border-top: 1px solid var(--dh-border-2); border-radius: 0; background: transparent; box-shadow: none; margin: 0; }
.story-list .story-row:first-child { border-top: 0; }
.story-list .story-row:hover { background: var(--dh-hover); }
.story-list .story-check { width: 17px; height: 17px; justify-self: center; accent-color: var(--dh-royal); }
.story-list .story-thumb { display: grid; place-items: center; width: 112px; height: auto; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--dh-thumb); }
.story-list .story-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-list .story-main { min-width: 0; display: grid; gap: 5px; }
.story-list .story-title { font-size: 16.5px; font-weight: 700; line-height: 1.6; color: var(--dh-ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-list .story-title:hover { color: var(--dh-royal); }
.story-list .story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; color: var(--dh-muted); }
.story-list .story-category { color: var(--dh-royal); font-weight: 700; text-decoration: none; }
.story-list .story-also { display: none; }
.story-list .story-stat { display: inline-flex; align-items: center; gap: 4px; }
.story-list .story-stat svg { width: 14px; height: 14px; }
.story-list .story-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.story-actions .story-buttons { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.story-list .story-actions .btn { height: 32px; min-height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 700; }
.story-list .story-actions .btn.icon { width: 32px; padding: 0; } /* not :has(> svg:only-child): an icon + text button (Restore) matched it, its label text is not an element (QA 24 Nov 2026) */
.story-list .story-actions .status, .story-list .story-actions .badge { padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
/* Below 1280px (the sidebar takes ~260px of it) the buttons go under the headline: beside it they left the headline
   about 60px wide at 1024px (26 Nov 2026). */
@media (max-width: 1279.98px) {
    .story-list .story-row { grid-template-columns: 24px 84px minmax(0, 1fr); gap: 8px 12px; }
    .story-list .story-thumb { width: 84px; }
    .story-list .story-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
    .story-list .story-buttons { margin-left: auto; }
}

/* -- Editor (Dhading .goji-editor-layout / .ne-*) -- */
.ned-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; }
.ned-main, .ned-side { gap: 16px; }
.ned-layout .ned-card { background: var(--dh-surface); border: 1px solid var(--dh-border); border-radius: 12px; padding: 20px 22px; box-shadow: none; }
.ned-layout .ned-side .ned-card { margin: 0; }
.ned-layout .ned-card__title { margin: 0 0 12px; font-family: var(--font-head); font-size: 15px; font-weight: 800; color: var(--dh-ink); }
.ned-layout .field-label { font-size: 13px; font-weight: 600; color: var(--dh-text); }
.ned-layout input[type=text], .ned-layout input[type=search], .ned-layout input[type=url], .ned-layout input[type=datetime-local],
.ned-layout select, .ned-layout textarea { min-height: 46px; border: 1px solid var(--dh-border); border-radius: 12px; font-size: 15px; padding: 11px 14px; background: var(--dh-surface); }
.ned-layout .ned-title { font-size: 24px; font-weight: 700; line-height: 1.4; padding: 12px 14px; min-height: 60px; }
.ned-layout .ned-search { min-height: 40px; padding: 8px 12px; font-size: 14px; border-radius: 10px; }
/* Inputs inside a bordered box keep no border of their own (24 Nov 2026: the Tags field and the address popup showed
   a box in a box): the box is the field. */
.ned-layout .ned-tags { min-height: 46px; padding: 4px 8px; border: 1px solid var(--dh-border); border-radius: 12px; background: var(--dh-surface); }
.ned-layout .ned-tags input.ned-tags__input, .ned-layout .ned-slug-pop__row input[type=text] { min-height: 36px; border: 0; border-radius: 0; padding: 6px 6px; background: transparent; box-shadow: none; }
.ned-layout .ned-slug-pop__row { border-color: var(--dh-border); border-radius: 12px; }
.ned-layout .btn { border-radius: 999px; }
.ned-layout [data-ned-card="publish"] .btn, .ned-layout .ned-publish .btn { min-height: 46px; height: 46px; font-size: 15px; font-weight: 600; }
.ned-layout .btn.primary { --btn-bg: var(--dh-royal); --btn-border: var(--dh-royal); --btn-hover: var(--dh-royal-d); }
@media (max-width: 1100px) { .ned-layout { grid-template-columns: minmax(0, 1fr); } }

/* Page head: views pill at the right of the title (Dhading .ne-views). */
.ned-head__views { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border: 1.5px solid var(--dh-border); border-radius: 999px; background: var(--dh-surface); font-size: 14px; color: var(--dh-muted); }
.ned-head__views b { color: var(--dh-ink); font-size: 15px; }
.ned-head__views svg { width: 18px; height: 18px; color: var(--dh-royal); }

/* Address line under the headline: "Address  https://…  Copy  ✎". */
.ned-address { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 14px; }
.ned-address__label { font-weight: 700; color: var(--dh-muted); }
.ned-address__value { font-family: inherit; font-size: 14px; color: var(--dh-text); overflow-wrap: anywhere; }
.ned-address__link { color: var(--dh-royal); text-decoration: underline; }
.ned-address__copy { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--dh-royal); cursor: pointer; }
.ned-address__copy { display: inline-flex; align-items: center; gap: 4px; }
.ned-address__copy svg { width: 14px; height: 14px; }
.ned-address__copy:hover { text-decoration: underline; }
.ned-address__tip { margin-left: -4px; }
/* Authors card: a small round picture before each name (24 Nov 2026): the photo, else the first letter. */
.ned-avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; overflow: hidden; background: var(--color-brand-soft); color: var(--color-brand-text); font-size: 12px; font-weight: 700; line-height: 1; }
.ned-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The address popup (24 Nov 2026): opens under the address line, the web address with its fixed start, a live preview. */
.ned-address { position: relative; }
.ned-slug-pop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 40; display: grid; gap: 8px; width: min(560px, 100%); padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); box-shadow: 0 16px 40px -12px rgba(15, 23, 42, .3); }
.ned-slug-pop[hidden] { display: none; }
.ned-slug-pop__label { font-weight: 700; color: var(--color-text); }
.ned-slug-pop__row { display: flex; align-items: stretch; min-width: 0; border: 1px solid var(--color-border-strong); border-radius: 8px; overflow: hidden; }
.ned-slug-pop__row:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-soft); }
.ned-slug-pop__base { display: flex; align-items: center; max-width: 45%; padding: 0 8px; background: var(--color-surface-2); color: var(--color-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ned-slug-pop__row input { flex: 1; min-width: 0; border: 0; border-radius: 0; box-shadow: none; outline: none; }
.ned-slug-pop__preview { margin: 0; color: var(--color-muted); overflow-wrap: anywhere; }
.ned-slug-pop__error { margin: 0; color: var(--color-danger-solid); }
.ned-slug-pop .hint { margin: 0; }
.ned-slug-pop__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ned-slug-pop__actions > span { display: inline-flex; gap: 8px; }
.ned-address__edit { border: 0; background: none; color: var(--dh-muted); }

/* Featured picture (Dhading .goji-media-cover): the picture, a red x to remove, "Change picture" on hover. */
.ned-feature .field > .field-label, .ned-feature .field > label:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.ned-feature .media-field { position: relative; display: block; }
.ned-feature .media-field-preview { position: relative; display: flex; align-items: center; justify-content: center; min-height: 140px; padding: 0; border: 1.5px dashed var(--dh-border); border-radius: 12px; background: var(--dh-mist); overflow: hidden; cursor: pointer; font-size: 13px; color: var(--dh-muted); text-align: center; }
.ned-feature .media-field.has-image .media-field-preview { border-style: solid; }
.ned-feature .media-field-preview:hover { border-color: var(--dh-royal); }
.ned-feature .media-field-preview img { display: block; width: 100%; height: auto; max-height: none; object-fit: cover; }
.ned-feature .media-field.has-image .media-field-preview::after { content: "Change picture"; position: absolute; left: 0; right: 0; bottom: 0; padding: 8px; background: var(--dh-overlay); color: #fff; font-size: 12.5px; font-weight: 700; text-align: center; opacity: 0; transition: opacity .15s; }
.ned-feature .media-field.has-image .media-field-preview:hover::after { opacity: 1; }
.ned-feature .media-field-name, .ned-feature [data-mf-choose], .ned-feature .field .hint { display: none; }
.ned-feature .media-field-actions { position: static; margin: 0; }
.ned-feature [data-mf-clear] { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; min-height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--dh-red); color: #fff; font-size: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
/* The × is two lines placed in the exact middle (24 Nov 2026: the hidden "Remove" text made a second grid row and
   pushed a grid-centred cross upwards). */
.ned-feature [data-mf-clear]::before, .ned-feature [data-mf-clear]::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.ned-feature [data-mf-clear]::after { transform: rotate(-45deg); }
.ned-feature [data-mf-clear]:hover { background: var(--dh-red-d); color: #fff; }
.ned-feature [data-mf-clear][hidden] { display: none; }
.ned-feature .toggle-row, .ned-feature [data-ned-needs-media] { margin-top: 14px; }

/* Category and author tick lists (Dhading .ne-cats). */
.ned-layout .ned-ticks__list { max-height: 260px; overflow: auto; display: grid; gap: 1px; padding: 4px; border: 1px solid var(--dh-border-2); border-radius: 10px; }
.ned-layout .ned-tick { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.ned-layout .ned-tick:hover { background: var(--dh-mist); }
.ned-layout .ned-tick input { width: 16px; height: 16px; margin: 0; accent-color: var(--dh-royal); }
.ned-layout .ned-count { font-size: 12px; font-weight: 700; color: var(--dh-royal); }
.ned-layout .ned-main-btn.is-main { background: var(--dh-royal); }

/* -- Media library dialog (Dhading .goji-mm) -- */
dialog.modal.media-picker { width: 97vw; height: 97vh; height: 97dvh; max-width: none; max-height: none; border-radius: 16px; box-shadow: 0 30px 80px rgba(2, 10, 30, .45); }
dialog.modal.media-picker .modal-header h2 { font-family: var(--font-head); font-size: 18px; font-weight: 800; }
dialog.modal.media-picker [data-mp-hint] { display: none; }
.media-picker .media-toolbar [data-mb-filter="kind"], .media-page .media-toolbar [data-mb-filter="kind"] { order: 1; }
.media-picker .media-toolbar [data-mb-filter="month"], .media-page .media-toolbar [data-mb-filter="month"] { order: 2; }
.media-picker .media-toolbar [data-mb-filter="sort"], .media-page .media-toolbar [data-mb-filter="sort"] { order: 3; }
.media-picker .media-toolbar .search-input, .media-page .media-toolbar .search-input { order: 4; flex: 1 1 220px; min-width: 180px; }
.media-picker .media-toolbar .media-view-toggle, .media-page .media-toolbar .media-view-toggle { order: 5; }
.media-picker .media-toolbar .media-total, .media-page .media-toolbar .media-total { order: 6; margin-left: 0; }
.media-picker .media-toolbar select, .media-page .media-toolbar select { min-height: 38px; font-size: 13.5px; width: auto; max-width: 170px; }
.media-picker .media-toolbar select:disabled, .media-page .media-toolbar select:disabled { color: var(--dh-muted); background: var(--dh-mist); }
.media-picker .media-grid[data-view="grid"], .media-page .media-grid[data-view="grid"] { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 12px; }
.media-picker .media-grid[data-view="grid"] .media-tile, .media-page .media-grid[data-view="grid"] .media-tile { display: block; padding: 0; aspect-ratio: 1; border: 2px solid transparent; border-radius: 10px; box-shadow: 0 0 0 1px var(--dh-border); overflow: hidden; background: var(--dh-surface); }
.media-picker .media-grid[data-view="grid"] .media-tile:hover, .media-page .media-grid[data-view="grid"] .media-tile:hover { box-shadow: 0 0 0 1px var(--dh-royal); }
.media-picker .media-grid[data-view="grid"] .media-tile[aria-selected="true"], .media-page .media-grid[data-view="grid"] .media-tile[aria-selected="true"] { border-color: var(--dh-royal); box-shadow: 0 0 0 1px var(--dh-royal); }
.media-picker .media-grid[data-view="grid"] .media-thumb, .media-page .media-grid[data-view="grid"] .media-thumb { display: block; width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: var(--dh-border-2); }
.media-picker .media-grid[data-view="grid"] .media-thumb img, .media-page .media-grid[data-view="grid"] .media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-picker .media-grid[data-view="grid"] .media-tile-text, .media-page .media-grid[data-view="grid"] .media-tile-text, .media-picker .media-grid[data-view="grid"] .media-badges, .media-page .media-grid[data-view="grid"] .media-badges { display: none; }
.media-picker .media-grid[data-view="grid"] .media-check, .media-page .media-grid[data-view="grid"] .media-check { display: none; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; place-items: center; background: var(--dh-royal); color: #fff; box-shadow: 0 1px 4px rgba(2, 10, 30, .35); }
.media-picker .media-grid[data-view="grid"] .media-tile[aria-selected="true"] .media-check, .media-page .media-grid[data-view="grid"] .media-tile[aria-selected="true"] .media-check { display: grid; }
.media-picker .media-details, .media-page .media-details { width: 330px; border-radius: 0; border-width: 0 0 0 1px; }
.media-picker .media-details-head h2, .media-page .media-details-head h2 { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--dh-ink); }
.media-picker [data-d-save] { display: none; }
/* Upload tab (Dhading .goji-mm__drop). */
.media-picker .media-dropzone, .media-page .media-dropzone { display: grid; justify-items: center; gap: 6px; padding: 48px 24px; border: 2px dashed var(--dh-drop); border-radius: 14px; background: var(--dh-mist); text-align: center; }
.media-picker .media-dropzone > svg, .media-page .media-dropzone > svg { width: 46px; height: 46px; color: var(--dh-royal); margin-bottom: 6px; }
.media-picker .media-dropzone-title, .media-page .media-dropzone-title { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--dh-ink); }
.media-picker .media-dropzone [data-mp-upload-visibility], .media-picker .media-dropzone [data-mp-after-upload] { display: none; }
/* Media library page as Dhading Update (owner, 20 Nov 2026): one card, tabs Media Library / Upload Files, the
   library scrolls inside the card on wide screens with Attachment Details beside it; files are square tiles. */
.media-page { padding: 0; overflow: hidden; }
.media-page[hidden] { display: none; }
.media-page > .media-page-tabs { gap: 2px; padding: 0 20px; border-bottom: 1px solid var(--dh-border); overflow: visible; }
.media-page > .media-page-tabs [role="tab"] { gap: 8px; padding: 14px 14px 12px; font-size: 14px; font-weight: 700; color: var(--dh-muted); }
.media-page > .media-page-tabs [role="tab"] svg { width: 18px; height: 18px; }
.media-page > .media-page-tabs [role="tab"][aria-selected="true"] { color: var(--dh-royal); border-bottom-color: var(--dh-royal); }
.media-page-panel[hidden] { display: none; }
.media-page .media-browser { display: flex; flex-direction: column; gap: 0; }
.media-page .media-toolbar { padding: 12px 20px; border-bottom: 1px solid var(--dh-border); }
.media-page .media-bulkbar { margin: 10px 20px 0; }
.media-page .media-layout { gap: 0; align-items: stretch; }
.media-page .media-main { padding: 20px; background: var(--dh-mist); border-radius: 0; min-height: 320px; }
.media-page .media-details { padding: 16px 18px; background: var(--dh-surface); }
.media-page-upload-panel { display: grid; gap: 16px; padding: 20px; }
.media-page-upload-panel[hidden] { display: none; }
.media-page .media-dropzone { display: grid; justify-items: center; gap: 6px; padding: 48px 24px; border: 2px dashed var(--dh-drop); border-radius: 14px; background: var(--dh-mist); text-align: center; }
.media-page .media-dropzone > svg { width: 46px; height: 46px; color: var(--dh-royal); margin-bottom: 6px; }
.media-page .media-dropzone-title { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: 800; color: var(--dh-ink); }
.media-page .media-dropzone.is-dragover { border-color: var(--dh-royal); background: var(--dh-sky); }
.media-page .media-queue { border-color: var(--dh-border); border-radius: 10px; }
.media-page-upload { font-weight: 700; }
@media (min-width: 1024px) {
    .media-page .media-browser { height: clamp(540px, calc(100vh - 215px), 1200px); }
    .media-page .media-layout { flex: 1; min-height: 0; }
    .media-page .media-layout.has-details { grid-template-columns: minmax(0, 1fr) 330px; }
    .media-page .media-main { overflow-y: auto; min-height: 0; }
    .media-page .media-details { position: static; top: auto; width: auto; max-height: none; height: 100%; overflow-y: auto; }
}
/* List view as Dhading: separate rows, picture, title with the file name under it, the facts on the right. */
.media-picker .media-grid[data-view="list"], .media-page .media-grid[data-view="list"] { gap: 6px; border: 0; background: transparent; }
.media-picker .media-grid[data-view="list"] .media-tile, .media-page .media-grid[data-view="list"] .media-tile { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 6px 14px 6px 6px; border: 1px solid var(--dh-border); border-radius: 10px; background: var(--dh-surface); }
.media-picker .media-grid[data-view="list"] .media-tile:first-child, .media-page .media-grid[data-view="list"] .media-tile:first-child { border-top: 1px solid var(--dh-border); }
.media-picker .media-grid[data-view="list"] .media-tile[aria-selected="true"], .media-page .media-grid[data-view="list"] .media-tile[aria-selected="true"] { border-color: var(--dh-royal); box-shadow: 0 0 0 1px var(--dh-royal); background: var(--dh-surface); }
.media-picker .media-grid[data-view="list"] .media-thumb, .media-page .media-grid[data-view="list"] .media-thumb { width: 56px; height: 42px; border-radius: 6px; }
.media-picker .media-grid[data-view="list"] .media-tile-text, .media-page .media-grid[data-view="list"] .media-tile-text { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; }
.media-picker .media-grid[data-view="list"] .media-name, .media-page .media-grid[data-view="list"] .media-name { grid-column: 1; color: var(--dh-ink); font-weight: 700; }
.media-picker .media-grid[data-view="list"] .media-file, .media-page .media-grid[data-view="list"] .media-file { grid-column: 1; font-size: 12.5px; color: var(--dh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-picker .media-grid[data-view="list"] .media-meta, .media-page .media-grid[data-view="list"] .media-meta { grid-column: 2; grid-row: 1 / span 2; font-size: 12.5px; color: var(--dh-muted); }
.media-picker .media-grid[data-view="list"] .media-check, .media-page .media-grid[data-view="list"] .media-check { display: none; }
.media-grid[data-view="grid"] .media-file, .media-file:empty { display: none; }
@media (max-width: 639.98px) {
    .media-picker .media-grid[data-view="list"] .media-tile-text, .media-page .media-grid[data-view="list"] .media-tile-text { grid-template-columns: minmax(0, 1fr); }
    .media-picker .media-grid[data-view="list"] .media-meta, .media-page .media-grid[data-view="list"] .media-meta { grid-column: 1; grid-row: auto; }
    .media-page > .media-page-tabs { padding: 0 8px; }
    .media-page .media-toolbar, .media-page-upload-panel { padding: 12px; }
    .media-page .media-main { padding: 12px; }
}
/* Featured picture: the cover keeps the card's width (the base cover rule's min-height + 16:9 made it 299px in a 254px card). */
.ned-feature .media-field.is-cover .media-field-preview { display: block; width: 100%; max-width: 100%; aspect-ratio: auto; min-height: 140px; box-sizing: border-box; }
.ned-feature .media-field.is-cover.has-image .media-field-preview { min-height: 0; }
.ned-feature .media-field.is-cover.has-image .media-field-preview img { display: block; width: 100%; height: auto; max-width: 100%; }
.ned-feature .media-field.is-cover:not(.has-image) .media-field-preview { display: flex; align-items: center; justify-content: center; }

/* ---- News dashboard blocks, Dhading Update style (owner, 20 Nov 2026) ---------------------------------------- */
/* Stories published, last 14 days: vertical bars, count above, day below. */
.nchart { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 10px; padding-top: var(--space-2); }
.nchart-col { display: grid; grid-template-rows: auto 170px auto; justify-items: center; gap: 8px; min-width: 0; }
.nchart-n { min-height: 1.3em; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.nchart-track { width: 100%; height: 170px; display: flex; align-items: flex-end; justify-content: center; }
.nchart-bar { display: block; width: 100%; max-width: 46px; height: 3px; border-radius: 8px 8px 4px 4px; background: linear-gradient(180deg, var(--chart-bar-top), var(--chart-bar-bottom)); }
.nchart-bar[data-pct="0"] { height: 3px; border-radius: 2px; background: var(--chart-track); }
.nchart-bar[data-pct="5"] { height: 5%; }
.nchart-bar[data-pct="10"] { height: 10%; }
.nchart-bar[data-pct="15"] { height: 15%; }
.nchart-bar[data-pct="20"] { height: 20%; }
.nchart-bar[data-pct="25"] { height: 25%; }
.nchart-bar[data-pct="30"] { height: 30%; }
.nchart-bar[data-pct="35"] { height: 35%; }
.nchart-bar[data-pct="40"] { height: 40%; }
.nchart-bar[data-pct="45"] { height: 45%; }
.nchart-bar[data-pct="50"] { height: 50%; }
.nchart-bar[data-pct="55"] { height: 55%; }
.nchart-bar[data-pct="60"] { height: 60%; }
.nchart-bar[data-pct="65"] { height: 65%; }
.nchart-bar[data-pct="70"] { height: 70%; }
.nchart-bar[data-pct="75"] { height: 75%; }
.nchart-bar[data-pct="80"] { height: 80%; }
.nchart-bar[data-pct="85"] { height: 85%; }
.nchart-bar[data-pct="90"] { height: 90%; }
.nchart-bar[data-pct="95"] { height: 95%; }
.nchart-bar[data-pct="100"] { height: 100%; }
.nchart-day { font-size: var(--text-sm); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.nchart-col.is-today .nchart-day { color: var(--color-text); font-weight: var(--weight-semibold); }
@media (max-width: 639.98px) {
    .nchart { gap: 4px; }
    .nchart-col { grid-template-rows: auto 120px auto; gap: 4px; }
    .nchart-track { height: 120px; }
    .nchart-n, .nchart-day { font-size: 11px; }
}

/* Busiest categories: name, bar, number. */
.nbars { display: grid; gap: 14px; }
.nbars-row { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr) 2.5em; align-items: center; gap: var(--space-3); }
.nbars-name { font-weight: var(--weight-semibold); color: var(--dh-ink, var(--color-text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nbars-bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 10px; border: 0; border-radius: 999px; background: var(--chart-track); overflow: hidden; }
.nbars-bar::-webkit-progress-bar { background: var(--chart-track); border-radius: 999px; }
.nbars-bar::-webkit-progress-value { background: linear-gradient(90deg, var(--chart-bar-bottom), var(--chart-bar-top)); border-radius: 999px; }
.nbars-bar::-moz-progress-bar { background: linear-gradient(90deg, var(--chart-bar-bottom), var(--chart-bar-top)); border-radius: 999px; }
.nbars-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-text); }

/* Most read: the 7 / 30 days switch sits in the card's corner. */
.dashboard-card:has(.nread) { position: relative; }
.nread-switch { position: absolute; top: var(--space-4); right: var(--space-4); display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--color-border); }
.nread-switch [role="tab"] { border: 0; background: transparent; color: var(--color-muted); font: inherit; font-size: 13px; font-weight: var(--weight-semibold); padding: 4px 12px; border-radius: 999px; cursor: pointer; }
.nread-switch [role="tab"][aria-selected="true"] { background: var(--color-surface); color: var(--color-brand); box-shadow: var(--shadow-xs); }
.nread-list { display: grid; gap: 14px; }
.nread-row { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; }
.nread-i { color: var(--color-brand); font-weight: var(--weight-bold); }
.nread-title { color: var(--dh-ink, var(--color-text)); font-weight: var(--weight-semibold); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nread-title:hover { color: var(--color-brand); text-decoration: none; }
.nread-n { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }

/* Coming up, Live on the homepage: clean story lists. */
.nlist { display: grid; gap: 12px; }
.nlist-row { display: grid; gap: 2px; min-width: 0; }
.nlist-row.is-badged { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); align-items: start; }
.nlist-title { color: var(--dh-ink, var(--color-text)); font-weight: var(--weight-semibold); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nlist-title:hover { color: var(--color-brand); text-decoration: none; }
.nlist-meta { font-size: var(--text-sm); color: var(--color-muted); }
.nbadge { font-size: 12px; font-weight: var(--weight-bold); line-height: 1.2; color: var(--color-brand); background: var(--color-brand-soft); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.nbadge.is-auto { color: var(--color-muted); background: var(--color-surface-2); }
.nlist-more { margin-top: var(--space-3); }

/* ---- SEO → Content health (news.seo_health, 20 Nov 2026) ------------------------------------------------------ */
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-3); }
.health-card { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "icon n" "icon label" "icon state"; column-gap: var(--space-3); row-gap: 2px; align-items: center; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-xs); transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
.health-card:hover { text-decoration: none; border-color: var(--color-border-strong); box-shadow: var(--shadow-sm); }
.health-card.is-current { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand), var(--shadow-xs); }
.health-card-icon { grid-area: icon; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tone-warning-soft); color: var(--tone-warning); }
.health-card-icon svg { width: 20px; height: 20px; }
.health-card.is-ok .health-card-icon { background: var(--tone-success-soft); color: var(--tone-success); }
.health-card-n { grid-area: n; font-size: 1.5rem; font-weight: var(--weight-bold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.health-card-label { grid-area: label; font-size: var(--text-sm); font-weight: var(--weight-semibold); line-height: 1.3; }
.health-card-state { grid-area: state; font-size: var(--text-xs); color: var(--tone-warning); font-weight: var(--weight-semibold); }
.health-card.is-ok .health-card-state { color: var(--tone-success); }

/* ---- Dashboard "System health" (news.dashboard_extras, 20 Nov 2026) ------------------------------------------- */
.nhealth-sum { margin: 0 0 var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-weight: var(--weight-semibold); background: var(--tone-success-soft); color: var(--tone-success); }
.nhealth-sum.is-warn { background: var(--tone-warning-soft); color: var(--tone-warning); }
.nhealth-sum.is-bad { background: var(--tone-danger-soft); color: var(--tone-danger); }
.nhealth-list { display: grid; gap: 10px; }
.nhealth-row { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.nhealth-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--color-border-strong); }
.nhealth-dot.is-ok { background: var(--tone-success); }
.nhealth-dot.is-warn { background: var(--tone-warning); }
.nhealth-dot.is-bad { background: var(--tone-danger); }
.nhealth-dot.is-info { background: var(--color-brand); }
.nhealth-text { display: grid; gap: 1px; font-size: var(--text-sm); color: var(--color-muted); line-height: 1.4; }
.nhealth-text b { color: var(--color-text); font-weight: var(--weight-semibold); }

/* ---- Settings → Web app preview (shared.web_app, 20 Nov 2026) ------------------------------------------------- */
.webapp-phone { display: grid; place-items: center; padding: var(--space-5); border-radius: 28px; background: var(--goji-navy-deep); }
.webapp-screen { display: grid; justify-items: center; gap: 6px; padding: var(--space-4) var(--space-6); }
.webapp-icon { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 16px; background: var(--color-surface); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); font-size: 28px; font-weight: var(--weight-bold); color: var(--color-brand); }
.webapp-icon img { display: block; width: 64px; height: 64px; }
.webapp-label { max-width: 90px; color: var(--goji-navy-text); font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Media → Photo watermark (shared.watermark, 20 Nov 2026) -------------------------------------------------- */
.wm-positions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "tl . tr" ". c ." "bl . br"; gap: 6px; max-width: 340px; padding: var(--space-2); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface-2); }
.wm-pos { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--color-surface); font-size: var(--text-sm); cursor: pointer; }
.wm-pos.is-top_left { grid-area: tl; } .wm-pos.is-top_right { grid-area: tr; } .wm-pos.is-center { grid-area: c; } .wm-pos.is-bottom_left { grid-area: bl; } .wm-pos.is-bottom_right { grid-area: br; }
.wm-pos:has(input:checked) { box-shadow: inset 0 0 0 2px var(--color-brand); font-weight: var(--weight-semibold); }
.wm-preview { display: block; width: 100%; height: auto; border-radius: var(--radius-md); background: var(--color-surface-2); }
.wm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-3); }
.wm-photo { margin: 0; display: grid; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); }
.wm-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--color-surface-2); }
.wm-photo figcaption { display: grid; gap: 6px; padding: var(--space-2); justify-items: start; }
.wm-name { font-size: var(--text-xs); color: var(--color-muted); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Settings → Move media files (shared.media_transfer, 20 Nov 2026) ----------------------------------------- */
.transfer-progress { display: grid; gap: 6px; }
.transfer-progress .nbars-bar { height: 12px; }
.text-danger { color: var(--tone-danger); }

/* ---- Analytics → Reader insights (news.reader_insights, 20 Nov 2026) ------------------------------------------ */
.ri-top { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; justify-content: space-between; }
.ri-live { display: grid; grid-template-columns: auto auto 1fr; grid-template-areas: "dot n label" ". note note"; align-items: center; column-gap: var(--space-2); row-gap: 2px; padding: var(--space-4) var(--space-5); min-width: 280px; }
.ri-live-dot { grid-area: dot; width: 12px; height: 12px; border-radius: 50%; background: var(--tone-success); box-shadow: 0 0 0 6px var(--tone-success-soft); animation: ri-pulse 1.6s ease-in-out infinite; }
.ri-live-n { grid-area: n; font-size: 2rem; font-weight: var(--weight-bold); line-height: 1; font-variant-numeric: tabular-nums; }
.ri-live-label { grid-area: label; font-weight: var(--weight-semibold); }
.ri-live .small { grid-area: note; }
@keyframes ri-pulse { 50% { box-shadow: 0 0 0 2px var(--tone-success-soft); } }
@media (prefers-reduced-motion: reduce) { .ri-live-dot { animation: none; } }

/* Analytics screens (News → Analytics, Website traffic), redesigned 20 Nov 2026: period switch, top cards with the
   change against the period before, a bar chart (x-goji::bar-chart), ranked lists with a share bar. */
.an-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); }
.an-toolbar .tabs { margin: 0; }
.an-live { display: inline-flex; align-items: center; gap: 8px; }
.an-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tone-success); box-shadow: 0 0 0 4px var(--tone-success-soft); }
.an-kpis { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); margin-bottom: var(--space-5); }
.an-kpis .stat-card { padding: var(--space-5); gap: 6px; border-radius: 14px; }
.an-kpis .stat-card-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.an-kpis .stat-card-head svg { flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 10px; }
.an-kpis .stat-card-value { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 1.875rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.an-kpis .stat-card-value .delta { font-size: 12px; line-height: 1.5; }
.an-kpis .stat-card-foot { font-size: var(--text-xs); }
.an-chart { margin-bottom: var(--space-5); }
.an-main { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.an-side { display: grid; gap: var(--space-5); min-width: 0; }
.an-bars .nbars-row { grid-template-columns: minmax(0, 40%) minmax(0, 1fr) auto; }
.an-bars .nbars-n { min-width: 2.5em; }
.nbars-sub { display: block; font-size: var(--text-xs); font-weight: var(--weight-regular, 400); color: var(--color-muted); }
.an-more { margin-top: var(--space-3); }
.an-more > summary { cursor: pointer; color: var(--accent); font-size: var(--text-sm); font-weight: var(--weight-semibold); margin-bottom: var(--space-3); }
.an-notes { margin-top: var(--space-5); }
.an-notes p { margin: 0 0 var(--space-2); }
@media (max-width: 1099.98px) { .an-main { grid-template-columns: minmax(0, 1fr); } }

/* Report bar chart (x-goji::bar-chart): the dashboard's bars (.nchart-bar 5 % steps), any number of columns. */
.vchart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: var(--space-3); font-size: var(--text-sm); color: var(--color-muted); }
.vchart-legend li { display: inline-flex; align-items: center; gap: 8px; }
.vchart-legend i { width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(180deg, var(--chart-bar-top), var(--chart-bar-bottom)); }
.vchart-legend i.is-alt { background: var(--chart-alt); }
.vchart-scroll { overflow-x: auto; overflow-y: hidden; }
.vchart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding: var(--space-2) 18px 0; }
.vchart.is-dense { gap: 3px; min-width: 640px; padding-right: 34px; padding-left: 34px; }
.vchart-col { display: grid; grid-template-rows: auto 200px auto; justify-items: center; gap: 6px; min-width: 0; border-radius: 6px; }
.vchart-col:hover .vchart-track { background: var(--color-surface-2); }
.vchart-n { min-height: 1.3em; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.vchart-track { width: 100%; height: 200px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--color-border); border-radius: 6px 6px 0 0; }
.vchart-bar { max-width: 40px; }
.vchart.is-paired .vchart-bar { max-width: 22px; }
.vchart-bar.is-alt { background: var(--chart-alt); }
.vchart-bar.is-alt[data-pct="0"] { background: var(--chart-track); }
.vchart.is-dense .vchart-bar { border-radius: 3px 3px 1px 1px; }
/* zero width, text overflowing both sides: a label never widens its column */
.vchart-x { width: 0; display: flex; justify-content: center; overflow: visible; min-height: 1.3em; font-size: 11px; color: var(--color-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vchart-col.is-current .vchart-x { color: var(--color-text); font-weight: var(--weight-semibold); }
@media (max-width: 639.98px) {
    .vchart { gap: 4px; min-width: 520px; }
    .vchart-col { grid-template-rows: auto 150px auto; }
    .vchart-track { height: 150px; }
}

/* Ranked list (most read, top pages): rank, title with a share bar under it, the number on the right. */
.rank-list { display: grid; }
.rank-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: var(--space-4); align-items: center; padding: 14px var(--space-5); border-top: 1px solid var(--color-border); }
.rank-row:first-child { border-top: 0; }
.rank-i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--color-surface-2); color: var(--color-muted); font-size: 13px; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.rank-row:nth-child(-n+3) .rank-i { background: var(--tone-brand-soft); color: var(--tone-brand); }
.rank-body { display: grid; gap: 4px; min-width: 0; justify-items: start; }
.rank-title { color: var(--color-text); font-weight: var(--weight-semibold); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
a.rank-title:hover { color: var(--accent); text-decoration: none; }
.rank-path { font-family: var(--font-mono, monospace); font-size: var(--text-sm); word-break: break-all; }
.rank-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--text-sm); color: var(--color-muted); }
.rank-meta .mono { word-break: break-all; }
.rank-chip { padding: 1px 8px; border-radius: 999px; background: var(--color-surface-2); color: var(--color-text); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.rank-bar { height: 6px; margin-top: 4px; }
.rank-side { display: grid; justify-items: end; line-height: 1.15; }
.rank-n { font-size: 1.125rem; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.rank-unit { font-size: var(--text-xs); color: var(--color-muted); }
.rank-list.is-compact .rank-row { padding: 10px var(--space-4); gap: var(--space-3); }
.rank-list.is-compact .rank-i { width: 24px; height: 24px; font-size: 12px; }
.rank-list.is-compact .rank-title { font-size: var(--text-sm); }
.rank-list.is-compact .rank-n { font-size: 1rem; }
@media (max-width: 639.98px) {
    .rank-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: var(--space-3); padding: 12px var(--space-4); }
    .rank-i { width: 26px; height: 26px; font-size: 12px; }
}

/* Analytics "Count page views" switch in the page header (owner, 20 Nov 2026: controlled here, not in Settings). */
.an-switch { display: inline-flex; align-items: center; gap: var(--space-2); padding: 8px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); box-shadow: var(--shadow-xs); }
.an-switch-form { margin: 0; }
.an-switch .toggle-field { align-items: center; gap: var(--space-4); font-weight: var(--weight-semibold); }
.an-switch .hint { font-size: var(--text-xs); }

/* Categories list at Dhading Update's sizes (owner, 20 Nov 2026): 16px names, 52px letter circle, 11px chips,
   12px address, compact story count and buttons (Dhading .dir-row). */
.cat-row { gap: 14px; padding: 12px 16px; }
.cat-row.is-child { padding-left: 52px; }
.cat-avatar { width: 52px; height: 52px; font-size: 17px; font-weight: 800; border-width: 1px; }
.cat-row.is-child .cat-avatar { width: 42px; height: 42px; font-size: 15px; }
.cat-name { font-size: 16px; line-height: 1.6; color: var(--dh-ink, var(--color-text)); }
.cat-meta { gap: 4px 8px; margin-top: 2px; }
.cat-meta .badge { padding: 1px 8px; font-size: 11px; font-weight: 800; line-height: 17px; }
.cat-path, .cat-meta { font-size: 12px; }
.cat-stories { min-width: 78px; padding: 6px 10px; border-radius: 12px; }
.cat-stories b { font-size: 18px; font-weight: 800; }
.cat-stories span { font-size: 11.5px; font-weight: 700; }
.cat-visibility { min-width: 0; height: 28px; padding: 0 12px; font-size: 12.5px; }
.cat-row .btn { min-height: 32px; height: 32px; padding: 0 12px; font-size: 13px; }
.cat-row .btn.icon { width: 32px; padding: 0; }
@media (max-width: 639.98px) {
    .cat-row { padding: 10px 12px; }
    .cat-avatar { width: 40px; height: 40px; font-size: 15px; }
    .cat-main { flex-basis: calc(100% - 56px); }
}

/* Breaking news (20 Nov 2026): what is on the site now, then status filters with counts. */
.brk-now { margin-bottom: var(--space-4); border-color: var(--tone-danger-border); background: var(--tone-danger-soft); }
.brk-now__title { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--space-3); font-size: var(--text-md); color: var(--tone-danger); }
.brk-now__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--tone-danger); box-shadow: 0 0 0 4px var(--tone-danger-border); animation: brk-pulse 1.4s ease-in-out infinite; }
@keyframes brk-pulse { 50% { box-shadow: 0 0 0 1px var(--tone-danger-border); } }
@media (prefers-reduced-motion: reduce) { .brk-now__dot { animation: none; } }
.brk-now__list { display: grid; gap: var(--space-2); }
.brk-now__item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 14px; border-radius: var(--radius-md); background: var(--color-surface); }
.brk-now__main { display: grid; gap: 2px; min-width: 0; }
.brk-now__headline { font-weight: var(--weight-bold); color: var(--color-text); overflow-wrap: anywhere; }
.brk-now__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--color-muted); }
.brk-filters { margin-bottom: var(--space-4); }

/* Editorial desk (20 Nov 2026): one row of counts linking to the sections below. */
.desk-kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.desk-kpi { display: block; color: inherit; border-radius: 14px; }
.desk-kpi:hover { text-decoration: none; }
.desk-kpi:hover .stat-card { border-color: var(--color-brand-border, var(--color-border-strong)); box-shadow: var(--shadow-sm); }
.desk-kpi .stat-card { height: 100%; }
.desk-empty { margin: 0; padding: var(--space-3) var(--space-5) var(--space-4); }
[data-desk-section] { scroll-margin-top: calc(var(--topbar-height, 64px) + 16px); }
.desk-mail { margin-top: var(--space-5); }
.desk-mail__head { display: grid; gap: 2px; cursor: pointer; list-style: revert; }
.desk-mail[open] .desk-mail__head { margin-bottom: var(--space-3); }

/* Pages list as Dhading Update (owner, 20 Nov 2026): picture or page icon, title, one-line excerpt, address + Copy link,
   last edit, words, status, Publish / Unpublish, open, Edit (shares the .cat-row design of Categories and Tags). */
.pg-thumb { overflow: hidden; padding: 0; background: var(--color-surface-2); border-color: var(--color-border); }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-avatar svg { width: 22px; height: 22px; }
.pg-excerpt { margin: 2px 0 2px; font-size: 13.5px; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-copy { font-size: 12.5px; font-weight: var(--weight-semibold); }
.pg-words { min-width: 70px; }
.pg-state { display: inline-flex; align-items: center; cursor: default; }
.pg-row .pg-publish { min-height: 32px; height: 32px; }
@media (max-width: 639.98px) { .pg-excerpt { white-space: normal; } }

/* Comments as Dhading Update, with quick moderation (owner, 20 Nov 2026): reader circle, name, time, the comment, its
   story, moderator, status, Approve / Spam / Open. */
.cm-toolbar { align-items: flex-start; flex-wrap: wrap; }
.cm-dates { position: relative; }
.cm-dates > summary { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; list-style: none; font-weight: var(--weight-medium); }
.cm-dates > summary::-webkit-details-marker { display: none; }
.cm-dates[open] > summary { border-color: var(--color-brand); }
.cm-dates__body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: grid; gap: 10px; min-width: 230px; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-md, var(--shadow-sm)); }
.cm-dates__body label { display: grid; gap: 4px; font-size: var(--text-sm); color: var(--color-muted); }
.cm-wrap.flush { background: transparent; border: 0; box-shadow: none; }
.cm-list { list-style: none; }
.cm-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--color-border); }
.cm-row:first-child { border-top: 0; }
.cm-row:hover { background: var(--color-surface-2); }
.cm-row.is-pending { box-shadow: inset 3px 0 0 var(--tone-warning); }
.cm-check { margin-top: 14px; flex: none; }
.cm-avatar { width: 42px; height: 42px; font-size: 16px; }
.cm-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.cm-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cm-name { color: var(--dh-ink, var(--color-text)); }
.cm-time { font-size: 12.5px; color: var(--color-muted); }
.cm-body { color: var(--color-text); line-height: 1.55; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cm-body:hover { color: var(--color-brand-text); text-decoration: none; }
.cm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 12.5px; color: var(--color-muted); }
.cm-story { display: inline-flex; align-items: center; gap: 4px; color: var(--color-muted); }
.cm-story svg { width: 14px; height: 14px; }
.cm-row > .status { flex: none; margin-top: 2px; }
.cm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.cm-actions form { margin: 0; }
@media (max-width: 759.98px) {
    .cm-row { flex-wrap: wrap; }
    .cm-main { flex-basis: calc(100% - 60px); }
    .cm-actions { width: 100%; justify-content: flex-start; padding-left: 56px; }
}

/* Settings as Dhading Update (owner, 20 Nov 2026): sections in the sidebar, the screens of a section as tabs on top. */
.settings-layout { grid-template-columns: minmax(0, 1fr); }
.settings-nav.is-tabbed { position: static; display: grid; gap: var(--space-3); padding: 0; border: 0; background: none; box-shadow: none; max-height: none; overflow: visible; }
.settings-sections { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-sections a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text-2); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.settings-sections a:hover { border-color: var(--color-brand); text-decoration: none; }
.settings-sections a.is-active { background: var(--color-brand); border-color: var(--color-brand); color: var(--color-brand-ink); }
.settings-nav.is-tabbed .settings-tabs { display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--color-border); }
.settings-nav.is-tabbed .settings-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; margin-bottom: -1px; border-radius: 0; border-bottom: 2px solid transparent; background: none; box-shadow: none; color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; }
.settings-nav.is-tabbed .settings-tabs a span { overflow: visible; }
.settings-nav.is-tabbed .settings-tabs a:hover { color: var(--color-text); background: none; }
.settings-nav.is-tabbed .settings-tabs a.is-active { color: var(--color-brand-text); border-bottom-color: var(--color-brand); background: none; box-shadow: none; }
.settings-nav.is-tabbed .settings-tabs svg { width: 16px; height: 16px; }
/* The tabs wrap instead of scrolling sideways; the form uses the page width (no left menu any more). */
.settings-nav.is-tabbed .settings-tabs { flex-wrap: wrap; overflow: visible; }
.settings-layout .settings-main, .settings-layout .ws-card { max-width: none; }

/* Polls as Dhading Update (owner, 20 Nov 2026): figures, what opens / closes next, "All polls" rows, where polls appear. */
.poll-kpis { margin-bottom: var(--space-4); }
.poll-next { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-bottom: var(--space-4); }
.poll-next__list { display: grid; gap: 8px; }
.poll-next__list li { display: grid; gap: 2px; }
.poll-all { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }
.poll-all__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.poll-all__head .card-title { margin: 0; }
.poll-all .list-toolbar { margin: 0; }
.poll-ended { white-space: nowrap; }
.poll-all .cat-list { box-shadow: none; }
.poll-bar { height: 6px; margin-top: 6px; max-width: 420px; }
.poll-row .status { flex: none; }
.poll-empty { margin: 0; padding: 18px; border: 1px dashed var(--color-border); border-radius: var(--radius-lg); text-align: center; color: var(--color-muted); }
.poll-where { display: grid; gap: 8px; }

/* Email newsletter overview as Dhading Update (owner, 20 Nov 2026): state line, six figures, How it works + campaigns. */
.nwl-state { display: flex; align-items: center; gap: 14px; margin-bottom: var(--space-4); padding: 14px 18px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.nwl-state > div { flex: 1; min-width: 0; }
.nwl-state__dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--tone-muted); box-shadow: 0 0 0 4px var(--tone-muted-soft); }
.nwl-state.is-on .nwl-state__dot { background: var(--tone-success); box-shadow: 0 0 0 4px var(--tone-success-soft); }
.nwl-kpis { margin-top: var(--space-4); margin-bottom: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.nwl-kpis .stat-card { height: 100%; }
.nwl-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 var(--space-4); }
.nwl-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; }
.nwl-how { margin: 0; padding-left: 20px; display: grid; gap: 10px; line-height: 1.55; }
.nwl-campaign-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nwl-campaign-counts li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.nwl-campaign-counts b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.nwl-sub { margin: 0; font-size: var(--text-sm); }
@media (max-width: 899.98px) { .nwl-grid { grid-template-columns: minmax(0, 1fr); } }

/* Watermark & share images as Dhading Update (news.share_images, 21 Nov 2026): segmented tabs, on/off strip, Design +
   Preview cards, the gallery of every design (chips, search, tiles), the watermark sliders and live preview. */
.shi { display: grid; gap: var(--space-4); }
.shi-head { margin: 0; }
.shi-seg { display: inline-flex; gap: 4px; padding: 4px; justify-self: start; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.shi-seg a { padding: 8px 18px; border-radius: var(--radius-md); color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); text-decoration: none; }
.shi-seg a:hover { color: var(--color-text); }
.shi-seg a.is-active { background: var(--color-surface); color: var(--color-brand-text); box-shadow: var(--shadow-sm); }
.shi-state { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.shi-state > div { flex: 1; min-width: 0; }
.shi-state__dot { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--tone-muted); box-shadow: 0 0 0 4px var(--tone-muted-soft); }
.shi-state.is-on .shi-state__dot { background: var(--tone-success); box-shadow: 0 0 0 4px var(--tone-success-soft); }
.shi-note { display: grid; gap: 4px; padding: 18px; border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.shi-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
.shi-sub { margin: var(--space-2) 0 0; font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
.shi-auto { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.shi-auto .field { margin: 0; }
.shi-categories { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px 12px; }
.shi-categories summary { cursor: pointer; font-weight: var(--weight-semibold); font-size: var(--text-sm); }
.shi-cat-list { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.shi-cat-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 10px; align-items: center; font-size: var(--text-sm); }
.shi-cat-child { padding-left: 16px; color: var(--color-muted); }
.shi-color { display: flex; align-items: center; gap: 8px; }
.shi-color input[type="color"] { flex: none; width: 44px; height: 36px; padding: 2px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); cursor: pointer; }
input.shi-hex { max-width: 130px; }
input.shi-number { width: 110px; flex: none; }
.shi-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: var(--weight-regular); }
.shi-sliders { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.shi-slider input[type="range"] { width: 100%; accent-color: var(--color-brand); }
.shi-slider output { float: right; font-variant-numeric: tabular-nums; color: var(--color-muted); }
.shi-positions { max-width: 360px; }
.shi-cards .choice { align-items: flex-start; }
.shi-wm-img, .shi-card-img, .shi-large-img { display: block; width: 100%; height: auto; border-radius: var(--radius-md); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.shi-card-btn, .shi-tile-img { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shi-story .row { gap: 8px; }
.shi-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shi-gallery-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.shi-search { max-width: 260px; }
.shi-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.shi-chips button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); cursor: pointer; }
.shi-chips button span { color: var(--color-muted); font-size: var(--text-xs); }
.shi-chips button.is-active { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: var(--weight-semibold); }
.shi-tiles { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.shi-tile { margin: 0; display: grid; align-content: start; border: 1px solid var(--color-border); border-radius: var(--radius-lg); overflow: hidden; background: var(--color-surface); }
.shi-tile[hidden] { display: none; }
.shi-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--color-surface-2); }
.shi-tile figcaption { display: grid; gap: 6px; padding: 10px 12px 12px; }
.shi-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.shi-tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.shi-tile-actions form { margin: 0; }
.shi-star svg { width: 16px; height: 16px; }
.shi-star[aria-pressed="true"] { color: var(--tone-warning); }
.shi-star[aria-pressed="true"] svg { fill: currentColor; }
@media (max-width: 899.98px) { .shi-grid { grid-template-columns: minmax(0, 1fr); } .shi-seg { justify-self: stretch; } .shi-seg a { flex: 1; text-align: center; } }

/* "Website settings": a sidebar heading that only opens its sub-menu (owner, 21 Nov 2026, as Dhading Update). */
.nav-sub--row > summary { position: relative; top: auto; right: auto; width: auto; height: auto; display: flex; align-items: center; gap: var(--space-3); min-height: 40px; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: var(--weight-semibold); color: var(--goji-navy-text-2); }
.nav-sub--row > summary .nav-label { flex: 1; min-width: 0; }
.nav-sub--row > summary > svg:last-child { width: 15px; height: 15px; margin-left: auto; transition: transform var(--duration) var(--ease); }
.nav-sub--row[open] > summary > svg:last-child { transform: rotate(90deg); }
.nav-sub--row[open] > summary > svg:first-child { transform: none; }
.nav-sub--row > summary.active { background: var(--goji-navy-active); color: var(--goji-navy-text); }
@media (min-width: 1024px) {
    [data-sidebar="collapsed"] .nav-sub.nav-sub--row { display: block; }
    [data-sidebar="collapsed"] .nav-sub--row .nav-sub-list, [data-sidebar="collapsed"] .nav-sub--row > summary > svg:last-child { display: none; }
}

/* Administrators & Security (21 Nov 2026, as Dhading Update): Administrators (adm-), Roles and the role page (rol-),
   the permission matrix (pm-), My two-factor sign-in (tfa-), the activity log (act-). Tokens only. */
.adm-card .row-title { font-weight: var(--weight-semibold); }
.adm-card td .badge + .badge { margin-left: var(--space-1); }
.adm-row-off td { color: var(--color-muted); }
.adm-row-off .row-title { color: var(--color-muted); }
.adm-layout { align-items: start; }
.adm-aside { position: sticky; top: calc(var(--topbar-height) + var(--space-4)); }
.adm-aside-title { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.adm-next { margin: 0; padding-left: var(--space-5); display: grid; gap: var(--space-2); color: var(--color-text-2); }
.adm-readonly { margin: 0; min-height: var(--control-height); display: flex; align-items: center; gap: var(--space-2); padding: 0 var(--space-3); border: 1px dashed var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text-2); }
.adm-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-2) var(--space-4); margin: 0; }
.adm-facts dt { color: var(--color-muted); }
.adm-facts dd { margin: 0; }
.adm-roles { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.adm-roles li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.adm-danger { border-color: var(--tone-danger-border); }

.rol-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin: var(--space-4) 0 var(--space-5); }
.rol-card { display: flex; flex-direction: column; gap: var(--space-3); }
.rol-head { display: flex; gap: var(--space-3); align-items: flex-start; }
.rol-title { min-width: 0; display: grid; gap: var(--space-1); }
.rol-title h2 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.rol-level { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 26px; padding: 0 var(--space-2); border-radius: var(--radius-sm); background: var(--color-brand-soft); color: var(--color-brand-text); font-size: var(--text-xs); font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.rol-desc { margin: 0; font-size: var(--text-sm); }
.rol-meter { width: 100%; margin: 0; }
.rol-stats { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: 0; color: var(--color-text-2); }
.rol-high.is-some { color: var(--tone-danger); font-weight: var(--weight-medium); }
.rol-foot { margin-top: auto; display: flex; align-items: center; gap: var(--space-3); }
.rol-new { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-end; }
.rol-new .field { flex: 1 1 220px; }
.rol-new .form-actions { margin: 0; }
.rol-layout { display: grid; gap: var(--space-5); grid-template-columns: 320px minmax(0, 1fr); align-items: start; }
.rol-side { position: sticky; top: calc(var(--topbar-height) + var(--space-4)); }
.rol-meter-block p { margin: var(--space-1) 0 0; color: var(--color-text-2); }
.rol-staff { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); font-size: var(--text-sm); }
.rol-perm-toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.rol-perm-toolbar .list-search { flex: 1 1 260px; }
.rol-perm-toolbar .list-search input[type="search"] { height: 42px; }
.rol-group { display: grid; gap: var(--space-3); }
.rol-group-head { display: flex; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.rol-group-head h2 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.rol-group-head p { margin: var(--space-1) 0 0; }
.rol-count { margin-left: var(--space-2); font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-muted); font-variant-numeric: tabular-nums; }
.rol-all { flex: 0 0 auto; }
.rol-perm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.rol-perm { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-2); border-radius: var(--radius-md); }
.rol-perm:hover { background: var(--color-surface-2); }
.rol-perm-label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: var(--weight-medium); }
.rol-needs { color: var(--tone-info); }

.pm-toolbar { flex-wrap: wrap; }
.pm-note { margin: 0; }
.pm-wrap { max-height: 75vh; overflow: auto; }
.pm-table { border-collapse: separate; border-spacing: 0; }
.pm-table thead th { position: sticky; top: 0; z-index: 2; background: var(--color-surface); box-shadow: inset 0 -1px 0 var(--color-border); }
.pm-table th.pm-perm { position: sticky; left: 0; z-index: 1; background: var(--color-surface); min-width: 260px; max-width: 360px; text-align: left; font-weight: var(--weight-regular); }
.pm-table thead th.pm-perm { z-index: 3; }
.pm-role { text-align: center; vertical-align: bottom; min-width: 92px; }
.pm-role-name { display: block; font-size: var(--text-xs); font-weight: var(--weight-semibold); line-height: var(--leading-tight); margin-bottom: var(--space-1); }
.pm-group-row th { background: var(--color-surface-2); text-align: left; padding-top: var(--space-3); padding-bottom: var(--space-3); }
.pm-group-name { font-weight: var(--weight-semibold); }
.pm-label { font-weight: var(--weight-medium); margin-right: var(--space-1); }
.pm-help { display: block; margin-top: 2px; }
.pm-cell { text-align: center; }
.pm-cell input[type="checkbox"] { width: 18px; height: 18px; cursor: pointer; }
.pm-cell input[aria-busy="true"] { opacity: .5; }
.pm-static { color: var(--color-faint); font-weight: var(--weight-bold); }
.pm-static.is-on { color: var(--tone-success); }
.pm-empty { padding: var(--space-5); margin: 0; }

.tfa-status { display: flex; gap: var(--space-4); align-items: flex-start; }
.tfa-status p { margin: var(--space-1) 0 0; }
.tfa-status-title { margin: 0; font-size: var(--text-lg); display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.tfa-status-icon { flex: 0 0 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--color-surface-2); color: var(--color-muted); }
.tfa-status-icon.is-on { background: var(--tone-success-soft); color: var(--tone-success); }
.tfa-status-icon svg { width: 22px; height: 22px; }
.tfa-danger { border-color: var(--tone-danger-border); }
.tfa-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); max-width: 760px; }
.tfa-step { display: flex; gap: var(--space-4); align-items: flex-start; }
.tfa-step h2 { margin: 0; font-size: var(--text-md); font-weight: var(--weight-semibold); }
.tfa-step p { margin: 0; }
.tfa-step-no { flex: 0 0 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-full); background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: var(--weight-bold); }
.tfa-qr-box { width: 220px; max-width: 100%; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.tfa-qr { display: block; width: 100%; height: auto; }
.tfa-key summary { cursor: pointer; color: var(--color-brand-text); font-weight: var(--weight-medium); }
.tfa-key[open] { display: grid; gap: var(--space-2); }
.tfa-key-value { font-size: var(--text-md); letter-spacing: .06em; }
.tfa-confirm { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; }
.tfa-confirm .field { margin: 0; }

.act-filters { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: flex-end; margin-bottom: var(--space-4); }
.act-filter-fields { display: grid; gap: var(--space-3); grid-template-columns: repeat(4, minmax(140px, 1fr)); flex: 1 1 560px; }
.act-filter-fields .field { margin: 0; }
.act-filters .form-actions { margin: 0; }
.act-type { white-space: nowrap; }
.act-open { margin-left: var(--space-2); font-size: var(--text-xs); }

@media (max-width: 899.98px) {
    .rol-layout { grid-template-columns: minmax(0, 1fr); }
    .rol-side, .adm-aside { position: static; }
    .act-filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 559.98px) {
    .act-filter-fields { grid-template-columns: minmax(0, 1fr); }
    .tfa-step { flex-direction: column; }
    .rol-group-head { flex-direction: column; }
}

/* SEO → SEO management and Redirects, laid out as Dhading Update (owner, 21 Nov 2026). */
.seom-alert { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-4); }
.seom-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.seom-col { display: grid; gap: var(--space-4); min-width: 0; }
.seom-card { display: grid; gap: var(--space-3); min-width: 0; }
.seom-title { margin: 0; font-size: 16px; font-weight: var(--weight-semibold); }
.seom-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.seom-head .seom-title { flex: 1; min-width: 0; }
.seom-code { font-size: 12.5px; overflow-wrap: anywhere; }
.seom-facts { display: grid; gap: 0; margin: 0; }
.seom-facts > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--space-3); padding: 8px 0; border-top: 1px solid var(--color-border); font-size: 14px; }
.seom-facts > div:first-child { border-top: 0; padding-top: 0; }
.seom-facts dt { color: var(--color-muted); }
.seom-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.seom-setup li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 8px 0; border-top: 1px solid var(--color-border); }
.seom-setup li:first-child { border-top: 0; padding-top: 0; }
.seom-setup-icon svg { width: 20px; height: 20px; color: var(--color-muted); }
.seom-setup li.is-done .seom-setup-icon svg { color: var(--tone-success); }
.seom-setup-text { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.seom-setup-state { color: var(--tone-success); font-weight: var(--weight-semibold); }
.seom-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.seom-list li::marker { color: var(--color-muted); }
.seom-list a { overflow-wrap: anywhere; }
.seom-extra { margin-left: 6px; color: var(--color-muted); font-size: 12.5px; white-space: nowrap; }
.seom-more { justify-self: start; font-size: 14px; font-weight: var(--weight-semibold); }
.seom-rows li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-3); padding: 8px 0; border-top: 1px solid var(--color-border); font-size: 14px; }
.seom-rows li:first-child { border-top: 0; padding-top: 0; }
.seom-rows li > .badge { margin-left: auto; }
.seom-path { min-width: 0; overflow-wrap: anywhere; }
.rdr-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.rdr-main, .rdr-side { display: grid; gap: var(--space-4); min-width: 0; }
.rdr-card { display: grid; gap: var(--space-3); min-width: 0; }
.rdr-toolbar { margin: 0; flex-wrap: wrap; }
.rdr-toolbar .list-search { flex: 1 1 240px; }
.rdr-toolbar select { flex: 0 0 180px; width: 180px; }
.rdr-count { margin: 0; white-space: nowrap; }
.rdr-table-wrap { overflow-x: auto; }
.rdr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rdr-table th { padding: 8px 10px; text-align: left; font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); border-bottom: 1px solid var(--color-border); }
.rdr-table td { padding: 10px; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.rdr-table tr:last-child td { border-bottom: 0; }
.rdr-table tr.is-off td { opacity: .65; }
.rdr-from { min-width: 200px; max-width: 340px; }
.rdr-from a { text-decoration: none; }
.rdr-note { display: block; margin-top: 4px; font-size: 12.5px; color: var(--color-muted); }
.rdr-to { max-width: 320px; overflow-wrap: anywhere; }
.rdr-num { text-align: right; white-space: nowrap; }
.rdr-last { display: block; font-size: 12px; color: var(--color-muted); }
.rdr-actions { white-space: nowrap; text-align: right; }
.rdr-actions form { display: inline; }
.rdr-help ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--color-muted); }
@media (min-width: 1100px) {
    .seom-grid.has-checks, .seom-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .rdr-grid { grid-template-columns: minmax(0, 1fr) 340px; }
    .rdr-side { position: sticky; top: calc(var(--topbar-h, 64px) + var(--space-4)); }
}
@media (max-width: 700px) {
    .seom-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .rdr-table thead { display: none; }
    .rdr-table, .rdr-table tbody, .rdr-table tr, .rdr-table td { display: block; }
    .rdr-table tr { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
    .rdr-table td { border: 0; padding: 2px 0; max-width: none; text-align: left; }
    .rdr-table td[data-label]::before { content: attr(data-label) ": "; color: var(--color-muted); font-size: 12px; }
    .rdr-last { display: inline; margin-left: 6px; }
    .rdr-toolbar select { flex: 1 1 100%; width: 100%; }
}

/* Website settings → Update services, laid out as Dhading Update (owner, 21 Nov 2026). */
.ups-page { display: grid; gap: var(--space-4); max-width: 1040px; }
.ups-switch { display: flex; align-items: center; gap: var(--space-4); }
.ups-switch-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--color-surface-2); color: var(--color-muted); }
.ups-switch.is-on .ups-switch-icon { background: var(--tone-success-soft); color: var(--tone-success); }
.ups-switch-icon svg { width: 22px; height: 22px; }
.ups-switch-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ups-switch form .field { margin: 0; }
.ups-kpis { margin: 0; }
.ups-card { display: grid; gap: var(--space-3); min-width: 0; }
.ups-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.ups-head .tabs { margin: 0; }
.ups-title { margin: 0 0 2px; font-size: 16px; font-weight: var(--weight-semibold); }
.ups-empty { margin: 0; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center; color: var(--color-muted); font-size: 14px; }
.ups-list { border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.ups-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: 12px var(--space-4); border-top: 1px solid var(--color-border); }
.ups-row:first-child { border-top: 0; }
.ups-row.is-paused .ups-row-main { opacity: .65; }
.ups-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-border-strong); }
.ups-dot.is-ok { background: var(--tone-success); }
.ups-dot.is-bad { background: var(--tone-danger); }
.ups-row-main { display: grid; gap: 4px; min-width: 0; }
.ups-address { justify-self: start; max-width: 100%; overflow-wrap: anywhere; font-size: 13px; }
.ups-why { display: block; margin-top: 2px; color: var(--tone-danger); font-size: 12.5px; }
.ups-row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ups-row-actions form { display: inline; }
.ups-add { display: grid; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.ups-add .field { margin: 0; }
.ups-add textarea { font-family: var(--font-mono); font-size: 13px; }
.ups-add-foot { display: flex; justify-content: flex-end; }
.ups-table-wrap { overflow-x: auto; }
.ups-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ups-table th { padding: 8px 10px; text-align: left; font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); border-bottom: 1px solid var(--color-border); }
.ups-table td { padding: 10px; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.ups-table tr:last-child td { border-bottom: 0; }
.ups-table .badge + .small { margin-left: 6px; }
.ups-how { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
@media (max-width: 700px) {
    .ups-row { grid-template-columns: 10px minmax(0, 1fr); }
    .ups-row-actions { grid-column: 2; justify-content: flex-start; }
    .ups-table thead { display: none; }
    .ups-table, .ups-table tbody, .ups-table tr, .ups-table td { display: block; }
    .ups-table tr { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
    .ups-table td { border: 0; padding: 2px 0; }
    .ups-table td[data-label]::before { content: attr(data-label) ": "; color: var(--color-muted); font-size: 12px; }
}

/* Push notifications: Send / Subscribers / Settings, laid out as Dhading Update (owner, 21 Nov 2026). */
.psh-state { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.psh-state-dot { flex: 0 0 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-border-strong); box-shadow: 0 0 0 4px var(--color-surface-2); }
.psh-state.is-on .psh-state-dot { background: var(--tone-success); box-shadow: 0 0 0 4px var(--tone-success-soft); }
.psh-state-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.psh-tabs { margin-bottom: var(--space-4); }
.psh-card { display: grid; gap: var(--space-3); min-width: 0; }
.psh-title { margin: 0; font-size: 16px; font-weight: var(--weight-semibold); }
.psh-limits { display: grid; gap: var(--space-3); margin: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); min-width: 0; }
.psh-limits__title { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; font-weight: var(--weight-semibold); }
.psh-limits__grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: start; }
.psh-limits__grid .field { margin: 0; }
.psh-limits:has(#psh-quiet:not(:checked)) .psh-limits__quiet { opacity: .55; }
.psh-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.psh-head .tabs { margin: 0; }
.psh-empty { margin: 0; padding: var(--space-4); text-align: center; color: var(--color-muted); font-size: 14px; }
.psh-compose-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); align-items: start; }
.psh-compose-grid .field { margin: 0; }
.psh-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
.psh-preview { background: var(--color-surface-2); }
/* Push → Settings → On the website (owner, 28 Nov 2026): style tiles, side/size/colour, and a preview website. */
.psh-title { display: flex; align-items: center; gap: 6px; }
.psh-look { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1.15fr) minmax(280px, 1fr); align-items: start; }
.psh-look__form { min-width: 0; }
.psh-styles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); margin: 0; padding: 0; border: 0; min-width: 0; }
.psh-styles > legend { margin-bottom: 6px; padding: 0; }
.psh-style { position: relative; margin: 0; cursor: pointer; }
.psh-style input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.psh-style__box { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); height: 100%; }
.psh-style input:checked + .psh-style__box { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); }
.psh-style input:focus-visible + .psh-style__box { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.psh-style__name { font-size: var(--text-sm); font-weight: var(--weight-medium); line-height: 1.25; }
.psh-mini { position: relative; display: grid; gap: 4px; align-content: start; height: 62px; padding: 7px; border-radius: 6px; background: var(--color-surface-2); border: 1px solid var(--color-border); overflow: hidden; }
.psh-mini i { display: block; height: 5px; border-radius: 3px; background: var(--color-border-strong); }
.psh-mini i:nth-child(2) { width: 70%; } .psh-mini i:nth-child(3) { width: 85%; }
.psh-mini__el { position: absolute; background: var(--color-brand); border-radius: 3px; }
.psh-mini[data-style="bell_card"] .psh-mini__el { left: 6px; bottom: 6px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 -16px 0 -1px var(--color-surface), 14px -16px 0 -1px var(--color-surface), 26px -16px 0 -1px var(--color-surface); }
.psh-mini[data-style="bell"] .psh-mini__el { left: 6px; bottom: 6px; width: 12px; height: 12px; border-radius: 50%; }
.psh-mini[data-style="card"] .psh-mini__el { left: 6px; bottom: 6px; width: 46%; height: 18px; border-radius: 4px; }
.psh-mini[data-style="bar_bottom"] .psh-mini__el { left: 0; right: 0; bottom: 0; height: 12px; border-radius: 0; }
.psh-mini[data-style="bar_top"] .psh-mini__el { left: 0; right: 0; top: 0; height: 12px; border-radius: 0; }
.psh-mini[data-style="modal"] .psh-mini__el { left: 28%; right: 28%; top: 30%; height: 24px; border-radius: 4px; box-shadow: 0 0 0 30px color-mix(in srgb, var(--color-text) 18%, transparent); }
.psh-mini[data-style="footer"] .psh-mini__el { left: 30%; right: 30%; bottom: 4px; height: 4px; }
.psh-row { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: start; }
.psh-row--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.psh-seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.psh-seg > legend { width: 100%; padding: 0; margin-bottom: 4px; }
.psh-seg label { position: relative; margin: 0; cursor: pointer; }
.psh-seg label input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.psh-seg label span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-full); background: var(--color-surface); font-weight: var(--weight-medium); }
.psh-seg label input:checked + span { border-color: var(--color-brand); background: var(--color-brand-soft); box-shadow: 0 0 0 1px var(--color-brand); }
.psh-seg label input:focus-visible + span { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.psh-colour__pick { width: 44px; height: 36px; padding: 2px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.psh-look:has(input[name="prompt_style"][value="bar_bottom"]:checked, input[name="prompt_style"][value="bar_top"]:checked, input[name="prompt_style"][value="modal"]:checked, input[name="prompt_style"][value="footer"]:checked) .psh-when-floating,
.psh-look:not(:has(input[name="prompt_style"][value="bell_card"]:checked, input[name="prompt_style"][value="bell"]:checked)) .psh-when-bell { display: none; }

.psh-lookview { position: sticky; top: var(--space-4); display: grid; gap: 8px; }
.psh-site { --psh-colour: var(--color-brand); --psh-scale: 1; position: relative; height: 330px; border-radius: 12px; border: 1px solid var(--color-border-strong); background: var(--color-surface); overflow: hidden; box-shadow: var(--shadow-sm); font-size: 12px; }
.psh-site[data-size="small"] { --psh-scale: .86; } .psh-site[data-size="large"] { --psh-scale: 1.14; }
.psh-site__top { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 3px solid var(--psh-colour); }
.psh-site__top b { margin-right: auto; font-size: 13px; }
.psh-site__top i, .psh-site__body i { display: block; height: 7px; border-radius: 4px; background: var(--color-border); }
.psh-site__top i { width: 30px; }
.psh-site__body { display: grid; gap: 8px; padding: 14px 12px; }
.psh-site__body i:nth-child(1) { height: 70px; border-radius: 6px; background: var(--color-surface-2); }
.psh-site__body i:nth-child(3) { width: 80%; } .psh-site__body i:nth-child(5) { width: 60%; }
.psh-site__bar, .psh-site__card, .psh-site__bell, .psh-site__shade, .psh-site__footer { position: absolute; display: none; }
.psh-site__icon { display: inline-grid; place-items: center; flex: none; width: calc(28px * var(--psh-scale)); height: calc(28px * var(--psh-scale)); border-radius: 50%; background: color-mix(in srgb, var(--psh-colour) 14%, var(--color-surface)); color: var(--psh-colour); }
.psh-site__icon svg, .psh-site__bell svg { width: 55%; height: 55%; }
.psh-site__copy { display: grid; gap: 2px; min-width: 0; }
.psh-site__copy b { font-size: calc(12px * var(--psh-scale)); }
.psh-site__copy span { color: var(--color-muted); font-size: calc(10.5px * var(--psh-scale)); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.psh-site__btns { display: flex; gap: 5px; }
.psh-site__btns em { font-style: normal; font-weight: 600; font-size: calc(11px * var(--psh-scale)); padding: 4px 10px; border-radius: 999px; background: var(--psh-colour); color: var(--color-brand-ink, var(--color-surface)); }
.psh-site__btns em.is-ghost { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border-strong); }
.psh-site__card { width: calc(190px * var(--psh-scale)); padding: 10px; border-radius: 12px; background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); grid-template-columns: auto 1fr; gap: 8px; }
.psh-site__card .psh-site__btns { grid-column: 1 / -1; }
.psh-site__bell { display: none; place-items: center; width: calc(34px * var(--psh-scale)); height: calc(34px * var(--psh-scale)); border-radius: 50%; background: var(--color-surface); color: var(--psh-colour); border: 1px solid var(--color-border); box-shadow: var(--shadow-md); bottom: 10px; }
.psh-site__bar { left: 0; right: 0; display: none; align-items: center; gap: 8px; padding: 8px 10px; background: var(--color-surface); box-shadow: var(--shadow-md); flex-wrap: wrap; }
.psh-site__bar .psh-site__copy { flex: 1 1 120px; }
.psh-site__shade { inset: 0; background: color-mix(in srgb, var(--color-text) 40%, transparent); }
.psh-site__footer { left: 0; right: 0; bottom: 0; padding: 6px 12px; background: var(--color-surface-2); color: var(--color-muted); text-decoration: underline; font-size: 11px; }
.psh-site[data-style="bell_card"] .psh-site__bell, .psh-site[data-style="bell"] .psh-site__bell { display: grid; }
.psh-site[data-style="bell_card"] .psh-site__card { display: grid; bottom: calc(10px + 34px * var(--psh-scale) + 8px); }
.psh-site[data-style="card"] .psh-site__card { display: grid; bottom: 10px; }
.psh-site[data-pos="left"] .psh-site__bell, .psh-site[data-pos="left"] .psh-site__card { left: 10px; }
.psh-site[data-pos="right"] .psh-site__bell, .psh-site[data-pos="right"] .psh-site__card { right: 10px; }
.psh-site[data-style="bar_bottom"] .psh-site__bar { display: flex; bottom: 0; border-top: 1px solid var(--color-border); }
.psh-site[data-style="bar_top"] .psh-site__bar { display: flex; top: 0; border-top: 3px solid var(--psh-colour); border-bottom: 1px solid var(--color-border); }
.psh-site[data-style="modal"] .psh-site__shade { display: block; }
.psh-site[data-style="modal"] .psh-site__card { display: grid; left: 50%; top: 50%; transform: translate(-50%, -50%); justify-items: center; text-align: center; grid-template-columns: 1fr; width: calc(210px * var(--psh-scale)); }
.psh-site[data-style="modal"] .psh-site__card .psh-site__btns { justify-content: center; }
.psh-site[data-style="footer"] .psh-site__footer { display: block; }
@media (max-width: 900px) { .psh-look { grid-template-columns: minmax(0, 1fr); } .psh-lookview { position: static; } }
.psh-phone, .psh-desktop, .psh-invite-card { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--color-surface); box-shadow: var(--shadow-sm); font-size: 14px; overflow-wrap: anywhere; }
.psh-phone b, .psh-desktop b, .psh-invite-card b { font-size: 15px; }
.psh-app { font-size: 12px; color: var(--color-muted); }
.psh-desktop, .psh-invite-card { grid-template-columns: 44px minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.psh-desktop > div, .psh-invite-card > div { display: grid; gap: 2px; min-width: 0; }
.psh-desktop-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--tone-brand-soft); color: var(--tone-brand); }
.psh-desktop-icon svg { width: 22px; height: 22px; }
.psh-host { font-size: 12px; color: var(--color-muted); }
.psh-table-wrap { overflow-x: auto; }
.psh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.psh-table th { padding: 8px 10px; text-align: left; font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); border-bottom: 1px solid var(--color-border); }
.psh-table td { padding: 10px; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.psh-table tr:last-child td { border-bottom: 0; }
.psh-table .num { text-align: right; white-space: nowrap; }
.psh-row-title { font-weight: var(--weight-semibold); text-decoration: none; }
.psh-row-meta { display: block; margin-top: 3px; font-size: 12.5px; color: var(--color-muted); }
.psh-of { display: block; font-size: 12px; color: var(--color-muted); }
.psh-kpis { margin-bottom: var(--space-4); }
.psh-breakdowns { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); }
.psh-bars { display: grid; gap: 10px; }
.psh-bars li { display: grid; grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 40px; gap: var(--space-3); align-items: center; font-size: 14px; }
.psh-bar { width: 100%; height: 8px; }
.psh-bar::-webkit-meter-bar { background: var(--color-surface-2); border: 0; border-radius: 99px; }
.psh-bar::-webkit-meter-optimum-value { background: var(--tone-brand); border-radius: 99px; }
.psh-bar::-moz-meter-bar { background: var(--tone-brand); border-radius: 99px; }
.psh-bar-n { text-align: right; }
.psh-settings { display: grid; gap: var(--space-4); margin-bottom: var(--space-4); }
.psh-settings .field { margin: 0; }
.psh-invite-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
.psh-invite-preview { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.psh-savebar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); position: sticky; bottom: var(--space-3); z-index: 2; }
.psh-keys { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.psh-keys > div { display: grid; gap: 2px; }
@media (min-width: 1000px) {
    .psh-compose-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
    .psh-breakdowns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .psh-invite-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .psh-table thead { display: none; }
    .psh-table, .psh-table tbody, .psh-table tr, .psh-table td { display: block; }
    .psh-table tr { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
    .psh-table td { border: 0; padding: 2px 0; }
    .psh-table td.num { text-align: left; }
    .psh-table td[data-label]::before { content: attr(data-label) ": "; color: var(--color-muted); font-size: 12px; }
    .psh-of { display: inline; margin-left: 4px; }
}

/* Reactions and Share counter, laid out as Dhading Update (owner, 21 Nov 2026). */
.rxn-state { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.rxn-state-dot { flex: 0 0 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--color-border-strong); box-shadow: 0 0 0 4px var(--color-surface-2); }
.rxn-state.is-on .rxn-state-dot { background: var(--tone-success); box-shadow: 0 0 0 4px var(--tone-success-soft); }
.rxn-state-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.rxn-kpis { margin-bottom: var(--space-4); }
.rxn-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); align-items: start; }
.rxn-card, .shc-card { display: grid; gap: var(--space-3); min-width: 0; margin-bottom: var(--space-4); }
.rxn-grid .rxn-card { margin-bottom: 0; }
.rxn-title, .shc-title { margin: 0; font-size: 16px; font-weight: var(--weight-semibold); }
.rxn-head, .shc-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.rxn-head .tabs { margin: 0; }
.rxn-bars { display: grid; gap: 10px; }
.rxn-bars li { display: grid; grid-template-columns: 28px minmax(90px, 160px) minmax(0, 1fr) 48px; gap: var(--space-3); align-items: center; font-size: 14px; }
.rxn-emoji { font-size: 20px; line-height: 1; }
.rxn-meter { width: 100%; height: 8px; }
.rxn-meter::-webkit-meter-bar { background: var(--color-surface-2); border: 0; border-radius: 99px; }
.rxn-meter::-webkit-meter-optimum-value { background: var(--tone-brand); border-radius: 99px; }
.rxn-meter::-moz-meter-bar { background: var(--tone-brand); border-radius: 99px; }
.rxn-n { text-align: right; }
.rxn-empty, .shc-empty { margin: 0; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center; color: var(--color-muted); font-size: 14px; }
.rxn-most { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 14px; }
.rxn-most a { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.rxn-most-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--color-muted); }
.rxn-labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--space-2); }
.rxn-label { display: flex; align-items: center; gap: var(--space-2); padding: 6px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.rxn-label input { flex: 1; min-width: 0; }
.rxn-modes { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.rxn-modes legend { margin-bottom: var(--space-2); font-weight: var(--weight-semibold); font-size: 14px; }
.rxn-mode { display: flex; gap: var(--space-3); align-items: flex-start; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); cursor: pointer; }
.rxn-mode > span { display: grid; gap: 2px; }
.rxn-mode:has(input:checked), .rxn-mode.is-current { border-color: var(--color-brand); background: var(--tone-brand-soft); }
.rxn-advanced > summary { cursor: pointer; font-weight: var(--weight-semibold); font-size: 14px; }
.rxn-advanced[open] > summary { margin-bottom: var(--space-3); }
.rxn-actions, .shc-actions { display: flex; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.rxn-card .field, .shc-card .field { margin: 0; }
.shc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; margin-bottom: var(--space-4); }
.shc-grid .shc-card { margin-bottom: 0; }
.shc-honest { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--tone-success-soft); color: var(--color-text); }
.shc-locked { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-3); align-items: start; }
.shc-locked > span:last-child { display: grid; gap: 2px; }
.shc-on svg { width: 22px; height: 22px; color: var(--tone-success); }
.shc-facts { display: grid; margin: 0; }
.shc-facts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-3); padding: 8px 0; border-top: 1px solid var(--color-border); font-size: 14px; }
.shc-facts > div:first-child { border-top: 0; padding-top: 0; }
.shc-facts dt { color: var(--color-muted); }
.shc-facts dd { margin: 0; }
.shc-token { display: grid; gap: var(--space-2); max-width: 560px; }
.shc-test { display: flex; gap: var(--space-2); align-items: center; }
.shc-test select { max-width: 280px; }
.shc-how > summary { cursor: pointer; font-weight: var(--weight-semibold); font-size: 14px; color: var(--color-brand); }
.shc-how ol { margin: var(--space-2) 0 0; padding-left: 20px; display: grid; gap: 4px; }
.shc-table-wrap { overflow-x: auto; }
.shc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.shc-table th { padding: 8px 10px; text-align: left; font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); border-bottom: 1px solid var(--color-border); }
.shc-table td { padding: 10px; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.shc-table tr:last-child td { border-bottom: 0; }
.shc-table .num { text-align: right; white-space: nowrap; }
.shc-story { font-weight: var(--weight-semibold); }
.shc-meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--color-muted); }
@media (min-width: 1000px) {
    .rxn-grid, .shc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .rxn-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .shc-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .shc-table thead { display: none; }
    .shc-table, .shc-table tbody, .shc-table tr, .shc-table td { display: block; }
    .shc-table tr { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
    .shc-table td { border: 0; padding: 2px 0; }
    .shc-table td.num { text-align: left; }
    .shc-table td[data-label]::before { content: attr(data-label) ": "; color: var(--color-muted); font-size: 12px; }
    .rxn-bars li { grid-template-columns: 28px minmax(0, 1fr) 48px; }
    .rxn-meter { grid-column: 2 / 4; }
}

/* Story audio (news.audio, 21 Nov 2026): the editor field, Website settings → Story audio, Platform → Story audio. */
.aud-field { display: grid; gap: var(--space-2); }
.aud-gender { display: flex; gap: var(--space-4); margin: 0; padding: 0 0 0 2px; border: 0; font-size: 14px; }
.aud-gender label { display: inline-flex; gap: 6px; align-items: center; }
.aud-state { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.aud-player { width: 100%; height: 36px; }
.aud-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-3) 0; }
.aud-month { display: flex; align-items: center; gap: var(--space-2); font-size: 14px; }
.aud-kpis { margin-bottom: var(--space-4); }
.aud-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); align-items: start; margin-bottom: var(--space-4); }
.aud-grid .aud-card { margin-bottom: 0; }
.aud-card { display: grid; gap: var(--space-3); min-width: 0; margin-bottom: var(--space-4); }
.aud-card .field { margin: 0; }
.aud-title { margin: 0; font-size: 16px; font-weight: var(--weight-semibold); }
.aud-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.aud-facts { display: grid; margin: 0; }
.aud-facts > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--space-3); padding: 8px 0; border-top: 1px solid var(--color-border); font-size: 14px; }
.aud-facts > div:first-child { border-top: 0; padding-top: 0; }
.aud-facts dt { color: var(--color-muted); }
.aud-facts dd { margin: 0; }
.aud-meter { width: 100%; height: 8px; }
.aud-empty { margin: 0; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); text-align: center; color: var(--color-muted); font-size: 14px; }
.aud-table-wrap { overflow-x: auto; }
.aud-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aud-table th { padding: 8px 10px; text-align: left; font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); border-bottom: 1px solid var(--color-border); }
.aud-table td { padding: 10px; vertical-align: top; border-bottom: 1px solid var(--color-border); }
.aud-table tr:last-child td { border-bottom: 0; }
.aud-table .num { text-align: right; white-space: nowrap; }
.aud-note { display: block; margin-top: 2px; font-size: 12.5px; color: var(--color-muted); }
.aud-actions { display: flex; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.aud-actions-cell { white-space: nowrap; text-align: right; }
.aud-actions-cell form { display: inline; }
.aud-edit { display: inline-block; text-align: left; }
.aud-edit[open] { display: block; margin-top: var(--space-2); }
.aud-edit > summary { list-style: none; cursor: pointer; display: inline-flex; }
.aud-rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-3); }
.aud-rule .field { margin: 0; }
.aud-site { border-top: 1px solid var(--color-border); padding: 10px 0; }
.aud-site > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px var(--space-3); align-items: center; }
.aud-site[open] > summary { margin-bottom: var(--space-3); }
.aud-site .aud-rule { display: grid; gap: var(--space-3); }
.aud-voice-form { display: grid; gap: var(--space-3); }
.aud-found { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.aud-costs { display: grid; gap: var(--space-2); }
.aud-cost { display: grid; grid-template-columns: minmax(180px, 260px) 140px minmax(0, 1fr); gap: var(--space-3); align-items: center; }
.aud-newcost { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
@media (min-width: 1000px) {
    .aud-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .aud-facts > div, .aud-cost { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .aud-table thead { display: none; }
    .aud-table, .aud-table tbody, .aud-table tr, .aud-table td { display: block; }
    .aud-table tr { padding: 10px 0; border-bottom: 1px solid var(--color-border); }
    .aud-table td { border: 0; padding: 2px 0; }
    .aud-table td.num { text-align: left; }
    .aud-table td[data-label]::before { content: attr(data-label) ": "; color: var(--color-muted); font-size: 12px; }
}

/* One flat sidebar (News): sub-menu entries with a small dot, as Dhading Update (22 Nov 2026). */
.nav-flat .nav-sub-list a::before { content: ""; flex: 0 0 5px; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: currentColor; opacity: .55; }
.nav-flat .nav-sub-list a.active::before { opacity: 1; }

/* The sidebar never grows wider than itself (a long label used to push the column and hide the sub-menu arrows,
   22 Nov 2026); a heading of the flat sidebar is not filled like a page, its open page is (as Dhading Update). */
.nav, .nav-item.has-sub, .nav-sub, .nav-sub-list { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.nav a .nav-label { min-width: 0; }
.nav-sub--row, .nav-sub--row > summary { box-sizing: border-box; max-width: 100%; }
.nav-sub--row > summary { width: 100%; }
.nav-flat .nav-sub--row > summary.active { background: transparent; color: var(--goji-navy-text); }

/* List pages as Dhading Update (owner, 22 Nov 2026): the filters, the count and the list sit close together — the page
   grid's 20 px gap no longer adds to the toolbar's own margins (title → pills 20, pills → filters 14, filters → count
   14, count → list 12), and the search box and selects are 44 px high. */
.content > .list-toolbar { margin: -6px 0; }
.content > .list-count { margin: -8px 0 -8px 4px; }
.content > .story-bulk { margin: -6px 0 -8px; }
.list-search input[type="search"], .list-toolbar select { height: 44px; }

/* The story editor of the news form as Dhading Update (owner, 22 Nov 2026): no card around it; "Add Media" a 40 px button
   above the editor; the editor a white box (radius 16 px) whose toolbar fits one row; the story in 17 px with a 1.85
   line height; the box grows with the story (no inner scroll bar). Full screen keeps its own layout. */
.ned-card.ned-card--editor { background: transparent; border: 0; box-shadow: none; padding: 0; }
.ned-card--editor .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ned-card--editor .editor { border: 0; background: transparent; border-radius: 16px; }
.ned-card--editor .editor-top { padding: 0 0 10px; background: transparent; border: 0; }
.ned-card--editor .editor-top .btn { height: 40px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: var(--weight-bold); background: var(--color-surface); border: 1px solid var(--color-border); }
.ned-card--editor .editor-toolbar { gap: 2px 6px; padding: 8px 10px; background: var(--color-surface-2); border: 0; border-bottom: 1px solid var(--color-border); border-radius: 16px 16px 0 0; }
.ned-card--editor .editor-btn { min-width: 28px; height: 28px; padding: 0 4px; }
.ned-card--editor .editor-group { gap: 1px; padding-left: 6px; }
.ned-card--editor .editor-surface, .ned-card--editor .editor-source { background: var(--color-surface); border-radius: 0 0 16px 16px; }
.ned-card--editor .editor-content { font-size: 17px; line-height: 1.85; padding: 22px 26px; min-height: 420px; max-height: none; overflow-y: visible; }
.ned-card--editor .editor.is-fullscreen { background: var(--color-surface); border-radius: 0; }
.ned-card--editor .editor.is-fullscreen .editor-top { padding: 8px 10px 0; }
.ned-card--editor .editor.is-fullscreen .editor-toolbar, .ned-card--editor .editor.is-fullscreen .editor-surface { border-radius: 0; }
/* The foot line (words, read time, revisions, saved, Help) belongs to the story box, as on Dhading Update (owner,
   26 Nov 2026): white, touching the text above with one border line between, and carrying the box's round corners. */
.ned-card--editor .editor-foot { background: var(--color-surface); border-top: 1px solid var(--color-border); border-radius: 0 0 16px 16px; padding: 10px var(--space-4); }
.ned-card--editor .editor-surface:has(~ .editor-foot:not([hidden])), .ned-card--editor .editor-source:has(~ .editor-foot:not([hidden])) { border-radius: 0; }
.ned-card--editor .editor.is-fullscreen .editor-foot { border-radius: 0; }
.ned-card--editor .editor.is-fullscreen .editor-content { overflow-y: visible; }

/* The story in Mukta, as Dhading Update (owner, 22 Nov 2026). */
.ned-card--editor .editor-content { font-family: Mukta, "Noto Sans Devanagari", system-ui, sans-serif; }

/* Pictures in the story editor as Dhading Update (22 Nov 2026): the picture at the size it will have in the story
   (no grey box, no height limit), the gallery in its columns, and a dark bar floating over the selected one. */
.editor-surface { position: relative; }
.editor-content .editor-media, .editor-content .editor-gallery { padding: 0; border: 0; background: none; border-radius: 0; margin: 0 0 1em; }
.editor-content .editor-media img { width: 100%; max-height: none; height: auto; border-radius: 4px; }
.editor-content .editor-media.has-link img { box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-brand) 35%, transparent); }
.editor-content .editor-media figcaption, .editor-content .editor-gallery figcaption { margin-top: 6px; font-size: .88em; line-height: 1.45; color: var(--color-text-2); text-align: center; }
.editor-content .editor-gallery figcaption.is-hint { font-size: var(--text-xs); color: var(--color-faint); }
.editor-content .editor-gallery-grid { gap: 6px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.editor-content .editor-gallery-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.editor-content .editor-gallery-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor-content .editor-gallery-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.editor-content .editor-gallery-grid img { border-radius: 4px; }
.editor-content .editor-media.ProseMirror-selectednode, .editor-content .editor-gallery.ProseMirror-selectednode { outline: 3px solid var(--color-brand); outline-offset: 3px; border-radius: 4px; }

.editor-imgbar { position: absolute; z-index: 30; top: 8px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 12px); padding: 5px; border-radius: 12px; background: var(--goji-imgbar-bg); color: #fff; box-shadow: 0 10px 28px rgba(15, 23, 42, .32); font-size: 13px; line-height: 1; }
.editor-imgbar[hidden] { display: none; }
.editor-imgbar__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.editor-imgbar__label { padding: 0 8px; font-weight: 600; white-space: nowrap; color: var(--goji-imgbar-muted); }
.editor-imgbar__label[hidden], .editor-imgbar__group[hidden], .editor-imgbar__btn[hidden] { display: none; }
.editor-imgbar__group { display: inline-flex; align-items: center; gap: 2px; padding: 0 3px; }
.editor-imgbar__group + .editor-imgbar__group { border-left: 1px solid rgba(255, 255, 255, .16); }
.editor-imgbar__btn { position: relative; display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: var(--goji-imgbar-text); font: inherit; font-weight: 700; cursor: pointer; }
.editor-imgbar__btn svg { width: 18px; height: 18px; }
.editor-imgbar__btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.editor-imgbar__btn:focus-visible { outline: 2px solid var(--goji-imgbar-accent); outline-offset: 1px; }
.editor-imgbar__btn[aria-pressed="true"], .editor-imgbar__btn[aria-expanded="true"] { background: #fff; color: var(--goji-imgbar-bg); }
.editor-imgbar__btn.is-danger:hover { background: var(--goji-imgbar-danger); color: #fff; }
.editor-imgbar__dot { position: absolute; top: 5px; right: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--goji-imgbar-dot); box-shadow: 0 0 0 2px var(--goji-imgbar-bg); }
.editor-imgbar__dot.is-on { background: var(--goji-imgbar-dot-on); }
.editor-imgbar__dot[hidden] { display: none; }
.editor-imgbar__panel { display: flex; align-items: center; gap: 6px; margin-top: 5px; padding: 5px 4px 1px; border-top: 1px solid rgba(255, 255, 255, .16); }
.editor-imgbar__panel[hidden] { display: none; }
.editor-imgbar__panel label { color: var(--goji-imgbar-muted); font-weight: 600; white-space: nowrap; }
.editor-imgbar__panel input { flex: 1 1 auto; min-width: 180px; height: 34px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 8px; background: #fff; color: var(--goji-ink-strong); font: inherit; font-size: 14px; }
.editor-imgbar__save { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--goji-imgbar-save); color: var(--goji-imgbar-save-text); font: inherit; font-weight: 700; cursor: pointer; }
.editor-imgbar__save:hover { background: var(--goji-imgbar-accent); }
.editor-imgbar__close { width: 30px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--goji-imgbar-muted); font-size: 20px; cursor: pointer; }
.editor-imgbar__close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
@media (max-width: 640px) {
    .editor-imgbar { width: calc(100% - 12px); }
    .editor-imgbar__label { display: none; }
    .editor-imgbar__panel { flex-wrap: wrap; }
    .editor-imgbar__panel label { display: none; }
    .editor-imgbar__panel input { min-width: 0; width: 100%; }
}

/* The story one step larger with one even rhythm (owner, 22 Nov 2026): 18px Mukta, every block 1em apart, the same
   left and right padding, headings set off a little more above than below. */
.ned-card--editor .editor-content, .ned-card--editor .editor.is-fullscreen .editor-content { font-size: 18px; line-height: 1.8; }
.ned-card--editor .editor-content { padding: 24px 28px; }
.ned-card--editor .editor-content :where(p, ul, ol, blockquote, table, figure, pre) { margin-top: 0; margin-bottom: 1em; }
.ned-card--editor .editor-content :where(ul, ol) { padding-left: 1.4em; }
.ned-card--editor .editor-content li { margin: 0 0 .35em; }
.ned-card--editor .editor-content li > p { margin: 0; }
.ned-card--editor .editor-content :where(h2, h3, h4) { line-height: 1.4; margin: 1.3em 0 .5em; }
.ned-card--editor .editor-content > :first-child { margin-top: 0; }
.ned-card--editor .editor-content > :last-child { margin-bottom: 0; }
@media (max-width: 640px) { .ned-card--editor .editor-content { padding: 18px 16px; } }

/* Story box help behind an (i) button in the footer, opening upwards (owner, 22 Nov 2026). */
.editor-foot { align-items: center; }
.editor-info { position: relative; }
/* Help is a plain icon and word: no border, no padding (owner, 26 Nov 2026). */
.editor-info__btn { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-text-2); font-size: var(--text-xs); font-weight: 600; cursor: pointer; list-style: none; user-select: none; }
.editor-info__btn::-webkit-details-marker { display: none; }
.editor-info__btn svg { width: 15px; height: 15px; }
.editor-info__btn:hover, .editor-info[open] > .editor-info__btn { color: var(--color-brand-text); }
.editor-info__box { position: absolute; z-index: 40; right: 0; bottom: calc(100% + 8px); width: min(380px, 86vw); padding: 12px 14px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); color: var(--color-text-2); box-shadow: 0 12px 30px rgba(15, 23, 42, .18); font-size: 13px; line-height: 1.55; }
.editor-info__box p { margin: 0; }
.editor-info__box p + p { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--color-border); }

/* Add author dialog as Dhading Update (owner, 22 Nov 2026). */
.ned-author-dialog { width: min(560px, calc(100vw - 32px)); }
.ned-author-form { display: grid; gap: var(--space-4); }
.ned-author-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.ned-author-form .field { margin: 0; }
.ned-author-form .req { color: var(--goji-danger); }
@media (max-width: 520px) { .ned-author-form__row { grid-template-columns: minmax(0, 1fr); } }

/* "?" notes of switches (x-goji::toggle tip; owner, 22 Nov 2026). */
.field.has-tip { position: relative; display: flex; align-items: center; gap: 6px; }
.field.has-tip > .toggle-field { flex: 0 1 auto; min-width: 0; }
.field.has-tip > .check { flex: 0 1 auto; min-width: 0; margin: 0; }
/* A tick with a tip: its short label stays on one line, the "?" right after it (24 Nov 2026). */
.field.has-tip > .check > span { white-space: nowrap; }
.goji-tip { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 1px solid var(--color-border-strong); border-radius: 50%; background: var(--color-surface); color: var(--color-muted); font-size: 11px; font-weight: 700; line-height: 1; cursor: help; }
.goji-tip:hover, .goji-tip[aria-expanded="true"] { border-color: var(--color-brand); color: var(--color-brand); }
.goji-tip__box { display: none; position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); padding: 10px 12px; border-radius: 10px; background: var(--goji-ink-strong); color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.5; box-shadow: 0 10px 26px rgba(15, 23, 42, .25); }
.goji-tip:hover + .goji-tip__box, .goji-tip:focus-visible + .goji-tip__box, .goji-tip[aria-expanded="true"] + .goji-tip__box { display: block; }

/* "On the site" as Dhading Update: switch first, the name after it, notes behind "?" (owner, 22 Nov 2026). */
[data-ned-site-card] .ned-fold__body { gap: 14px; }
[data-ned-site-card] .toggle-field { flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 12px; font-size: 15px; }
[data-ned-site-card] .toggle-field > span { display: block; }
[data-ned-site-card][open] > .ned-fold__summary [data-ned-site-line] { display: none; }
[data-ned-site-card] .aud-field { gap: 8px; }
[data-ned-site-card] .aud-gender { padding-left: 52px; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; color: var(--color-text-2); }
[data-ned-site-card] .aud-gender label { white-space: nowrap; }

/* Website settings → Story audio (24 Nov 2026, modern page): month switcher, status strip, KPI cards, audios per day,
   being made now, the month's audios with a player, voice cards. New names only (the aud-* above serve other screens). */
.aud-period { display: inline-flex; align-items: center; gap: var(--space-1); }
.aud-period__pick select { min-width: 170px; font-weight: var(--weight-semibold); }
.aud-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4);
    border: 1px solid var(--tone-success-border); border-radius: var(--radius-lg); background: var(--tone-success-soft); }
.aud-status.is-paused { border-color: var(--tone-warning-border); background: var(--tone-warning-soft); }
.aud-status__dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--tone-success); box-shadow: 0 0 0 4px var(--tone-success-border); }
.aud-status.is-paused .aud-status__dot { background: var(--tone-warning); box-shadow: 0 0 0 4px var(--tone-warning-border); }
.aud-status__text { display: grid; flex: 1; min-width: 220px; }
.aud-status__text span { font-size: 13px; color: var(--color-text-2); }
.aud-status__queue { padding: 4px 12px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--color-border); font-size: 13px; font-weight: var(--weight-semibold); }
.aud-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.aud-kpi { position: relative; display: grid; gap: 4px; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm, none); }
.aud-kpi__icon { position: absolute; top: var(--space-4); right: var(--space-4); display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); }
.aud-kpi__icon svg { width: 20px; height: 20px; }
.aud-kpi__icon.is-brand { background: var(--tone-brand-soft); color: var(--tone-brand); }
.aud-kpi__icon.is-review { background: var(--tone-review-soft); color: var(--tone-review); }
.aud-kpi__icon.is-info { background: var(--tone-info-soft); color: var(--tone-info); }
.aud-kpi__icon.is-success { background: var(--tone-success-soft); color: var(--tone-success); }
.aud-kpi__label { font-size: 13px; font-weight: var(--weight-semibold); color: var(--color-muted); }
.aud-kpi__value { font-size: 1.9rem; line-height: 1.2; letter-spacing: -.01em; }
.aud-kpi__foot { font-size: 12.5px; color: var(--color-muted); }
.aud-kpi__foot.is-up { color: var(--tone-success); }
.aud-kpi__foot.is-down { color: var(--tone-danger); }
.aud-kpi__meter { width: 100%; height: 8px; }
.aud-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; margin-bottom: var(--space-4); }
.aud-layout > .aud-card { margin-bottom: 0; }
.aud-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.aud-chart { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 3px; height: 160px; padding-bottom: 18px; }
.aud-bar { position: relative; display: flex; align-items: flex-end; height: 100%; }
.aud-bar__fill { --h: 0%; width: 100%; height: var(--h); min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--tone-brand), var(--tone-brand-border)); }
.aud-bar:hover .aud-bar__fill { background: var(--tone-review); }
.aud-bar em { position: absolute; bottom: -18px; left: 50%; transform: translateX(-50%); font-size: 11px; font-style: normal; color: var(--color-muted); }
.aud-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.aud-queue li { display: grid; gap: 4px; padding: var(--space-2) 0; border-top: 1px solid var(--color-border); font-size: 14px; }
.aud-queue li:first-child { border-top: 0; }
.aud-pill { justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: var(--weight-semibold); background: var(--tone-muted-soft); color: var(--tone-muted); }
.aud-pill.is-queued { background: var(--tone-info-soft); color: var(--tone-info); }
.aud-pill.is-working { background: var(--tone-review-soft); color: var(--tone-review); }
.aud-filter { display: inline-flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--color-border); }
.aud-filter a { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: var(--weight-semibold); color: var(--color-text-2); text-decoration: none; }
.aud-filter a.is-active { background: var(--color-surface); color: var(--color-text); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.aud-list { list-style: none; margin: 0; padding: 0; display: grid; }
.aud-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px) auto; gap: var(--space-3); align-items: center; padding: var(--space-3) 0; border-top: 1px solid var(--color-border); }
.aud-item:first-child { border-top: 0; }
.aud-item.is-failed { opacity: .85; }
.aud-item__main { display: grid; gap: 2px; min-width: 0; }
.aud-item__title { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.aud-item__player { width: 100%; height: 36px; }
.aud-item__charge { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.aud-voice { font-weight: var(--weight-semibold); }
.aud-voice.is-female { color: var(--tone-review); }
.aud-voice.is-male { color: var(--tone-info); }
.aud-voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.aud-voices legend { padding: 0; margin-bottom: var(--space-2); font-weight: var(--weight-semibold); font-size: 14px; }
.aud-voice-card { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; }
.aud-voice-card:has(input:checked) { border-color: var(--tone-brand); background: var(--tone-brand-soft); }
.aud-voice-card > span:last-child { display: grid; }
.aud-voice-card__icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; font-size: 18px; font-weight: 700; }
.aud-voice-card__icon.is-male { background: var(--tone-info-soft); color: var(--tone-info); }
.aud-voice-card__icon.is-female { background: var(--tone-review-soft); color: var(--tone-review); }
.aud-settings .aud-actions { justify-content: space-between; }
@media (max-width: 1100px) { .aud-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
    .aud-item { grid-template-columns: minmax(0, 1fr) auto; }
    .aud-item__player { grid-column: 1 / -1; grid-row: 2; }
    .aud-voices { grid-template-columns: minmax(0, 1fr); }
    .aud-chart { height: 120px; }
}

/* Other credits explained, one clear block per person (owner, 22 Nov 2026). */
.ned-credits { gap: 12px; }
.ned-credits__about { margin: 0; font-size: 13px; line-height: 1.55; color: var(--color-text-2); }
.ned-credits .ned-credit { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-2); }
.ned-credits .ned-credit[hidden] { display: none; }
.ned-credit__field { display: grid; gap: 4px; }
.ned-credit__label { font-size: 12px; font-weight: 600; color: var(--color-text-2); }
.ned-credits__more { justify-self: start; }
.ned-credits__more[hidden] { display: none; }

/* Legal hold, folded in the left column (owner, 22 Nov 2026). */
.ned-legal .ned-fold__body { gap: 14px; }
.ned-legal__about { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: 13.5px; line-height: 1.55; color: var(--color-text-2); }
.ned-legal .ned-card__title .badge { margin-left: 6px; vertical-align: middle; }

/* News list: the row's "…" filled when opened, and the story popup (owner, 22 Nov 2026). */
.story-tools .dropdown-menu { min-width: 220px; }
.story-tools__note { display: block; padding: 8px 12px; font-size: var(--text-sm); color: var(--color-muted); }
.story-tools .dropdown-menu a.is-action { color: var(--color-brand); font-weight: 600; border-top: 1px solid var(--color-border); }
dialog.modal.story-panel { width: 80vw; max-width: 80vw; height: 85vh; max-height: 85vh; padding: 0; overflow: hidden; }
dialog.modal.story-panel[open] { display: flex; flex-direction: column; }
.story-panel__head, .story-panel__tabs, .story-panel__crumb { flex: none; }
.story-panel__body { flex: 1 1 auto; min-height: 0; }
.story-panel__head { display: flex; align-items: flex-start; gap: var(--space-3); padding: 18px 22px 10px; }
.story-panel__heading { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.story-panel__heading h2 { margin: 0; font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.story-panel__status { font-size: 12px; font-weight: 600; color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.story-panel__open { flex: none; }
.story-panel__tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 22px 12px; border-bottom: 1px solid var(--color-border); }
.story-panel__tab { flex: none; height: 34px; padding: 0 14px; border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); color: var(--color-text-2); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.story-panel__tab:hover { border-color: var(--color-border-strong); color: var(--color-text); }
.story-panel__tab[aria-selected="true"] { background: var(--color-brand); border-color: var(--color-brand); color: var(--goji-on-brand, #fff); }
.story-panel__tab.is-action { border-style: dashed; color: var(--color-brand); }
.story-panel__tab.is-action[aria-selected="true"] { border-style: solid; color: var(--goji-on-brand, #fff); }
.story-panel__tab:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.story-panel__crumb { display: flex; align-items: center; gap: 10px; padding: 8px 22px; border-bottom: 1px solid var(--color-border); font-size: 14px; font-weight: 600; color: var(--color-text-2); }
.story-panel__crumb[hidden] { display: none; }
.story-panel__body { overflow-y: auto; padding: 18px 22px 24px; display: grid; gap: var(--space-4); align-content: start; background: var(--color-bg, var(--color-surface-2)); outline: none; }
.story-panel__body > [data-panel-content] { display: grid; gap: var(--space-4); min-width: 0; }
.story-panel__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.story-panel.is-loading .story-panel__body > :not(.story-panel__loading) { opacity: .55; transition: opacity .15s ease; }
.story-panel__loading { margin: 40px auto; color: var(--color-muted); font-size: 14px; }
.story-panel__failed { display: grid; gap: 12px; justify-items: start; padding: 24px; border-radius: 12px; background: var(--color-surface); }
.story-panel__failed p { margin: 0; }
@media (max-width: 640px) {
    dialog.modal.story-panel { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
    .story-panel__head, .story-panel__tabs, .story-panel__crumb, .story-panel__body { padding-left: 14px; padding-right: 14px; }
    .story-panel__open { display: none; }
    .story-panel__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}

/* News list: View / Preview under the status, on hover or focus of the row (owner, 22 Nov 2026). */
.story-state { position: relative; display: flex; align-items: center; }
.story-state .story-view, .story-state form { position: absolute; left: 50%; top: calc(100% + 3px); transform: translateX(-50%); white-space: nowrap; }
.story-state form .story-view { position: static; transform: none; }
.story-view { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--color-link, var(--color-brand)); font: inherit; font-size: 12.5px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; visibility: hidden; }
.story-row:hover .story-view, .story-row:focus-within .story-view, .story-view:focus-visible { visibility: visible; }
.story-view:hover { color: var(--color-brand); }
@media (hover: none) { .story-view { visibility: visible; } }

/* News list: Edit at the end of the headline on hover; the right-hand controls on one even line (owner, 22 Nov 2026). */
.story-list .story-headline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.story-list .story-headline .story-title { flex: 0 1 auto; min-width: 0; }
.story-list .story-edit { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 24px; min-height: 24px; padding: 0 9px 0 7px; border-radius: 7px; font-size: 11.5px; font-weight: 700; visibility: hidden; }
.story-list .story-edit svg { width: 13px; height: 13px; }
.story-row:hover .story-edit, .story-row:focus-within .story-edit { visibility: visible; }
@media (hover: none) { .story-list .story-edit { visibility: visible; } }
.story-list .story-actions { align-items: center; }

/* Review & notes, clean and clear (owner, 22 Nov 2026): people, Assign and Notes as three parts with one rhythm. */
.ned-review[open] > .ned-fold__summary [data-ned-review-line] { display: none; }
.ned-review .ned-fold__body { gap: 0; }
.ned-review .ned-review__state { margin-bottom: 12px; }
.ned-review__people { margin: 0; display: grid; gap: 6px; padding-bottom: 14px; font-size: 14px; }
.ned-review__people > div { display: flex; justify-content: space-between; gap: 12px; }
.ned-review__people dt { color: var(--color-muted); }
.ned-review__people dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ned-review__section { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--color-border); }
.ned-review__section:last-child { padding-bottom: 0; }
.ned-review__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-text-2); }
.ned-review__hint { font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--color-muted); }
.ned-review__assign select, .ned-review__row .btn { height: 40px; min-height: 40px; }
.ned-review__row { grid-template-columns: minmax(0, 1fr) auto; }
.ned-review__row .btn { padding: 0 16px; border-radius: 10px; }
.ned-review .ned-review__changes { margin-top: 0; }
.ned-review .ned-thread { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.ned-review .ned-thread__empty { font-size: 13px; color: var(--color-muted); }
.ned-review .ned-compose { display: grid; gap: 8px; }
.ned-review .ned-compose textarea { min-height: 76px; resize: vertical; }
.ned-review .ned-compose__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* Story box foot: "N words · N min read · N revisions · Saved …" on one line, one size (owner, 22 Nov 2026). */
.editor-foot__meta { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; }
.editor-foot__extra::before { content: "·"; margin-right: 6px; }
.editor-foot__extra a { font-weight: var(--weight-semibold); }

/* Long tick lists load by AJAX (owner, 22 Nov 2026): the line at the end of the list, and the search results. */
.ned-ticks__found { display: grid; gap: 1px; }
.ned-ticks__found[hidden] { display: none; }
.ned-ticks__more { margin: 0; padding: 8px; text-align: center; font-size: 12px; color: var(--color-muted); }
.ned-ticks__more[hidden] { display: none; }

/* Editor polish (owner, 22 Nov 2026): Address close under the headline; "Other credits" explained behind an info icon;
   the Publish card's Status choice. */
.ned-layout .ned-address { margin-top: -4px; }
.ned-title-tip { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.goji-tip--info { width: 20px; height: 20px; border: 0; background: transparent; color: var(--color-muted); cursor: pointer; }
.goji-tip--info svg { width: 18px; height: 18px; }
.ned-title-tip .goji-tip__box { left: 0; right: auto; width: min(280px, 72vw); text-transform: none; letter-spacing: 0; }
[data-ned-other-credits][open] > .ned-fold__summary .ned-fold__line { display: none; }
.ned-status-move select { width: 100%; }

/* Platform → Billing (billing Phase 2, 22 Nov 2026): products, price versions, module pricing, configuration. */
.billing-safety { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-4); padding: 10px 14px; border: 1px solid var(--tone-brand-border); border-radius: var(--radius-md); background: var(--tone-brand-soft); color: var(--color-text-2); font-size: var(--text-sm); }
.billing-safety svg { width: 16px; height: 16px; flex: none; color: var(--tone-brand); }
.billing-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.billing-facts li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 8px 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
.billing-facts li:last-child { border-bottom: 0; }
.billing-facts li > span:first-child { color: var(--color-muted); }
.billing-facts b { text-align: right; overflow-wrap: anywhere; }
/* Billing Phase 6: website credit on the client billing page and top-up rows. */
.client-wallet { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px dashed var(--color-border); display: grid; gap: var(--space-2); }
.billing-topup { align-items: flex-end; gap: var(--space-2); flex-wrap: wrap; }
.billing-topup .field { flex: 1 1 180px; margin: 0; }
.billing-price-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.billing-price-chips li { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface-2); font-size: var(--text-sm); white-space: nowrap; }
.billing-price-chips li > span:first-child { color: var(--color-muted); }
.billing-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.billing-head__main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--text-sm); min-width: 0; }
.billing-price-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: var(--space-3); }
.billing-price-card { display: grid; gap: 6px; align-content: start; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.billing-price-card.is-empty { border-style: dashed; background: var(--color-surface-2); }
.billing-price-card h3 { margin: 0; font-size: var(--text-sm); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--color-text-2); }
.billing-price-card__final { margin: 0; font-size: 22px; font-weight: 700; line-height: 1.25; color: var(--color-text); }
.billing-price-card__final span { margin-left: 4px; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.billing-price-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-3); font-size: var(--text-sm); }
.billing-price-card dt { color: var(--color-muted); }
.billing-price-card dd { margin: 0; text-align: right; }
.billing-price-card p { margin: 0; }
.billing-price-form { display: grid; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.billing-price-form h3 { margin: 0; font-size: var(--text-md); }
.billing-price-form .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.billing-versions { margin-top: var(--space-4); }
.billing-versions > summary { cursor: pointer; font-weight: 600; font-size: var(--text-sm); padding: 6px 0; }
.billing-module-grid { margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--space-2); }
/* Billing → one product (24 Nov 2026): setup progress in the head, the live price calculator, "How clients see it". */
.billing-head { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: var(--space-3); }
/* Both columns use their whole width (the page-wide .stack cap of 640 px does not apply here). */
.billing-product > .stack { max-width: none; }
.billing-head__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.billing-progress { display: grid; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.billing-progress__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.billing-progress__bar { width: 100%; height: 8px; }
.billing-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); font-size: 13px; }
.billing-steps li { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-2); }
.billing-steps__dot { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--color-border-strong); font-size: 11px; font-weight: 700; }
.billing-steps li.is-done { color: var(--color-text); }
.billing-steps li.is-done .billing-steps__dot { border-color: var(--tone-success); background: var(--tone-success); color: var(--color-surface); }
.billing-product__side { position: sticky; top: var(--space-4); }
.billing-preview { display: grid; gap: var(--space-2); position: relative; border: 2px solid var(--tone-brand-border); background: linear-gradient(160deg, var(--tone-brand-soft), var(--color-surface) 60%); }
.billing-preview__kicker { margin: 0; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .08em; font-weight: var(--weight-semibold); color: var(--tone-brand); }
.billing-preview__name { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.billing-preview__desc { margin: 0; }
.billing-preview__prices { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.billing-preview__prices li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.billing-preview__amount { font-size: 1.15rem; font-weight: 700; }
.billing-preview__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; color: var(--color-text-2); }
.billing-preview__sale { position: absolute; top: var(--space-3); right: var(--space-3); padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: var(--weight-semibold); background: var(--tone-muted-soft); color: var(--tone-muted); }
.billing-preview__sale.is-on { background: var(--tone-success-soft); color: var(--tone-success); }
.bp-intervals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.bp-intervals legend { padding: 0; margin-bottom: var(--space-2); font-weight: var(--weight-semibold); font-size: 14px; }
.bp-interval { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; }
.bp-interval > span { display: grid; }
.bp-interval:has(input:checked), .bp-interval.is-on { border-color: var(--tone-brand); background: var(--tone-brand-soft); }
.bp-quick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.bp-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-4); align-items: center; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--color-surface-2); border: 1px dashed var(--color-border-strong); }
.bp-calc__main { display: grid; gap: 2px; }
.bp-calc__final { font-size: 1.6rem; line-height: 1.2; color: var(--tone-brand); }
.bp-calc__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-4); margin: 0; }
.bp-calc__facts dt { font-size: 12px; color: var(--color-muted); }
.bp-calc__facts dd { margin: 0; font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.bp-calc__warn { grid-column: 1 / -1; margin: 0; color: var(--tone-danger); }
.bp-modules-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-2); }
@media (max-width: 1023.98px) { .billing-product__side { position: static; } }
@media (max-width: 640px) { .bp-intervals { grid-template-columns: minmax(0, 1fr); } .bp-calc { grid-template-columns: minmax(0, 1fr); } }
.billing-module-pick { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; }
.billing-module-pick:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); }
.billing-module-pick input { margin-top: 3px; accent-color: var(--color-brand); }
.billing-mode-form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.billing-mode-form select { min-width: 170px; }
.billing-warn { color: var(--tone-warning); font-weight: 600; }
.billing-legend { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: var(--text-sm); }
.billing-locked { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text-2); font-size: var(--text-sm); }
.billing-locked svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--color-muted); }
.billing-dl { margin: 0 0 var(--space-3); display: grid; grid-template-columns: auto 1fr; gap: 6px var(--space-3); font-size: var(--text-sm); }
.billing-dl dt { color: var(--color-muted); }
.billing-dl dd { margin: 0; }

/* Billing list filters: the search grows, the choices keep their own width; stacked on phones. */
.billing-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.billing-filters input[type="search"] { flex: 1 1 240px; width: auto; min-width: 0; }
.billing-filters select { flex: 0 1 190px; width: auto; min-width: 0; }
@media (max-width: 640px) {
    .billing-filters select { flex: 1 1 100%; }
}
.billing-mode-form { flex-wrap: nowrap; }
.billing-mode-form select { flex: 1 1 160px; width: auto; min-width: 0; }

/* Website subscriptions + "Change subscription" drawer with its preview (billing Phase 2.1). */
.billing-subs__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-4) 0 var(--space-2); }
.billing-subs__head h3 { margin: 0; font-size: var(--text-md); }
.billing-subs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.billing-subs__list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.billing-subs__main { display: grid; gap: 2px; min-width: 0; }
.billing-subs__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sub-change { gap: var(--space-4); }
.sub-change__periods { border: 0; margin: 0; padding: 0; min-width: 0; }
.sub-change__segment { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-change__segment label { position: relative; }
.sub-change__segment input { position: absolute; opacity: 0; pointer-events: none; }
.sub-change__segment span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-full); font-size: var(--text-sm); font-weight: 600; color: var(--color-text-2); cursor: pointer; background: var(--color-surface); }
.sub-change__segment input:checked + span { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand-text); }
.sub-change__segment input:focus-visible + span { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.sub-change input[type="date"] { min-height: 40px; }
.sub-change [hidden] { display: none !important; }
.sub-preview { display: grid; gap: var(--space-3); padding: var(--space-3); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-2); min-width: 0; }
.sub-preview__inner { display: grid; gap: var(--space-3); min-width: 0; }
.sub-preview__flag { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em; color: var(--tone-warning); }
.sub-preview__flag svg { width: 15px; height: 15px; flex: none; }
.sub-preview__compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-3); }
.sub-preview__compare section, .sub-preview__money, .sub-preview__access { padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface); border: 1px solid var(--color-border); min-width: 0; }
.sub-preview__compare section.is-proposed { border-color: var(--color-brand); }
.sub-preview h4 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; font-size: var(--text-sm); }
.sub-preview dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px var(--space-3); font-size: var(--text-sm); }
.sub-preview dt { color: var(--color-muted); }
.sub-preview dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.sub-preview__access ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; font-size: var(--text-sm); }
.sub-preview__access li { display: flex; justify-content: space-between; gap: var(--space-3); }
.sub-preview__access li > span { color: var(--color-muted); }
.sub-preview__access li > b { text-align: right; overflow-wrap: anywhere; }

/* Billing Phase 3: invoice document, actions, client billing page. */
.inv-doc { display: grid; gap: var(--space-4); min-width: 0; }
.inv-doc__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); align-items: flex-start; }
.inv-doc__kind { margin: 0; font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--color-muted); }
.inv-doc__number { margin: 2px 0 6px; font-size: 22px; }
.inv-doc__dates, .inv-doc__totals { margin: 0; display: grid; grid-template-columns: auto auto; gap: 4px var(--space-4); font-size: var(--text-sm); }
.inv-doc__dates dt, .inv-doc__totals dt { color: var(--color-muted); }
.inv-doc__dates dd, .inv-doc__totals dd { margin: 0; text-align: right; }
.inv-doc__totals { justify-self: end; min-width: min(100%, 280px); }
.inv-doc__totals .is-total { padding-top: 6px; border-top: 1px solid var(--color-border); font-weight: 700; color: var(--color-text); font-size: var(--text-md); }
.inv-doc__parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-3); font-size: var(--text-sm); }
.inv-doc__label { margin: 0 0 4px; font-size: var(--text-xs); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--color-muted); }
.inv-doc__section { display: grid; gap: 4px; }
.inv-doc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--text-sm); }
.inv-doc__list li { display: flex; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--color-border); }
.billing-pay-form { padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.billing-pay-form h3 { margin: 0; font-size: var(--text-md); }
.billing-more { margin-top: var(--space-3); }
.billing-more > summary { cursor: pointer; font-weight: 600; font-size: var(--text-sm); padding: 6px 0; }
.billing-more form { margin-top: var(--space-2); }
.pre-line { white-space: pre-line; }
.client-site { display: grid; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.client-site:last-child { border-bottom: 0; }
.client-site h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--text-md); }
.billing-test-form { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.billing-test-form input[name="amount"] { width: 110px; }

/* Goji Assistant (shared.ai_support, 23 Nov 2026): floating button + panel, bottom right of the admin shell. */
.assistant { position: fixed; right: 20px; bottom: 20px; z-index: var(--z-dropdown); }
.assistant-fab { width: 52px; height: 52px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
    background: var(--color-brand); color: #fff; box-shadow: var(--shadow-lg); }
.assistant-fab:hover { background: var(--color-brand-hover); }
.assistant-fab:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 3px; }
.assistant-fab svg { width: 24px; height: 24px; }
.assistant-panel { position: absolute; right: 0; bottom: 64px; width: min(380px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 110px));
    display: flex; flex-direction: column; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.assistant-panel[hidden] { display: none; }
.assistant-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--color-border); }
.assistant-head h2 { font-size: 1rem; margin: 0; }
.assistant-close { background: none; border: 0; cursor: pointer; color: inherit; padding: 4px; }
.assistant-tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid var(--color-border); }
.assistant-tabs button, .assistant-tab-link { background: none; border: 0; padding: 8px 10px; cursor: pointer; color: inherit; font: inherit;
    border-bottom: 2px solid transparent; text-decoration: none; }
.assistant-tabs button[aria-selected="true"] { border-bottom-color: var(--color-brand); font-weight: 600; }
.assistant-body { padding: 12px 14px; overflow-y: auto; display: grid; gap: 10px; }
.assistant-body[hidden] { display: none; }
.assistant-search input { width: 100%; }
.assistant-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.assistant-list li { padding-bottom: 8px; border-bottom: 1px solid var(--color-border); }
.assistant-article h3, .assistant-thread h3 { font-size: 1rem; margin: 4px 0; }
.assistant-article-body { overflow-wrap: anywhere; }
.assistant-back { background: none; border: 0; padding: 0; color: var(--color-brand); cursor: pointer; font: inherit; }
.assistant-messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.assistant-msg { padding: 8px 10px; border-radius: var(--radius-lg); border: 1px solid var(--color-border); }
.assistant-msg.is-staff { border-left: 3px solid var(--color-brand); }
.assistant-msg.is-internal { border-left: 3px solid var(--tone-warning); background: var(--tone-warning-soft); }
.assistant-msg p { margin: 4px 0 0; overflow-wrap: anywhere; }
.assistant-new summary { cursor: pointer; font-weight: 600; }
@media (max-width: 560px) { .assistant { right: 12px; bottom: 12px; } }
/* news.summary: Website settings → AI summary, the 5-design picker (previews use the public box). */
/* Platform → AI summary as steps (29 Nov 2026): a checklist with the switch, numbered cards, only the chosen AI's fields. */
.ais-setup { display: grid; gap: var(--space-4); max-width: 920px; }
.ais-setup__status { display: grid; gap: var(--space-3); }
.ais-setup__state { display: flex; align-items: center; gap: var(--space-3); }
.ais-setup__state > div { display: grid; gap: 2px; }
.ais-setup__big { font-size: 18px; }
.ais-setup__dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--color-border-strong); box-shadow: 0 0 0 4px var(--color-surface-2); }
.ais-setup__dot.is-on { background: var(--tone-success); }
.ais-setup__checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.ais-setup__checks li { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.ais-setup__checks li > span:last-child { display: grid; min-width: 0; }
.ais-setup__tick { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-surface-2); color: var(--color-muted); font-weight: var(--weight-semibold); font-size: 13px; }
.ais-setup__checks li.is-done .ais-setup__tick { background: var(--tone-success); color: var(--color-surface); }
.ais-setup__foot { border-top: 1px solid var(--color-border); padding-top: var(--space-2); }
.ais-setup__title { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: 16px; font-weight: var(--weight-semibold); }
.ais-setup__num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--color-brand); color: var(--color-surface); font-size: 13px; }
.ais-setup__models { display: grid; gap: var(--space-1); padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); }
.ais-setup__models ul { margin: 0; padding-left: var(--space-4); }
.ais-setup__why { display: block; max-width: 280px; margin-left: auto; text-align: right; white-space: normal; }
.ais-setup__keyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-2); }
@media (max-width: 560px) { .ais-setup__keyrow { grid-template-columns: minmax(0, 1fr); } }
.ais-setup:has(input[name="provider"][value="gemini"]:checked) [data-only="claude"],
.ais-setup:has(input[name="provider"][value="claude"]:checked) [data-only="gemini"] { display: none; }
/* AI summary → design gallery (29 Nov 2026): full width, equal tiles (name, hint, a scaled preview), the choice as a ring. */
.ais-admin > .card { max-width: none; }
.ais-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
@media (min-width: 720px) { .ais-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ais-pick { position: relative; margin: 0; cursor: pointer; min-width: 0; }
.ais-pick > input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ais-pick__box { display: grid; grid-template-rows: auto 1fr; gap: var(--space-2); height: 100%; padding: var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface); }
.ais-pick > input:checked + .ais-pick__box { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--color-brand); }
.ais-pick > input:focus-visible + .ais-pick__box { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.ais-pick__head { display: grid; gap: 2px; }
.ais-pick__preview { display: block; height: 200px; overflow: hidden; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); pointer-events: none; }
.ais-pick__preview .ais { margin: 0; zoom: .72; }
/* Account pages inside the dashboard (23 Nov 2026): My profile, Change password, Two-factor. */
.account-page { display: grid; gap: var(--space-4); max-width: 1100px; }
.avatar.xl { width: 72px; height: 72px; font-size: 30px; border-radius: var(--radius-lg, 16px); background: var(--color-primary); color: #fff; }
.account-hero { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.account-hero__who { flex: 1 1 260px; min-width: 0; display: grid; gap: 4px; }
.account-hero__who h2 { font-size: var(--text-xl, 1.35rem); overflow-wrap: anywhere; }
.account-hero__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.account-hero__facts { display: flex; flex-wrap: wrap; gap: var(--space-4); margin: 0; }
.account-hero__facts dt { font-size: var(--text-sm); color: var(--color-text-2); }
.account-hero__facts dd { margin: 0; font-weight: var(--weight-semibold); }
/* Account → Appearance (25 Nov 2026): a picture of the admin per theme; the chosen one is outlined and ticked. */
.account-themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
.account-theme { position: relative; display: grid; gap: 6px; align-content: start; padding: var(--space-2) var(--space-2) var(--space-3); border: 2px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.account-theme:hover { border-color: var(--color-border-strong); }
.account-theme:has(input:checked) { border-color: var(--color-brand); box-shadow: 0 0 0 3px var(--color-brand-soft); }
.account-theme input { position: absolute; opacity: 0; pointer-events: none; }
.account-theme:has(input:focus-visible) { outline: 2px solid var(--color-brand); outline-offset: 3px; }
.account-theme__name { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; font-weight: var(--weight-semibold); font-size: var(--text-sm); color: var(--color-text); }
.account-theme__name svg { width: 16px; height: 16px; color: var(--color-brand-text); }
.account-theme__hint { padding: 0 4px; font-size: var(--text-xs); color: var(--color-muted); line-height: 1.35; }
.account-theme__status { min-height: 1.2em; color: var(--tone-success); font-weight: var(--weight-semibold); }
.account-theme-form { max-width: none; }
.account-theme__status.is-failed { color: var(--tone-danger); }
.theme-preview { position: relative; display: grid; grid-template-columns: 26% 1fr; height: 84px; overflow: hidden; border-radius: var(--radius-md); border: 1px solid var(--goji-border); }
.theme-preview__side { display: grid; align-content: start; gap: 5px; padding: 8px 6px; background: var(--preview-light-side); }
.theme-preview__side i { display: block; height: 4px; border-radius: 2px; background: var(--goji-navy-label); opacity: .7; }
.theme-preview__side i:first-child { background: var(--goji-navy-active); opacity: 1; }
.theme-preview__main { display: grid; grid-template-rows: 14px 1fr; gap: 6px; padding: 0 0 8px; background: var(--goji-bg); }
.theme-preview__bar { background: var(--goji-primary-on-white); }
.theme-preview__card { display: grid; align-content: start; gap: 5px; margin: 0 8px; padding: 7px; border-radius: 4px; background: var(--goji-surface); border: 1px solid var(--goji-border); }
.theme-preview__card i { display: block; height: 4px; border-radius: 2px; background: var(--goji-border-strong); }
.theme-preview__card i:nth-child(2) { width: 70%; }
.theme-preview__card i:nth-child(3) { width: 45%; }
.theme-preview--dark .theme-preview__side { background: var(--preview-dark-side); }
.theme-preview--dark .theme-preview__main { background: var(--preview-dark-bg); }
.theme-preview--dark .theme-preview__bar { background: var(--preview-dark-surface); }
.theme-preview--dark .theme-preview__card { background: var(--preview-dark-surface); border-color: var(--preview-dark-line); }
.theme-preview--dark .theme-preview__card i { background: var(--preview-dark-line); }
.theme-preview--dark { border-color: var(--preview-dark-line); }
/* Same as device: light on the left, dark on the right, split on a slant. */
.theme-preview--system::after { content: ""; position: absolute; inset: 0; clip-path: polygon(62% 0, 100% 0, 100% 100%, 38% 100%);
    background: linear-gradient(var(--preview-dark-surface) 0 14px, var(--preview-dark-bg) 14px); }
.theme-preview__tick { position: absolute; top: 6px; right: 6px; z-index: 1; display: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--color-brand); color: var(--color-brand-ink); box-shadow: 0 0 0 2px var(--goji-surface); }
.theme-preview__tick svg { width: 13px; height: 13px; }
.account-theme:has(input:checked) .theme-preview__tick { display: grid; }
@media (max-width: 639.98px) {
    .account-themes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
    .account-theme { padding: 6px 6px var(--space-2); }
    .account-theme__hint { display: none; }
    .account-theme__name { justify-content: center; padding: 0; font-size: var(--text-xs); text-align: center; }
    .account-theme__name svg { display: none; }
    .theme-preview { height: 58px; }
    .theme-preview__tick { width: 18px; height: 18px; top: 4px; right: 4px; }
}
.account-rows { list-style: none; margin: 0; padding: 0; display: grid; }
.account-rows li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border); }
.account-rows li:last-child { border-bottom: 0; }
.account-rows--compact li { padding: var(--space-2) 0; }
.account-rows__icon { width: 36px; height: 36px; flex: none; display: inline-grid; place-items: center; border-radius: var(--radius-md); background: var(--color-surface-3); color: var(--color-text-2); }
.account-rows__icon svg { width: 18px; height: 18px; }
.account-rows__main { flex: 1 1 auto; min-width: 0; display: grid; }
.account-rows__main small { color: var(--color-text-2); font-size: var(--text-sm); overflow-wrap: anywhere; }
.account-focus { max-width: 560px; }
.account-pw-rules { margin: 0; padding-left: 1.2em; font-size: var(--text-sm); color: var(--color-text-2); }
@media (max-width: 560px) { .account-rows li { flex-wrap: wrap; } .account-rows li > .btn { width: 100%; justify-content: center; } }

/* Website settings → Logo and favicon (owner, 24 Nov 2026): each picture shown whole (contain, never cropped) in a
   clean tile; the help text sits behind the "?" after the label (<x-goji::field tip>). */
.field-label-row { position: relative; display: flex; align-items: center; gap: 6px; }
.field-label-row .field-label { margin-bottom: 0; }
.field-label-row .goji-tip__box { right: auto; width: max-content; max-width: min(320px, 80vw); }
.ws-tile { display: grid; gap: var(--space-2); align-content: start; }
.ws-tile .media-field { display: grid; gap: var(--space-2); }
.ws-tile .media-field-preview { display: grid; gap: 6px; flex: none; }
.ws-tile .media-field-preview img, .ws-tile .media-field-preview .media-doc { width: 100%; height: 132px; object-fit: contain; padding: var(--space-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); box-sizing: border-box; }
.ws-tile[data-field="logo_inverse_media_id"] .media-field-preview img { background: var(--goji-ink-strong); border-color: var(--goji-ink-strong); }
.ws-tile .media-field-empty { display: grid; place-items: center; height: 132px; border: 1.5px dashed var(--color-border-strong); border-radius: var(--radius-md); color: var(--color-muted); font-size: var(--text-sm); }
.ws-tile .media-field-name { font-size: 12.5px; color: var(--color-muted); min-width: 0; }
.ws-tile .media-field-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* Website settings → Social media editor (owner, 24 Nov 2026; social-links.js). Colours of badges and preview
   buttons are set by the script (CSSOM), never inline HTML. */
.soc-editor { display: grid; gap: var(--space-4); }
.soc-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: var(--space-5); align-items: start; }
.soc-main { display: grid; gap: var(--space-5); min-width: 0; }
.soc-block { display: grid; gap: var(--space-3); }
.soc-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); }
.soc-block__title { margin: 0; font-size: var(--text-md, 1rem); font-weight: 700; }
.soc-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.soc-row { display: grid; grid-template-columns: auto auto minmax(120px, 170px) minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.soc-row.is-dragging { opacity: .55; border-style: dashed; border-color: var(--color-brand); }
.soc-handle { display: grid; place-items: center; width: 28px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-muted); cursor: grab; }
.soc-handle:active { cursor: grabbing; }
.soc-handle:hover, .soc-handle:focus-visible { background: var(--color-surface-2); color: var(--color-text); }
.soc-badge { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--color-surface-2); color: var(--color-text); flex: none; }
.soc-badge svg { width: 18px; height: 18px; }
.soc-platform, .soc-url { width: 100%; min-width: 0; }
.soc-moves { display: inline-flex; gap: 2px; }
.soc-icon-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--color-muted); cursor: pointer; }
.soc-icon-btn:hover:not(:disabled), .soc-icon-btn:focus-visible { border-color: var(--color-border); background: var(--color-surface-2); color: var(--color-text); }
.soc-icon-btn:disabled { opacity: .35; cursor: default; }
.soc-remove:hover:not(:disabled) { color: var(--color-danger-solid); }
.soc-icon-btn svg { width: 16px; height: 16px; }
.soc-add { justify-self: start; }
.soc-choice { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; min-width: 0; }
.soc-choice legend { padding: 0; margin-bottom: 4px; font-size: var(--text-sm); font-weight: 600; }
.soc-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.soc-seg__opt { position: relative; }
.soc-seg__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.soc-seg__opt span { display: inline-block; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); font-size: var(--text-sm); }
.soc-seg__opt input:checked + span { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: 600; }
.soc-seg__opt input:focus-visible + span { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.soc-colors { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: 4px; }
.soc-color { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-sm); }
.soc-color input[type=color] { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); cursor: pointer; }
.soc-names { margin-top: 2px; }
.soc-preview-card { position: sticky; top: calc(var(--topbar-height, 64px) + 16px); display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.soc-preview { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; border-radius: var(--radius-md); min-height: 66px; align-items: center; }
.soc-preview--light { background: var(--color-surface); border: 1px solid var(--color-border); }
.soc-preview--dark { background: var(--goji-ink-strong); }
.soc-preview__btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 2px; font-size: 13px; font-weight: 600; }
.soc-preview__btn.has-name { padding: 0 12px 0 10px; }
.soc-preview__empty { font-size: var(--text-sm); color: var(--color-muted); }
.soc-preview--dark .soc-preview__empty { color: rgba(255, 255, 255, .7); }
@media (max-width: 900px) {
    .soc-layout { grid-template-columns: minmax(0, 1fr); }
    .soc-preview-card { position: static; }
}
@media (max-width: 640px) {
    .soc-row { grid-template-columns: auto auto minmax(0, 1fr) auto; }
    .soc-url { grid-column: 1 / -1; }
}

/* ---- Platform → client → Members → Edit dialog (owner, 25 Nov 2026) ------------------------------------------- */
.member-edit__form { max-width: none; gap: var(--space-4); }
.member-edit__section { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.member-edit__section h3 { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-base); }
.member-edit__section h3 svg { width: 16px; height: 16px; color: var(--color-brand-text); }
.member-edit__section .field { margin: 0; }
.member-edit__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); align-items: start; }
.member-edit__choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.member-edit__confirm { background: var(--tone-warning-soft); border-color: var(--tone-warning-border); }
@media (max-width: 639.98px) { .member-edit__grid, .member-edit__choices { grid-template-columns: minmax(0, 1fr); } }

/* ---- Website space meter, foot of the sidebar (owner, 25 Nov 2026: partials/space-meter) ------------------------ */
.side-space { display: grid; gap: 6px; padding: var(--space-3) var(--space-4) var(--space-4); background: var(--goji-navy-deep); }
.side-space__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.side-space__label { display: inline-flex; align-items: center; gap: 6px; color: var(--goji-navy-text); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.side-space__label svg { width: 15px; height: 15px; color: var(--goji-navy-label); }
.side-space.is-none .side-space__label { min-width: 0; font-size: var(--text-xs); white-space: nowrap; }
.side-space.is-none .side-space__label svg { width: 13px; height: 13px; }
.side-space__size { margin-left: 4px; color: var(--goji-navy-text-2); font-weight: var(--weight-semibold); }
.side-space__size::before { content: "· "; color: var(--goji-navy-label); font-weight: var(--weight-regular); }
.side-space__help { display: inline-grid; place-items: center; color: var(--goji-navy-label); cursor: help; }
.side-space__help svg { width: 14px; height: 14px; }
.side-space__help[data-goji-tooltip]:hover::after, .side-space__help[data-goji-tooltip]:focus-visible::after { display: block; left: auto; right: 0; bottom: calc(100% + 8px); transform: none; width: 220px; white-space: normal; }
.side-space__bar { width: 100%; height: 6px; border: 0; border-radius: var(--radius-full); overflow: hidden; background: var(--goji-navy-border); appearance: none; }
.side-space__bar::-webkit-progress-bar { background: var(--goji-navy-border); border-radius: var(--radius-full); }
.side-space__bar::-webkit-progress-value { background: var(--goji-navy-indicator); border-radius: var(--radius-full); }
.side-space__bar::-moz-progress-bar { background: var(--goji-navy-indicator); border-radius: var(--radius-full); }
.side-space__bar.is-open::-webkit-progress-value { background: var(--goji-navy-active); }
.side-space__bar.is-open::-moz-progress-bar { background: var(--goji-navy-active); }
.side-space.is-near .side-space__bar::-webkit-progress-value { background: var(--tone-warning-mark); }
.side-space.is-near .side-space__bar::-moz-progress-bar { background: var(--tone-warning-mark); }
.side-space.is-full .side-space__bar::-webkit-progress-value { background: var(--tone-danger); }
.side-space.is-full .side-space__bar::-moz-progress-bar { background: var(--tone-danger); }
.side-space__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 0; color: var(--goji-navy-label); font-size: var(--text-xs); }
.side-space__text b { color: var(--goji-navy-text); font-weight: var(--weight-semibold); }
.side-space__pct { margin-left: auto; color: var(--goji-navy-text-2); font-weight: var(--weight-semibold); }
.side-space__warn { margin: 0; color: var(--tone-warning-mark); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.side-space.is-full .side-space__warn { color: var(--tone-danger-soft); }
.usage-detail { display: block; margin-top: 2px; color: var(--color-muted); font-size: var(--text-xs); }

/* ---- Client page → Members: devices per account (owner, 25 Nov 2026) ------------------------------------------- */
.devices-policy { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 var(--space-4) var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.devices-policy svg { width: 16px; height: 16px; color: var(--color-muted); }
.devices-policy.is-single { border-color: var(--tone-success-border); background: var(--tone-success-soft); }
.devices-policy.is-single svg { color: var(--tone-success); }
.devices-policy .btn { margin-left: auto; }

/* ==== Mobile pass (owner, 25 Nov 2026): most clients run their website from a phone. Every client screen was rendered
   at 375px and checked for overflow, cramped rows and small tap targets; the fixes live here, last, so they win. ==== */

/* Hidden chart labels (screen readers) stay inside the chart's own scroll area instead of widening the page. */
.vchart-scroll { position: relative; }
/* The "more" (…) icon: bolder dots, they were hard to see on a phone. */
svg path[d="M5 12h.01M12 12h.01M19 12h.01"] { stroke-width: 3.4; }

/* Dialogs never keep the browser's own max-width (it left a strip of the page visible beside full-width panels). */
dialog.modal, dialog.drawer { max-width: 100vw; }

@media (max-width: 639.98px) {
    /* Pop-ups: a full-width bottom sheet, "wide" ones too. Side panels: the whole screen. */
    dialog.modal, dialog.modal.wide { width: 100vw; max-width: 100vw; }
    dialog.drawer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    dialog.modal.story-panel { max-width: 100vw; }
    .story-panel__tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .story-panel__tabs::-webkit-scrollbar { display: none; }
    .modal-close { padding: 10px; margin: -6px -6px 0 0; }
    .modal-header { padding: var(--space-4) var(--space-4) var(--space-2); }
    .modal-body { padding: var(--space-3) var(--space-4) var(--space-4); }
    .modal-footer { padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom)); }

    /* Nothing inside a card may push the page sideways; tab rows scroll inside their own width. */
    .card > *, .stack > * { min-width: 0; }
    .tabs { min-width: 0; max-width: 100%; }

    /* Menus behind "…" (and the editor's help box) open as a sheet at the bottom of the screen, never off its edge. */
    main#main details.dropdown[open] > .dropdown-menu,
    main#main details.editor-info[open] > .editor-info__box {
        position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom));
        width: auto; min-width: 0; max-width: none; max-height: 70vh; overflow-y: auto; z-index: var(--z-dropdown);
        border-radius: var(--radius-lg); box-shadow: 0 -8px 40px rgba(2, 10, 30, .28);
    }
    main#main details.dropdown[open] > .dropdown-menu a, main#main details.dropdown[open] > .dropdown-menu button { min-height: 44px; }

    /* Overview quick buttons: long labels ("Advertisements") stay inside their tile. */
    .overview-action { white-space: normal; overflow-wrap: normal; hyphens: auto; -webkit-hyphens: auto; font-size: 12.5px; min-width: 0; padding-left: 4px; padding-right: 4px; }

    /* News list: filters two by two under a full-width search. */
    .story-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .story-filters .list-search { grid-column: 1 / -1; }
    .story-filters select { width: 100%; min-width: 0; flex: none; height: 42px; font-size: 14px; }

    /* News list rows: picture + full headline (up to three lines; tapping it opens the editor), then one action row. */
    .story-list .story-row { grid-template-columns: 22px 76px minmax(0, 1fr); gap: 8px 10px; padding: 14px 12px; align-items: start; }
    .story-list .story-thumb { width: 76px; }
    .story-list .story-headline { display: block; }
    .story-list .story-title { -webkit-line-clamp: 3; font-size: 15.5px; line-height: 1.5; }
    .story-list .story-edit { display: none; }
    .story-list .story-meta { gap: 2px 10px; font-size: 12.5px; }
    /* Owner, 26 Nov 2026: on a narrow phone the last button (…) ran off the screen. Slightly smaller buttons, and when
       they still do not fit the button group moves to a second line on the right; the status and View stay on the left. */
    .story-list .story-actions { grid-column: 1 / -1; flex-wrap: wrap; gap: 8px 6px; justify-content: flex-end; }
    .story-list .story-buttons { margin-left: auto; }
    .story-list .story-actions > .story-state { margin-right: auto; gap: 8px; min-width: 0; }
    .story-list .story-actions .btn { padding: 0 10px; }
    .story-list .story-actions .status, .story-list .story-actions .badge { padding: 4px 9px; }
    /* The bar of the selected stories: across the bottom of the screen, nothing outside it (it ran off both sides). */
    .story-bulk-bar { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); transform: none; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; }
    .story-bulk-bar select { flex: 1 1 auto; min-width: 0; width: auto; }
    .story-bulk-bar .btn { flex: none; }
    .story-bulk[data-has-selection] { padding-bottom: 72px; }
    .story-state .story-view, .story-state form { position: static; transform: none; }

    /* Categories and authors: name and details on top, all the buttons on one row below. */
    .cat-row { flex-wrap: wrap; gap: 10px 8px; }
    .cat-row .cat-main { flex: 1 1 calc(100% - 64px); min-width: 0; }
    .cat-row > :not(.cat-avatar):not(.cat-main) { flex: none; }
    .cat-row > .cat-stories { margin-right: auto; }
    .cat-row .cat-visibility { min-width: 0; }

    /* Ads board: the area filter is one scrolling row of chips, not a tall rounded block. */
    .adb { grid-template-columns: minmax(0, 1fr); }
    .adb > * { min-width: 0; }
    .adb-areas { display: flex; flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
    .adb-areas::-webkit-scrollbar { display: none; }
    .adb-areas button { flex: none; white-space: nowrap; min-height: 36px; }

    /* Story editor: the toolbar is one row that scrolls sideways (it took four rows), with finger-sized buttons. */
    .editor-toolbar { display: flex; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; gap: 2px; }
    .editor-toolbar::-webkit-scrollbar { display: none; }
    .editor-toolbar .editor-group { flex: none; display: inline-flex; gap: 2px; }
    .editor-toolbar .editor-btn { width: auto; min-width: 40px; height: 40px; flex: none; }
    /* Room under the last field for the floating Update / Draft bar. */
    .ned-layout, form.ned-form { padding-bottom: 96px; }
}

/* Touch screens: finger-sized targets (about 40px) for the small buttons, chips and switches. */
@media (pointer: coarse) {
    .topbar .topbar-toggle { min-width: 40px; min-height: 40px; justify-content: center; }
    .btn.small { min-height: 36px; }
    .btn.small.icon, .btn.icon { min-width: 36px; min-height: 36px; }
    .cat-visibility { height: 36px; }
    .ned-address__copy { min-height: 32px; padding: 4px 8px; }
}

/* ---- Story editor: Featured | Share image tabs and the "More designs" dialog (owner, 25 Nov 2026) ---------------- */
.ned-pic-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.ned-pic-tabs [role="tab"] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 var(--space-2); border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--color-text-2); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-semibold); cursor: pointer; }
.ned-pic-tabs [role="tab"] svg { width: 15px; height: 15px; }
.ned-pic-tabs [role="tab"][aria-selected="true"] { background: var(--color-surface); color: var(--color-brand-text); box-shadow: var(--shadow-xs); }
.ned-pic-panel { display: grid; gap: var(--space-3); min-width: 0; }
.ned-pic-panel[hidden] { display: none; }
html:not(.js) .ned-pic-panel[hidden] { display: grid; }
.ned-feature .ned-share .field > .field-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
.ned-feature .ned-share .field .hint, .ned-feature .ned-share .field-help { display: block; }
.ned-share__stage { position: relative; display: grid; place-items: center; min-height: 120px; border-radius: var(--radius-md); background: var(--color-surface-2); overflow: hidden; }
.ned-share__stage .ned-share__preview { border-radius: var(--radius-md); }
.ned-share__wait { padding: var(--space-4); color: var(--color-muted); font-size: var(--text-sm); }
.ned-share__wait[hidden] { display: none; }
.ned-share__design { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.ned-share__design-text { font-size: var(--text-sm); min-width: 0; }
.ned-share__design .btn svg { width: 15px; height: 15px; }
/* 29 Nov 2026: "Preview again" left, "More designs" right, in one row under the headline field; the note behind a "?". */
/* Always one line, whatever the width (owner, 29 Nov 2026): the buttons never wrap; on a very narrow column the
   words shrink first, the icons and the count stay. */
.ned-share__actions { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-2); min-width: 0; }
.ned-share__actions .btn { flex: 0 1 auto; min-width: 0; white-space: nowrap; padding-inline: 10px; }
.ned-share__actions .btn svg { flex: none; width: 15px; height: 15px; }
.ned-share__actions .btn .badge { flex: none; }
.ned-share__more { margin-left: auto; }
@media (max-width: 360px) { .ned-share__actions .btn { font-size: 12px; padding-inline: 8px; gap: 4px; } }
.ned-share__label { display: inline-flex; align-items: center; gap: var(--space-1); }
.ned-share__label .field-label { margin: 0; }

dialog.modal.ned-designs { width: min(1080px, calc(100vw - 2 * var(--space-4))); height: min(860px, calc(100vh - 2 * var(--space-5))); }
.ned-designs .modal-body { display: block; }
.ned-designs__unlock { position: sticky; top: calc(var(--space-3) * -1); z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px solid var(--tone-warning-border); border-radius: var(--radius-lg); background: var(--tone-warning-soft); box-shadow: var(--shadow-sm); outline: 0; }
.ned-designs__unlock.is-nudged { animation: ned-nudge .5s var(--ease); }
@keyframes ned-nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.ned-designs__unlock-icon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--tone-warning); }
.ned-designs__unlock-icon svg { width: 20px; height: 20px; }
.ned-designs__unlock-text { display: grid; gap: 2px; flex: 1 1 240px; min-width: 0; }
.ned-designs__price { font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--color-text); }
.ned-designs__price .muted { font-size: var(--text-sm); font-weight: var(--weight-regular); }
.ned-designs__buy { margin: 0; max-width: none; }
/* The periods on sale (week / month / year): one row of choices; the chosen one is outlined in the brand colour. */
.ned-designs__periods { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-1) 0; }
.ned-designs__period { position: relative; flex: 1 1 132px; min-width: 0; margin: 0; cursor: pointer; }
.ned-designs__period.is-static { cursor: default; }
.ned-designs__period input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ned-designs__period-box { display: grid; gap: 1px; height: 100%; padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.ned-designs__period-name { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--color-muted); text-transform: uppercase; letter-spacing: .04em; }
.ned-designs__period-price { font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--color-text); white-space: nowrap; }
.ned-designs__period-price .muted { font-size: var(--text-xs); font-weight: var(--weight-regular); }
.ned-designs__period-note { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--tone-success); }
.ned-designs__period input:checked + .ned-designs__period-box { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); }
.ned-designs__period input:focus-visible + .ned-designs__period-box { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.ned-designs__chips { display: flex; gap: 6px; margin-bottom: var(--space-4); overflow-x: auto; scrollbar-width: none; }
.ned-designs__chips::-webkit-scrollbar { display: none; }
.ned-designs__chips button { flex: none; min-height: 34px; padding: 0 var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-2); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); white-space: nowrap; cursor: pointer; }
.ned-designs__chips button.is-on { border-color: var(--color-brand); background: var(--color-brand); color: var(--color-brand-ink); }
.ned-designs__group { margin-bottom: var(--space-5); }
.ned-designs__group[hidden] { display: none; }
.ned-designs__group h3 { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); font-size: var(--text-base); }
.ned-designs__group h3 .badge svg { width: 11px; height: 11px; margin-right: 3px; }
.ned-designs__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--space-3); }
.ned-design { display: grid; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ned-design:hover { border-color: var(--tone-brand-border); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.ned-design.is-selected { border-color: var(--color-brand); background: var(--color-brand-soft); }
.ned-design__art { position: relative; display: block; aspect-ratio: 600 / 315; border-radius: var(--radius-sm); background: var(--color-surface); overflow: hidden; }
.ned-design__art img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* While a tile is being drawn: a soft moving shine instead of a blank white box (29 Nov 2026); the picture covers it. */
.ned-design__art:has(img) { background: linear-gradient(100deg, var(--color-surface-2) 30%, var(--color-surface) 50%, var(--color-surface-2) 70%); background-size: 300% 100%;
  animation: ned-design-wait 1.4s ease-in-out infinite; }
@keyframes ned-design-wait { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .ned-design__art:has(img) { animation: none; } }
.ned-design__blank { position: absolute; inset: 0; display: grid; place-items: center; color: var(--color-faint); }
.ned-design__blank svg { width: 28px; height: 28px; }
.ned-design.is-blank .ned-design__art::before { content: ""; position: absolute; inset: 0; background: var(--color-surface-2); }
/* A locked design is shown CLEARLY as a stamped preview (owner, 25 Nov 2026): the lock is a small badge, not a veil.
   The picture cannot be dragged or selected; what the browser holds is the small stamped preview only. */
.ned-design__lock { position: absolute; top: 6px; left: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-full); background: var(--color-overlay); color: var(--color-brand-ink); }
.ned-design__lock svg { width: 14px; height: 14px; }
.ned-design.is-locked .ned-design__art img { pointer-events: none; user-select: none; -webkit-user-drag: none; }
/* A usable design: "view full size" and "download" on the tile's corner (beside the tile's own button, not inside it). */
.ned-design-cell { position: relative; display: grid; min-width: 0; }
.ned-design__tools { position: absolute; top: 12px; left: 12px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s var(--ease); }
.ned-design-cell:hover .ned-design__tools, .ned-design-cell:focus-within .ned-design__tools { opacity: 1; }
.ned-design__tool { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); cursor: pointer; }
.ned-design__tool:hover, .ned-design__tool:focus-visible { border-color: var(--color-brand); color: var(--color-brand-text); text-decoration: none; }
.ned-design__tool svg { width: 15px; height: 15px; }
@media (hover: none) { .ned-design__tools { opacity: 1; } }
/* The viewer: one design at full size over the dialog. */
dialog.ned-lightbox { width: min(1240px, calc(100vw - 2 * var(--space-4))); max-width: none; max-height: calc(100dvh - 2 * var(--space-4)); padding: 0; border: 0; border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-lg); overflow: hidden; }
dialog.ned-lightbox::backdrop { background: var(--color-overlay); }
.ned-lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); }
.ned-lightbox__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ned-lightbox__count { color: var(--color-muted); }
.ned-lightbox__actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.ned-lightbox__actions .btn svg { width: 15px; height: 15px; }
.ned-lightbox__stage { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); padding: var(--space-3); background: var(--color-surface-2); }
.ned-lightbox__stage img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 190px); object-fit: contain; border-radius: var(--radius-md); background: var(--color-surface); transition: opacity .15s var(--ease); }
.ned-lightbox.is-loading .ned-lightbox__stage img { opacity: .45; }
.ned-lightbox__nav { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); cursor: pointer; }
.ned-lightbox__nav:hover, .ned-lightbox__nav:focus-visible { border-color: var(--color-brand); color: var(--color-brand-text); }
.ned-lightbox__nav svg { width: 18px; height: 18px; }
@media (max-width: 639.98px) {
    dialog.ned-lightbox { width: 100vw; border-radius: 0; }
    .ned-lightbox__stage { grid-template-columns: minmax(0, 1fr); padding: var(--space-2); }
    .ned-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); }
    .ned-lightbox__nav[data-ned-lightbox-prev] { left: var(--space-3); }
    .ned-lightbox__nav[data-ned-lightbox-next] { right: var(--space-3); }
    .ned-lightbox__actions { margin-left: 0; width: 100%; }
    .ned-lightbox__actions .btn { flex: 1 1 auto; justify-content: center; }
}
.ned-design.is-locked { cursor: not-allowed; }
.ned-design.is-locked:hover { transform: none; }
.ned-design__tick { position: absolute; top: 6px; right: 6px; display: none; place-items: center; width: 24px; height: 24px; border-radius: var(--radius-full); background: var(--color-brand); color: var(--color-brand-ink); }
.ned-design__tick svg { width: 14px; height: 14px; }
.ned-design.is-selected .ned-design__tick { display: grid; }
.ned-design__name { padding: 0 2px 2px; font-size: var(--text-sm); font-weight: var(--weight-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ned-designs__foot { margin-right: auto; }
@media (max-width: 639.98px) {
    dialog.modal.ned-designs { width: 100vw; height: 94dvh; max-height: 94dvh; }
    .ned-designs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
    .ned-designs__buy, .ned-designs__buy .btn { width: 100%; }
    /* Phones: the bar scrolls with the designs (three choices are too tall to keep pinned); the choices use the full width. */
    .ned-designs__unlock { position: relative; top: auto; }
    .ned-designs__unlock-icon { position: absolute; top: var(--space-3); right: var(--space-3); width: 32px; height: 32px; }
    .ned-designs__unlock-icon svg { width: 16px; height: 16px; }
    .ned-designs__unlock-text { flex-basis: 100%; }
    .ned-designs__unlock-text > b { padding-right: 40px; }
    .ned-designs__periods { flex-direction: column; }
    .ned-designs__period { flex: none; }
    .ned-designs__period-box { grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-2); }
    .ned-designs__period-note { grid-column: 1 / -1; }
    .ned-designs__foot { display: none; }
}

/* ---- Two-factor sign-in panel (profile dialog and the two-factor page; owner, 25 Nov 2026) ----------------------- */
dialog.modal.tfp-dialog { width: min(640px, calc(100vw - 2 * var(--space-4))); }
.tfp { display: grid; gap: var(--space-4); min-width: 0; }
.tfp-steps { display: grid; gap: var(--space-4); margin: 0; padding: 0; list-style: none; counter-reset: tfa; }
.tfp-steps > li { position: relative; display: grid; gap: var(--space-2); padding-left: 44px; counter-increment: tfa; min-width: 0; }
.tfp-steps > li::before { content: counter(tfa); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: var(--weight-bold); font-size: var(--text-sm); }
.tfp-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: calc(var(--space-4) * -1); width: 2px; background: var(--color-border); }
.tfp-scan { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.tfp-scan .tfa-qr-box { flex: none; width: 176px; }
.tfp-scan__manual { display: grid; gap: var(--space-2); flex: 1 1 220px; min-width: 0; }
.tfp-key { display: flex; gap: var(--space-2); align-items: center; }
.tfp-key input { flex: 1 1 auto; min-width: 0; font-size: var(--text-sm); letter-spacing: .04em; background: var(--color-surface-2); }
.tfp-form { max-width: none; }
.tfp-form .field { margin: 0; }
.tfp-form--inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); }
.tfp-form--inline .field { flex: 0 1 190px; }
.tfp-form input.tfp-code, .tfp-form .tfp-code input { font-family: var(--font-mono); font-size: var(--text-lg); letter-spacing: .18em; text-align: center; }
.tfp-status { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--tone-success-border); border-radius: var(--radius-lg); background: var(--tone-success-soft); }
.tfp-status > div { display: grid; gap: 2px; min-width: 0; }
.tfp-status__icon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--color-surface); color: var(--tone-success); }
.tfp-status__icon svg { width: 22px; height: 22px; }
.tfp-action { border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.tfp-action > summary { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); cursor: pointer; list-style: none; }
.tfp-action > summary::-webkit-details-marker { display: none; }
.tfp-action > summary > svg { flex: none; width: 20px; height: 20px; color: var(--color-brand-text); }
.tfp-action > summary > span { display: grid; gap: 2px; min-width: 0; }
.tfp-action > summary small { color: var(--color-muted); font-size: var(--text-xs); }
.tfp-action > summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--color-muted); border-bottom: 2px solid var(--color-muted); transform: rotate(45deg); transition: transform .15s; }
.tfp-action[open] > summary::after { transform: rotate(-135deg); }
.tfp-action[open] > summary { border-bottom: 1px solid var(--color-border); }
.tfp-action > form { padding: var(--space-4); }
.tfp-action.is-danger > summary > svg, .tfp-action.is-danger > summary b { color: var(--tone-danger); }
.tfp-codes-box { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.tfp-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px var(--space-4); margin: 0; padding: 0; list-style: none; font-size: var(--text-md); letter-spacing: .06em; }
.tfp-codes li { padding: 6px var(--space-3); border-radius: var(--radius-sm); background: var(--color-surface); border: 1px solid var(--color-border); text-align: center; }
.tfp-codes-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tfp-done { display: flex; justify-content: flex-end; }
@media (max-width: 639.98px) {
    .tfp-steps > li { padding-left: 38px; }
    .tfp-scan { justify-content: center; }
    .tfp-form--inline .field, .tfp-form--inline .btn { flex: 1 1 100%; }
    .tfp-done .btn { width: 100%; }
    dialog.modal.tfp-dialog { width: 100vw; }
}


/* Pay popup (PayPopup, goji/pay.js; owner, 25 Nov 2026): a payment's QR on the page with a live status line.
   The QR sits on a white square in every colour theme (scanners do not read light-on-dark codes). */
dialog.modal.gpay-dialog { width: min(420px, calc(100vw - 2 * var(--space-4))); }
.gpay { display: grid; gap: var(--space-4); text-align: center; }
.gpay__head { display: grid; gap: 2px; }
.gpay__amount { margin: 0; font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--color-text); font-variant-numeric: tabular-nums; }
.gpay__body { display: grid; gap: var(--space-3); justify-items: center; }
.gpay__body[hidden], .gpay__result[hidden] { display: none; }
.gpay__qr { width: min(260px, 72vw); aspect-ratio: 1; padding: 10px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.gpay__qr img, .gpay__qr svg { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.gpay__how { margin: 0; font-size: var(--text-sm); color: var(--color-text); max-width: 34ch; }
.gpay__live { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: var(--space-2) var(--space-3); width: 100%;
    border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); font-weight: 600; }
.gpay__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-brand); animation: gpay-pulse 1.4s ease-in-out infinite; flex: none; }
.gpay__left { margin-left: auto; font-weight: 400; color: var(--color-muted); }
.gpay__left b { color: var(--color-text); font-variant-numeric: tabular-nums; }
.gpay__result { display: grid; gap: var(--space-2); justify-items: center; padding: var(--space-4) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.gpay__result.is-ok { background: var(--tone-success-soft); border-color: var(--tone-success-border); }
.gpay__result.is-warn { background: var(--tone-warning-soft); border-color: var(--tone-warning-border); }
.gpay__result.is-bad { background: var(--tone-danger-soft); border-color: var(--tone-danger-border); }
.gpay__mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--color-surface); border: 1px solid var(--color-border); }
.gpay__mark svg { width: 26px; height: 26px; }
.gpay__result.is-ok .gpay__mark { color: var(--tone-success); }
.gpay__result.is-warn .gpay__mark { color: var(--tone-warning); }
.gpay__result.is-bad .gpay__mark { color: var(--tone-danger); }
.gpay__result-title { margin: 0; font-size: var(--text-lg); font-weight: 700; }
@keyframes gpay-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .gpay__dot { animation: none; } }
@media (max-width: 480px) {
    dialog.modal.gpay-dialog { width: 100vw; max-width: 100vw; }
    .gpay__left { margin-left: 0; flex: 1 1 100%; }
}
.gpay__phone { display: none; }
@media (max-width: 640px) { .gpay__phone { display: block; } }

/* News list: how long a story has been open in an editor (26 Nov 2026). */
.badge__sub { font-weight: var(--weight-regular, 400); opacity: .85; }

/* Import story (story-import.js; owner, 26 Nov 2026): the window beside Add Media. Step 1 a drop area, step 2 the
   review (what was found on the left, the options on the right). */
dialog.modal.editor-import-dialog { width: min(680px, calc(100vw - 2 * var(--space-4))); }
.editor-import-dialog .modal-header { align-items: center; }
.imp-pills { display: inline-flex; gap: 6px; flex: none; }
.imp-pill { padding: 2px 10px; border: 1px solid var(--color-border); border-radius: 999px; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-muted); white-space: nowrap; }
.imp-pill.is-on { border-color: var(--tone-brand-border); background: var(--tone-brand-soft); color: var(--tone-brand); }
.imp-step { display: grid; gap: var(--space-3); }
.imp-step[hidden] { display: none; }
.imp-drop { display: grid; justify-items: center; gap: 6px; padding: var(--space-6) var(--space-4); border: 2px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-2); text-align: center; cursor: pointer; }
.imp-drop:hover, .imp-drop.is-over, .imp-drop:focus-within { border-color: var(--color-brand); background: var(--accent-soft); }
.imp-drop__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--color-surface); color: var(--color-brand); }
.imp-drop__icon svg { width: 22px; height: 22px; }
.imp-drop__title { font-size: var(--text-md); font-weight: var(--weight-bold); color: var(--color-text); }
.imp-drop__sub { font-size: var(--text-sm); color: var(--color-muted); }
.imp-chips { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.imp-chip { padding: 2px 10px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--color-border); font-size: var(--text-xs); color: var(--color-text-2); white-space: nowrap; }
.imp-paste { border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-2) var(--space-3); }
.imp-paste > summary { cursor: pointer; font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--color-text-2); }
.imp-paste[open] { display: grid; gap: var(--space-2); }
.imp-paste textarea { width: 100%; min-height: 110px; }
.imp-file { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.imp-file__name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.imp-file__name svg { flex: none; width: 18px; height: 18px; color: var(--color-brand); }
.imp-file .imp-chips { justify-content: flex-start; }
.imp-preeti { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--tone-warning-border); border-radius: var(--radius-md); background: var(--tone-warning-soft); font-size: var(--text-sm); cursor: pointer; }
.imp-preeti[hidden] { display: none; }
.imp-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.imp-parts, .imp-options { display: grid; gap: var(--space-2); align-content: start; }
.imp-part { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.imp-part[hidden] { display: none; }
.imp-part__label { font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-muted); }
.imp-part__text { font-size: var(--text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.imp-where { display: grid; gap: 4px; margin-top: var(--space-1); }
.imp-where select { width: 100%; }
.imp-options .check[hidden] { display: none; }
@media (max-width: 600px) {
    .imp-grid { grid-template-columns: minmax(0, 1fr); }
    .imp-pills { display: none; }
}

/* Story result window (story-result.js; owner, 26 Nov 2026): Publish / Schedule / Send for review / Update show the
   progress in the middle of the screen, then the result in the same window. Smaller saves keep their toasts. */
dialog.modal.ned-result { width: min(440px, calc(100vw - 2 * var(--space-4))); padding: var(--space-6) var(--space-5) var(--space-5); }
/* No "position: relative" here: a modal dialog is position: fixed, which already holds the × button; relative made
   the window scroll away with the page on phones (26 Nov 2026). */
.ned-result [hidden] { display: none !important; }
.ned-result__run { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--space-2) var(--space-4); }
.ned-result__progress { position: relative; width: 64px; height: 64px; }
.ned-result__ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.ned-result__track { fill: none; stroke: var(--color-border); stroke-width: 5; }
.ned-result__bar { fill: none; stroke: var(--color-brand); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 169.65; stroke-dashoffset: 169.65; transition: stroke-dashoffset .3s var(--ease); }
.ned-result__pct { position: absolute; inset: 0; display: grid; place-items: center; font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--color-text); }
.ned-result__title { margin: 0; font-size: var(--text-lg); font-weight: 700; line-height: 1.3; color: var(--color-text); outline: none; }
.ned-result__sub { margin: 2px 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.ned-result__steps { grid-column: 1 / -1; list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.ned-result__steps li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-faint); transition: color .2s var(--ease); }
.ned-result__steps li::before { content: ""; box-sizing: border-box; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--color-border-strong); display: grid; place-items: center; font-size: 10px; font-weight: 800; line-height: 1; }
.ned-result__steps li.is-on { color: var(--color-text); font-weight: 600; }
.ned-result__steps li.is-on::before { border-color: var(--color-brand); border-right-color: transparent; animation: goji-spin .8s linear infinite; }
.ned-result__steps li.is-done { color: var(--tone-success); }
.ned-result__steps li.is-done::before { content: "\2713"; border-color: var(--tone-success); background: var(--tone-success); color: var(--color-surface); }
.ned-result__slow { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); color: var(--color-muted); }
.ned-result__done { display: grid; justify-items: center; gap: var(--space-2); text-align: center; }
.ned-result__x { position: absolute; top: var(--space-3); right: var(--space-3); }
.ned-result__mark { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; border: 1px solid var(--color-border); }
.ned-result__mark svg { width: 30px; height: 30px; }
.ned-result:not(.is-ok) [data-nr-mark="ok"], .ned-result:not(.is-warn) [data-nr-mark="warn"], .ned-result:not(.is-bad) [data-nr-mark="bad"] { display: none; }
.ned-result.is-ok .ned-result__mark { background: var(--tone-success-soft); border-color: var(--tone-success-border); color: var(--tone-success); }
.ned-result.is-warn .ned-result__mark { background: var(--tone-warning-soft); border-color: var(--tone-warning-border); color: var(--tone-warning); }
.ned-result.is-bad .ned-result__mark { background: var(--tone-danger-soft); border-color: var(--tone-danger-border); color: var(--tone-danger); }
.ned-result__done .ned-result__title { margin-top: var(--space-2); font-size: 1.3rem; }
.ned-result__story { width: 100%; box-sizing: border-box; display: grid; gap: var(--space-2); margin-top: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); text-align: start; }
.ned-result__headline { margin: 0; font-weight: 700; line-height: 1.45; color: var(--color-text); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ned-result__link { display: flex; align-items: center; gap: var(--space-2); }
.ned-result__link input { flex: 1; min-width: 0; height: 34px; padding: 0 var(--space-2); font-size: var(--text-sm); color: var(--color-muted); background: var(--color-surface); }
.ned-result__link .btn { flex: none; gap: 6px; }
.ned-result__link .btn svg { width: 15px; height: 15px; }
.ned-result__errors { width: 100%; box-sizing: border-box; display: grid; gap: 4px; margin: var(--space-2) 0 0; padding: var(--space-3) var(--space-3) var(--space-3) calc(var(--space-3) + 1.1em); border: 1px solid var(--tone-danger-border); border-radius: var(--radius-md); background: var(--tone-danger-soft); color: var(--tone-danger); font-size: var(--text-sm); text-align: start; }
.ned-result.is-warn .ned-result__errors { border-color: var(--tone-warning-border); background: var(--tone-warning-soft); color: var(--color-text); }
.ned-result__share { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--space-2); margin-top: var(--space-1); }
.ned-result__share a, .ned-result__share button { display: grid; justify-items: center; gap: 4px; padding: var(--space-2) 4px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-xs); font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color .15s var(--ease), transform .15s var(--ease), background-color .15s var(--ease); }
.ned-result__share a:hover, .ned-result__share a:focus-visible, .ned-result__share button:hover, .ned-result__share button:focus-visible { border-color: var(--color-brand); background: var(--color-brand-soft); transform: translateY(-1px); }
.ned-result__share svg { width: 20px; height: 20px; fill: currentColor; }
.ned-result__actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); margin-top: var(--space-2); }
.ned-result__actions.is-single { grid-template-columns: minmax(0, 1fr); }
.ned-result__actions .btn { justify-content: center; gap: 6px; }
.ned-result__actions .btn svg { width: 16px; height: 16px; }
.ned-result__more { display: flex; justify-content: center; align-items: center; gap: var(--space-2); margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--color-faint); }
.ned-result__more a { color: var(--color-brand-text); }
.ned-result__done > * { animation: ned-result-in .32s var(--ease) both; }
.ned-result__done > :nth-child(3) { animation-delay: .04s; }
.ned-result__done > :nth-child(4) { animation-delay: .08s; }
.ned-result__done > :nth-child(5) { animation-delay: .12s; }
.ned-result__done > :nth-child(6) { animation-delay: .16s; }
.ned-result__done > :nth-child(7) { animation-delay: .2s; }
.ned-result__done > :nth-child(8) { animation-delay: .24s; }
.ned-result__done > :nth-child(9) { animation-delay: .28s; }
.ned-result__done > .ned-result__mark { animation: ned-result-pop .4s var(--ease) both; }
.ned-result__tick { stroke-dasharray: 24; stroke-dashoffset: 24; animation: ned-result-draw .45s .18s var(--ease) forwards; }
@keyframes ned-result-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ned-result-pop { from { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
@keyframes ned-result-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    .ned-result__done > *, .ned-result__done > .ned-result__mark { animation: none; }
    .ned-result__tick { animation: none; stroke-dashoffset: 0; }
    .ned-result__bar { transition: none; }
    .ned-result__steps li.is-on::before { animation: none; }
}
@media (max-width: 480px) {
    dialog.modal.ned-result { width: 100vw; max-width: 100vw; padding: var(--space-5) var(--space-4) var(--space-4); }
    .ned-result__share { gap: 6px; }
    .ned-result__share a, .ned-result__share button { padding: var(--space-2) 2px; }
    .ned-result__share span { font-size: 11px; }
}

/* Phones: every pop-up floats in the middle of the screen (owner, 26 Nov 2026), at most 97% of its width and height,
   rounded on every side. They were bottom sheets, some of them shifted to one side and cut off. The story panel
   keeps its own full-screen window; the media library keeps its 97% height. Kept last so the pop-ups' own phone
   widths give way to it. */
@media (max-width: 639.98px) {
    dialog.modal:not(.story-panel) {
        width: 97vw; max-width: 97vw; max-height: 97vh; max-height: 97dvh; margin: auto; border-radius: var(--radius-xl);
    }
    dialog.modal:not(.story-panel) > .modal-header { padding: var(--space-4) var(--space-4) var(--space-2); }
    dialog.modal:not(.story-panel) > .modal-body { padding: var(--space-2) var(--space-4) var(--space-4); }
    dialog.modal:not(.story-panel) > .modal-footer { padding: var(--space-3) var(--space-4); }
}

/* Phones (owner, 26 Nov 2026): the floating Update / Draft (Publish / Save draft) bar sits on the bottom edge across
   the whole width, no gap under it; the phone's own home bar area is padded inside it. */
@media (max-width: 639.98px) {
    .ned-publish__actions.is-docked {
        left: 0; right: 0; bottom: 0; width: 100%; max-width: none; margin: 0; box-sizing: border-box;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        border: 0; border-top: 1px solid var(--color-border); border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 24px rgba(15, 27, 45, .12);
    }
    body.ned-has-dock .content { padding-bottom: 84px; }
}

/* The Address line under the headline (owner, 26 Nov 2026): Copy and the pencil continue right after the address,
   on its last line, instead of dropping to a line of their own when the address is long. Text flow, not flex. */
.ned-layout .ned-address { display: block; line-height: 1.9; }
.ned-layout .ned-address > .ned-address__label { margin-right: 10px; }
.ned-layout .ned-address > .ned-address__value { vertical-align: baseline; }
.ned-layout .ned-address > .ned-address__copy { display: inline-block; margin-left: 10px; vertical-align: baseline; }
.ned-layout .ned-address > .ned-address__copy[hidden] { display: none; }
.ned-layout .ned-address > .ned-address__edit { display: inline-flex; margin-left: 4px; vertical-align: middle; }
@media (max-width: 639.98px) {
    .ned-layout .ned-address > .ned-address__label { display: block; margin-right: 0; }
    .ned-layout .ned-address > .ned-address__copy { margin-left: 6px; padding: 0 6px; min-height: 0; }
}

/* News list rows on phones, laid out for the thumb (owner, 26 Nov 2026: "options and buttons still don't line up").
   Row 1: tick, picture, headline and details. Row 2: the status, under the headline. Row 3: View / Preview on the
   left, the action buttons on the right, always on one line. The action wrappers dissolve into the row's grid
   (display: contents) so each part takes its own place; nothing changes in the markup or for screen readers. */
@media (max-width: 639.98px) {
    .story-list .story-actions, .story-list .story-actions > .story-state { display: contents; }
    .story-list .story-row > .story-check { grid-column: 1; grid-row: 1; }
    .story-list .story-row > .story-thumb { grid-column: 2; grid-row: 1; }
    .story-list .story-row > .story-main { grid-column: 3; grid-row: 1; }
    .story-list .story-state > .status { grid-column: 3; grid-row: 2; justify-self: start; align-self: center; }
    .story-list .story-state > :not(.status) { grid-column: 1 / 3; grid-row: 3; justify-self: start; align-self: center; position: static; transform: none; }
    .story-list .story-buttons { grid-column: 3; grid-row: 3; justify-self: end; align-self: center; margin: 0; flex-wrap: nowrap; gap: 6px; }
    .story-list .story-state .story-view {
        visibility: visible; height: 32px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 9px;
        background: var(--color-surface); font-size: 12.5px; font-weight: 700; text-decoration: none; white-space: nowrap;
    }
    /* "You are editing this · 4 min" stays one small pill; Release follows it. */
    .story-list .story-meta [data-article-lock] { white-space: nowrap; font-size: 11.5px; padding: 3px 8px; }
}
.story-lock { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
@media (max-width: 639.98px) { .story-list .story-meta > .story-lock { flex: 1 1 100%; } }

/* Category trees of the story editor (owner, 26 Nov 2026, WordPress style; category-tree.js). Sub-categories sit under
   their parent behind a thin guide line; the arrow opens a branch; a closed branch says how many below it are ticked;
   the ticked ones also show as chips under the box. */
.ntree__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ntree__tools .ned-search { flex: 1 1 180px; min-width: 0; }
.ntree__all { display: inline-flex; gap: 12px; margin-left: auto; font-size: var(--text-xs); font-weight: var(--weight-semibold); white-space: nowrap; }
.ntree { list-style: none; margin: 0; padding: 4px; max-height: 340px; overflow: auto; overscroll-behavior: contain;
    border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); }
.ned-ticks.has-error .ntree { border-color: var(--tone-danger); }
.ntree__group { list-style: none; margin: 0 0 0 13px; padding: 0 0 0 9px; border-left: 1px solid var(--color-border); }
.ntree__group[hidden] { display: none; }
.ntree__node { margin: 0; padding: 0; }
.ntree__row { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ntree__row > .ned-tick { flex: 1 1 auto; min-width: 0; }
.ntree__row .ned-tick__label { min-width: 0; overflow-wrap: anywhere; }
.ntree__tog { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px;
    background: none; color: var(--color-muted); cursor: pointer; }
.ntree__tog:hover, .ntree__tog:focus-visible { background: var(--color-surface-2); color: var(--color-text); }
.ntree__tog svg { width: 15px; height: 15px; transition: transform .15s var(--ease); }
.ntree__tog[aria-expanded="true"] svg { transform: rotate(90deg); }
.ntree__tog.is-leaf { cursor: default; }
.ntree__tog.is-leaf::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--color-border-strong); }
.ntree__badge { flex: none; margin-right: 6px; padding: 1px 8px; border-radius: var(--radius-full); background: var(--color-surface-2);
    color: var(--color-muted); font-size: 11px; font-weight: var(--weight-semibold); white-space: nowrap; }
.ntree__badge.is-ticked { background: var(--color-brand-soft); color: var(--color-brand-text); }
.ntree__badge[hidden] { display: none; }
.ntree.is-filtering .ntree__node:not(.is-shown) { display: none; }
.ntree.is-filtering .ntree__node.is-hit > .ntree__row .ned-tick__label { font-weight: var(--weight-semibold); color: var(--color-text); }
.ntree__empty { list-style: none; padding: 10px; }
.ntree__note { margin: 0; font-size: var(--text-xs); color: var(--color-muted); }
.ntree__note[hidden] { display: none; }
.ntree__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ntree__chips[hidden] { display: none; }
.ntree__chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 10px; border: 1px solid var(--color-border);
    border-radius: var(--radius-full); background: var(--color-surface-2); font-size: var(--text-xs); color: var(--color-text); }
.ntree__chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntree__chip b { padding: 0 6px; border-radius: var(--radius-full); background: var(--color-brand); color: var(--color-brand-ink); font-size: 10px; }
.ntree__chip.is-main { border-color: var(--color-brand); }
.ntree__chip button { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
    background: none; color: var(--color-muted); font-size: 15px; line-height: 1; cursor: pointer; }
.ntree__chip button:hover, .ntree__chip button:focus-visible { background: var(--tone-danger-soft); color: var(--tone-danger); }
.ned-layout .ntree .ned-tick { padding: 5px 6px; }
@media (pointer: coarse) { .ntree__tog { width: 34px; height: 34px; } .ntree__chip button { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) { .ntree__tog svg { transition: none; } }

/* Agency import (owner request of 26 Nov 2026; Dhading Update's Agency import; news-wire::admin.import). */
.aimp { display: grid; gap: var(--space-4); }
.aimp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.aimp-state { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.aimp-dot { flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--color-border-strong); box-shadow: 0 0 0 5px var(--color-surface-2); }
.aimp-dot.is-on { background: var(--tone-success); box-shadow: 0 0 0 5px var(--tone-success-soft); }
.aimp-dot.is-warn { background: var(--tone-warning); box-shadow: 0 0 0 5px var(--tone-warning-soft); }
.aimp-state__title { margin: 0; font-size: var(--text-lg); font-weight: 700; color: var(--color-text); }
.aimp-state__line { margin: 2px 0 0; color: var(--color-muted); }
.aimp-live { border-radius: var(--radius-full); padding-inline: var(--space-6); }
.aimp-reasons { margin: 6px 0 0; padding-left: 1.2em; }
.aimp-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 14px; background: var(--color-surface); border: 1px solid var(--color-border); width: fit-content; max-width: 100%; }
.aimp-tabs a { padding: 9px 18px; border-radius: 10px; color: var(--color-text-2); font-weight: 600; text-decoration: none; white-space: nowrap; }
.aimp-tabs a:hover { background: var(--color-surface-2); color: var(--color-text); }
.aimp-tabs a.is-active { background: var(--color-surface-2); color: var(--color-brand-text); box-shadow: inset 0 0 0 1px var(--color-border); }
.aimp-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-3); }
.aimp-stat { display: grid; gap: 4px; padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface); }
.aimp-stat b { font-size: 1.6rem; line-height: 1.1; color: var(--color-brand-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.aimp-stat span { color: var(--color-muted); font-size: var(--text-sm); }
.aimp-card { display: grid; gap: var(--space-3); }
.aimp-card__title { margin: 0; font-size: var(--text-lg); font-weight: 700; color: var(--color-brand-text); }
.aimp-muted { margin: 0; color: var(--color-muted); }
.aimp-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.aimp-actions form { margin: 0; }
.aimp-stories__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); }
.aimp-stories__head form { margin: 0; }
.aimp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.aimp-pills a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-full); color: var(--color-text-2); font-weight: 600; text-decoration: none; background: var(--color-surface); }
.aimp-pills a b { color: var(--color-brand-text); }
.aimp-pills a.is-active { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); color: var(--color-brand-text); }
.aimp-empty { margin: 0; padding: var(--space-5); border: 1px dashed var(--color-border-strong); border-radius: 12px; text-align: center; color: var(--color-muted); }
.aimp-list { list-style: none; margin: 0; padding: 0; display: grid; }
.aimp-row { display: flex; align-items: center; gap: var(--space-3); padding: 12px 4px; border-top: 1px solid var(--color-border); }
.aimp-row:first-child { border-top: 0; }
.aimp-row__main { flex: 1 1 auto; min-width: 0; }
.aimp-row__title { font-weight: 700; color: var(--color-text); text-decoration: none; overflow-wrap: anywhere; }
a.aimp-row__title:hover { color: var(--color-brand-text); text-decoration: underline; }
.aimp-row__meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 4px 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.aimp-row__note { color: var(--color-text-2); }
.aimp-row__actions { display: flex; flex-wrap: wrap; gap: 6px; flex: none; }
.aimp-row__actions form { margin: 0; }
.aimp-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--radius-full); background: var(--color-surface-2); color: var(--color-text-2); font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.aimp-tag.is-ok { background: var(--tone-success-soft); color: var(--tone-success); }
.aimp-tag.is-warn { background: var(--tone-warning-soft); color: var(--tone-warning); }
.aimp-choices { display: grid; gap: var(--space-2); border: 0; margin: 0; padding: 0; min-width: 0; }
.aimp-choice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; }
.aimp-choice:has(input:checked) { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); }
.aimp-choice input { margin-top: 4px; }
.aimp-choice span { display: grid; gap: 2px; }
.aimp-choice small { color: var(--color-muted); font-size: var(--text-sm); }
.aimp-agencies { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-3); border: 0; margin: 0; padding: 0; min-width: 0; }
.aimp-agency { display: flex; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: 14px; cursor: pointer; background: var(--color-surface); }
.aimp-agency:has(input:checked) { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); }
.aimp-agency input { margin-top: 4px; }
.aimp-agency__body { display: grid; gap: 6px; min-width: 0; }
.aimp-agency__body small { color: var(--color-muted); }
.aimp-agency__state { display: flex; flex-wrap: wrap; gap: 6px; }
.aimp-probe { margin: 0; padding: var(--space-3) var(--space-4); border-radius: 12px; border: 1px solid var(--color-border); }
.aimp-probe.is-ok { background: var(--tone-success-soft); border-color: var(--tone-success-border); }
.aimp-probe.is-bad { background: var(--tone-danger-soft); border-color: var(--tone-danger-border); }
.aimp-probe small { color: var(--color-muted); }
.aimp-feeds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px var(--space-4); border: 0; margin: 0; padding: 0; min-width: 0; }
.aimp-feeds legend { grid-column: 1 / -1; margin-bottom: 6px; }
.aimp-feed { display: flex; gap: 8px; align-items: center; }
.aimp-map { display: grid; gap: 8px; }
.aimp-map__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: var(--space-3); }
.aimp-map__row select { width: 100%; }
.aimp-preview:not(:empty) { margin-top: var(--space-2); padding-top: var(--space-2); border-top: 1px solid var(--color-border); }
.aimp-more { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
@media (max-width: 1100px) { .aimp-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 639.98px) {
    .aimp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .aimp-stat { padding: var(--space-3) var(--space-4); }
    .aimp-tabs { display: flex; width: 100%; }
    .aimp-tabs a { flex: 1 1 auto; text-align: center; padding: 8px 10px; }
    .aimp-head .aimp-live { width: 100%; }
    .aimp-head form { width: 100%; }
    .aimp-row { flex-wrap: wrap; }
    .aimp-row__actions { width: 100%; justify-content: flex-end; }
    .aimp-map__row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* Client billing page redesign (owner request 26 Nov 2026): at-a-glance figures, a "Pay now" notice, full-width
   sections left to right, a two-column contacts form; phones 320-375 px stack everything. Tokens only. */
.billing-page { display: grid; gap: var(--space-5); }
.billing-page > .card { margin: 0; }
.billing-summary { display: grid; gap: var(--space-4); }
.billing-due { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-4) var(--space-5); border: 1px solid var(--tone-warning-border); border-radius: var(--radius-lg); background: var(--tone-warning-soft); color: var(--color-text); }
.billing-due.is-overdue { border-color: var(--tone-danger-border); background: var(--tone-danger-soft); }
.billing-due__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--tone-warning); }
.billing-due.is-overdue .billing-due__icon { color: var(--tone-danger); }
.billing-due__icon svg { width: 20px; height: 20px; }
.billing-due__text { display: grid; gap: 2px; min-width: 0; }
.billing-due__text b { font-size: var(--text-md); }
.billing-due__text span { color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.billing-due__action form { margin: 0; }
.billing-kpis { display: grid; gap: var(--space-4); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.billing-kpis .stat-card-value { font-size: var(--text-2xl); overflow-wrap: anywhere; }
.billing-kpis .stat-card-foot { overflow-wrap: anywhere; }
.billing-sites { display: grid; gap: var(--space-4); }
.billing-page .client-site { padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); gap: var(--space-3); }
.billing-page .client-site:last-child { border-bottom: 1px solid var(--color-border); }
.client-site__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.client-site__head h3 { margin: 0; font-size: var(--text-lg); }
.client-site__head .avatar { background: var(--color-brand-soft); color: var(--color-brand-text); }
.billing-page .billing-subs__list li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) auto; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-3) var(--space-4); background: var(--color-surface); }
.billing-subs__period { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-width: 0; }
.billing-subs__until { display: grid; gap: 0; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.billing-subs__until b { font-weight: var(--weight-medium); }
.billing-soon { color: var(--tone-warning); font-weight: var(--weight-semibold); }
.billing-subs__action { margin: 0; justify-self: end; }
.billing-lists { display: grid; gap: var(--space-5); }
.billing-lists > .card { margin: 0; }
.billing-how { display: grid; gap: var(--space-3); }
.billing-how > p:first-child { padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.billing-how__note { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--color-muted); }
.billing-how__note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.billing-contacts-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.billing-recipients { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.billing-recipients li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); font-size: var(--text-sm); overflow-wrap: anywhere; }
.billing-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.billing-form-foot .field, .billing-form-foot .checkbox { margin: 0; }
@media (max-width: 1023.98px) {
    .billing-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .billing-page .billing-subs__list li { grid-template-columns: minmax(0, 1fr) auto; }
    .billing-subs__period { grid-column: 1 / -1; grid-row: 2; }
    .billing-subs__action { grid-column: 2; grid-row: 1; }
}
@media (max-width: 639.98px) {
    .billing-page { gap: var(--space-4); }
    .billing-due { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-3) var(--space-4); }
    .billing-due__action { grid-column: 1 / -1; }
    .billing-due__action .btn { width: 100%; }
    .billing-kpis { gap: var(--space-3); }
    .billing-kpis .stat-card { padding: var(--space-3); }
    .billing-kpis .stat-card-value { font-size: var(--text-lg); }
    .billing-page .client-site { padding: var(--space-3); }
    .billing-page .billing-subs__list li { padding: var(--space-3); }
    .billing-contacts-grid { grid-template-columns: minmax(0, 1fr); }
    .billing-form-foot .btn { width: 100%; }
}
@media (max-width: 359.98px) {
    .billing-kpis { grid-template-columns: minmax(0, 1fr); }
}

/* Plan changes (owner decision 26 Nov 2026): the client's "Change plan" page and the notices on the Billing page.
   Tokens only; phones 320-375 px: one plan card per row, the confirm buttons full width. */
.billing-subs__action { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.billing-subs__action form { margin: 0; }
.billing-scheduled { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-3) var(--space-4); border: 1px dashed var(--tone-info-border); border-radius: var(--radius-md); background: var(--tone-info-soft); font-size: var(--text-sm); }
.billing-scheduled > svg { flex: none; width: 18px; height: 18px; color: var(--tone-info); }
.billing-scheduled > span { flex: 1 1 220px; min-width: 0; }
.billing-scheduled form { margin: 0; }
.plan-page { display: grid; gap: var(--space-5); }
.plan-page > .card, .plan-page > .alert { margin: 0; }
.plan-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.plan-now__label { color: var(--color-muted); font-size: var(--text-sm); }
.plan-now b { font-size: var(--text-lg); }
.plan-now > span:last-child { color: var(--color-text-2); font-size: var(--text-sm); }
.plan-periods { display: inline-flex; justify-self: start; padding: 4px; gap: 4px; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); }
.plan-periods a { padding: 6px var(--space-4); border-radius: var(--radius-full); color: var(--color-text-2); font-size: var(--text-sm); font-weight: var(--weight-medium); text-decoration: none; }
.plan-periods a.is-active { background: var(--color-brand); color: var(--color-brand-ink); }
.plan-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.plan-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-xs); min-width: 0; }
.plan-card.is-current { border-color: var(--color-border-strong); }
.plan-card.is-chosen { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--color-brand-soft); }
.plan-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.plan-card__head h2 { margin: 0; font-size: var(--text-lg); }
.plan-card__price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1); }
.plan-card__price b { font-size: var(--text-2xl); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.plan-card__price span { color: var(--color-muted); font-size: var(--text-sm); }
.plan-card__saving { margin: 0; color: var(--tone-success); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.plan-card__text { margin: 0; color: var(--color-text-2); font-size: var(--text-sm); }
.plan-card__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--text-sm); }
.plan-card__list li { display: flex; align-items: flex-start; gap: var(--space-2); }
.plan-card__list svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--tone-success); }
.plan-card__foot { margin-top: auto; padding-top: var(--space-2); }
.plan-card__foot .btn { width: 100%; }
.plan-card__foot [aria-disabled="true"] { opacity: .6; pointer-events: none; }
.plan-preview { display: grid; gap: var(--space-4); }
.plan-preview__lead { margin: 0; font-size: var(--text-md); font-weight: var(--weight-medium); }
.plan-preview__lead.is-refused { color: var(--tone-warning); }
.plan-preview .billing-facts li.is-total { font-size: var(--text-md); }
.plan-preview .billing-facts li.is-total span { color: var(--color-text); font-weight: var(--weight-semibold); }
.plan-preview__mods { margin: 0; font-size: var(--text-sm); }
.plan-preview__mods.is-loss { color: var(--tone-warning); }
.plan-preview__notices { list-style: none; margin: 0; padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-2); border-radius: var(--radius-md); background: var(--tone-info-soft); font-size: var(--text-sm); }
.plan-preview__notices li { display: flex; align-items: flex-start; gap: var(--space-2); }
.plan-preview__notices svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--tone-info); }
.plan-preview__confirm { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-3); margin: 0; padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.plan-settings { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 639.98px) {
    .billing-subs__action { justify-content: flex-start; }
    .plan-card { padding: var(--space-4); }
    .plan-periods { justify-self: stretch; }
    .plan-periods a { flex: 1 1 0; text-align: center; padding: 8px var(--space-2); }
    .plan-preview__confirm .btn { flex: 1 1 100%; }
    .plan-settings { grid-template-columns: minmax(0, 1fr); }
}@media (max-width: 639.98px) {
    /* Phones: the plan row is a column — name, state and dates, then Change plan / Renew side by side. */
    .billing-page .billing-subs__list li { grid-template-columns: minmax(0, 1fr); }
    .billing-page .billing-subs__period, .billing-page .billing-subs__action { grid-column: 1; grid-row: auto; justify-self: stretch; }
    .billing-page .billing-subs__action > .btn, .billing-page .billing-subs__action > form { flex: 1 1 0; }
    .billing-page .billing-subs__action > form .btn { width: 100%; }
}.plan-preview .billing-facts b { white-space: nowrap; }

/* Subscription payment modes (owner request 26 Nov 2026): the Super Admin says how a period is paid. Tokens only. */
.sub-change__pay { display: grid; gap: var(--space-2); }
.sub-pay { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; }
.sub-pay:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); }
.sub-pay input { margin-top: 3px; flex: none; }
.sub-pay span { display: grid; gap: 2px; min-width: 0; }
.sub-pay small { color: var(--color-text-2); font-size: var(--text-sm); }
.sub-change__paid { display: grid; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); }
.sub-preview__pay ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sub-preview__pay li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-3); padding: 6px 0; border-bottom: 1px solid var(--color-border); font-size: var(--text-sm); }
.sub-preview__pay li > span { color: var(--color-muted); }
.sub-preview__note { display: flex; align-items: flex-start; gap: var(--space-2); margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--tone-info-soft); font-size: var(--text-sm); }
.sub-preview__note svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--tone-info); }
.sub-preview__note.is-warn { background: var(--tone-warning-soft); }
.sub-preview__note.is-warn svg { color: var(--tone-warning); }
.billing-free { color: var(--tone-success); font-weight: var(--weight-medium); }

/* Billing polish (owner request 26 Nov 2026): Renew for several periods, Renew early, Clients list plan facts,
   the Enforcement page form. Tokens only. */
.billing-renew { display: flex; align-items: center; gap: var(--space-2); margin: 0; }
.billing-renew__units { min-height: var(--control-height-sm); padding: 0 var(--space-6) 0 var(--space-2); font-size: var(--text-sm); border-radius: var(--radius-sm); max-width: 9.5rem; }
.billing-renew-early { color: var(--color-muted); }
.plan-fact { color: var(--color-muted); margin-top: 2px; white-space: normal; }
.plan-fact.is-soon { color: var(--tone-warning); font-weight: var(--weight-medium); }
.plan-fact.is-over { color: var(--tone-danger); font-weight: var(--weight-medium); }
.enf-form { display: grid; gap: var(--space-5); }
.enf-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: var(--space-3); min-width: 0; }
.enf-form legend { padding: 0; font-weight: var(--weight-semibold); margin-bottom: var(--space-1); }
.enf-days { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.enf-sites { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.enf-sites li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.enf-sites li .field, .enf-sites li .checkbox { margin: 0; }
.enf-sites li > span { color: var(--color-muted); font-size: var(--text-sm); }
.enf-sites li.would-suspend > span { color: var(--tone-danger); font-weight: var(--weight-medium); }
.enf-danger { padding: var(--space-3) var(--space-4); border: 1px solid var(--tone-danger-border); border-radius: var(--radius-md); background: var(--tone-danger-soft); display: grid; gap: var(--space-2); }
@media (max-width: 639.98px) {
    .billing-renew { flex: 1 1 100%; }
    .billing-renew__units { flex: 1 1 0; max-width: none; }
}@media (max-width: 639.98px) {
    /* Phones: "Renew for …" and Renew share the row evenly; an invoice card's View / Pay / Cancel sit on one line. */
    .billing-page .billing-subs__action > form.billing-renew { display: flex; gap: var(--space-2); }
    .billing-page .billing-subs__action > form.billing-renew .btn { width: auto; flex: 1 1 0; }
    .billing-page .billing-renew__units { flex: 1 1 0; min-width: 0; max-width: none; }
    .billing-lists td.nowrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); white-space: normal; }
    .billing-lists td.nowrap form { margin: 0; }
}

/* Homepage manager, layout pass (owner request 27 Nov 2026): three tabs, every part at the full width, the builder's
   Add / Save bar above the list and in view while it scrolls, numbered rows. Admin screen only; tokens only. */
.hp-page { display: grid; gap: var(--space-4); min-width: 0; }
.hp-tabs [role="tab"] { display: inline-flex; align-items: center; gap: var(--space-2); }
.hp-tabs [role="tab"] svg { width: 16px; height: 16px; flex: none; }
.hp-tab__short { display: none; }
.hp-panel { min-width: 0; }
.hp-panel > .card, .hp-panel .hp-builder { margin: 0; }
.hp-builder { display: grid; gap: var(--space-4); max-width: none; }
.hp-builder__bar { position: sticky; top: var(--topbar-height); z-index: var(--z-sticky); margin: 0 calc(-1 * var(--space-2)); padding: var(--space-3) var(--space-2); border-top: 0; border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.hp-list { counter-reset: hp-row; }
.hp-row { counter-increment: hp-row; }
.hp-row__bar::before { content: counter(hp-row); flex: none; display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: var(--radius-full); background: var(--color-surface-2); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
.hp-row:not(.is-off) .hp-row__bar::before { background: var(--color-brand-soft); color: var(--color-brand-text); }
.hp-row__bar { padding: var(--space-3) var(--space-4); }
.hp-row__fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
.hp-row__fields > fieldset, .hp-row__fields > .hp-row__style, .hp-row__fields > .hp-row__ads { grid-column: 1 / -1; }
.hp-row__fields .hp-field { align-content: start; }
.hp-row__style { align-items: flex-start; }
.hp-row__fields > * + .hp-row__style, .hp-row__fields > * + .hp-row__ads { padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.hp-stories { display: grid; gap: var(--space-4); min-width: 0; }
.hp-stories > .card, .hp-slots > .card, .hp-stories > [data-front-page-banner] > .alert { margin: 0; }
.hp-stories__hint { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; color: var(--color-text-2); font-size: var(--text-sm); }
.hp-stories__hint svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--tone-info); }
.hp-slots { display: grid; gap: var(--space-4); grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.hp-slots > .card:has(table) { grid-column: 1 / -1; }
.hp-slots .empty-state { padding: var(--space-5) var(--space-4); }
.hp-anchor { display: none; }
.hp-more { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); margin-top: 0; }
.hp-more > .card { margin: 0; }
@media (max-width: 899.98px) {
    .hp-slots { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639.98px) {
    /* Phones: the three tabs share the row (short names, no icons), so none is scrolled out of view. */
    .hp-tabs { display: flex; gap: 0; }
    .hp-tabs [role="tab"] { flex: 1 1 auto; min-width: 0; justify-content: center; padding-left: var(--space-1); padding-right: var(--space-1); text-align: center; }
    .hp-tabs [role="tab"] svg, .hp-tab__long { display: none; }
    .hp-tab__short { display: inline; }
    .hp-builder__bar { position: static; margin: 0; padding: var(--space-3) 0; }
    .hp-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; width: 100%; }
    .hp-add label { grid-column: 1 / -1; }
    .hp-add select { width: 100%; }
    .hp-save { width: 100%; justify-content: space-between; }
    .hp-row__main { flex-basis: 140px; }
    .hp-row__more { padding-left: var(--space-3); }
    .hp-layouts { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
    .hp-row__bar { padding: var(--space-2) var(--space-3); }
    .hp-row__bar::before { min-width: 22px; height: 22px; }
}

/* Overview: widgets of one "tabs" group in one card (owner request 27 Nov 2026). Tokens only. */
.dashboard-tabbed { gap: var(--space-4); }
.dashboard-tabs { margin: calc(-1 * var(--space-1)) 0 0; }
.dashboard-tabs [role="tab"] { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: var(--weight-semibold); }
.dashboard-tab-panel { display: grid; align-content: start; gap: var(--space-3); min-width: 0; }
.dashboard-tab-panel[hidden] { display: none; }
.dashboard-tab-panel > p { margin: 0; }
@media (max-width: 479.98px) {
    /* Phones: the tabs share the row, a long name wraps, so none is scrolled out of view. */
    .dashboard-tabs { gap: 0; overflow-x: visible; }
    .dashboard-tabs [role="tab"] { flex: 1 1 auto; min-width: 0; justify-content: center; gap: var(--space-1); padding-left: var(--space-1); padding-right: var(--space-1); font-size: var(--text-sm); white-space: normal; text-align: center; line-height: 1.25; }
    .dashboard-tabs [role="tab"] > span:first-child { min-width: 0; }
    .dashboard-tabs .badge { flex: none; margin-left: 0; }
}
/* Live coverage desk, easy layout (owner request 27 Nov 2026, as Dhading Update): status bar on top, the writing box and
   key points beside the timeline, update types as chips, the quick start. Prefixes live-desk-, live-kind, live-more-,
   live-quick, live-choice (grepped: unused elsewhere). Tokens only. */
.live-desk { display: grid; gap: var(--space-4); min-width: 0; }
.live-desk > .card, .live-desk-side > .card, .live-desk-main > .card { margin: 0; }
.live-desk-head { border-left: 4px solid var(--color-border); }
.live-desk-head.is-live { border-left-color: var(--tone-danger); }
.live-desk-head.is-paused { border-left-color: var(--tone-warning); }
.live-desk-head.is-scheduled { border-left-color: var(--tone-info, var(--color-brand)); }
.live-desk-head.is-closed { border-left-color: var(--tone-muted, var(--color-border)); }
.live-desk-head .live-desk-actions { gap: var(--space-2); }
.live-desk-grid { display: grid; gap: var(--space-4); align-items: start; min-width: 0; }
.live-desk-grid.has-side { grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); }
.live-desk-side { display: grid; gap: var(--space-4); align-content: start; min-width: 0; }
.live-desk-main { min-width: 0; }
.live-desk-composer { display: grid; gap: var(--space-3); }
.live-desk-composer__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.live-desk-composer__head .card-title { margin: 0; }
.live-desk-points { display: grid; gap: var(--space-3); }
.live-desk-points .card-title { margin: 0; }
.live-desk-points__list { margin: 0; padding-left: 1.2em; display: grid; gap: var(--space-1); }
.live-kinds { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--space-1); }
.live-kinds legend { padding: 0; margin-bottom: var(--space-1); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.live-kinds legend .hint { display: block; font-weight: 400; }
.live-kinds__row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.live-kind { position: relative; display: inline-flex; align-items: center; gap: var(--space-1); padding: 6px var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface); font-size: var(--text-sm); cursor: pointer; }
.live-kind input { position: absolute; opacity: 0; pointer-events: none; }
.live-kind::before { content: ""; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--color-muted); }
.live-kind--important::before { background: var(--tone-warning); }
.live-kind--breaking::before { background: var(--tone-danger); }
.live-kind--official::before { background: var(--color-brand); }
.live-kind:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand-text); font-weight: var(--weight-semibold); }
.live-kind:has(input:focus-visible) { outline: 2px solid var(--focus-color); outline-offset: 2px; }
.live-more-fields > summary { cursor: pointer; font-size: var(--text-sm); color: var(--color-brand-text); }
.live-more-fields[open] > summary { margin-bottom: var(--space-3); }
.live-quick__mode { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.live-quick__mode legend { padding: 0; margin-bottom: var(--space-1); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.live-choice { position: relative; display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.live-choice input { margin-top: 3px; }
.live-choice span { display: grid; gap: 2px; }
.live-choice small { color: var(--color-muted); font-size: var(--text-xs); }
.live-choice:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); }
.live-quick__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.live-quick-card { max-width: 640px; }
@media (max-width: 1099.98px) {
    .live-desk-grid.has-side { grid-template-columns: minmax(0, 1fr); }
}

/* Topics (news.topics), owner request 27 Nov 2026: the "On the website" card of the list and the "Suggest stories" line.
   Prefix topic- (the module's own). Tokens only. */
.topic-site { display: grid; gap: var(--space-4); margin-top: var(--space-4); }
.topic-site .card-title { margin: 0; }
.topic-site__grid { display: grid; gap: var(--space-4) var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.topic-suggest { flex-wrap: wrap; align-items: center; margin: 0 0 var(--space-3); }

/* Agency import, phase 1a (owner request 27 Nov 2026): the Filing tab's cards, per-feed numbers, recent checks.
   Prefix aimp- (the page's own). Tokens only. */
.aimp-form { display: grid; gap: var(--space-4); min-width: 0; }
.aimp-form > .card { margin: 0; }
.aimp-choices--grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.aimp-choice.is-locked { opacity: .65; cursor: not-allowed; }
.aimp-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); align-items: start; }
.aimp-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.aimp-quiet { display: grid; gap: var(--space-1); min-width: 0; }
.aimp-quiet__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.aimp-quiet .aimp-quiet__row input { flex: 1 1 6.5rem; width: auto; min-width: 0; }
.aimp-next { margin: var(--space-3) 0 0; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.aimp-tokens > summary { cursor: pointer; font-size: var(--text-sm); color: var(--color-brand-text); }
.aimp-tokens dl { display: grid; gap: var(--space-2) var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); margin: var(--space-3) 0; }
.aimp-tokens dl > div { display: grid; gap: 2px; }
.aimp-tokens dt { margin: 0; }
.aimp-tokens dd { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
.aimp-feed { justify-content: space-between; }
.aimp-feed__name { flex: 1 1 auto; display: flex; gap: 8px; align-items: center; min-width: 0; }
.aimp-feeds .aimp-feed .aimp-feed__max { flex: 0 0 4.5rem; width: 4.5rem; max-width: 4.5rem; min-width: 0; }
.aimp-runs { list-style: none; margin: 0; padding: 0; display: grid; }
.aimp-run { display: grid; grid-template-columns: 9rem 6rem minmax(0, 1fr); gap: var(--space-3); padding: var(--space-2) 0; border-top: 1px solid var(--color-border); font-size: var(--text-sm); }
.aimp-run:first-child { border-top: 0; }
.aimp-run__when, .aimp-run__kind { color: var(--color-muted); }
.aimp-run.is-bad .aimp-run__what { color: var(--tone-danger); }
@media (max-width: 639.98px) {
    .aimp-run { grid-template-columns: minmax(0, 1fr) auto; }
    .aimp-run__what { grid-column: 1 / -1; }
}

/* Agency import → Agency tab layout (owner, 27 Nov 2026): agencies in equal columns over the full width, the sign-in
   in its own band with the button on the same row on wide screens. Tokens only. */
.aimp-card__head { display: grid; gap: 4px; }
.aimp-card__head .aimp-muted { margin: 0; }
.aimp-connect { gap: var(--space-4); }
.aimp-connect .aimp-agencies { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.aimp-connect .aimp-agency { align-items: flex-start; min-height: 100%; }
.aimp-connect .aimp-agency__body { height: 100%; grid-template-rows: auto 1fr auto; }
.aimp-connect .aimp-agency__body b { font-size: var(--text-md, 1rem); }
.aimp-signin { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: 14px; background: var(--color-surface-2); }
.aimp-signin__title { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: 700; }
.aimp-signin__title svg { width: 16px; height: 16px; color: var(--color-muted); }
.aimp-signin__row { display: grid; gap: var(--space-3) var(--space-4); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: start; }
.aimp-signin__row .field { margin: 0; }
.aimp-signin__save { padding-top: 1.75rem; }
@media (max-width: 899.98px) {
    .aimp-signin__row { grid-template-columns: minmax(0, 1fr); }
    .aimp-signin__save { padding-top: 0; }
    .aimp-signin__save .btn { width: 100%; justify-content: center; }
}
/* Agency import → Agency tab (owner, 27 Nov 2026): the status tags right after the agency name. */
.aimp-agency__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.aimp-connect .aimp-agency__body { grid-template-rows: auto 1fr; }

/* Agency import → Rules tab (owner, 27 Nov 2026): three cards; four equal columns on wide screens. */
.aimp-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); border: 0; margin: 0; padding: 0; min-width: 0; }
.aimp-grid--center { align-items: center; }
.aimp-grid--center .check { margin-top: var(--space-4); }

/* Agency import page header (owner, 27 Nov 2026): one card — state, chips, switch — with the tabs as a full-width bar. */
.aimp-hero { padding: 0; overflow: hidden; display: grid; gap: 0; border-top: 4px solid var(--color-border-strong); }
.aimp-hero.is-on { border-top-color: var(--tone-success); }
.aimp-hero.is-warn { border-top-color: var(--tone-warning); }
.aimp-hero .aimp-head { padding: var(--space-5); gap: var(--space-4); }
.aimp-state { align-items: center; }
.aimp-dot { margin-top: 0; }
.aimp-state__text { display: grid; gap: var(--space-2); min-width: 0; }
.aimp-state__title { font-size: var(--text-xl, 1.25rem); line-height: 1.2; }
.aimp-state__line { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; }
.aimp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--radius-full); background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--color-text-2); font-size: var(--text-sm); font-weight: 600; white-space: nowrap; }
.aimp-chip svg { width: 14px; height: 14px; color: var(--color-muted); flex: none; }
.aimp-chip.is-muted { color: var(--color-muted); font-weight: 500; }
.aimp-chip.is-bad { background: var(--tone-danger-soft); border-color: var(--tone-danger-border); color: var(--tone-danger); }
.aimp-switch { margin: 0; }
.aimp-hero .aimp-live { min-height: 44px; padding-inline: var(--space-5); }
.aimp-hero .aimp-tabs { display: flex; width: 100%; max-width: none; gap: 0; padding: 0 var(--space-3); border: 0; border-top: 1px solid var(--color-border); border-radius: 0; background: var(--color-surface-2); overflow-x: auto; scrollbar-width: none; }
.aimp-hero .aimp-tabs::-webkit-scrollbar { display: none; }
.aimp-hero .aimp-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; border-radius: 0; border-bottom: 3px solid transparent; background: transparent; box-shadow: none; color: var(--color-text-2); }
.aimp-hero .aimp-tabs a svg { width: 16px; height: 16px; color: var(--color-muted); flex: none; }
.aimp-hero .aimp-tabs a:hover { background: transparent; color: var(--color-text); }
.aimp-hero .aimp-tabs a.is-active { background: transparent; box-shadow: none; color: var(--color-brand-text); border-bottom-color: var(--color-brand); }
.aimp-hero .aimp-tabs a.is-active svg { color: var(--color-brand); }
@media (max-width: 639.98px) {
    .aimp-hero .aimp-head { padding: var(--space-4); }
    .aimp-hero .aimp-switch, .aimp-hero .aimp-live { width: 100%; justify-content: center; }
    .aimp-hero .aimp-tabs { padding: 0; }
    .aimp-hero .aimp-tabs a { flex: 0 0 auto; padding: 12px 14px; }
}.aimp-hero .aimp-tabs { flex-wrap: nowrap; }

/* Agency import → Categories & tags (owner, 27 Nov 2026): desks as a multi-column grid of small boxes. */
.aimp-card__head--row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.aimp-card__head--row > div { display: grid; gap: 4px; min-width: 0; flex: 1 1 260px; }
.aimp-card .aimp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: var(--space-3); border: 0; margin: 0; padding: 0; min-width: 0; }
.aimp-card .aimp-map__row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); min-width: 0; }
.aimp-card .aimp-map__row.is-set { border-color: var(--color-brand); background: var(--color-surface-2); }
.aimp-map__desk { font-weight: 600; font-size: var(--text-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aimp-card .aimp-map__row select { width: 100%; min-width: 0; }
.aimp-extras { border: 0; margin: 0; padding: 0; min-width: 0; }
.aimp-extras { align-items: stretch; }
.aimp-extras > .field { padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: 12px; margin: 0; }
@media (max-width: 639.98px) {
    .aimp-card .aimp-map { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
}
.aimp-main-cat { max-width: 560px; border: 0; margin: 0; padding: 0; min-width: 0; grid-template-columns: minmax(0, 1fr); }

/* Agency import header (owner, 27 Nov 2026): a pulsing green dot while live, red while off; plain facts (no chip
   backgrounds); a live countdown to the next check. */
.aimp-dot { position: relative; }
.aimp-hero .aimp-dot:not(.is-on) { background: var(--tone-danger); box-shadow: 0 0 0 5px var(--tone-danger-soft); }
.aimp-dot.is-on::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: aimp-live-pulse 1.6s ease-out infinite; }
@keyframes aimp-live-pulse { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(2.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .aimp-dot.is-on::after { animation: none; } }
.aimp-state__line { gap: var(--space-2) var(--space-4); }
.aimp-state__line .aimp-chip { padding: 0; background: none; border: 0; border-radius: 0; }
.aimp-state__line .aimp-chip.is-bad { background: none; }
.aimp-countdown { font-variant-numeric: tabular-nums; }

/* Agency import (owner, 27 Nov 2026): the agency's own small logo (32x32) in the header and on the Agency tab. */
.aimp-agency-logo { width: 32px; height: 32px; flex: none; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--color-border); padding: 2px; }
.aimp-chip--agency { gap: 8px; }

/* Agency import → Agency stories (owner, 27 Nov 2026): a story not created yet reads right in its row, folded. */
.aimp-read { margin-top: var(--space-2); }
.aimp-read > summary { cursor: pointer; color: var(--color-brand-text); font-size: var(--text-sm); font-weight: 600; width: fit-content; }
.aimp-read__body { margin-top: var(--space-2); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-2); max-height: 420px; overflow: auto; font-size: var(--text-sm); }
.aimp-read__body p { margin: 0 0 .6em; }

/* Website settings (owner, 27 Nov 2026): every screen in the sidebar sub-menu with small section captions; the page shows
   only its own name instead of a row of tabs. */
.nav-sub-heading { margin: 10px 0 2px; padding: 0 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--goji-navy-muted, rgba(255,255,255,.55)); }
.nav-sub-heading:first-child { margin-top: 2px; }

/* Sidebar sub-menus (owner, 27 Nov 2026): no left border line, the dot close to the name, normal weight. */
.nav-sub-list { border-left: 0; padding-left: 0; margin-left: 24px; }
.nav-sub-list a { gap: 0; font-weight: var(--weight-regular); }
.nav-sub-list a.active { font-weight: var(--weight-medium, 500); }
.nav-flat .nav-sub-list a::before { margin-right: 10px; }
.nav-sub-heading { padding-left: 10px; }

/* Photo watermark → "How the logo is stamped" (owner, 27 Nov 2026): position on a small photo frame, styles as tiles with
   a sample, sliders with a hint, logo and smallest photo side by side, Save at the foot; the preview stays in view. */
.wm-form { display: grid; gap: var(--space-5); }
.wm-form__head { display: grid; gap: 6px; }
.wm-form__row { display: grid; gap: var(--space-5); grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.wm-form__row--bottom { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.wm-block { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-2); }
.wm-frame { position: relative; width: 100%; max-width: 260px; aspect-ratio: 4 / 3; border-radius: 12px; border: 1px solid var(--color-border);
    background: linear-gradient(160deg, var(--color-surface-2) 0%, var(--color-surface) 45%, var(--color-border-strong) 100%); overflow: hidden; }
.wm-frame::before { content: ""; position: absolute; left: 50%; bottom: -18%; width: 46%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50% 50% 0 0; background: rgba(255,255,255,.45); }
.wm-spot { position: absolute; display: grid; place-items: center; width: 38%; height: 30%; cursor: pointer; }
.wm-spot input { position: absolute; opacity: 0; pointer-events: none; }
.wm-spot.is-top_left { top: 0; left: 0; } .wm-spot.is-top_right { top: 0; right: 0; }
.wm-spot.is-bottom_left { bottom: 0; left: 0; } .wm-spot.is-bottom_right { bottom: 0; right: 0; }
.wm-spot.is-center { top: 35%; left: 31%; }
.wm-spot__mark { width: 34px; height: 18px; border-radius: 5px; border: 2px dashed rgba(17, 24, 39, .35); background: rgba(255,255,255,.35); transition: all .15s; }
.wm-spot:hover .wm-spot__mark { border-color: var(--color-brand); background: rgba(255,255,255,.7); }
.wm-spot:has(input:checked) .wm-spot__mark { border: 0; background: var(--color-brand); box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.wm-spot:has(input:focus-visible) .wm-spot__mark { outline: 2px solid var(--color-brand); outline-offset: 3px; }
.wm-spot__name { position: absolute; bottom: 4px; font-size: 11px; font-weight: 600; color: var(--color-text); background: rgba(255,255,255,.9); padding: 1px 6px; border-radius: 999px; opacity: 0; pointer-events: none; white-space: nowrap; }
.wm-spot.is-top_left .wm-spot__name, .wm-spot.is-top_right .wm-spot__name { bottom: auto; top: calc(50% + 12px); }
.wm-spot:has(input:checked) .wm-spot__name, .wm-spot:hover .wm-spot__name { opacity: 1; }
.wm-styles { display: grid; gap: var(--space-2); }
.wm-style { display: grid; grid-template-columns: auto 56px minmax(0, 1fr); align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; background: var(--color-surface); }
.wm-style:has(input:checked) { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); background: var(--color-brand-soft, var(--color-surface-2)); }
.wm-style__demo { position: relative; width: 56px; height: 40px; border-radius: 8px; background: linear-gradient(160deg, var(--color-muted), var(--color-border-strong)); overflow: hidden; }
.wm-style__demo i { position: absolute; right: 5px; bottom: 5px; width: 22px; height: 9px; border-radius: 2px; background: var(--tone-danger); }
.wm-style__demo.is-badge i { width: 26px; height: 13px; border: 3px solid #fff; background: var(--tone-danger); box-sizing: border-box; border-radius: 4px; }
.wm-style__text { display: grid; gap: 2px; min-width: 0; }
.wm-style__text small { color: var(--color-muted); font-size: var(--text-sm); }
.wm-sliders { padding: var(--space-4); border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-2); }
.wm-sliders output { color: var(--color-brand-text); font-weight: 700; }
.wm-slider__hint { font-size: 12px; color: var(--color-muted); }
.wm-min { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wm-min span { color: var(--color-muted); font-size: var(--text-sm); }
.wm-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
@media (min-width: 900px) { .wm-preview { position: sticky; top: 84px; } }
@media (max-width: 639.98px) {
    .wm-form__row, .wm-form__row--bottom { grid-template-columns: minmax(0, 1fr); }
    .wm-frame { max-width: none; }
}

/* Photo watermark → Recent photos (owner, 27 Nov 2026): the 7 newest, one row on wide screens. */
@media (min-width: 1200px) { .shi .wm-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

/* Watermark & share images → Share image (owner, 27 Nov 2026): grouped Design form with Save at its foot, the preview
   in view while editing, and gallery previews with a placeholder until each one is drawn. */
.shi-form { display: grid; gap: var(--space-4); }
.shi-form__head { display: grid; gap: 6px; }
.shi-block { display: grid; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
.shi-block .shi-sub { margin: 0; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .05em; color: var(--color-muted); font-weight: 700; }
.shi-autos { display: grid; gap: var(--space-2); }
.shi-auto-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-3); align-items: center; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-2); }
.shi-auto-row .field, .shi-auto-row .toggle-field, .shi-auto-row > * { margin: 0; min-width: 0; }
.shi-auto-row select { width: 100%; }
.shi-toggles { display: grid; gap: var(--space-2) var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.shi-toggles > * { margin: 0; }
.shi-pair { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.shi-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--color-border); }
@media (min-width: 900px) { .shi-preview { position: sticky; top: 84px; } }
.shi-tile-img { position: relative; aspect-ratio: 1200 / 630; overflow: hidden; background: linear-gradient(100deg, var(--color-surface-2) 30%, var(--color-surface) 50%, var(--color-surface-2) 70%); background-size: 300% 100%; animation: shi-shimmer 1.4s ease-in-out infinite; }
.shi-tile-img img { opacity: 0; transition: opacity .25s ease; }
.shi-tile-img.is-loaded { animation: none; background: var(--color-surface-2); }
.shi-tile-img.is-loaded img { opacity: 1; }
@keyframes shi-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .shi-tile-img { animation: none; } }
.shi-tile figcaption .small.muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shi-tile-actions .btn svg { width: 14px; height: 14px; }
@media (max-width: 639.98px) { .shi-auto-row { grid-template-columns: minmax(0, 1fr); } }

/* Watermark & share images (owner, 27 Nov 2026): explanations behind a "?" next to the heading. */
.shi-tip-row { position: relative; display: flex; align-items: center; gap: 8px; }
.shi-tip-row .card-title, .shi-tip-row .shi-sub { margin: 0; }
.shi-tip-row .goji-tip__box { left: 0; right: auto; top: calc(100% + 6px); width: max-content; max-width: min(420px, 100%); }

/* Preview cards (owner, 27 Nov 2026): less space between the title and the picture. */
.shi-preview, .wm-preview { gap: var(--space-3); }
.shi-preview > .card-title, .wm-preview > .card-title { margin: 0; }

/* Share image live preview (owner, 27 Nov 2026): the card dims while the new one is drawn. */
.shi-card-btn img { transition: opacity .2s ease; }
.shi-card-btn.is-updating img { opacity: .5; }

/* Share image → On every card (owner, 27 Nov 2026): three equal switches in a row, then colour and address. */
.shi-toggles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.shi-toggles > * { padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface-2); align-items: center; }
.shi-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.shi-pair .shi-color { display: flex; gap: 8px; }
.shi-pair .shi-hex { flex: 1; min-width: 0; }
@media (max-width: 719.98px) { .shi-toggles, .shi-pair { grid-template-columns: minmax(0, 1fr); } }
.shi-toggles { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.shi-toggles .field.has-tip > .toggle-field { flex: 1 1 auto; }
.shi-toggles .field.has-tip .goji-tip__box { left: 0; right: 0; }

/* On every card (owner, 27 Nov 2026): plain rows, no box; the label then its switch from the left, switches lined up. */
.shi-toggles > * { padding: 0; border: 0; border-radius: 0; background: none; }
.shi-toggles .field.has-tip > .toggle-field { flex: 0 0 auto; justify-content: flex-start; align-items: center; }
.shi-toggles .toggle-field > span { min-width: 130px; }

/* On every card (owner, 27 Nov 2026): the switch first on the left, its name right after it. */
.shi-toggles .toggle-field { gap: 10px; }
.shi-toggles .toggle-field > input.toggle { order: -1; }
.shi-toggles .toggle-field > span { min-width: 0; }

/* Share image → Your own text (owner, 27 Nov 2026): the fields, and the handle dragged on the preview. */
.shi-block:has(input[type="checkbox"][name="text_on"]:not(:checked)) .shi-text-fields { display: none; }
.shi-text-fields { display: grid; gap: var(--space-3); }
.shi-text-fields input[type="text"]#shi-text { width: 100%; }
.shi-text-row { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); align-items: start; }
.shi-bgs { border: 0; padding: 0; min-width: 0; }
.shi-bg-list { display: flex; flex-wrap: wrap; gap: 6px; }
.shi-bg { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--color-border); border-radius: 999px; cursor: pointer; font-size: var(--text-sm); }
.shi-bg input { position: absolute; opacity: 0; pointer-events: none; }
.shi-bg::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--color-border-strong); }
.shi-bg.is-dark::before { background: var(--goji-ink-strong); } .shi-bg.is-light::before { background: #fff; } .shi-bg.is-accent::before { background: var(--tone-warning); } .shi-bg.is-none::before { background: repeating-linear-gradient(45deg, #fff 0 3px, var(--color-border-strong) 3px 6px); }
.shi-bg:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft, var(--color-surface-2)); color: var(--color-brand-text); font-weight: 600; }
.shi-bg:has(input:focus-visible) { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.shi-stage { position: relative; }
.shi-drag { position: absolute; left: 0; top: 0; z-index: 2; padding: .32em .55em; border: 2px dashed rgba(255, 255, 255, .95); border-radius: 8px; outline: 1px solid rgba(0, 0, 0, .35);
    color: transparent; font-weight: 700; line-height: 1.15; white-space: nowrap; cursor: grab; touch-action: none; user-select: none; }
.shi-drag:hover, .shi-drag:focus-visible { background: rgba(37, 99, 235, .12); }
.shi-drag.is-dragging { cursor: grabbing; color: #fff; background: rgba(0, 0, 0, .55); }
.shi-drag[hidden] { display: none; }

/* Your own text handle (owner, 27 Nov 2026): invisible until pointed at, focused or dragged — the card stays clean. */
.shi-drag { border-color: transparent; outline-color: transparent; }
.shi-stage:hover .shi-drag, .shi-drag:focus-visible, .shi-drag.is-dragging { border-color: rgba(255, 255, 255, .95); outline-color: rgba(0, 0, 0, .35); }
.shi-drag:hover { background: rgba(37, 99, 235, .12); }

/* Share image → rotation (owner, 27 Nov 2026): same design, or the favourites by turns; the next stories' designs. */
.shi-rotate { display: grid; gap: var(--space-2); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.shi-rotate__choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; }
.shi-rotate__choice input { margin-top: 3px; }
.shi-rotate__choice span { display: grid; gap: 2px; }
.shi-rotate__choice small { color: var(--color-muted); font-size: var(--text-sm); }
.shi-rotate__choice:has(input:checked) { border-color: var(--color-brand); box-shadow: inset 0 0 0 1px var(--color-brand); background: var(--color-brand-soft, var(--color-surface-2)); }
.shi-rotate__next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.shi-rotate__pill { padding: 3px 10px; border-radius: 999px; background: var(--color-surface-2); border: 1px solid var(--color-border); font-size: 12.5px; }

/* Rotation choices (owner, 27 Nov 2026): one line each, the note behind a "?". */
.shi-rotate__choice { position: relative; align-items: center; white-space: nowrap; }
.shi-rotate__choice input { margin-top: 0; }
.shi-rotate__choice .goji-tip { margin-left: auto; }
.shi-rotate__choice .goji-tip__box { left: 0; right: 0; top: calc(100% + 6px); white-space: normal; }

/* Tooltips (owner, 27 Nov 2026): with a mouse they show while the "?" is pointed at only — a click no longer keeps them
   open; touch screens (no hover) still open them with a tap. */
@media (hover: hover) and (pointer: fine) {
    .goji-tip[aria-expanded="true"]:not(:hover):not(:focus-visible) + .goji-tip__box { display: none; }
}

/* Rotation choices: the earlier ".shi-rotate__choice span { display: grid }" also showed the tooltip boxes — hidden again, shown
   on hover / keyboard focus, and with a tap on touch screens (27 Nov 2026). */
.shi-rotate__choice span.goji-tip__box { display: none; }
.shi-rotate__choice .goji-tip:hover + span.goji-tip__box, .shi-rotate__choice .goji-tip:focus-visible + span.goji-tip__box { display: block; }
@media (hover: none) { .shi-rotate__choice .goji-tip[aria-expanded="true"] + span.goji-tip__box { display: block; } }

/* Gallery tools (owner, 27 Nov 2026): Star all / Clear favourites next to the search. */
.shi-gallery-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.shi-gallery-tools form { margin: 0; }
.shi-gallery-tools .btn svg { width: 14px; height: 14px; }

/* Settings → Auto Social (shared.auto_social, 27 Nov 2026): the website and the health of each connected account. */
.aso { display: grid; gap: var(--space-4); }
.aso-start { display: grid; gap: var(--space-3); justify-items: start; }
.aso-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.aso-card { display: grid; gap: var(--space-3); }
.aso-card .card-title { margin: 0; }
.aso-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; overflow-wrap: anywhere; }
.aso-accounts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aso-accounts li { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; }
.aso-accounts__name { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.aso-accounts__end { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.aso-accounts__end form { margin: 0; }
.aso-sub { font-size: .95rem; font-weight: 600; margin: 0; }
.aso-connect { display: grid; gap: 10px; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.aso-connect__row { display: flex; flex-wrap: wrap; gap: 8px; }
.aso-connect__row form { margin: 0; }
.aso-form { display: grid; gap: var(--space-3); }
.aso-choose { margin-bottom: var(--space-4); }
.aso-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aso-choice { display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; cursor: pointer; }
.aso-choice:has(input:checked) { border-color: var(--color-border-strong); background: var(--color-surface-2); }
.aso-choice input { flex-shrink: 0; width: 18px; height: 18px; }
.aso-choice .aso-accounts__name { flex: 1; }
.aso-face { position: relative; flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--color-surface-2); color: var(--color-muted); }
.aso-face--sm { width: 32px; height: 32px; }
.aso-face img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.aso-face__solo { width: 22px; height: 22px; }
.aso-face--sm .aso-face__solo { width: 18px; height: 18px; }
.aso-face__mark { position: absolute; right: -3px; bottom: -3px; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: var(--radius-full); border: 2px solid var(--color-surface); background: var(--color-surface); }
.aso-face__mark svg { width: 12px; height: 12px; }
.aso-face--facebook { color: var(--brand-facebook); } .aso-face--instagram { color: var(--brand-instagram); } .aso-face--threads { color: var(--color-text); }
.aso-face--telegram { color: var(--brand-telegram); } .aso-face--google_business { color: var(--brand-google); }
.aso-accounts li, .aso-rule-row { justify-content: flex-start; }
.aso-accounts li > .aso-accounts__name, .aso-rule-row > .aso-accounts__name { flex: 1; }
.aso-widget { display: grid; gap: var(--space-3); }
.aso-widget__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aso-widget__list li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.aso-widget__list .aso-accounts__name { flex: 1; min-width: 0; }
.aso-widget__list .aso-accounts__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aso-widget__connect { display: flex; flex-wrap: wrap; gap: 6px; }
.aso-widget__connect form { margin: 0; }
.aso-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px 0 6px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text); font: inherit; font-size: var(--text-sm); font-weight: var(--weight-medium); cursor: pointer; text-decoration: none; }
.aso-chip:hover { border-color: var(--color-brand); background: var(--color-brand-soft); }
.aso-chip .aso-face { width: 24px; height: 24px; background: transparent; }
.aso-chip .aso-face__solo { width: 18px; height: 18px; }
.pml { display: grid; gap: var(--space-4); }
.pml .card-title { margin: 0; }
.pml-check { display: grid; gap: var(--space-3); }
.pml-check--ok { display: flex; align-items: center; gap: var(--space-3); border-color: var(--tone-success-border); background: var(--tone-success-soft); }
.pml-check--bad { border-color: var(--tone-danger-border); }
.pml-check__head { display: flex; align-items: flex-start; gap: var(--space-3); }
.pml-check__icon { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--tone-danger-soft); color: var(--tone-danger); }
.pml-check--ok .pml-check__icon { background: var(--color-surface); color: var(--tone-success); }
.pml-check__icon svg { width: 20px; height: 20px; }
.pml-fix { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); }
.pml-fix--text { display: block; }
.pml-fix__what { display: grid; gap: 2px; min-width: 0; }
.pml-fix__path s { color: var(--tone-danger); font-family: var(--font-mono, ui-monospace, monospace); }
.pml-fix__form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.pml-fix__input { display: inline-flex; align-items: center; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); padding-left: 10px; }
.pml-fix__slash { color: var(--color-muted); font-family: var(--font-mono, ui-monospace, monospace); }
.pml-fix__input input { border: 0; background: transparent; min-width: 0; width: 180px; padding: 8px 10px 8px 2px; box-shadow: none; }
.pml-fix__input:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); }
.pml-patterns, .pml-optional { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pml-patterns > legend, .pml-optional > legend { display: flex; align-items: center; gap: 6px; padding: 0; margin-bottom: 4px; }
.pml-pattern { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.pml-pattern:has(input:checked) { border-color: var(--color-brand); background: var(--color-brand-soft); box-shadow: 0 0 0 1px var(--color-brand); }
.pml-pattern input { margin-top: 3px; flex: none; width: 18px; height: 18px; }
.pml-pattern__body { display: grid; gap: 4px; min-width: 0; }
.pml-pattern__name { display: flex; align-items: center; gap: 8px; font-weight: var(--weight-medium); }
.pml-pattern__url, .pml-custom code { font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--text-sm); color: var(--color-muted); background: var(--color-surface-2); padding: 2px 6px; border-radius: 6px; overflow-wrap: anywhere; justify-self: start; }
.pml-custom { display: grid; gap: 10px; margin: -2px 0 4px 44px; }
.pml-patterns:not(:has(input[value="custom"]:checked)) .pml-custom { opacity: .65; }
.pml-custom__input { display: flex; align-items: stretch; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.pml-custom__site { display: inline-flex; align-items: center; padding: 0 10px; background: var(--color-surface-2); color: var(--color-muted); font-size: var(--text-sm); border-right: 1px solid var(--color-border); white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; }
.pml-custom__input input { flex: 1; min-width: 0; border: 0; box-shadow: none; padding: 9px 10px; background: transparent; }
.pml-custom__input:focus-within { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); }
.pml-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pml-tag { font: inherit; font-family: var(--font-mono, ui-monospace, monospace); font-size: var(--text-sm); padding: 5px 10px; border: 1px solid var(--color-brand); border-radius: 6px; background: var(--color-surface); color: var(--color-brand-text, var(--color-brand)); cursor: pointer; }
.pml-tag:hover { background: var(--color-brand-soft); }
.pml-tag.is-on { background: var(--color-brand-soft); box-shadow: inset 0 0 0 1px var(--color-brand); font-weight: var(--weight-medium); }
.pml-bases { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.pml-now__list { display: grid; gap: 10px; margin: var(--space-3) 0 0; }
.pml-now__list div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.pml-now__list dt { color: var(--color-muted); font-size: var(--text-sm); }
.pml-now__list dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .pml-now__list div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pml-custom { margin-left: 0; }
  .pml-custom__site { max-width: 40%; }
  .pml-fix__form, .pml-fix__input { width: 100%; }
  .pml-fix__input input { width: 100%; }
}
.aso-rules { margin-top: var(--space-4); }
.aso-rules__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.aso-rules__head form { margin: 0; }
.aso-rules__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.aso-rule-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 12px; }
.aso-rule-row[data-on="no"] { background: var(--color-surface-2); }
.aso-rule { display: grid; gap: var(--space-4); }
.aso-section { display: grid; gap: var(--space-3); margin: 0; padding: 0; border: 0; min-width: 0; }
.aso-section > legend { padding: 0; margin-bottom: var(--space-2); }
.aso-modes { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.aso-mode { position: relative; margin: 0; cursor: pointer; }
.aso-mode input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.aso-mode__box { display: grid; gap: 2px; height: 100%; padding: 10px 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); }
.aso-mode input:checked + .aso-mode__box { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); }
.aso-mode input:focus-visible + .aso-mode__box, .aso-pill input:focus-visible + span { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.aso-timing, .aso-days { display: flex; flex-wrap: wrap; gap: 6px; }
.aso-pill { position: relative; margin: 0; cursor: pointer; }
.aso-pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.aso-pill span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-full); background: var(--color-surface); font-weight: var(--weight-medium); }
.aso-pill input:checked + span { border-color: var(--color-brand); background: var(--color-brand-soft); color: var(--color-text); box-shadow: 0 0 0 1px var(--color-brand); }
.aso-row { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: start; }
.aso-limits > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.aso-limits > summary::-webkit-details-marker { display: none; }
.aso-limits > summary::after { content: "▾"; color: var(--color-muted); }
.aso-limits[open] > summary::after { content: "▴"; }
.aso-limits__body { display: grid; gap: var(--space-3); padding-top: var(--space-2); }
.aso-warnings { margin: 0; padding: 10px 12px 10px 28px; border: 1px solid var(--tone-warning-border); border-radius: var(--radius-md); background: var(--tone-warning-soft); display: grid; gap: 4px; }
.aso-rule:not(:has(input[name="fb_mode"][value="image_caption"]:checked, input[name="fb_mode"][value="text_only"]:checked, input[name="fb_mode"][value="custom"]:checked)) .aso-when-caption,
.aso-rule:not(:has(input[name="fb_mode"][value="custom"]:checked)) .aso-when-custom,
.aso-rule:not(:has(input[type="checkbox"][name="fc_enabled"]:checked)) .aso-when-comment,
.aso-rule:not(:has(input[name="timing_mode"][value="delay"]:checked)) .aso-when-delay,
.aso-rule:not(:has(input[name="timing_mode"][value="fixed"]:checked)) .aso-when-fixed,
.aso-rule:not(:has(input[name="timing_mode"][value="optimal"]:checked)) .aso-when-optimal,
.aso-rule:not(:has(input[type="checkbox"][name="hours_on"]:checked)) .aso-when-hours { display: none; }
@media (max-width: 560px) {
  .aso-rule-row { flex-wrap: wrap; }
  .aso-rule-row .aso-accounts__end { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}
.ado-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); align-items: start; }
.ado-pitch, .ado-buy { display: grid; gap: var(--space-3); }
.ado-pitch .card-title, .ado-buy .card-title { margin: 0; }
.ado-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.ado-points li { display: flex; gap: var(--space-3); align-items: flex-start; }
.ado-points li > svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--color-brand); }
.ado-points li span { display: grid; gap: 2px; color: var(--color-muted); }
.ado-points li b { color: var(--color-text); }
.ado-periods { display: grid; gap: var(--space-2); }
.ado-period { position: relative; margin: 0; cursor: pointer; }
.ado-period.is-static { cursor: default; }
.ado-period input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ado-period__box { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.ado-period__name { font-weight: var(--weight-medium); color: var(--color-text); }
.ado-period__price { font-weight: var(--weight-bold); color: var(--color-text); white-space: nowrap; }
.ado-period__price .muted { font-size: var(--text-xs); font-weight: var(--weight-regular); }
.ado-period__note { grid-column: 1 / -1; font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--tone-success); }
.ado-period input:checked + .ado-period__box { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); }
.ado-period input:focus-visible + .ado-period__box { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.ado-form { margin: 0; }
.ado-form .btn { width: 100%; justify-content: center; }
@media (max-width: 860px) { .ado-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .aso-accounts li { flex-wrap: wrap; }
  .aso-accounts__end { width: 100%; justify-content: space-between; }
}

/* Lists: "Showing 25 of 5,117" and Load more under the list (owner, 29 Nov 2026; <x-goji::pagination>, goji/load-more.js). */
.load-more { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-5) 0 var(--space-3); }
.load-more__count { margin: 0; color: var(--color-muted); font-size: var(--text-md); }
.load-more__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2); }
.load-more__btn { min-width: 180px; min-height: 48px; padding: 0 var(--space-6); border-radius: var(--radius-full); font-size: var(--text-lg); font-weight: var(--weight-bold); justify-content: center; }
.load-more[aria-busy="true"] .load-more__btn { opacity: .7; pointer-events: none; }

/* Reactions → Settings → Design (owner, 29 Nov 2026): eleven designs, each with a sample bar (css/news-reactions.css). */
/* Share counter → Share buttons design (owner, 29 Nov 2026): eleven tiles, each with the real block (css/news-share.css). */
.shd-form { display: grid; gap: var(--space-3); }
.shd-designs { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; border: 0; min-width: 0; }
@media (min-width: 720px) { .shd-designs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shd-design:last-child { grid-column: span 2; } }
@media (min-width: 1280px) { .shd-designs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shd-design { position: relative; margin: 0; cursor: pointer; min-width: 0; }
.shd-design > input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.shd-design__box { display: grid; grid-template-rows: auto 1fr; gap: var(--space-2); height: 100%; padding: var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface); }
.shd-design > input:checked + .shd-design__box { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--color-brand); }
.shd-design > input:focus-visible + .shd-design__box { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.shd-design__name { display: grid; gap: 2px; }
.shd-design__preview { display: flex; align-items: center; min-height: 150px; overflow: hidden; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); pointer-events: none; }
.shd-design__preview .nsd { width: 100%; margin: 0; zoom: .82; }
.shd-classic { width: 100%; text-align: center; color: var(--color-muted); font-size: 13px; }
.shd-actions { display: flex; justify-content: flex-end; }
.rxn-designs { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin: 0; padding: 0; border: 0; min-width: 0; }
.rxn-designs > legend { margin-bottom: var(--space-2); padding: 0; font-weight: var(--weight-semibold); }
.rxn-design { position: relative; margin: 0; cursor: pointer; min-width: 0; }
.rxn-design > input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rxn-design__box { display: grid; gap: var(--space-2); height: 100%; padding: var(--space-3); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface); }
.rxn-design > input:checked + .rxn-design__box { border-color: var(--color-brand); box-shadow: 0 0 0 2px var(--color-brand); }
.rxn-design > input:focus-visible + .rxn-design__box { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.rxn-design__name { display: grid; gap: 2px; }
.rxn-design__preview { display: block; max-height: 190px; overflow: hidden; padding: var(--space-2); border-radius: var(--radius-md); background: var(--color-surface-2); pointer-events: none; }
.rxn-design__preview .n-reactions { zoom: .62; padding-top: 0; border-top: 0; }

/* Story editor → "AI tools" pop-up (owner, 29 Nov 2026): AI summary and story audio as two tabs — what it does, three
   steps, the controls and a preview of what readers see. Phones: centred, ≤97% wide, scrolls inside. */
.ned-ai-btn { gap: var(--space-2); border-color: var(--tone-brand-border); background: var(--tone-brand-soft); color: var(--tone-brand); }
.ned-ai-btn:hover { border-color: var(--color-brand); }
.ned-ai-btn svg { width: 16px; height: 16px; }
.ned-ai-btn__dots { display: inline-flex; gap: 3px; }
.ned-ai__state { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--color-border-strong); }
.ned-ai__state.is-on { background: var(--tone-success); }
.ned-ai__state.is-wait { background: var(--tone-warning); }
.ned-ai__state.is-fail { background: var(--tone-danger); }
dialog.modal.wide.ned-ai { width: min(960px, 97vw); max-height: 92vh; max-height: 92dvh; }
.ned-ai .modal-body { display: grid; gap: var(--space-6); }
.ned-ai__tabs { display: grid; gap: var(--space-6); }
.ned-ai__tablist { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-3); border: 0; padding: 0 0 var(--space-6); margin: 0;
  border-bottom: 1px solid var(--color-border); }
.ned-ai__card { position: relative; display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg);
  background: var(--color-surface); transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.ned-ai__card:hover { border-color: var(--color-brand); }
.ned-ai__card:has([aria-selected="true"]) { border-color: var(--color-brand); background: var(--tone-brand-soft); box-shadow: 0 0 0 1px var(--color-brand); }
.ned-ai__tab { display: flex; align-items: flex-start; gap: var(--space-3); flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: var(--color-text);
  text-align: left; font: inherit; cursor: pointer; }
.ned-ai__tab::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.ned-ai__tab:focus-visible { outline: none; }
.ned-ai__card:has(.ned-ai__tab:focus-visible) { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.ned-ai__tabtext b { font-size: 15px; }
/* The cards are not underlined tabs: the general tab look stays off. */
.ned-ai__tablist { overflow: visible; }
.ned-ai__tablist .ned-ai__tab, .ned-ai__tablist .ned-ai__tab:hover, .ned-ai__tablist .ned-ai__tab[aria-selected="true"] { margin: 0; padding: 0; border: 0; white-space: normal; color: var(--color-text); font-weight: inherit; }
.ned-ai__empty { margin: 0; padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-muted); font-size: 13px; line-height: 1.5; }
.ned-ai__status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.ned-ai__chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--radius-full); background: var(--tone-muted-soft); color: var(--tone-muted);
  border: 1px solid var(--tone-muted-border); font-size: 11px; font-weight: var(--weight-semibold); letter-spacing: .06em; }
.ned-ai__card.is-on .ned-ai__chip { background: var(--tone-success-soft); color: var(--tone-success); border-color: var(--tone-success-border); }
.ned-ai__switch { position: relative; z-index: 1; flex: none; margin-left: auto; }
.ned-ai__switch .field { margin: 0; }
.ned-ai__sub { margin-bottom: var(--space-1); font-size: 13px; font-weight: var(--weight-semibold); }
.ned-ai__tabicon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: var(--radius-md); background: var(--color-brand); color: var(--color-surface); }
.ned-ai__tabicon svg { width: 20px; height: 20px; }
.ned-ai__tabtext { display: grid; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ned-ai__tabtext .small { color: var(--color-muted); }
.ned-ai__panel { display: grid; gap: var(--space-5); }
.ned-ai__panel[hidden] { display: none; }
.ned-ai__intro { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--tone-brand-soft), var(--color-surface-2)); }
.ned-ai__bigicon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--color-surface); color: var(--color-brand); box-shadow: var(--shadow-sm); }
.ned-ai__bigicon svg { width: 26px; height: 26px; }
.ned-ai__title { margin: 0 0 var(--space-1); font-size: 18px; font-weight: var(--weight-semibold); }
.ned-ai__lead { margin: 0; color: var(--color-text-2); line-height: 1.55; }
.ned-ai__how { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.ned-ai__how li { display: flex; align-items: flex-start; gap: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-md); font-size: 13px; line-height: 1.45; }
.ned-ai__num { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--color-brand); color: var(--color-surface); font-size: 12px; font-weight: var(--weight-semibold); }
.ned-ai__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@media (min-width: 760px) { .ned-ai__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.ned-ai__controls, .ned-ai__demo { display: grid; gap: var(--space-3); min-width: 0; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.ned-ai__label { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: 12px; font-weight: var(--weight-semibold); letter-spacing: .04em; text-transform: uppercase; color: var(--color-muted); }
.ned-ai__stage { padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface-2); }
.ned-ai__stage .ais { margin: 0; }
/* The audio preview: the website's "Listen to this story" box. */
.ned-ai-player { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.ned-ai-player__label { margin: 0; font-weight: var(--weight-semibold); }
.ned-ai-player__audio { width: 100%; }
.ned-ai-player__mock { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-full); background: var(--color-surface-2); }
.ned-ai-player__play { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--color-brand); color: var(--color-surface); }
.ned-ai-player__play svg { width: 16px; height: 16px; }
.ned-ai-player__wave { display: flex; align-items: center; gap: 3px; flex: 1 1 auto; height: 28px; min-width: 0; overflow: hidden; }
.ned-ai-player__wave span { flex: none; width: 3px; height: 40%; border-radius: 2px; background: var(--color-border-strong); }
.ned-ai-player__wave span:nth-child(3n+1) { height: 70%; }
.ned-ai-player__wave span:nth-child(4n+2) { height: 95%; }
.ned-ai-player__wave span:nth-child(5n+3) { height: 55%; }
.ned-ai-player__wave span:nth-child(-n+7) { background: var(--color-brand); }
.ned-ai-player__time { flex: none; font-size: 12px; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.ned-ai-player__note { margin: 0; font-size: 12px; color: var(--color-muted); }
@media (max-width: 640px) { dialog.modal.wide.ned-ai { width: 97vw; max-width: 97vw; margin: auto; border-radius: var(--radius-xl); } .ned-ai__intro { padding: var(--space-3); } }

/* Result window → "AI for this story" (29 Nov 2026): the AI tools' live progress, one row each. */
.ned-result__ai { display: grid; gap: var(--space-2); width: 100%; padding: var(--space-3); border: 1px solid var(--tone-brand-border); border-radius: var(--radius-lg); background: var(--tone-brand-soft); text-align: left; }
.ned-result__ai[hidden] { display: none; }
.ned-result__ai-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: 13px; font-weight: var(--weight-semibold); color: var(--tone-brand); }
.ned-result__ai-head > span { display: inline-flex; align-items: center; gap: var(--space-1); }
.ned-result__ai-head svg { width: 16px; height: 16px; }
.ned-result__ai-list { display: grid; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.ned-result__ai-list li { position: relative; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.ned-result__ai-mark { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; font-weight: var(--weight-semibold);
  background: var(--tone-muted-soft); color: var(--tone-muted); }
.ned-result__ai-list li.is-on .ned-result__ai-mark { background: var(--tone-success-soft); color: var(--tone-success); }
.ned-result__ai-list li.is-fail .ned-result__ai-mark { background: var(--tone-danger-soft); color: var(--tone-danger); }
.ned-result__ai-list li.is-working .ned-result__ai-mark { border: 3px solid var(--tone-brand-border); border-top-color: var(--color-brand); background: none; animation: ned-ai-spin .8s linear infinite; }
.ned-result__ai-text { display: grid; gap: 1px; min-width: 0; font-size: 13px; }
.ned-result__ai-text span { color: var(--color-muted); }
.ned-result__ai-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--color-brand), transparent); background-size: 50% 100%;
  background-repeat: no-repeat; animation: ned-ai-slide 1.4s ease-in-out infinite; }
@keyframes ned-ai-spin { to { transform: rotate(360deg); } }
@keyframes ned-ai-slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@media (prefers-reduced-motion: reduce) { .ned-result__ai-list li.is-working .ned-result__ai-mark, .ned-result__ai-bar { animation: none; } }

/* Share image → "Use as featured image" (29 Nov 2026): one button under the preview, its note behind an info tip. */
.ned-share__use { display: flex; align-items: center; gap: var(--space-2); }
.ned-share__use .btn svg { width: 15px; height: 15px; }

/* News list → a row's "AI" button (29 Nov 2026): small, with one dot per AI tool (same colours as the editor). */
.story-ai { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--tone-brand-border); border-radius: var(--radius-full);
  background: var(--tone-brand-soft); color: var(--tone-brand); font: inherit; font-size: 12px; font-weight: var(--weight-semibold); line-height: 1.6; cursor: pointer; }
.story-ai:hover { border-color: var(--color-brand); }
.story-ai:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.story-ai svg { width: 13px; height: 13px; }
.story-ai__dots { display: inline-flex; gap: 3px; margin-left: 2px; }
.story-ai__dots .ned-ai__state { width: 7px; height: 7px; }

/* Agency import → "Agency stories": today's (or the latest) at most 20, said beside the title (29 Nov 2026). */
.aimp-stories__when { margin-left: var(--space-2); padding: 1px 8px; border-radius: var(--radius-full); background: var(--color-surface-2); color: var(--color-muted);
  font-size: 12px; font-weight: var(--weight-semibold); vertical-align: middle; }

/* The editor's address line (owner, 29 Nov 2026: clearer, Copy as an icon, words and icons one size, two steps smaller):
   13 px words, 13 px icons in equal 24 px buttons (Copy, the info tip, the pencil). */
.ned-address { gap: 4px 8px; font-size: 13px; line-height: 1.4; }
.ned-address .ned-address__label, .ned-address .ned-address__value { font-size: 13px; }
.ned-address .ned-address__copy, .ned-address .goji-tip, .ned-address .ned-address__edit { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; margin: 0;
  padding: 0; border: 0; border-radius: 6px; background: none; color: var(--color-muted); cursor: pointer; }
.ned-address .ned-address__copy[hidden] { display: none; }
.ned-address .ned-address__copy:hover, .ned-address .ned-address__edit:hover, .ned-address .goji-tip:hover { background: var(--color-surface-2); color: var(--color-brand); }
.ned-address .ned-address__copy svg, .ned-address .goji-tip svg, .ned-address .ned-address__edit svg { width: 13px; height: 13px; }
.ned-address .ned-address__tip { display: inline-grid; align-self: center; height: 24px; margin: 0; gap: 0; }
/* …in the editor's text-flow address line (26 Nov): the three icon buttons sit centred on the words, one size. */
.ned-layout .ned-address { font-size: 13px; line-height: 24px; }
.ned-layout .ned-address > .ned-address__label { margin-right: 8px; }
.ned-layout .ned-address > .ned-address__copy, .ned-layout .ned-address > .ned-address__tip, .ned-layout .ned-address > .ned-address__edit { display: inline-grid; vertical-align: middle; margin-left: 4px; padding: 0; }
.ned-layout .ned-address > .ned-address__copy[hidden] { display: none; }

/* AI tools → Translation (news.translate, 29 Nov 2026): languages, each one's state and headline; the tabs preview. */
.ntr-langs { display: grid; gap: var(--space-1); margin: 0; padding: 0; border: 0; }
.ntr-lang { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.ntr-lang input[type="text"], .ntr-lang textarea { width: 100%; }
.ntr-demo { display: grid; gap: var(--space-2); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-surface); border: 1px solid var(--color-border); }
.ntr-demo__tabs { display: inline-flex; gap: 4px; justify-self: start; padding: 4px; border-radius: var(--radius-full); background: var(--color-surface-2); }
.ntr-demo__tab { padding: 4px 14px; border-radius: var(--radius-full); font-weight: var(--weight-semibold); color: var(--color-text-2); }
.ntr-demo__tab.is-on { background: var(--color-surface); color: var(--color-brand); box-shadow: var(--shadow-xs); }
.ntr-demo__headline { margin: 0; font-size: 17px; font-weight: var(--weight-semibold); }
.ntr-demo__other { margin: 0; font-size: 14px; color: var(--color-text-2); }

/* AI tools → Translation: the languages as cards to tick, side by side (owner, 29 Nov 2026). */
.ntr-langs legend { margin-bottom: var(--space-2); }
.ntr-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2); }
.ntr-pick__opt { display: flex !important; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.ntr-pick__opt:hover { border-color: var(--color-brand); }
.ntr-pick__opt input[type="checkbox"] { flex: none; display: inline-block; width: 18px; height: 18px; margin: 0; accent-color: var(--color-brand); cursor: pointer; }
.ntr-pick__opt:has(input:checked) { border-color: var(--color-brand); background: color-mix(in srgb, var(--color-brand) 7%, var(--color-surface)); }
.ntr-pick__opt:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand) 25%, transparent); }
.ntr-pick__opt:has(input:disabled) { cursor: default; opacity: .7; }
.ntr-pick__text { display: grid; gap: 1px; min-width: 0; line-height: 1.25; }
.ntr-pick__name { font-size: 15px; font-weight: var(--weight-semibold); color: var(--color-text); }
.ntr-pick__sub { font-size: 12px; color: var(--color-text-2); }

/* AI tools cards: the ON/OFF chip and a short note on one line, small (owner, 29 Nov 2026). */
.ned-ai__status { flex-wrap: nowrap; gap: var(--space-2); min-width: 0; }
.ned-ai__chip { flex: none; }
.ned-ai__line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; line-height: 1.4; color: var(--color-muted); }

/* AI tools "how it works": each step on one line (owner, 29 Nov 2026). */
.ned-ai__how li { align-items: center; min-width: 0; }
.ned-ai__step { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }

/* Platform → Daily horoscope (news.horoscope, 29 Nov 2026): the day, how it is made, the twelve cards (News → Rashifal's). */
.hs-head { gap: var(--space-4); }
.hs-mode { display: grid; gap: var(--space-3); }
.hs-mode__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.hs-mode__choices legend { margin-bottom: var(--space-2); }
.hs-mode__opt { display: flex !important; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 14px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.hs-mode__opt input { flex: none; margin-top: 3px; accent-color: var(--color-brand); }
.hs-mode__opt > span { display: grid; gap: 2px; }
.hs-mode__opt:has(input:checked) { border-color: var(--color-brand); background: color-mix(in srgb, var(--color-brand) 7%, var(--color-surface)); }
.hs-warn { padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--tone-warning-soft); color: var(--tone-warning); }

/* News → Rashifal: where the horoscope comes from (phase 2, 29 Nov 2026). */
.rs-source { display: grid; gap: var(--space-3); margin-bottom: var(--space-4); }
.rs-source__choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-2); margin: 0; padding: 0; border: 0; }
.rs-source__choices legend { margin-bottom: var(--space-2); }
.rs-source__opt { display: flex !important; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 14px; border: 1.5px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.rs-source__opt input { flex: none; margin-top: 3px; accent-color: var(--color-brand); }
.rs-source__opt > span { display: grid; gap: 2px; }
.rs-source__opt:has(input:checked) { border-color: var(--color-brand); background: color-mix(in srgb, var(--color-brand) 7%, var(--color-surface)); }
.rs-source__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.rs-source__reset { margin: calc(-1 * var(--space-2)) 0 var(--space-4); }

/* Auto Social: the "Connect" buttons with each platform's own logo in its own colours (owner, 29 Nov 2026). */
.aso-brand-btn { display: inline-flex; align-items: center; gap: 8px; padding-inline: 12px 14px; font-weight: var(--weight-semibold); }
.aso-brand-btn__icons { display: inline-flex; align-items: center; }
.aso-brand-btn__icons .aso-brand + .aso-brand { margin-left: -5px; box-shadow: 0 0 0 2px var(--color-surface); border-radius: 6px; }
.aso-brand { flex: none; display: block; }
.aso-chip .aso-brand { width: 24px; height: 24px; }

/* Auto Social: an account's posting settings — a bigger window with the example post on the right (owner, 30 Nov 2026).
   Phones: one column, the example right under the post formats. auto-social-preview.js fills it. */
dialog.modal.wide.aso-rule-dialog { width: min(1120px, 97vw); max-height: 94vh; max-height: 94dvh; }
.aso-mode__box { align-content: start; }
.aso-mode__tag { justify-self: start; margin-top: 4px; padding: 1px 8px; border-radius: var(--radius-full); background: var(--tone-warning-soft); color: var(--color-text); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.aso-preview { display: grid; gap: var(--space-2); align-content: start; min-width: 0; padding: var(--space-3); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.aso-preview__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.aso-preview__note { margin: 0; color: var(--color-muted); }
.aso-preview__note.is-warning { color: var(--color-text); padding: 6px 10px; border-radius: var(--radius-md); background: var(--tone-warning-soft); border: 1px solid var(--tone-warning-border); }
.aso-pv { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); line-height: 1.4; }
.aso-pv [hidden] { display: none !important; }
.aso-pv__top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
.aso-pv__top .aso-face, .aso-pv__comment .aso-face { width: 32px; height: 32px; }
.aso-pv__who { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.aso-pv__who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aso-pv__who small { display: inline-flex; align-items: center; gap: 3px; color: var(--color-muted); font-size: var(--text-xs); }
.aso-pv__who svg { width: 11px; height: 11px; }
.aso-pv__dots { color: var(--color-muted); font-weight: 700; letter-spacing: 1px; }
.aso-pv__text { padding: 0 12px 10px; white-space: pre-line; overflow-wrap: anywhere; }
.aso-pv__link { color: var(--brand-facebook); }
.aso-pv__photo { position: relative; display: grid; place-items: center; aspect-ratio: 1.91 / 1; background: var(--color-surface-3); color: var(--color-muted); font-size: var(--text-xs); overflow: hidden; }
.aso-pv__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.aso-pv__card { display: grid; background: var(--color-surface-2); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.aso-pv__card-body { display: grid; gap: 2px; padding: 8px 12px 10px; }
.aso-pv__card-body small { color: var(--color-muted); font-size: var(--text-xs); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aso-pv__card-body b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aso-pv__cta { align-self: flex-start; margin: 10px 12px 0; padding: 6px 14px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-full); color: var(--brand-google); font-weight: var(--weight-semibold); }
.aso-pv__bar { display: flex; justify-content: space-around; gap: 8px; margin: 8px 12px 0; padding: 6px 0; border-top: 1px solid var(--color-border); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.aso-pv__bar:empty { display: none; }
.aso-pv__bar svg { width: 20px; height: 20px; }
.aso-pv__comment { display: flex; align-items: flex-start; gap: 8px; padding: 4px 12px 12px; }
.aso-pv__bubble { display: grid; gap: 1px; min-width: 0; padding: 6px 10px; border-radius: 16px; background: var(--color-surface-2); white-space: pre-line; overflow-wrap: anywhere; font-size: var(--text-xs); }
/* Instagram: square picture first, the icons, then the caption under the account name. */
.aso-pv--instagram .aso-pv__photo { order: 1; aspect-ratio: 1 / 1; }
.aso-pv--instagram .aso-pv__bar { order: 2; justify-content: flex-start; gap: 14px; margin: 0; padding: 8px 12px 4px; border: 0; color: var(--color-text); }
.aso-pv--instagram .aso-pv__text { order: 3; }
.aso-pv--instagram .aso-pv__comment { order: 4; }
.aso-pv--instagram .aso-pv__link, .aso-pv--threads .aso-pv__link { color: var(--color-text-2); }
.aso-pv--threads .aso-pv__photo { margin: 0 12px; border-radius: var(--radius-md); }
.aso-pv--threads .aso-pv__bar { justify-content: flex-start; gap: 14px; border: 0; color: var(--color-text); }
.aso-pv--telegram .aso-pv__photo { order: -1; }
.aso-pv--telegram .aso-pv__top { order: -2; }
.aso-pv--telegram .aso-pv__text { padding-top: 8px; }
.aso-pv--telegram .aso-pv__link { color: var(--brand-telegram); }
.aso-pv--google_business .aso-pv__photo { order: -1; }
.aso-pv--google_business .aso-pv__top { order: -2; }
.aso-pv--google_business .aso-pv__text { padding-top: 8px; padding-bottom: 0; }
.aso-pv--google_business { padding-bottom: 12px; }
@media (min-width: 900px) {
    /* Settings on the left, the example on the right; it stays in view while the settings scroll. */
    .aso-rule.aso-rule--preview { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); column-gap: var(--space-6); row-gap: 0; align-items: start; }
    .aso-rule.aso-rule--preview > * { grid-column: 1; margin-bottom: var(--space-4); }
    .aso-rule.aso-rule--preview > .aso-preview { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: 0; margin-bottom: 0; }
    .aso-rule--preview .aso-modes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
}
@media (max-width: 639.98px) {
    dialog.modal.wide.aso-rule-dialog { width: 97vw; max-width: 97vw; margin: auto; border-radius: var(--radius-xl); }
}

/* How websites pay for an AI use (owner, 30 Nov 2026): the margin and least price show only for "Our cost + margin". */
.usage-pricing:not(:has(input[name="pricing_mode"][value="cost"]:checked)) .usage-pricing__cost { display: none; }
/* Platform → Billing → Dollar rate. */
.usd-rate__now { display: grid; gap: 2px; }
.usd-rate__big { font-size: var(--text-2xl); font-weight: var(--weight-semibold); line-height: 1.2; }
.usd-rate__uses { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.usd-rate__nrb { display: grid; gap: 4px; margin: 0; }
.usd-rate__nrb > div { display: flex; justify-content: space-between; gap: var(--space-3); }
.usd-rate__nrb dt { color: var(--color-muted); }
.usd-rate__nrb dd { margin: 0; font-weight: var(--weight-semibold); }

/* Website credit (owner, 30 Nov 2026): the topbar chip and the Credit page. Tokens only. */
.topbar .topbar-credit { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-full); border: 1px solid var(--topbar-line); color: var(--topbar-text); font-size: var(--text-sm); font-weight: var(--weight-semibold); white-space: nowrap; text-decoration: none; }
.topbar .topbar-credit:hover { background: var(--topbar-hover); text-decoration: none; }
.topbar .topbar-credit svg { width: 15px; height: 15px; }
.topbar .topbar-credit.is-low { background: var(--tone-warning-soft); border-color: var(--tone-warning-border); color: var(--color-text); }
@media (max-width: 639.98px) { .topbar .topbar-credit { padding: 0 8px; } .topbar .topbar-credit svg { display: none; } }
.credit-stats { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.credit-plus { color: var(--tone-success); font-weight: var(--weight-semibold); }
.credit-amounts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.credit-amounts > legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px; }
.credit-amount { position: relative; margin: 0; cursor: pointer; }
.credit-amount input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.credit-amount span { display: grid; place-items: center; height: 42px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); font-weight: var(--weight-semibold); background: var(--color-surface); }
.credit-amount input:checked + span { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); color: var(--color-brand-text); }
.credit-amount input:focus-visible + span { outline: 2px solid var(--color-brand); outline-offset: 2px; }
/* AI tools: what one use costs, where the website pays from its credit (30 Nov 2026). */
.ned-ai__price { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0; padding: 3px 10px; border-radius: var(--radius-full); background: var(--tone-success-soft); border: 1px solid var(--tone-success-border); color: var(--color-text); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.ned-ai__price svg { width: 13px; height: 13px; flex: none; }
/* Agency import → Filing → Pictures: what a shared story shows (owner, 30 Nov 2026). Off without Share images. */
.aimp-share { display: grid; gap: 8px; margin: var(--space-3) 0 0; padding: 0; border: 0; min-width: 0; }
.aimp-share__choices { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.aimp-share__choice { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.aimp-share__choice input { margin-top: 3px; flex: none; }
.aimp-share__choice span { display: grid; gap: 2px; }
.aimp-share__choice small { color: var(--color-muted); }
.aimp-share__choice:has(input:checked) { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); background: var(--color-brand-soft); }
.aimp-share.is-off { opacity: .55; }
.aimp-share.is-off .aimp-share__choice { cursor: not-allowed; }

/* Auto Social: stories shared this month on the free tier (owner, 30 Nov 2026). Tokens only. */
.aso-stories { display: grid; gap: var(--space-2); }
/* Auto Social page, clean layout (owner, 30 Nov 2026): a status header with three tiles, then one list of accounts. */
.aso-hero { display: grid; gap: var(--space-4); padding: var(--space-5); background: linear-gradient(135deg, var(--color-brand-soft) 0%, var(--color-surface) 55%); }
.aso-hero__main { display: flex; align-items: flex-start; gap: var(--space-3); min-width: 0; }
.aso-hero__icon { flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--color-brand); color: var(--color-brand-ink); box-shadow: var(--shadow-sm); }
.aso-hero__icon svg { width: 24px; height: 24px; }
.aso-hero.is-paused .aso-hero__icon { background: var(--tone-warning-soft); color: var(--tone-warning); box-shadow: none; }
.aso-hero__text { display: grid; gap: 2px; min-width: 0; }
.aso-hero__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--text-xl); font-weight: var(--weight-semibold); color: var(--color-text); }
.aso-hero__lead { margin: 0; color: var(--color-muted); }
.aso-hero__tiles { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.aso-tile { display: grid; gap: 6px; align-content: start; min-width: 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.aso-tile__label { font-size: var(--text-xs); font-weight: var(--weight-semibold); letter-spacing: .05em; text-transform: uppercase; color: var(--color-muted); }
.aso-tile__value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; overflow-wrap: anywhere; }
.aso-tile__big { font-size: var(--text-2xl); line-height: 1; }
.aso-tile__note { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.aso-tile__note.is-warn { color: var(--tone-warning); font-weight: var(--weight-medium); }
.aso-tile form { margin: 0; }
.aso-accounts-card { gap: var(--space-4); }
.aso-accounts-card__head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.aso-accounts-card__head form { margin: 0; }
.aso-list { list-style: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.aso-row-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-3); padding: 12px 16px; background: var(--color-surface); transition: background var(--duration) var(--ease); }
.aso-row-card + .aso-row-card { border-top: 1px solid var(--color-border); }
.aso-row-card:hover { background: var(--color-surface-2); }
.aso-row-card.is-off .aso-face { opacity: .55; filter: grayscale(.7); }
.aso-row-card.is-problem { box-shadow: inset 3px 0 0 var(--tone-danger); }
.aso-row-card__name { display: grid; gap: 2px; min-width: 0; }
.aso-row-card__name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aso-row-card__how { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.aso-row-card__how span { padding: 1px 8px; border: 1px solid var(--color-border); border-radius: var(--radius-full); background: var(--color-surface-2); color: var(--color-text-2); font-size: var(--text-xs); line-height: 1.6; }
.aso-row-card__actions { display: flex; align-items: center; gap: 6px; }
.aso-row-card__actions form { margin: 0; }
.aso-row-card__unlink { color: var(--color-muted); }
.aso-row-card__unlink:hover { color: var(--tone-danger); }
.aso-row-card__unlink-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.aso-empty { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.aso-empty__icon { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--tone-brand-soft); color: var(--tone-brand); }
.aso-empty__icon svg { width: 20px; height: 20px; }
.aso-accounts-card .aso-connect { padding: var(--space-4); border: 0; border-radius: var(--radius-lg); background: var(--color-surface-2); }
.aso-connect__lock { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 639.98px) {
    .aso-hero { padding: var(--space-4); }
    .aso-row-card { grid-template-columns: auto minmax(0, 1fr) auto; padding: 12px; }
    .aso-row-card__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
.aso-stories__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.aso-stories__count { margin: 0; font-size: var(--text-lg); }
.aso-stories__count b { font-size: var(--text-2xl); }
.aso-stories__bar { width: 100%; height: 10px; border: 0; border-radius: var(--radius-full); overflow: hidden; background: var(--color-surface-3); appearance: none; -webkit-appearance: none; }
.aso-stories__bar::-webkit-progress-bar { background: var(--color-surface-3); border-radius: var(--radius-full); }
.aso-stories__bar::-webkit-progress-value { background: var(--color-brand); border-radius: var(--radius-full); }
.aso-stories__bar::-moz-progress-bar { background: var(--color-brand); border-radius: var(--radius-full); }
.aso-stories.is-near .aso-stories__bar::-webkit-progress-value, .aso-stories.is-full .aso-stories__bar::-webkit-progress-value { background: var(--tone-warning); }
.aso-stories.is-near .aso-stories__bar::-moz-progress-bar, .aso-stories.is-full .aso-stories__bar::-moz-progress-bar { background: var(--tone-warning); }
.billing-free-tier { display: inline-flex; align-items: center; gap: 6px; margin-left: var(--space-2); font-size: var(--text-sm); }
.billing-free-tier input { width: 84px; }

/* Share images: the tile behind the logo (owner, 30 Nov 2026). Tokens only. */
.shi-logo-bg { margin-top: var(--space-3); }
.shi-logo-color { display: inline-flex; align-items: center; }
.shi-logo-color input[type="color"] { width: 40px; height: 32px; padding: 2px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); cursor: pointer; }
.shi-bg.is-logo-white::before { background: var(--color-surface); } .shi-bg.is-logo-dark::before { background: var(--goji-ink-strong); }
.shi-bg.is-logo-brand::before { background: var(--color-brand); } .shi-bg.is-logo-none::before { background: repeating-linear-gradient(45deg, var(--color-surface) 0 3px, var(--color-border-strong) 3px 6px); }
.shi-bg.is-logo-design::before { background: linear-gradient(135deg, var(--color-surface) 50%, var(--goji-ink-strong) 50%); } .shi-bg.is-logo-custom::before { background: var(--tone-success); }

/* Credit page across the whole width (owner, 30 Nov 2026): figures in a row, movements beside the top-up and prices. */
.credit-page .credit-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.credit-body { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: start; }
.credit-side { display: grid; gap: var(--space-3); }
.credit-side__sub { margin: var(--space-2) 0 0; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.credit-prices { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.credit-prices li { display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-2); font-size: var(--text-sm); }
.credit-prices b { font-weight: var(--weight-semibold); }
@media (max-width: 899.98px) { .credit-body { grid-template-columns: minmax(0, 1fr); } }

/* /account/billing: a website's credit, modern (owner, 30 Nov 2026). Tokens only. */
.cw { gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-top-style: solid; border-radius: var(--radius-lg); background: var(--color-surface); }
.cw__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.cw__title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--text-md); }
.cw__title svg { width: 18px; height: 18px; color: var(--color-brand); }
.cw__link { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.cw__link svg { width: 14px; height: 14px; }
.cw__stats { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.cw__stat { display: grid; gap: 2px; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--color-surface-2); border: 1px solid var(--color-border); }
.cw__stat span { color: var(--color-muted); font-size: var(--text-sm); }
.cw__stat b { font-size: var(--text-xl); font-weight: var(--weight-semibold); }
.cw__stat.is-main { background: var(--tone-success-soft); border-color: var(--tone-success-border); }
.cw__stat.is-main.is-low { background: var(--tone-warning-soft); border-color: var(--tone-warning-border); }
.cw__moves { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.cw__move { display: flex; align-items: center; gap: var(--space-3); padding: 10px var(--space-3); }
.cw__move + .cw__move { border-top: 1px solid var(--color-border); }
.cw__dot { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--color-surface-3); color: var(--color-muted); }
.cw__dot svg { width: 14px; height: 14px; }
.cw__dot.is-in { background: var(--tone-success-soft); color: var(--tone-success); }
.cw__what { display: grid; flex: 1; min-width: 0; }
.cw__what small { color: var(--color-muted); font-size: var(--text-xs); }
.cw__amount { font-weight: var(--weight-semibold); white-space: nowrap; }
.cw__amount.is-in { color: var(--tone-success); }
.cw__topup { display: grid; gap: var(--space-2); }
.cw__chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cw__chips > legend { grid-column: 1 / -1; padding: 0; margin-bottom: 6px; }
.cw__other { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.cw__other input { flex: 1 1 180px; }
@media (max-width: 479.98px) { .cw__chips { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* /account/billing (owner, 30 Nov 2026): per website, the package card (left) and the credit card (right) — two separate
   white cards on the website's tinted panel; one column below 1100px. */
.client-site__grid { display: grid; gap: var(--space-4); align-items: start; }
@media (min-width: 1100px) { .client-site__grid.has-wallet { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.client-site__grid > .client-wallet { margin-top: 0; }
.client-site__grid > .cw, .cpk { box-shadow: var(--shadow-sm); }
.client-site__grid .cw__stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr)); gap: var(--space-2); }
.client-site__grid .cw__stat { padding: var(--space-3); }
.client-site__grid .cw__stat b { font-size: var(--text-lg); white-space: nowrap; }
.cpk { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); min-width: 0; }
.cpk__title { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: var(--text-md); }
.cpk__title svg { width: 18px; height: 18px; color: var(--color-brand); }
.cpk__plan { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: var(--space-3); }
.cpk__icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--color-brand-soft); color: var(--color-brand-text); }
.cpk__icon svg { width: 24px; height: 24px; }
.cpk__name { display: grid; gap: 2px; min-width: 0; }
.cpk__name b { font-size: var(--text-lg); font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.cpk__free { color: var(--tone-success); font-size: var(--text-sm); font-weight: var(--weight-medium); }
.cpk__facts { display: grid; margin: 0; border-top: 1px solid var(--color-border); }
.cpk__facts > div { display: grid; grid-template-columns: minmax(130px, 0.8fr) minmax(0, 1.4fr); align-items: center; gap: var(--space-3); padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.cpk__facts dt { display: inline-flex; align-items: center; gap: 10px; color: var(--color-muted); font-size: var(--text-sm); }
.cpk__facts dt svg { width: 16px; height: 16px; flex: none; }
.cpk__facts dd { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px var(--space-2); margin: 0; font-size: var(--text-sm); font-weight: var(--weight-medium); font-variant-numeric: tabular-nums; min-width: 0; }
.cpk__desc { font-weight: var(--weight-regular); overflow-wrap: anywhere; }
.cpk__left { padding: 2px 10px; border-radius: var(--radius-full); background: var(--tone-success-soft); color: var(--tone-success); font-size: var(--text-xs); font-weight: var(--weight-semibold); white-space: nowrap; }
.cpk__left.is-soon { background: var(--tone-warning-soft); color: var(--tone-warning); }
.cpk__note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px var(--space-3); border: 1px solid var(--tone-success-border); border-radius: var(--radius-md); background: var(--tone-success-soft); color: var(--tone-success); }
.cpk__note svg { width: 16px; height: 16px; flex: none; }
.cpk .cpk__actions { justify-content: flex-start; justify-self: stretch; }
.cpk__sub { margin: var(--space-2) 0 0; font-size: var(--text-sm); color: var(--color-muted); font-weight: var(--weight-semibold); }
/* The add-on rows inside the half-width card: name and action on one line, the period under them. */
.billing-page .cpk .billing-subs__list li { grid-template-columns: minmax(0, 1fr) auto; padding: var(--space-3); }
.cpk .billing-subs__period { grid-column: 1 / -1; grid-row: 2; }
.cpk .billing-subs__action:not(.cpk__actions) { grid-column: 2; grid-row: 1; }
@media (max-width: 479.98px) {
    .cpk__plan { grid-template-columns: auto minmax(0, 1fr); }
    .cpk__plan > :last-child { grid-column: 1 / -1; justify-self: start; }
    .cpk__facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .cpk .cpk__actions > *, .cpk .cpk__actions form .btn { flex: 1 1 auto; }
}

/* Rashifal → Share on social media (owner, 30 Nov 2026; clearer screen the same day). Tokens only.
   Head: icon, title, status chip. Body: numbered settings + facts (left), the post preview (right; under on phones). */
.rs-social { display: grid; gap: var(--space-4); margin-bottom: var(--space-4); }
.rs-social__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-2) var(--space-3); align-items: start; }
.rs-social__title { min-width: 0; display: grid; gap: 2px; }
.rs-social__icon { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-md); background: var(--color-brand-soft); color: var(--color-brand); }
.rs-social__icon svg { width: 20px; height: 20px; }
.rs-social__status .badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-sm); padding: 4px 10px; }
.rs-social__status svg { width: 14px; height: 14px; }
.rs-social__locked { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px dashed var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.rs-social__body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: var(--space-5); align-items: start; }
.rs-social__form { display: grid; gap: var(--space-3); min-width: 0; }
.rs-social__step { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.rs-social__num { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%; background: var(--color-brand); color: var(--color-surface); font-size: var(--text-sm); font-weight: var(--weight-semibold, 600); }
.rs-social__field { flex: 1 1 auto; min-width: 0; margin: 0; }
.rs-social__field .toggle-field { width: 100%; font-weight: var(--weight-semibold, 600); }
.rs-social__field .toggle-field .hint { font-weight: var(--weight-regular); }
.rs-social__time { display: grid; gap: 6px; }
.rs-social__time .field-label { font-weight: var(--weight-semibold, 600); margin: 0; }
.rs-social__time input { width: 160px; max-width: 100%; }
.rs-social__step:has(.toggle:not(:checked)) + .rs-social__step { opacity: .6; }
.rs-social__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--text-sm); color: var(--color-muted); }
.rs-social__facts li { display: flex; gap: 8px; align-items: flex-start; }
.rs-social__facts svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--tone-success); }
.rs-social__warn { display: flex; gap: 8px; align-items: flex-start; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--tone-warning-soft); color: var(--tone-warning); border: 1px solid var(--tone-warning-border); font-size: var(--text-sm); }
.rs-social__warn svg { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.rs-social__actions { display: flex; }
.rs-social__preview { display: grid; gap: 8px; min-width: 0; }
.rs-social__post { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-sm, none); }
.rs-social__post img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; background: var(--color-surface-2); }
.rs-social__post-text { display: grid; gap: 2px; padding: 10px 12px; background: var(--color-surface-2); }
.rs-social__post-site { font-size: 11px; letter-spacing: .04em; color: var(--color-muted); }
.rs-social__post-text strong { font-size: var(--text-sm); line-height: 1.35; }
@media (max-width: 899.98px) { .rs-social__body { grid-template-columns: minmax(0, 1fr); } .rs-social__preview { max-width: 520px; } }
@media (max-width: 599.98px) { .rs-social__status { grid-column: 2 / -1; } }
@media (max-width: 479.98px) { .rs-social__step { padding: var(--space-3); } .rs-social__actions .btn { width: 100%; justify-content: center; } }

/* Analytics → Social & push (owner, 30 Nov 2026) and its dashboard card. Tokens only. */
.spr { display: grid; gap: var(--space-4); }
.spr-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.spr-tiles { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.spr-tile { position: relative; display: grid; gap: 4px; align-content: start; min-width: 0; padding: var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-xs); }
.spr-tile__icon { display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 4px; border-radius: var(--radius-md); background: var(--color-surface-2); color: var(--color-text-2); }
.spr-tile__icon svg { width: 18px; height: 18px; }
.spr-tile--social .spr-tile__icon, .spr-tile--push .spr-tile__icon { background: var(--tone-brand-soft); color: var(--tone-brand); }
.spr-tile--social, .spr-tile--push { border-color: var(--tone-brand-border); }
.spr-tile__label { font-size: var(--text-sm); color: var(--color-muted); font-weight: var(--weight-medium); }
.spr-tile__n { font-size: var(--text-3xl); line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--color-text); }
.spr-tile__note { font-size: var(--text-xs); color: var(--color-muted); }
.spr-card { display: grid; gap: var(--space-3); }
.spr-card__head { display: grid; gap: 2px; }
.spr-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.spr-title { color: var(--color-text); font-weight: var(--weight-medium); }
.spr-title:hover { color: var(--color-brand-text); }
.spr-empty { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.spr-empty__icon { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-full); background: var(--tone-brand-soft); color: var(--tone-brand); }
.spr-empty__icon svg { width: 20px; height: 20px; }
.spr-how { display: flex; gap: 6px; align-items: flex-start; }
.spr-how__icon { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.spw { display: grid; gap: var(--space-2); }
.spw-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.spw-n { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); background: var(--tone-brand-soft); }
.spw-n b { font-size: var(--text-2xl); line-height: 1.1; color: var(--tone-brand); font-variant-numeric: tabular-nums; }
.spw-n span { font-size: var(--text-xs); color: var(--color-text-2); }
.spw-best { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.spr-col-social { background: color-mix(in srgb, var(--tone-brand-soft) 40%, transparent); }
.spr-email { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-2); }
.spr-email .field { flex: 1 1 280px; margin: 0; }
/* Auto Social → Daily posts (owner, 30 Nov 2026). */
.aso-daily { gap: var(--space-3); }
.aso-daily__list { list-style: none; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.aso-daily__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 12px 16px; background: var(--color-surface); }
.aso-daily__row + .aso-daily__row { border-top: 1px solid var(--color-border); }
.aso-daily__form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); width: 100%; margin: 0; }
.aso-daily__main { display: grid; gap: 2px; flex: 1 1 260px; min-width: 0; }
.aso-daily__main .field { margin: 0; }
.aso-daily__main .toggle-field { font-weight: var(--weight-semibold); }
.aso-daily__time input { width: 130px; }

/* Dashboard "Social media" invitation (owner, 30 Nov 2026): highlighted, gently animated, still for reduced motion. */
.aso-promo { position: relative; display: grid; gap: var(--space-2); padding: var(--space-4); overflow: hidden; border: 1px solid var(--tone-brand-border); border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--tone-brand-soft) 0%, var(--color-surface) 70%); animation: aso-promo-glow 3.2s ease-in-out infinite; }
.aso-promo::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 35%, color-mix(in srgb, var(--color-surface) 70%, transparent) 50%, transparent 65%);
    transform: translateX(-120%); animation: aso-promo-shine 4.5s ease-in-out infinite; }
.aso-promo__brands { display: flex; gap: 6px; }
.aso-promo__brand { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-surface); box-shadow: var(--shadow-sm); animation: aso-promo-float 3s ease-in-out infinite; }
.aso-promo__brand:nth-child(2) { animation-delay: .25s; } .aso-promo__brand:nth-child(3) { animation-delay: .5s; }
.aso-promo__brand:nth-child(4) { animation-delay: .75s; } .aso-promo__brand:nth-child(5) { animation-delay: 1s; }
.aso-promo__title { margin: 4px 0 0; font-size: var(--text-lg); font-weight: var(--weight-bold); color: var(--color-text); line-height: 1.35; }
.aso-promo__lead { margin: 0; font-size: var(--text-sm); color: var(--color-text-2); line-height: 1.55; }
.aso-promo__list { list-style: none; margin: 2px 0 0; padding: 0; display: grid; gap: 5px; }
.aso-promo__list li { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--color-text); }
.aso-promo__ico { flex: none; display: inline-grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: 6px; background: var(--color-surface); box-shadow: var(--shadow-xs); font-size: 1em; line-height: 1;
    font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.aso-promo__cta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: 4px; }
.aso-promo__cta .btn { animation: aso-promo-pulse 2.4s ease-in-out infinite; }
@keyframes aso-promo-glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-brand) 0%, transparent); } 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-brand) 14%, transparent); } }
@keyframes aso-promo-shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes aso-promo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes aso-promo-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .aso-promo, .aso-promo::after, .aso-promo__brand, .aso-promo__cta .btn { animation: none; } .aso-promo::after { display: none; } }
/* Dashboard Social media card: today's daily posts and the stories shared last (owner, 30 Nov 2026) — small, like a log. */
.aso-log { display: grid; gap: 6px; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.aso-log__head { margin: 4px 0 0; font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--color-muted); }
.aso-log__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.aso-log__row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 0; font-size: var(--text-xs); line-height: 1.4; color: var(--color-text-2); }
.aso-log__row + .aso-log__row { border-top: 1px dashed var(--color-border); }
.aso-log__ico { flex: none; width: 18px; text-align: center; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.aso-log__label { flex: 1 1 auto; min-width: 0; }
.aso-log__state { flex: none; color: var(--color-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.aso-log__row.is-posted .aso-log__state { color: var(--tone-success); font-weight: var(--weight-semibold); }
.aso-log__row.is-off { opacity: .6; }
.aso-log__brands { flex: none; display: inline-flex; gap: 2px; }
.aso-log__brands .aso-brand { width: 14px; height: 14px; }
.aso-log__title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text); }
.aso-log__title:hover { color: var(--color-brand-text); }
/* Platform → Themes (1 Dec 2026): one block per marketplace theme — price, on sale, plans that include it. */
.pt-market { display: grid; gap: var(--space-3); }
.pt-theme { display: grid; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.pt-theme__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.pt-theme__price { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); align-items: end; gap: var(--space-2) var(--space-3); max-width: none; }
.pt-theme__price .field { margin: 0; }
.pt-theme__plans { display: grid; gap: var(--space-2); max-width: none; }
.pt-theme__plans .choices { display: flex; flex-wrap: wrap; gap: 6px var(--space-4); margin: 0; padding: 0; border: 0; }
.pt-theme__plans legend { margin-bottom: 4px; color: var(--color-muted); }
/* Appearance → Buy a theme (1 Dec 2026). */
.theme-buy { padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.theme-buy__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); max-width: none; }
.theme-buy__row select { width: auto; }
