/*
 * Pinpraise design system — the only stylesheet the app loads.
 * No framework underneath: tokens → reset → type → shell → components → utilities.
 * Prefix: x-  Tokens: --x-*  Theme: [data-theme=light|dark] on <html>, default follows the OS.
 * Keep page CSS out of views; add a component here instead.
 */

/* ------------------------------------------------------------------ */
/* 1. Tokens                                                           */
/* ------------------------------------------------------------------ */
/* tokens:start base — generated from docs/design-tokens.json by docs/dev/build-tokens.mjs; do not edit by hand */
:root {
    /* Type */
    --x-font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --x-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --x-fs-xs: .75rem;
    --x-fs-sm: .8125rem;
    --x-fs-md: .875rem;
    --x-fs-lg: 1rem;
    --x-fs-xl: 1.125rem;
    --x-fs-2xl: 1.375rem;
    --x-fs-3xl: 1.75rem;
    --x-fs-4xl: 1.75rem;
    /* Radii */
    --x-r-sm: 6px;
    --x-r-md: 8px;
    --x-r-lg: 12px;
    --x-r-xl: 16px;
    --x-r-pill: 999px;
    /* Layout */
    --x-top-h: 60px;
    --x-content-max: 1240px;
    --x-gutter: 32px;
    /* Motion and focus */
    --x-ease: cubic-bezier(.2, .7, .2, 1);
    --x-t-fast: 120ms;
    --x-t-med: 200ms;
    --x-focus-ring: 2px solid var(--x-primary);
    --x-focus-offset: 2px;
    /* Brand and highlight */
    --x-brand-500: #0F7B6C;
    --x-brand-600: #0C6659;
    --x-brand-400: #2BC4AE;
    --x-brand-300: #7FE0D0;
    --x-amber: #E8A317;
    --x-star: #F2B01E;
}
/* tokens:end base */

/* tokens:start light — generated from docs/design-tokens.json by docs/dev/build-tokens.mjs; do not edit by hand */
:root, :root[data-theme="light"] {
    color-scheme: light;
    /* Surfaces and lines */
    --x-bg: #F7F8FA;
    --x-surface: #FFFFFF;
    --x-surface-2: #F3F4F6;
    --x-surface-3: #E8EBF0;
    --x-line: #E6E8EC;
    --x-line-strong: #D0D5DD;
    --x-control-line: #808A9C;
    /* Text */
    --x-text: #101828;
    --x-text-2: #475467;
    --x-text-3: #5D6878;
    --x-text-inv: #FFFFFF;
    --x-on-primary: #FFFFFF;
    /* Primary (derived from the brand steps at runtime) */
    --x-primary: var(--x-brand-500);
    --x-primary-hover: var(--x-brand-600);
    --x-primary-soft: color-mix(in srgb, var(--x-brand-500) 12%, var(--x-surface));
    --x-primary-text: color-mix(in srgb, var(--x-brand-600) 72%, #000);
    --x-primary-ring: color-mix(in srgb, var(--x-brand-500) 28%, transparent);
    --x-primary-strong: var(--x-primary-hover);
    --x-primary-pressed: color-mix(in srgb, var(--x-brand-600) 85%, #000);
    /* Semantic tones */
    --x-success: #1E8E5A;
    --x-success-soft: #E4F5EC;
    --x-success-text: #136840;
    --x-danger: #D3452F;
    --x-danger-soft: #FCECE9;
    --x-danger-text: #A4321F;
    --x-warning: #B9731A;
    --x-warning-soft: #FDF3E3;
    --x-warning-text: #8A5410;
    --x-info: #2E6FD8;
    --x-info-soft: #E8F0FD;
    --x-info-text: #1F4FA3;
    /* Side panel (ink rail) */
    --x-rail-bg: #121A22;
    --x-rail-text: #B8C2CC;
    --x-rail-text-strong: #FFFFFF;
    --x-rail-muted: #6E7B88;
    --x-rail-hover: rgba(255, 255, 255, .06);
    --x-rail-active: var(--x-primary-soft);
    --x-rail-line: rgba(255, 255, 255, .08);
    /* Depth */
    --x-shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --x-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
    --x-shadow-md: 0 12px 24px -8px rgba(16, 24, 40, .12), 0 4px 8px -4px rgba(16, 24, 40, .06);
    --x-shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);
    --x-backdrop: rgba(16, 24, 40, .45);
}
/* tokens:end light */

/* tokens:start dark — generated from docs/design-tokens.json by docs/dev/build-tokens.mjs; do not edit by hand */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        /* Surfaces and lines */
        --x-bg: #0B0E14;
        --x-surface: #12161E;
        --x-surface-2: #191E28;
        --x-surface-3: #212734;
        --x-line: #222835;
        --x-line-strong: #323A4A;
        --x-control-line: #6B7588;
        /* Text */
        --x-text: #ECEFF4;
        --x-text-2: #AAB3C0;
        --x-text-3: #8B95A4;
        --x-text-inv: #0B0E14;
        --x-on-primary: #0B0E14;
        /* Primary (derived from the brand steps at runtime) */
        --x-primary: var(--x-brand-400);
        --x-primary-hover: var(--x-brand-300);
        --x-primary-soft: color-mix(in srgb, var(--x-brand-400) 16%, transparent);
        --x-primary-text: var(--x-brand-300);
        --x-primary-ring: color-mix(in srgb, var(--x-brand-400) 35%, transparent);
        --x-primary-strong: var(--x-primary-hover);
        --x-primary-pressed: color-mix(in srgb, var(--x-brand-300) 85%, #fff);
        /* Semantic tones */
        --x-success: #3DBA7E;
        --x-success-soft: rgba(61, 186, 126, .14);
        --x-success-text: #8BE0B6;
        --x-danger: #F0705D;
        --x-danger-soft: rgba(240, 112, 93, .14);
        --x-danger-text: #F8A79B;
        --x-warning: #E5A04A;
        --x-warning-soft: rgba(229, 160, 74, .14);
        --x-warning-text: #F3C98E;
        --x-info: #6E9EF0;
        --x-info-soft: rgba(110, 158, 240, .14);
        --x-info-text: #B3CBF8;
        /* Side panel (ink rail) */
        --x-rail-bg: #0A0E12;
        --x-rail-line: rgba(255, 255, 255, .06);
        /* Depth */
        --x-shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
        --x-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .02);
        --x-shadow-md: 0 8px 22px -6px rgba(0, 0, 0, .6);
        --x-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
        --x-backdrop: rgba(0, 0, 0, .6);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    /* Surfaces and lines */
    --x-bg: #0B0E14;
    --x-surface: #12161E;
    --x-surface-2: #191E28;
    --x-surface-3: #212734;
    --x-line: #222835;
    --x-line-strong: #323A4A;
    --x-control-line: #6B7588;
    /* Text */
    --x-text: #ECEFF4;
    --x-text-2: #AAB3C0;
    --x-text-3: #8B95A4;
    --x-text-inv: #0B0E14;
    --x-on-primary: #0B0E14;
    /* Primary (derived from the brand steps at runtime) */
    --x-primary: var(--x-brand-400);
    --x-primary-hover: var(--x-brand-300);
    --x-primary-soft: color-mix(in srgb, var(--x-brand-400) 16%, transparent);
    --x-primary-text: var(--x-brand-300);
    --x-primary-ring: color-mix(in srgb, var(--x-brand-400) 35%, transparent);
    --x-primary-strong: var(--x-primary-hover);
    --x-primary-pressed: color-mix(in srgb, var(--x-brand-300) 85%, #fff);
    /* Semantic tones */
    --x-success: #3DBA7E;
    --x-success-soft: rgba(61, 186, 126, .14);
    --x-success-text: #8BE0B6;
    --x-danger: #F0705D;
    --x-danger-soft: rgba(240, 112, 93, .14);
    --x-danger-text: #F8A79B;
    --x-warning: #E5A04A;
    --x-warning-soft: rgba(229, 160, 74, .14);
    --x-warning-text: #F3C98E;
    --x-info: #6E9EF0;
    --x-info-soft: rgba(110, 158, 240, .14);
    --x-info-text: #B3CBF8;
    /* Side panel (ink rail) */
    --x-rail-bg: #0A0E12;
    --x-rail-line: rgba(255, 255, 255, .06);
    /* Depth */
    --x-shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
    --x-shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .02);
    --x-shadow-md: 0 8px 22px -6px rgba(0, 0, 0, .6);
    --x-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
    --x-backdrop: rgba(0, 0, 0, .6);
}
/* tokens:end dark */

/* ------------------------------------------------------------------ */
/* 2. Reset + base                                                     */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Reduced motion: one global rule covers every transition, animation and smooth scroll in this
   file and the per-area files (x-*.css, landing.css). Looping animations (spinners, shimmer, pulse)
   stop after one pass. Never add a motion rule outside this contract. */
@media (prefers-reduced-motion: reduce) {
    html, * { scroll-behavior: auto !important; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}
body {
    margin: 0;
    font-family: var(--x-font);
    font-size: var(--x-fs-md);
    line-height: 1.5;
    color: var(--x-text);
    background: var(--x-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'ss01', 'cv11';
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: var(--x-text); }
h1 { font-size: var(--x-fs-3xl); letter-spacing: -.02em; }
h2 { font-size: var(--x-fs-2xl); }
h3 { font-size: var(--x-fs-xl); }
h4 { font-size: var(--x-fs-lg); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--x-primary); text-decoration: none; }
a:hover { color: var(--x-primary-hover); text-decoration: underline; text-underline-offset: 2px; }
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--x-line); margin: 24px 0; }
small { font-size: var(--x-fs-sm); }
strong, b { font-weight: 700; }
code, kbd { font-family: var(--x-mono); font-size: .9em; background: var(--x-surface-2); padding: 1px 6px; border-radius: 6px; }
kbd { border: 1px solid var(--x-line-strong); box-shadow: 0 1px 0 var(--x-line-strong); }
:focus-visible { outline: 2px solid var(--x-primary); outline-offset: 2px; }
::selection { background: var(--x-primary-soft); }
[hidden] { display: none !important; }
.x-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.x-skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--x-surface); padding: 8px 12px; border-radius: var(--x-r-sm); box-shadow: var(--x-shadow-md); }
.x-skip:focus { left: 8px; }

.x-icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.x-icon-sm { width: 14px; height: 14px; }
.x-icon-lg { width: 24px; height: 24px; }
.x-icon-xl { width: 32px; height: 32px; stroke-width: 1.6; }

/* ------------------------------------------------------------------ */
/* 3. App shell — floating side panel                                  */
/* ------------------------------------------------------------------ */
:root { --x-side-w: 272px; --x-side-gap: 14px; }
.x-app { min-height: 100vh; display: grid; grid-template-columns: var(--x-side-w) minmax(0, 1fr); gap: 0; }
.x-main { min-width: 0; display: flex; flex-direction: column; overflow-x: clip; }

/* Side panel: a floating card inset from the viewport edge */
.x-side { position: sticky; top: 0; height: 100vh; padding: var(--x-side-gap) 0 var(--x-side-gap) var(--x-side-gap); }
.x-side-in { height: 100%; display: flex; flex-direction: column; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: 20px; box-shadow: var(--x-shadow-sm); overflow: hidden; }
.x-side-head { padding: 18px 18px 6px; }
.x-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--x-text); font-weight: 800; font-size: 18px; letter-spacing: -.02em; text-decoration: none; min-width: 0; }
.x-logo:hover { color: var(--x-text); text-decoration: none; }
.x-logo-mark { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(135deg, var(--x-brand-400), var(--x-brand-600)); display: grid; place-items: center; color: #06221E; flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 8px var(--x-primary-ring); }
.x-logo-mark svg { width: 19px; height: 19px; }
.x-logo-img { height: 30px; width: auto; max-width: 170px; object-fit: contain; }
.x-logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.x-workspace { margin: 12px 14px 6px; padding: 10px 12px; border-radius: 14px; background: var(--x-surface-2); display: flex; align-items: center; gap: 10px; min-width: 0; }
.x-workspace .x-avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--x-text); color: var(--x-bg); font-size: 13px; }
.x-workspace-meta { min-width: 0; line-height: 1.2; }
.x-workspace-name { display: block; font-weight: 800; font-size: var(--x-fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.x-side-scroll { flex: 1; overflow-y: auto; padding: 6px 14px 14px; }
/* A 6px thumb with no arrow buttons; `scrollbar-width` would win over these in
   Chromium and bring the Windows arrows back, so it is only a fallback. */
.x-side-scroll::-webkit-scrollbar { width: 6px; }
.x-side-scroll::-webkit-scrollbar-button { display: none; }
.x-side-scroll::-webkit-scrollbar-thumb { background: transparent; border-radius: 3px; }
.x-side-scroll:hover::-webkit-scrollbar-thumb, .x-side-scroll:focus-within::-webkit-scrollbar-thumb { background: var(--x-line-strong); }
@supports not selector(::-webkit-scrollbar) { .x-side-scroll { scrollbar-width: thin; scrollbar-color: var(--x-line-strong) transparent; } }
.x-nav-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--x-text-3); padding: 16px 12px 6px; }
.x-nav a {
    display: flex; align-items: center; gap: 12px; padding: 7px 10px 7px 8px; margin: 2px 0; border-radius: 12px;
    color: var(--x-text-2); font-weight: 700; font-size: var(--x-fs-md); text-decoration: none; position: relative;
    transition: background var(--x-t-fast), color var(--x-t-fast);
}
.x-nav a:hover { background: var(--x-surface-2); color: var(--x-text); text-decoration: none; }
.x-nav a .x-icon { width: 17px; height: 17px; }
.x-nav-chip { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--x-surface-2); color: var(--x-text-3); flex: none; transition: background var(--x-t-fast), color var(--x-t-fast), transform var(--x-t-fast); }
.x-nav a:hover .x-nav-chip { background: var(--x-surface-3); color: var(--x-text); }
.x-nav a.is-active { background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-nav a.is-active .x-nav-chip { background: var(--x-primary); color: #fff; box-shadow: 0 4px 10px -4px var(--x-primary-ring); }
.x-nav-count { margin-left: auto; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: var(--x-r-pill); background: var(--x-text); color: var(--x-bg); }
.x-nav a.is-active .x-nav-count { background: var(--x-primary); color: var(--x-on-primary); }

.x-side-setup { margin: 14px 0 4px; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, var(--x-brand-500), var(--x-brand-600)); color: #fff; }
.x-side-setup strong { display: block; font-size: var(--x-fs-md); }
.x-side-setup p { color: rgba(255,255,255,.78); font-size: var(--x-fs-sm); margin: 4px 0 10px; }
.x-side-setup .x-bar { background: rgba(255,255,255,.22); } .x-side-setup .x-bar > span { background: #fff; }
.x-side-setup .x-btn { width: 100%; margin-top: 10px; background: #fff; border-color: #fff; color: var(--x-brand-600); }

.x-side-foot { border-top: 1px solid var(--x-line); padding: 10px 12px; }
.x-user-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 8px; border: 0; border-radius: 12px; background: none; color: var(--x-text); text-align: left; }
.x-user-btn:hover { background: var(--x-surface-2); }
.x-user-btn .x-avatar { background: var(--x-text); color: var(--x-bg); }
.x-user-meta { min-width: 0; line-height: 1.2; flex: 1; }
.x-user-name { display: block; font-weight: 800; font-size: var(--x-fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-user-sub { display: block; color: var(--x-text-3); font-size: var(--x-fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Top row inside the content column */
.x-top { display: flex; align-items: center; gap: 8px; padding: 18px var(--x-gutter) 0; max-width: var(--x-content-max); width: 100%; margin: 0 auto; }
.x-top .x-top-menu { display: none; }
.x-top-brand { display: none; }
.x-top-spacer { flex: 1; }
.x-top-actions { display: flex; align-items: center; gap: 6px; }

/* Acting-as banner (super admin inside another account) */
.x-acting { margin: 8px 0 4px; padding: 10px 12px; border-radius: 12px; background: var(--x-warning-soft); color: var(--x-warning-text); font-size: var(--x-fs-xs); font-weight: 600; line-height: 1.4; }
.x-acting .x-icon { vertical-align: -3px; margin-right: 2px; }
.x-acting strong { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-acting .x-btn { margin-top: 8px; width: 100%; }

.x-content { flex: 1; width: 100%; max-width: var(--x-content-max); margin: 0 auto; padding: 16px var(--x-gutter) 64px; }
.x-content.is-wide { max-width: none; }
.x-content.is-narrow { max-width: 760px; }
.x-foot { padding: 20px var(--x-gutter); color: var(--x-text-3); font-size: var(--x-fs-xs); border-top: 1px solid var(--x-line); display: flex; gap: 16px; flex-wrap: wrap; max-width: var(--x-content-max); margin: 0 auto; width: 100%; }
.x-foot a { color: inherit; }

/* Mobile: the panel becomes a drawer */
.x-overlay { position: fixed; inset: 0; background: var(--x-backdrop); z-index: 40; opacity: 0; pointer-events: none; transition: opacity var(--x-t-med); }
@media (max-width: 1023px) {
    :root { --x-gutter: 20px; }
    .x-app { grid-template-columns: 1fr; }
    .x-side { position: fixed; left: 0; top: 0; bottom: 0; width: min(312px, 88vw); height: auto; z-index: 50; padding: 10px; transform: translateX(-104%); }
    body.is-nav-ready .x-side { transition: transform var(--x-t-med) var(--x-ease); }
    body.is-nav-open .x-side { transform: none; }
    body.is-nav-open .x-overlay { opacity: 1; pointer-events: auto; }
    body.is-nav-open { overflow: hidden; }
    .x-top { position: sticky; top: 0; z-index: 30; padding: 10px var(--x-gutter); background: color-mix(in srgb, var(--x-bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--x-line); }
    .x-top .x-top-menu { display: grid; }
    .x-top-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.02em; color: var(--x-text); }
    .x-top .x-btn-primary .x-btn-text { display: none; }
    .x-content { padding-top: 12px; }
}
@media (max-width: 639px) {
    :root { --x-gutter: 16px; }
    h1 { font-size: var(--x-fs-2xl); }
}

/* Bare layout (wizard): no panel */
.x-app.is-bare { display: block; }
.x-app.is-bare .x-content { padding-top: 24px; }
.x-app.is-bare .x-logo { margin: 0; }

/* ------------------------------------------------------------------ */
/* 4. Page scaffolding                                                 */
/* ------------------------------------------------------------------ */
.x-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin: 20px 0 24px; }
/* The title column gives way first, so a long subtitle wraps instead of pushing
   the actions under it: every page keeps its actions on the right of the band. */
.x-page > div:not(.x-page-actions) { flex: 1 1 320px; min-width: 0; }
.x-page > .x-page-actions { flex: 0 1 auto; margin-left: auto; }
.x-page-sub { color: var(--x-text-2); margin-top: 6px; font-size: var(--x-fs-md); max-width: 60ch; }
.x-page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.x-eyebrow { font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--x-primary-text); margin-bottom: 6px; }
.x-section { margin: 32px 0 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.x-section h2 { font-size: var(--x-fs-xl); }
.x-section-sub { color: var(--x-text-3); font-size: var(--x-fs-sm); margin-top: 2px; }
.x-back { display: inline-flex; align-items: center; gap: 6px; color: var(--x-text-3); font-weight: 600; font-size: var(--x-fs-sm); margin-bottom: 12px; }
.x-back:hover { color: var(--x-text); text-decoration: none; }

.x-grid { display: grid; gap: 20px; }
.x-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.x-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.x-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.x-grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
.x-grid-side { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
.x-stack { display: flex; flex-direction: column; gap: 16px; }
.x-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.x-row-between { justify-content: space-between; }
@media (max-width: 1023px) { .x-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .x-grid-main, .x-grid-side { grid-template-columns: 1fr; } }
@media (max-width: 639px) { .x-grid-2, .x-grid-3, .x-grid-4 { grid-template-columns: 1fr; } }
/* Beside the settings sub-nav (260px + gap) the column is far narrower than the
   viewport suggests: at 1024px with the side panel open it is ~460px. Grids in
   it follow the page column's real width (.x-content is the container). */
.x-content { container-type: inline-size; }
@media (min-width: 1024px) {
    @container (max-width: 1040px) { .x-grid-side .x-grid-main { grid-template-columns: 1fr; } .x-grid-side .x-grid-3, .x-grid-side .x-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    @container (max-width: 800px) { .x-grid-side .x-grid-2, .x-grid-side .x-grid-3, .x-grid-side .x-grid-4 { grid-template-columns: 1fr; } }
}

/* ------------------------------------------------------------------ */
/* 5. Surfaces                                                         */
/* ------------------------------------------------------------------ */
.x-card { background: var(--x-surface); border: 1px solid var(--x-line); border-radius: var(--x-r-lg); box-shadow: var(--x-shadow-sm); }
.x-card-body { padding: 24px; }
.x-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--x-line); flex-wrap: wrap; }
.x-card-head h2, .x-card-head h3 { font-size: var(--x-fs-lg); }
.x-card-foot { padding: 16px 24px; border-top: 1px solid var(--x-line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.x-card-sub { color: var(--x-text-3); font-size: var(--x-fs-sm); margin-top: 2px; }
.x-card.is-flat { box-shadow: none; }
.x-card.is-soft { background: var(--x-surface-2); border-color: transparent; box-shadow: none; }
.x-card.is-interactive { transition: transform var(--x-t-fast), box-shadow var(--x-t-fast), border-color var(--x-t-fast); }
.x-card.is-interactive:hover { box-shadow: var(--x-shadow-md); transform: translateY(-1px); border-color: var(--x-line-strong); }
.x-card.is-brand { background: linear-gradient(135deg, var(--x-brand-500), var(--x-brand-600)); border-color: transparent; color: #fff; }
.x-card.is-brand h2, .x-card.is-brand h3, .x-card.is-brand p { color: #fff; }
@media (max-width: 639px) { .x-card-body, .x-card-head, .x-card-foot, .x-card .x-list > li, .x-card .x-list > li.is-group { padding-left: 16px; padding-right: 16px; } }

.x-list { list-style: none; margin: 0; padding: 0; }
.x-list > li { padding: 14px 24px; border-top: 1px solid var(--x-line); display: flex; gap: 14px; align-items: center; }
.x-list > li:first-child { border-top: 0; }
.x-list-main { flex: 1; min-width: 0; }
.x-list-title { font-weight: 700; display: block; }
.x-list-sub { color: var(--x-text-3); font-size: var(--x-fs-sm); }
.x-list.is-hover > li:hover { background: var(--x-surface-2); }

/* ------------------------------------------------------------------ */
/* 6. Buttons                                                          */
/* ------------------------------------------------------------------ */
.x-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 700; font-size: var(--x-fs-md); line-height: 1; white-space: nowrap; text-decoration: none;
    background: var(--x-surface); color: var(--x-text); border-color: var(--x-line-strong);
    transition: background var(--x-t-fast), border-color var(--x-t-fast), color var(--x-t-fast), transform var(--x-t-fast), box-shadow var(--x-t-fast);
    user-select: none;
}
.x-btn:hover { background: var(--x-surface-2); text-decoration: none; color: var(--x-text); }
.x-btn:active { transform: translateY(1px); }
.x-btn:disabled, .x-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.x-btn .x-icon { width: 16px; height: 16px; }
.x-btn-primary { background: var(--x-primary); border-color: var(--x-primary); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 1px 2px var(--x-primary-ring); }
.x-btn-primary:hover { background: var(--x-primary-hover); border-color: var(--x-primary-hover); color: #fff; }
:root[data-theme="dark"][data-accent="teal"] .x-btn-primary { color: #06221E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"])[data-accent="teal"] .x-btn-primary { color: #06221E; } }
.x-btn-danger { background: var(--x-danger); border-color: var(--x-danger); color: #fff; }
.x-btn-danger:hover { filter: brightness(.92); color: #fff; }
.x-btn-ghost { background: transparent; border-color: transparent; color: var(--x-text-2); }
.x-btn-ghost:hover { background: var(--x-surface-2); color: var(--x-text); }
.x-btn-soft { background: var(--x-primary-soft); border-color: transparent; color: var(--x-primary-text); }
.x-btn-soft:hover { background: var(--x-primary-soft); filter: brightness(.96); color: var(--x-primary-text); }
.x-btn-sm { height: 32px; padding: 0 12px; font-size: var(--x-fs-sm); border-radius: 8px; }
.x-btn-lg { height: 48px; padding: 0 22px; font-size: var(--x-fs-lg); border-radius: 12px; }
.x-btn-block { width: 100%; }
.x-btn-icon { width: 40px; padding: 0; }
.x-btn-icon.x-btn-sm { width: 32px; }
.x-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.x-btn.is-loading::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; color: var(--x-text); animation: x-spin .7s linear infinite; }
.x-btn-primary.is-loading::after { color: #fff; }
@keyframes x-spin { to { transform: rotate(360deg); } }
.x-btn-group { display: inline-flex; }
.x-btn-group .x-btn { border-radius: 0; margin-left: -1px; }
.x-btn-group .x-btn:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.x-btn-group .x-btn:last-child { border-radius: 0 10px 10px 0; }

/* ------------------------------------------------------------------ */
/* 7. Forms                                                            */
/* ------------------------------------------------------------------ */
.x-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.x-field:last-child { margin-bottom: 0; }
.x-label { font-weight: 700; font-size: var(--x-fs-md); display: flex; align-items: center; gap: 6px; }
.x-label .x-opt { color: var(--x-text-3); font-weight: 500; font-size: var(--x-fs-sm); }
.x-help { color: var(--x-text-3); font-size: var(--x-fs-sm); line-height: 1.45; }
.x-error { color: var(--x-danger-text); font-size: var(--x-fs-sm); font-weight: 600; }
.x-input, .x-select, .x-textarea {
    width: 100%; height: 40px; padding: 0 13px; border-radius: 10px;
    border: 1px solid var(--x-control-line); background: var(--x-surface); color: var(--x-text);
    transition: border-color var(--x-t-fast), box-shadow var(--x-t-fast);
}
.x-textarea { height: auto; min-height: 110px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.x-input::placeholder, .x-textarea::placeholder { color: var(--x-text-3); }
.x-input:hover, .x-select:hover, .x-textarea:hover { border-color: var(--x-text-3); }
.x-input:focus, .x-select:focus, .x-textarea:focus { outline: none; border-color: var(--x-primary); box-shadow: 0 0 0 3px var(--x-primary-ring); }
.x-input.is-invalid, .x-textarea.is-invalid, .x-select.is-invalid { border-color: var(--x-danger); }
.x-input.is-invalid:focus { box-shadow: 0 0 0 3px var(--x-danger-soft); }
.x-input:disabled, .x-select:disabled, .x-textarea:disabled { background: var(--x-surface-2); color: var(--x-text-3); cursor: not-allowed; }
.x-input-sm { height: 32px; padding: 0 10px; font-size: var(--x-fs-sm); border-radius: 8px; }
.x-select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A828B' 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 12px center; cursor: pointer; }
.x-input-wrap { position: relative; display: flex; align-items: center; }
.x-input-wrap > .x-icon { position: absolute; left: 12px; color: var(--x-text-3); pointer-events: none; }
.x-input-wrap > .x-icon ~ .x-input { padding-left: 38px; }
.x-input-wrap > .x-btn { position: absolute; right: 4px; }
.x-input-wrap.has-action > .x-input { padding-right: 90px; }
.x-input-group { display: flex; }
.x-input-group > .x-input { border-radius: 10px 0 0 10px; }
.x-input-group > .x-btn { border-radius: 0 10px 10px 0; margin-left: -1px; height: 40px; }
.x-input-group > .x-input-sm { border-radius: 8px 0 0 8px; }
.x-input-group > .x-btn-sm { height: 32px; border-radius: 0 8px 8px 0; }
.x-input-group > .x-addon { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--x-line-strong); border-right: 0; border-radius: 10px 0 0 10px; background: var(--x-surface-2); color: var(--x-text-3); font-size: var(--x-fs-sm); white-space: nowrap; }
.x-input-group > .x-addon + .x-input { border-radius: 0 10px 10px 0; }
.x-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
.x-form-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.x-count { color: var(--x-text-3); font-size: var(--x-fs-xs); text-align: right; }
.x-count.is-over { color: var(--x-danger-text); }

/* Check / radio / switch */
.x-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; }
.x-check input { appearance: none; width: 18px; height: 18px; margin: 2px 0 0; border-radius: 5px; border: 1.5px solid var(--x-line-strong); background: var(--x-surface); flex: none; display: grid; place-items: center; transition: background var(--x-t-fast), border-color var(--x-t-fast); cursor: pointer; }
.x-check input[type="radio"] { border-radius: 50%; }
.x-check input:checked { background: var(--x-primary); border-color: var(--x-primary); }
.x-check input[type="checkbox"]:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.x-check input[type="radio"]:checked::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.x-check input:focus-visible { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-check .x-help { font-weight: 400; }
.x-switch-ctl { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.x-switch-ctl input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--x-line-strong); position: relative; flex: none; transition: background var(--x-t-med); cursor: pointer; margin: 0; }
.x-switch-ctl input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--x-t-med) var(--x-ease); }
.x-switch-ctl input:checked { background: var(--x-primary); }
.x-switch-ctl input:checked::after { transform: translateX(18px); }
.x-switch-ctl input:focus-visible { outline: 2px solid var(--x-primary); outline-offset: 2px; }

/* Choice tiles (radio cards) */
.x-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.x-tile { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1.5px solid var(--x-line); border-radius: var(--x-r-md); background: var(--x-surface); cursor: pointer; transition: border-color var(--x-t-fast), box-shadow var(--x-t-fast), background var(--x-t-fast); }
.x-tile:hover { border-color: var(--x-line-strong); }
.x-tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.x-tile:has(input:checked) { border-color: var(--x-primary); background: var(--x-primary-soft); box-shadow: 0 0 0 3px var(--x-primary-ring); }
.x-tile:has(input:focus-visible) { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-tile .x-icon { color: var(--x-primary); width: 22px; height: 22px; }
.x-tile-title { font-weight: 700; }
.x-tile-sub { color: var(--x-text-3); font-size: var(--x-fs-sm); }

/* Segmented control */
.x-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--x-surface-2); gap: 2px; }
.x-seg > a, .x-seg > button, .x-seg > label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 0; background: none; color: var(--x-text-2); font-weight: 700; font-size: var(--x-fs-sm); cursor: pointer; text-decoration: none; position: relative; white-space: nowrap; }
.x-seg > label input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.x-seg > .is-active, .x-seg > [aria-pressed="true"], .x-seg > label:has(input:checked) { background: var(--x-surface); color: var(--x-text); box-shadow: var(--x-shadow-sm); }
.x-seg > a:hover, .x-seg > button:hover, .x-seg > label:hover { color: var(--x-text); text-decoration: none; }
.x-seg.is-block { display: flex; } .x-seg.is-block > * { flex: 1; justify-content: center; }

/* ------------------------------------------------------------------ */
/* 8. Navigation within pages                                          */
/* ------------------------------------------------------------------ */
.x-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--x-line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.x-tabs::-webkit-scrollbar { display: none; }
.x-tabs > a, .x-tabs > button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--x-text-2); font-weight: 700; font-size: var(--x-fs-md); white-space: nowrap; text-decoration: none; }
.x-tabs > a:hover, .x-tabs > button:hover { color: var(--x-text); text-decoration: none; }
.x-tabs > .is-active, .x-tabs > [aria-selected="true"] { color: var(--x-text); border-bottom-color: var(--x-primary); }
.x-tabs .x-count-pill { font-size: var(--x-fs-xs); font-weight: 800; padding: 1px 7px; border-radius: var(--x-r-pill); background: var(--x-surface-3); color: var(--x-text-2); }
.x-tabs .is-active .x-count-pill { background: var(--x-primary-soft); color: var(--x-primary-text); }
/* Tabs that do not fit fold into a "More" menu (pinpraise.js foldTabs, tablets and up). */
.x-tabs.has-more { overflow: visible; flex-wrap: nowrap; }
.x-tabs-more { margin-left: auto; flex: none; display: inline-flex; align-items: stretch; }
.x-tabs-more-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--x-text-2); font: inherit; font-weight: 600; font-size: var(--x-fs-md); white-space: nowrap; cursor: pointer; }
.x-tabs-more-btn:hover, .x-tabs-more.is-open .x-tabs-more-btn { color: var(--x-text); }
.x-tabs-more .x-menu-panel { min-width: 240px; max-height: 70vh; overflow-y: auto; }
.x-tabs-more .x-menu-panel > a { border-bottom: 0; margin-bottom: 0; padding: 9px 10px; font-size: var(--x-fs-md); font-weight: 600; color: var(--x-text); }
.x-tabs-more .x-menu-panel > a.is-active { background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-tabpanel[hidden] { display: none; }

.x-subnav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; }
.x-subnav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--x-text-2); font-weight: 600; text-decoration: none; }
.x-subnav a:hover { background: var(--x-surface-2); color: var(--x-text); }
.x-subnav a.is-active { background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-subnav a .x-icon { color: var(--x-text-3); width: 16px; height: 16px; }
.x-subnav a.is-active .x-icon { color: var(--x-primary); }
@media (max-width: 1023px) { .x-subnav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; } .x-subnav a { white-space: nowrap; } }

.x-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.x-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--x-r-pill); border: 1px solid var(--x-line-strong); background: var(--x-surface); color: var(--x-text-2); font-weight: 600; font-size: var(--x-fs-sm); text-decoration: none; cursor: pointer; white-space: nowrap; transition: background var(--x-t-fast), border-color var(--x-t-fast), color var(--x-t-fast); }
.x-chip:hover { border-color: var(--x-text-3); color: var(--x-text); text-decoration: none; }
.x-chip.is-active, .x-chip[aria-pressed="true"] { background: var(--x-text); border-color: var(--x-text); color: var(--x-bg); }
.x-chip .x-icon { width: 14px; height: 14px; }
.x-chip-count { font-size: var(--x-fs-xs); opacity: .7; }

.x-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.x-toolbar .x-input-wrap { flex: 1; min-width: 200px; max-width: 360px; }
.x-toolbar-end { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.x-pagination { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.x-pagination a, .x-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; font-weight: 700; font-size: var(--x-fs-sm); color: var(--x-text-2); text-decoration: none; }
.x-pagination a:hover { background: var(--x-surface-2); color: var(--x-text); }
.x-pagination .is-active { background: var(--x-text); color: var(--x-bg); }
.x-pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ------------------------------------------------------------------ */
/* 9. Data display                                                     */
/* ------------------------------------------------------------------ */
.x-table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--x-line); border-radius: var(--x-r-lg); background: var(--x-surface); }
.x-table { width: 100%; border-collapse: collapse; font-size: var(--x-fs-md); }
.x-table th, .x-table td { padding: 12px 16px; text-align: left; vertical-align: middle; border-top: 1px solid var(--x-line); }
.x-table th { border-top: 0; background: var(--x-surface-2); color: var(--x-text-3); font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.x-table tbody tr:hover { background: color-mix(in srgb, var(--x-surface-2) 60%, transparent); }
.x-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }
.x-table .is-shrink { width: 1%; white-space: nowrap; }
/* A shrink column asks for the least width, and `.x-row > * { min-width: 0 }` lets its items give all of it up: buttons collapse to a dot. They keep their size. */
.x-table td.is-shrink > .x-row > * { flex-shrink: 0; }
.x-table td.is-shrink .x-btn { min-width: 32px; flex-shrink: 0; }
@media (min-width: 768px) { .x-table td.is-shrink > .x-row { width: max-content; flex-wrap: nowrap; } } /* the column is as wide as its buttons in every browser */
/* Row headings read like body text, not like the column headers. */
.x-table tbody th[scope="row"] { background: transparent; color: var(--x-text); font-size: inherit; font-weight: 600; letter-spacing: 0; text-transform: none; white-space: normal; border-top: 1px solid var(--x-line); }
.x-table a.x-cell-title { color: var(--x-text); font-weight: 700; }
/* A totals row is one even band, not a grey block under the first column only. */
.x-table tfoot th, .x-table tfoot td { background: var(--x-surface-2); border-top: 1px solid var(--x-line-strong); }
.x-table-wrap.is-plain { border: 0; border-radius: 0; background: transparent; }
@media (max-width: 767px) {
    .x-table.is-stack thead { display: none; }
    .x-table.is-stack tr { display: block; padding: 10px 0; border-top: 1px solid var(--x-line); }
    .x-table.is-stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 16px; text-align: left; }
    .x-table.is-stack td::before { content: attr(data-label); color: var(--x-text-3); font-size: var(--x-fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; flex: 0 0 auto; white-space: nowrap; }
    /* the value never widens the card: it wraps (long paths, names, emails) and may shrink */
    .x-table.is-stack td { min-width: 0; overflow-wrap: anywhere; }
    .x-table.is-stack td > * { min-width: 0; }
    /* .is-shrink is width: 1% for a real table column; on a stacked row it squeezed the label and the buttons to nothing */
    .x-table.is-stack td.is-shrink { width: auto; white-space: normal; }
    .x-table.is-stack td .x-btn { flex-shrink: 0; }
    /* the table itself is a block, so a colspan cell with a long sentence can't widen it past the card */
    .x-table.is-stack, .x-table.is-stack tbody, .x-table.is-stack tfoot { display: block; width: 100%; }
    .x-table.is-stack tfoot th[scope="row"] { display: block; padding: 4px 16px 2px; border: 0; }
    .x-table.is-stack tfoot td:empty { display: none; }
    /* a cell with only actions has no label, so the empty label must not indent it */
    .x-table.is-stack td:has(> .x-lt-actions)::before { content: none; }
    .x-table.is-stack .x-lt-actions { justify-content: flex-start; }
    /* a row heading (<th scope="row">) becomes the stacked row's title */
    .x-table.is-stack tbody th[scope="row"] { display: block; padding: 4px 16px 2px; text-align: left; font-weight: 800; font-size: var(--x-fs-sm); border: 0; }
    .x-table.is-stack td > div:has(> .x-input-group), .x-table.is-stack td > .x-input-group { flex: 1; min-width: 0; }
}

.x-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .02em; background: var(--x-surface-3); color: var(--x-text-2); white-space: nowrap; }
.x-badge .x-icon { width: 12px; height: 12px; }
.x-badge-success { background: var(--x-success-soft); color: var(--x-success-text); }
.x-badge-danger { background: var(--x-danger-soft); color: var(--x-danger-text); }
.x-badge-warning { background: var(--x-warning-soft); color: var(--x-warning-text); }
.x-badge-info { background: var(--x-info-soft); color: var(--x-info-text); }
.x-badge-brand { background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* A run of status badges beside a name (Locations list, titles, import list). */
.x-loc-badges { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; margin-right: 6px; }
.x-loc-badges:empty { display: none; }

.x-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--x-primary-soft); color: var(--x-primary-text); font-weight: 800; font-size: var(--x-fs-sm); flex: none; overflow: hidden; }
.x-avatar img { width: 100%; height: 100%; object-fit: cover; }
.x-avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.x-avatar-lg { width: 48px; height: 48px; font-size: var(--x-fs-lg); }
.x-avatar.is-ink { background: var(--x-text); color: var(--x-bg); }

.x-stars { display: inline-flex; gap: 2px; color: var(--x-star); }
.x-stars .x-icon { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.x-stars .is-off { color: var(--x-line-strong); }
.x-stars.is-lg .x-icon { width: 20px; height: 20px; }

/* KPI tiles */
.x-kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* Signal strip under the Home KPIs: one quiet pill per chore or side signal
   (needs reply, unhappy customers, failing requests, recommend score). */
.x-signals { display: flex; flex-wrap: wrap; gap: 8px; }
.x-signal { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: var(--x-r-pill); border: 1px solid var(--x-line-strong); background: var(--x-surface); color: var(--x-text-2); font-size: var(--x-fs-sm); text-decoration: none; transition: border-color var(--x-t-fast), color var(--x-t-fast); }
.x-signal:hover { border-color: var(--x-text-3); color: var(--x-text); text-decoration: none; }
.x-signal strong { color: var(--x-text); font-variant-numeric: tabular-nums; }
.x-signal .x-icon { color: var(--x-text-3); }
.x-signal.is-warning { border-color: var(--x-warning); background: var(--x-warning-soft); color: var(--x-warning-text); } .x-signal.is-warning strong, .x-signal.is-warning .x-icon { color: var(--x-warning-text); }
.x-signal.is-danger { border-color: var(--x-danger); background: var(--x-danger-soft); color: var(--x-danger-text); } .x-signal.is-danger strong, .x-signal.is-danger .x-icon { color: var(--x-danger-text); }
.x-signal.is-success { border-color: var(--x-success); background: var(--x-success-soft); color: var(--x-success-text); } .x-signal.is-success strong, .x-signal.is-success .x-icon { color: var(--x-success-text); }
/* Links inside running text keep their line box but get a 32px hit area. */
p > a:not(.x-btn), .x-card-sub > a:not(.x-btn), .x-help > a:not(.x-btn), .x-note a:not(.x-btn), .x-alert-main a:not(.x-btn), .x-list-sub > a:not(.x-btn) { padding: 6px 0; margin: -6px 0; }
/* Exactly four tiles: four across when they fit (808px), otherwise two by two,
   never three plus an orphan. The min() term is <= 0 once the row is 808px wide. */
@media (min-width: 640px) {
    .x-kpis:has(> :last-child:nth-child(4)) { grid-template-columns: repeat(auto-fit, minmax(max(190px, min(calc((100% - 31px) / 3), calc((808px - 100%) * 999))), 1fr)); }
    /* Six tiles: two rows of three, never five and an orphan. */
    .x-kpis:has(> :last-child:nth-child(6)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.x-kpi { padding: 20px 22px; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: var(--x-r-lg); box-shadow: var(--x-shadow-sm); display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.x-kpi-label { color: var(--x-text-3); font-size: var(--x-fs-sm); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.x-kpi-label .x-icon { width: 15px; height: 15px; }
.x-kpi-value { font-size: var(--x-fs-3xl); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; gap: 8px; }
.x-kpi-value small { font-size: var(--x-fs-md); color: var(--x-text-3); font-weight: 600; letter-spacing: 0; }
.x-kpi-sub { color: var(--x-text-3); font-size: var(--x-fs-sm); }
a.x-kpi { color: inherit; text-decoration: none; transition: box-shadow var(--x-t-fast), transform var(--x-t-fast); }
a.x-kpi:hover { box-shadow: var(--x-shadow-md); transform: translateY(-1px); }
.x-kpi.is-active { border-color: var(--x-primary); box-shadow: 0 0 0 3px var(--x-primary-ring); }
.x-trend { display: inline-flex; align-items: center; gap: 3px; font-size: var(--x-fs-xs); font-weight: 800; padding: 2px 7px; border-radius: var(--x-r-pill); }
.x-trend .x-icon { width: 12px; height: 12px; }
.x-trend-up { background: var(--x-success-soft); color: var(--x-success-text); }
.x-trend-down { background: var(--x-danger-soft); color: var(--x-danger-text); }
.x-trend-flat { background: var(--x-surface-3); color: var(--x-text-3); }

/* Bars, rings, sparklines — pure CSS/SVG charts */
.x-bar { height: 8px; border-radius: 999px; background: var(--x-surface-3); overflow: hidden; }
.x-bar > span { display: block; height: 100%; border-radius: 999px; background: var(--x-primary); transition: width .5s var(--x-ease); }
.x-bar.is-amber > span { background: var(--x-star); }
.x-bar.is-danger > span { background: var(--x-danger); }
.x-bar.is-success > span { background: var(--x-success); }
.x-dist { display: grid; gap: 10px; }
.x-dist-row { display: grid; grid-template-columns: 44px 1fr 48px; align-items: center; gap: 12px; font-size: var(--x-fs-sm); font-weight: 700; }
.x-dist-row .x-stars .x-icon { width: 13px; height: 13px; }
.x-dist-row .is-num { text-align: right; color: var(--x-text-3); font-variant-numeric: tabular-nums; }
.x-ring { --v: 0; --c: var(--x-primary); width: 72px; height: 72px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--x-surface-3) 0); display: grid; place-items: center; flex: none; }
.x-ring::after { content: attr(data-value); width: 56px; height: 56px; border-radius: 50%; background: var(--x-surface); display: grid; place-items: center; font-weight: 800; font-size: var(--x-fs-lg); letter-spacing: -.02em; }
.x-ring.is-lg { width: 112px; height: 112px; } .x-ring.is-lg::after { width: 92px; height: 92px; font-size: var(--x-fs-3xl); }
.x-spark { display: flex; align-items: flex-end; gap: 2px; height: 32px; }
.x-spark > i { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: var(--x-primary); opacity: .75; }
.x-spark > i:last-child { opacity: 1; }
.x-chart { width: 100%; height: auto; display: block; overflow: visible; }
.x-chart .axis { font-family: var(--x-font); }
.x-chart .grid { stroke: var(--x-line); stroke-width: 1; }
.x-chart .axis { fill: var(--x-text-3); font-size: 11px; font-weight: 600; }
.x-chart .line { fill: none; stroke: var(--x-primary); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.x-chart .area { fill: var(--x-primary); opacity: .1; }
.x-chart .dot { fill: var(--x-surface); stroke: var(--x-primary); stroke-width: 2.5; }
.x-chart .line.is-2 { stroke: var(--x-amber); } .x-chart .dot.is-2 { stroke: var(--x-amber); }
.x-chart .line.is-3 { stroke: var(--x-info); } .x-chart .dot.is-3 { stroke: var(--x-info); }
.x-chart .line.is-4 { stroke: var(--x-danger); } .x-chart .dot.is-4 { stroke: var(--x-danger); }
.x-chart .bar { fill: var(--x-primary); rx: 3; }
.x-chart .bar.is-muted { fill: var(--x-surface-3); }
.x-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--x-fs-sm); color: var(--x-text-2); font-weight: 600; }
.x-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--x-primary); margin-right: 6px; vertical-align: -1px; }
.x-legend .is-2 i { background: var(--x-amber); } .x-legend .is-3 i { background: var(--x-info); } .x-legend .is-4 i { background: var(--x-danger); }

/* Steps / checklist */
.x-steps { display: flex; gap: 0; align-items: center; counter-reset: step; }
.x-step { display: flex; align-items: center; gap: 10px; color: var(--x-text-3); font-weight: 700; font-size: var(--x-fs-sm); white-space: nowrap; }
.x-step + .x-step::before { content: ''; width: 32px; height: 1px; background: var(--x-line-strong); margin: 0 12px; }
.x-step-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--x-line-strong); font-size: var(--x-fs-xs); font-weight: 800; }
.x-step.is-active { color: var(--x-text); }
.x-step.is-active .x-step-n { background: var(--x-primary); border-color: var(--x-primary); color: var(--x-on-primary); }
.x-step.is-done .x-step-n { background: var(--x-success-soft); border-color: transparent; color: var(--x-success-text); }
.x-step.is-done .x-step-n .x-icon { width: 13px; height: 13px; }
@media (max-width: 767px) { .x-step span:not(.x-step-n) { display: none; } .x-step.is-active span:not(.x-step-n) { display: inline; } .x-step + .x-step::before { width: 14px; margin: 0 6px; } }

.x-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.x-checklist li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--x-line); border-radius: var(--x-r-md); background: var(--x-surface); }
.x-checklist .x-check-mark { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--x-line-strong); display: grid; place-items: center; flex: none; color: transparent; }
.x-checklist li.is-done { opacity: .72; }
.x-checklist li.is-done .x-check-mark { background: var(--x-success); border-color: var(--x-success); color: #fff; }
.x-checklist li.is-done .x-checklist-title { text-decoration: line-through; }
.x-checklist .x-check-mark .x-icon { width: 14px; height: 14px; }
.x-checklist-main { flex: 1; min-width: 0; }
.x-checklist-title { font-weight: 700; }
.x-checklist-sub { color: var(--x-text-3); font-size: var(--x-fs-sm); }
.x-progress-line { display: flex; align-items: center; gap: 12px; font-size: var(--x-fs-sm); font-weight: 700; color: var(--x-text-2); }
.x-progress-line .x-bar { flex: 1; }

/* ------------------------------------------------------------------ */
/* 10. Feedback                                                        */
/* ------------------------------------------------------------------ */
.x-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--x-r-md); border: 1px solid transparent; margin-bottom: 20px; font-size: var(--x-fs-md); background: var(--x-surface-2); color: var(--x-text); }
.x-alert .x-icon { margin-top: 1px; }
.x-alert-main { flex: 1; min-width: 0; }
.x-alert strong { display: block; margin-bottom: 2px; }
.x-alert-success { background: var(--x-success-soft); color: var(--x-success-text); }
.x-alert-danger { background: var(--x-danger-soft); color: var(--x-danger-text); }
.x-alert-warning { background: var(--x-warning-soft); color: var(--x-warning-text); }
.x-alert-info { background: var(--x-info-soft); color: var(--x-info-text); }
.x-alert-close { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; padding: 2px; border-radius: 6px; }
.x-alert-close:hover { opacity: 1; }
.x-alert a { color: inherit; font-weight: 700; text-decoration: underline; }

.x-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.x-toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: var(--x-text); color: var(--x-bg); font-weight: 600; font-size: var(--x-fs-md); box-shadow: var(--x-shadow-lg); opacity: 0; transform: translateY(10px); transition: opacity var(--x-t-med), transform var(--x-t-med) var(--x-ease); cursor: pointer; }
.x-toast.is-show { opacity: 1; transform: none; }
.x-toast .x-icon { color: var(--x-brand-400); }
.x-toast.is-error .x-icon { color: var(--x-danger); }
.x-toast a { color: inherit; text-decoration: underline; }
@media (max-width: 639px) { .x-toasts { left: 16px; right: 16px; bottom: 16px; } .x-toast { max-width: none; } }

.x-empty { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.x-empty-art { width: 72px; height: 72px; border-radius: 22px; background: var(--x-primary-soft); color: var(--x-primary); display: grid; place-items: center; margin-bottom: 6px; }
.x-empty-art .x-icon { width: 32px; height: 32px; stroke-width: 1.6; }
pre.x-code code { background: none; padding: 0; border-radius: 0; font-size: inherit; color: inherit; } /* /design code blocks */
/* Illustrations (quality plan 2026-11 §6.3): helpers/illustration_helper.php, assets/img/illustrations */
.x-illus { display: block; width: 160px; height: auto; max-width: 100%; margin: 0 auto 4px; }
.x-illus-sm { width: 80px; }
.x-empty .x-illus { margin-bottom: 6px; }
.x-empty.is-compact .x-illus { width: 80px; }
/* States pass (quality plan 2026-11 section 4.3.4) */
/* A region that is fetching: the JS sets aria-busy="true" while it waits (reviews.js notes/rescue,
   reply-care.js history, widget-builder.js preview, listing.js lazy parts). */
[aria-busy="true"] { position: relative; min-height: 48px; }
[aria-busy="true"] > :not(.x-skel):not(.x-note) { opacity: .55; pointer-events: none; transition: opacity var(--x-dur, .15s) var(--x-ease, ease); }

/* Inline skeleton rows used by the JS while a list loads (no inline style= needed). */

/* Error note inside a fetched region: text and Retry stay on one line where they fit. */
.x-note > div > .x-btn.x-btn-sm.x-btn-ghost { vertical-align: middle; margin-left: 4px; }

/* Illustrations keep the same block height as the icon chip, so a card does not jump when one replaces the other. */
.x-empty .x-illus { min-height: 120px; }
.x-empty.is-compact .x-illus, .x-empty .x-illus-sm { min-height: 60px; }
/* §30 Onboarding v3 (migration 167): wizard progress, Home first-win card, checklist time, admin funnel.
   Reuses .x-progress-line / .x-bar / .x-steps / .x-step from §9; merge into pinpraise.css after §29. */
.x-wizard-progress { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; }
/* The bar runs the width of the card, so its time label ends at the card's edge instead of floating mid-page.
   The track must show on the tinted band, and step one (0%) still shows a start. */
.x-wizard-progress .x-bar { background: var(--x-line-strong); }
.x-wizard-progress .x-bar > span { min-width: 8px; }
/* "(skipped)" labels lengthen the row: the connectors give way so the steps stay inside the wizard column. */
.x-wizard-top > .x-steps { min-width: 0; }
.x-wizard-top > .x-steps > .x-step + .x-step { flex: 0 1 auto; min-width: 0; }
.x-wizard-top > .x-steps > .x-step + .x-step::before { flex: 0 1 28px; width: 28px; min-width: 8px; margin: 0 8px; }
.x-wizard-progress .x-progress-line > span:last-child { white-space: nowrap; }
.x-wizard-next { margin: 0; }
.x-wizard-back { margin: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--x-r-md); background: var(--x-primary-soft); color: var(--x-primary-text); font-weight: 700; align-self: flex-start; }
.x-win { border-color: var(--x-primary-ring); }
.x-win .x-card-body { align-items: center; }
.x-win .x-illus-sm { flex: none; margin: 0; }
.x-win-actions { flex: none; align-items: center; }
.x-checklist-time { color: var(--x-text-3); font-size: var(--x-fs-xs); font-weight: 700; white-space: nowrap; }
.x-checklist-time::before { content: '·'; margin-right: 6px; }
.x-funnel .x-num { text-align: right; white-space: nowrap; }
.x-funnel td .x-progress-line { min-width: 180px; }
@media (max-width: 767px) {
    .x-win .x-card-body { flex-wrap: wrap; }
    .x-win-actions { width: 100%; justify-content: flex-end; }
    .x-funnel td .x-progress-line { min-width: 120px; flex: 1; margin-left: 24px; }
}
.x-empty h3 { font-size: var(--x-fs-xl); }
.x-empty p { color: var(--x-text-2); max-width: 44ch; }
.x-empty .x-row { justify-content: center; margin-top: 8px; }
.x-empty.is-compact { padding: 28px 16px; gap: 6px; }
.x-empty.is-compact .x-empty-art { width: 48px; height: 48px; border-radius: 14px; }
.x-empty.is-compact .x-empty-art .x-icon { width: 22px; height: 22px; }
.x-empty.is-compact h3 { font-size: var(--x-fs-lg); }

.x-skel { position: relative; overflow: hidden; background: var(--x-surface-3); border-radius: 8px; color: transparent !important; }
.x-skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: x-shimmer 1.4s infinite; }
@keyframes x-shimmer { to { transform: translateX(100%); } }

.x-note { padding: 14px 16px; border-radius: var(--x-r-md); background: var(--x-surface-2); color: var(--x-text-2); font-size: var(--x-fs-sm); display: flex; gap: 10px; align-items: flex-start; }
.x-note .x-icon { color: var(--x-text-3); flex: none; margin-top: 1px; }
.x-note.is-brand { background: var(--x-primary-soft); color: var(--x-primary-text); } .x-note.is-brand .x-icon { color: var(--x-primary); }
.x-voice-reply.is-recording { color: var(--x-danger-text); border-color: var(--x-danger); } .x-voice-reply.is-recording .x-icon { color: var(--x-danger); animation: x-pulse 1s ease-in-out infinite alternate; }
@keyframes x-pulse { to { opacity: .35; } }
.x-note.is-warning { background: var(--x-warning-soft); color: var(--x-warning-text); } .x-note.is-warning .x-icon { color: var(--x-warning-text); }

/* ------------------------------------------------------------------ */
/* 11. Overlays                                                        */
/* ------------------------------------------------------------------ */
.x-menu { position: relative; display: inline-block; }
.x-menu-panel { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; z-index: 60; background: var(--x-surface); border: 1px solid var(--x-line); border-radius: var(--x-r-md); box-shadow: var(--x-shadow-md); padding: 6px; display: none; }
.x-menu-panel.is-left { right: auto; left: 0; }
.x-menu-panel.is-up { top: auto; bottom: calc(100% + 6px); }
.x-menu.is-open .x-menu-panel { display: block; animation: x-pop var(--x-t-fast) var(--x-ease); }
@keyframes x-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.x-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--x-text); font-weight: 600; font-size: var(--x-fs-md); text-align: left; text-decoration: none; cursor: pointer; }
.x-menu-item:hover { background: var(--x-surface-2); color: var(--x-text); text-decoration: none; }
.x-menu-item .x-icon { color: var(--x-text-3); width: 16px; height: 16px; }
.x-menu-item.is-danger { color: var(--x-danger-text); } .x-menu-item.is-danger .x-icon { color: var(--x-danger); }
.x-menu-item.is-current { background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-menu-head { padding: 8px 10px 4px; font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--x-text-3); }
.x-menu-sep { height: 1px; background: var(--x-line); margin: 6px 4px; }
.x-menu-panel.is-wide { min-width: 300px; max-height: 70vh; overflow-y: auto; }

dialog.x-modal { padding: 0; border: 0; border-radius: var(--x-r-xl); background: var(--x-surface); color: var(--x-text); width: min(560px, calc(100vw - 32px)); box-shadow: var(--x-shadow-lg); max-height: calc(100vh - 48px); }
dialog.x-modal::backdrop { background: var(--x-backdrop); backdrop-filter: blur(2px); }
dialog.x-modal[open] { animation: x-modal-in var(--x-t-med) var(--x-ease); }
@keyframes x-modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog.x-modal.is-lg { width: min(820px, calc(100vw - 32px)); }
.x-modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 0; }
.x-modal-head h2 { font-size: var(--x-fs-xl); flex: 1; }
.x-modal-body { padding: 16px 24px 24px; }
.x-modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 24px 24px; flex-wrap: wrap; }
.x-modal-close { margin-left: auto; }
/* .is-lg and .x-share carry their own width (two classes), so the phone sheet must name them or it stays 32px short and off-centre (19 Nov). */
@media (max-width: 639px) { dialog.x-modal, dialog.x-modal.is-lg, dialog.x-modal.x-share { width: 100vw; max-width: none; margin: auto 0 0; border-radius: var(--x-r-xl) var(--x-r-xl) 0 0; max-height: 92vh; } }


.x-lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.9); display: none; place-items: center; padding: 24px; }
.x-lightbox.is-open { display: grid; }
.x-lightbox img, .x-lightbox video { max-width: 100%; max-height: 90vh; border-radius: 12px; box-shadow: var(--x-shadow-lg); }
.x-lightbox-close { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255,255,255,.12); }
.x-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; background: rgba(255,255,255,.12); }
.x-lightbox-nav.is-prev { left: 16px; } .x-lightbox-nav.is-next { right: 16px; }

[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: var(--x-text); color: var(--x-bg); font-size: var(--x-fs-xs); font-weight: 700; padding: 5px 9px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--x-t-fast); z-index: 30; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; }
/* The top bar sits at the viewport edge: its tooltips open downwards so they are never cut off. */
.x-top [data-tooltip]::after { bottom: auto; top: calc(100% + 8px); }
/* Numbered/bulleted stacks: no browser margins, markers flush with the text around them. */
ol.x-stack, ul.x-stack:not(.x-list) { margin: 0; padding-left: 20px; }

/* ------------------------------------------------------------------ */
/* 12. Review card                                                     */
/* ------------------------------------------------------------------ */
.x-review { background: var(--x-surface); border: 1px solid var(--x-line); border-radius: var(--x-r-lg); box-shadow: var(--x-shadow-sm); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.x-review.is-negative { border-left: 3px solid var(--x-danger); }
.x-review.is-needs-reply { border-left: 3px solid var(--x-amber); }
.x-review-head { display: flex; gap: 12px; align-items: flex-start; }
.x-review-who { flex: 1; min-width: 0; }
.x-review-author { font-weight: 800; font-size: var(--x-fs-lg); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x-review-meta { display: flex; align-items: center; gap: 8px; color: var(--x-text-3); font-size: var(--x-fs-sm); flex-wrap: wrap; margin-top: 2px; }
.x-review-meta .x-stars .x-icon { width: 14px; height: 14px; }
.x-review-text { font-size: var(--x-fs-lg); line-height: 1.6; color: var(--x-text); white-space: pre-line; overflow-wrap: anywhere; }
.x-review-text.is-empty { color: var(--x-text-3); font-style: italic; font-size: var(--x-fs-md); }
.x-review-media { display: flex; gap: 8px; flex-wrap: wrap; }
.x-review-media button { padding: 0; border: 0; background: none; border-radius: 10px; overflow: hidden; width: 84px; height: 84px; position: relative; }
.x-review-media img { width: 100%; height: 100%; object-fit: cover; }
.x-review-media .x-more { position: absolute; inset: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-weight: 800; }
.x-reply { padding: 14px 16px; border-radius: 12px; background: var(--x-surface-2); border-left: 3px solid var(--x-primary); display: flex; flex-direction: column; gap: 6px; }
.x-reply-head { display: flex; align-items: center; gap: 8px; font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--x-primary-text); }
.x-reply-text { white-space: pre-line; overflow-wrap: anywhere; color: var(--x-text-2); }
.x-reply-actions { display: flex; gap: 6px; margin-top: 4px; }
.x-reply-actions > .x-btn-ghost:first-child { margin-left: -12px; } /* icon lines up with the reply text */
.x-review-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x-review-foot .x-spacer { flex: 1; }
.x-ai { padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, var(--x-primary-soft), transparent); border: 1px dashed color-mix(in srgb, var(--x-primary) 45%, transparent); display: flex; flex-direction: column; gap: 8px; }
.x-ai-head { display: flex; align-items: center; gap: 8px; font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--x-primary-text); }
.x-source { display: inline-flex; align-items: center; gap: 5px; font-size: var(--x-fs-xs); font-weight: 800; color: var(--x-text-3); }
.x-source .x-icon { width: 13px; height: 13px; }
.x-review-list { display: flex; flex-direction: column; gap: 14px; }

/* ------------------------------------------------------------------ */
/* 13. Auth + wizard shells                                            */
/* ------------------------------------------------------------------ */
.x-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.x-auth-side { background: var(--x-rail-bg); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.x-auth-side::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -200px; top: -200px; background: radial-gradient(circle, color-mix(in srgb, var(--x-brand-400) 32%, transparent), transparent 65%); }
.x-auth-side::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; left: -160px; bottom: -200px; background: radial-gradient(circle, rgba(232,163,23,.22), transparent 65%); }
.x-auth-side > * { position: relative; }
.x-auth-side .x-logo { font-size: 20px; }
.x-auth-quote { font-size: var(--x-fs-2xl); font-weight: 700; line-height: 1.35; letter-spacing: -.02em; max-width: 26ch; }
.x-auth-quote em { font-style: normal; color: var(--x-brand-300); }
.x-auth-points { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; color: #C7D0D8; font-weight: 600; }
.x-auth-points li { display: flex; gap: 10px; align-items: center; }
.x-auth-points .x-icon { color: var(--x-brand-400); }
.x-auth-fine { color: var(--x-rail-muted); font-size: var(--x-fs-sm); }
.x-auth-main { display: grid; place-items: center; padding: 40px 24px; }
.x-auth-box { width: 100%; max-width: 400px; }
.x-auth-box h1 { font-size: var(--x-fs-3xl); margin-bottom: 6px; }
.x-auth-box .x-page-sub { margin-bottom: 28px; }
.x-auth-links { margin-top: 20px; color: var(--x-text-2); font-size: var(--x-fs-md); display: flex; flex-direction: column; gap: 8px; text-align: center; }
.x-auth-mobile-logo { display: none; margin-bottom: 28px; }
@media (max-width: 899px) { .x-auth { grid-template-columns: 1fr; } .x-auth-side { display: none; } .x-auth-mobile-logo { display: flex; } .x-auth-mobile-logo .x-logo { color: var(--x-text); } }

.x-wizard { max-width: 720px; margin: 0 auto; padding: 24px 0 64px; }
.x-wizard-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.x-wizard-card { background: var(--x-surface); border: 1px solid var(--x-line); border-radius: var(--x-r-xl); box-shadow: var(--x-shadow-md); padding: 36px 40px; }
.x-wizard-card h1 { font-size: var(--x-fs-3xl); margin-bottom: 8px; }
.x-wizard-card > .x-page-sub { margin-bottom: 28px; }
.x-wizard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.x-wizard-foot > .x-btn { height: 48px; } /* Back and Continue share one height */
@media (max-width: 639px) { .x-wizard-card { padding: 24px 20px; border-radius: var(--x-r-lg); } .x-tiles-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } .x-tiles-kinds .x-tile { padding: 12px; } }
.x-celebrate { text-align: center; padding: 20px 0; }
.x-celebrate-mark { width: 88px; height: 88px; border-radius: 28px; margin: 0 auto 20px; background: linear-gradient(135deg, var(--x-brand-400), var(--x-brand-600)); color: #06221E; display: grid; place-items: center; box-shadow: 0 16px 32px -12px var(--x-primary-ring); animation: x-bounce .6s var(--x-ease); }
.x-celebrate-mark .x-icon { width: 40px; height: 40px; stroke-width: 2.4; }
@keyframes x-bounce { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }

.x-connect { display: flex; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--x-line); border-radius: var(--x-r-lg); background: var(--x-surface); }
.x-connect-logo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--x-surface-2); flex: none; }
.x-connect-logo svg { width: 26px; height: 26px; }
.x-connect-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.x-connect-title { font-weight: 800; font-size: var(--x-fs-lg); }
.x-connect-sub { color: var(--x-text-3); font-size: var(--x-fs-sm); }
.x-connect.is-on { border-color: color-mix(in srgb, var(--x-success) 40%, transparent); background: color-mix(in srgb, var(--x-success-soft) 50%, var(--x-surface)); }

.x-loc-pick { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.x-loc-pick .x-check { padding: 12px 14px; border: 1px solid var(--x-line); border-radius: var(--x-r-md); align-items: center; }
.x-loc-pick .x-check:has(input:checked) { border-color: var(--x-primary); background: var(--x-primary-soft); }
.x-loc-pick .x-check input { margin-top: 0; }

/* ------------------------------------------------------------------ */
/* 14. Utilities (small, deliberate set)                               */
/* ------------------------------------------------------------------ */
.x-muted { color: var(--x-text-3); }
.x-text-2 { color: var(--x-text-2); }
.x-small { font-size: var(--x-fs-sm); }
.x-xs { font-size: var(--x-fs-xs); }
.x-strong { font-weight: 700; }
.x-center { text-align: center; }
.x-right { text-align: right; }
.x-nowrap { white-space: nowrap; }
.x-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-mono { font-family: var(--x-mono); font-size: .92em; }
.x-num { font-variant-numeric: tabular-nums; }
.x-mt-0 { margin-top: 0 !important; } .x-mt-1 { margin-top: 8px; } .x-mt-2 { margin-top: 16px; } .x-mt-3 { margin-top: 24px; } .x-mt-4 { margin-top: 32px; }
.x-mb-0 { margin-bottom: 0 !important; } .x-mb-1 { margin-bottom: 8px; } .x-mb-2 { margin-bottom: 16px; } .x-mb-3 { margin-bottom: 24px; } .x-mb-4 { margin-bottom: 32px; }
.x-gap-1 { gap: 8px; } .x-gap-2 { gap: 16px; }
.x-flex-1 { flex: 1; min-width: 0; }
.x-hide-mobile { } .x-show-mobile { display: none !important; }
@media (max-width: 767px) { .x-hide-mobile { display: none !important; } .x-show-mobile { display: initial !important; } }
/* Phones zoom into a focused field under 16px, which looks like the page broke: every control is 16px there. */
@media (max-width: 767px) { .x-input, .x-select, .x-textarea, .x-input-sm, .x-select.x-input-sm { font-size: 16px; } }
.x-success-text { color: var(--x-success-text); } .x-danger-text { color: var(--x-danger-text); } .x-warning-text { color: var(--x-warning-text); } .x-brand-text { color: var(--x-primary-text); }
.x-copy-field { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border: 1px solid var(--x-line-strong); border-radius: 10px; background: var(--x-surface-2); font-family: var(--x-mono); font-size: var(--x-fs-sm); }
.x-copy-field span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
pre.x-code { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--x-rail-bg); color: #D7E0E8; font-family: var(--x-mono); font-size: var(--x-fs-sm); overflow-x: auto; line-height: 1.5; }
details.x-details { border: 1px solid var(--x-line); border-radius: var(--x-r-md); background: var(--x-surface); }
details.x-details > summary { cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 10px; }
details.x-details > summary::-webkit-details-marker { display: none; }
details.x-details > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--x-text-3); border-bottom: 2px solid var(--x-text-3); transform: rotate(45deg); transition: transform var(--x-t-fast); }
details.x-details[open] > summary::after { transform: rotate(-135deg); }
details.x-details > .x-details-body { padding: 0 18px 18px; }
/* print styles moved to the end of the file (quality plan 2026-11 §5.3) */

/* Bare layout (wizard): no rail/top bar */

/* Long unbreakable content (review URLs, code) must not widen grid columns */
.x-grid > *, .x-row > *, .x-stack > * { min-width: 0; }
.x-copy-field { min-width: 0; }
.x-table tr.is-disabled { opacity: .55; }

/* Page band: the first .x-page of a page renders on a full-bleed tinted band */
.x-content { isolation: isolate; }
.x-content > .x-page:first-child { position: relative; margin: 0 0 28px; padding: 22px 0 26px; }
.x-content > .x-page:first-child::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; background: linear-gradient(180deg, color-mix(in srgb, var(--x-primary-soft) 60%, var(--x-bg)) 0%, var(--x-bg) 100%); border-bottom: 1px solid var(--x-line); }
.x-content > .x-page:first-child h1 { font-size: var(--x-fs-4xl); letter-spacing: -.03em; }
@media (max-width: 639px) { .x-content > .x-page:first-child h1 { font-size: var(--x-fs-3xl); } .x-content > .x-page:first-child { padding: 22px 0 18px; margin-bottom: 20px; } }
.x-content.is-wide > .x-page:first-child::before { width: auto; left: calc(-1 * var(--x-gutter)); right: calc(-1 * var(--x-gutter)); transform: none; }
.x-flash { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; }
.x-flash .x-alert { margin: 0; box-shadow: var(--x-shadow-lg); border-color: var(--x-line); background: var(--x-surface); animation: x-modal-in var(--x-t-med) var(--x-ease); }
.x-flash .x-alert-success { color: var(--x-success-text); } .x-flash .x-alert-danger { color: var(--x-danger-text); } .x-flash .x-alert-warning { color: var(--x-warning-text); }

/* Promoted from section stylesheets (audit pass) */
.x-tiles.is-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.x-tiles.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 639px) { .x-tiles.is-2, .x-tiles.is-3 { grid-template-columns: 1fr; } }
.x-card-foot.is-between { justify-content: space-between; }
.x-card-head h2, .x-card-head h3 { display: flex; align-items: center; gap: 8px; }
.x-page-actions .x-select:not(.x-input-sm), .x-toolbar .x-select:not(.x-input-sm), .x-row > .x-select:not(.x-input-sm) { width: auto; height: 40px; }
.x-input-group > .x-btn:not(:last-child) { border-radius: 0; }
.x-ml-auto { margin-left: auto; }
.x-ai-headline { font-size: var(--x-fs-lg); font-weight: 700; }
.x-ai ul { margin: 6px 0 0; padding-left: 18px; }
.x-table.is-dense th, .x-table.is-dense td { padding: 10px 12px; }
.x-select.is-auto { width: auto; max-width: 100%; } /* sized to its longest option, but never past its row (phones) */
.x-page-actions > form { max-width: 100%; min-width: 0; }
.x-card-head > .x-row { min-width: 0; max-width: 100%; }
.x-card-head > .x-flex-1 { flex: 1 1 260px; }
/* Picker toolbar with a "Read from Google again" column (listing_plus/_picker.php): the button
   sits level with the select, the "Read … <date>" help hangs under it; on phones the column
   drops under the select without its spacer label. */
/* An input group never pokes past its grid column (plan form "%" addon). */
.x-input-group { max-width: 100%; }
.x-input-group > .x-input { min-width: 0; flex: 1 1 auto; }
/* Numbered step lists (DLT registration): the chip stays left, text beside it. */
.x-dlt-steps > li { flex-wrap: nowrap; align-items: flex-start; }
.x-dlt-steps > li > .x-badge { min-width: 28px; justify-content: center; flex: none; }
.x-dlt-steps > li > .x-dlt-step-text { flex: 1 1 auto; min-width: 0; }
@media (max-width: 639px) {
    /* wizard "Google connected" row: the badge wraps under the text instead of breaking words */
    .x-connect { flex-wrap: wrap; }
    .x-connect-main { flex-basis: calc(100% - 64px); overflow-wrap: break-word; }
    .x-connect > .x-badge { margin-left: 64px; }
    /* campaign message box shows the whole default text */
    #c-message { min-height: 260px; }
}
.x-toolbar.x-pk { align-items: flex-start; }
.x-pk-one { display: flex; align-items: center; gap: 6px; min-height: 40px; }
@media (max-width: 639px) { .x-toolbar.x-pk .x-toolbar-end { margin-left: 0; width: 100%; } .x-toolbar.x-pk .x-toolbar-end .x-label { display: none; } } /* the title column keeps 260px, so a long badge drops under it on phones instead of squeezing it */
/* A control sized to its longest option (a location picker) never runs past its
   row on a phone: the row's children may shrink, and the control caps at the row. */
.x-select, .x-input, .x-textarea { max-width: 100%; }
.x-row > *, .x-page-actions > *, .x-toolbar > * { min-width: 0; }
.x-copy-field > .x-input, .x-copy-field > .x-btn { height: 32px; }
/* File pickers look like the rest of the form: a small button + the file name, no system chrome. */
.x-input[type="file"]{ height: auto; padding: 4px 6px 4px 4px; font-size: var(--x-fs-sm); color: var(--x-text-2); cursor: pointer; }
.x-input[type="file"]::file-selector-button{ height: 30px; margin: 0 10px 0 0; padding: 0 12px; border: 1px solid var(--x-line-strong); border-radius: 8px; background: var(--x-surface); color: var(--x-text); font: inherit; font-size: var(--x-fs-sm); font-weight: 700; cursor: pointer; }
.x-input[type="file"]::file-selector-button:hover { background: var(--x-surface-2); }
/* A textarea given .x-input by mistake still grows (the 40px input height would slice its last line). */
textarea.x-input { height: auto; min-height: 110px; padding: 11px 13px; resize: vertical; line-height: 1.5; }
/* Colour pickers are a 40px swatch with the same corners as an input. */
input[type="color"].x-color, .x-input[type="color"] { width: 48px; height: 40px; padding: 3px; border: 1px solid var(--x-line-strong); border-radius: 10px; background: var(--x-surface); cursor: pointer; }
input[type="color"].x-color::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"].x-color::-webkit-color-swatch { border: 0; border-radius: 7px; }
.x-main:has(> .x-content.is-narrow) > .x-foot { max-width: 760px; }
.x-input.is-auto { width: auto; flex: none; }
.x-goal-form .x-input[type=date] { min-width: 150px; }
@media (max-width: 639px) { .x-goal-form .x-input[type=date] { flex: 1 1 150px; } .x-goal-form .x-muted { flex-basis: 100%; } }
.x-textarea.is-short { min-height: 64px; }
.x-wf-notes { width: 100%; padding: 14px 16px; }
.x-wf-note-list > li { padding: 0; border: 0; display: block; }
.x-switch-ctl.is-top, .x-check.is-top { align-items: flex-start; }
.x-row.is-top { align-items: flex-start; }
.x-row.is-center { justify-content: center; }
.x-prose { white-space: pre-line; overflow-wrap: anywhere; }
.x-input.is-code { height: 56px; font-size: 1.5rem; font-weight: 700; letter-spacing: .25em; text-align: center; }
.x-celebrate .x-page-sub { margin: 8px auto 24px; max-width: 46ch; }
.x-auth-fine a { color: inherit; }
.x-progress-line { min-width: 160px; }

/* Promoted from settings/admin audit */
h1 .x-icon, h2 .x-icon, h3 .x-icon { display: inline-block; vertical-align: -.15em; }
.x-card-head h2, .x-card-head h3 { min-width: 0; }
.x-card-head h2 .x-icon, .x-card-head h3 .x-icon { color: var(--x-text-3); }
.x-card > .x-card-head:last-child, .x-card > form > .x-card-head:last-child { border-bottom: 0; }
.x-card.is-brand .x-card-head { border-bottom-color: rgba(255,255,255,.18); }
.x-card.is-brand .x-card-sub, .x-card.is-brand .x-kpi-value small, .x-card.is-brand .x-muted, .x-card.is-brand .x-text-2, .x-card.is-brand .x-help { color: rgba(255,255,255,.8); }
.x-card.is-brand .x-badge-brand { background: rgba(255,255,255,.92); color: var(--x-brand-600); }
.x-card.is-brand .x-btn-ghost { color: rgba(255,255,255,.85); }
.x-card.is-brand .x-btn-ghost:hover { color: #fff; background: rgba(255,255,255,.12); }
.x-card.is-brand .x-btn[disabled] { background: rgba(255,255,255,.22); border-color: transparent; color: #fff; opacity: 1; }
.x-card.is-brand .x-card-foot { border-top-color: rgba(255,255,255,.18); }
.x-card.is-brand ul, .x-card.is-brand li { color: rgba(255,255,255,.88); }
.x-card.is-brand li .x-icon { color: #fff; }
.x-card.is-brand .x-card-head h2 .x-icon, .x-card.is-brand .x-card-head h3 .x-icon { color: rgba(255,255,255,.8); }
.x-list > li.is-wrap { flex-wrap: wrap; }
/* In a narrow card the text keeps a readable width and the trailing button
   drops to its own line on the right instead of squeezing the text. */
.x-list > li.is-wrap > .x-list-main { flex-basis: 150px; }
.x-list > li.is-wrap > .x-btn:last-child { margin-left: auto; }
.x-list-full { flex-basis: 100%; min-width: 0; }
.x-list > li.is-group { padding: 16px 24px 4px; }
.x-list > li.is-group + li { border-top: 0; }
.x-list-text { font-weight: 400; }
.x-input-group > .x-select { border-radius: 0; margin-left: -1px; }
.x-input-group > .x-addon + .x-select { margin-left: 0; }
.x-input-group > .x-select.is-auto { width: auto; flex: none; }
.x-input-group > .x-select:last-child { border-radius: 0 10px 10px 0; }
.x-input-group > .x-addon.is-end { border-left: 0; border-right: 1px solid var(--x-line-strong); border-radius: 0 10px 10px 0; }
.x-input-group.x-copy-field > .x-input { border: 0; background: none; flex: 1; min-width: 0; height: 32px; padding: 0; box-shadow: none; }
.x-input-group.x-copy-field > .x-btn { height: 32px; }
ol.x-steps { margin: 0; padding: 0; list-style: none; }
.x-steps.is-vertical { flex-direction: column; align-items: stretch; gap: 20px; }
.x-steps.is-vertical .x-step { white-space: normal; align-items: flex-start; gap: 14px; color: var(--x-text); font-weight: 500; font-size: var(--x-fs-md); }
.x-steps.is-vertical .x-step > div { flex: 1; min-width: 0; }
.x-steps.is-vertical .x-step + .x-step::before { display: none; }
.x-steps.is-vertical .x-step span { display: inline; }
.x-toolbar > .x-select { min-width: 160px; }
.x-ol { margin: 0; padding-left: 18px; }
.x-row.is-nowrap { flex-wrap: nowrap; }
.x-row.is-end { justify-content: flex-end; }
.x-card-foot.is-start { justify-content: flex-start; }
.x-grid-2 > .x-card { display: flex; flex-direction: column; }
.x-grid-2 > .x-card > form:not(.x-card-foot):not([hidden]) { display: flex; flex-direction: column; flex: 1; } /* a form used as the footer, or a hidden helper form, must not grow */
.x-grid-2 > .x-card > .x-card-foot, .x-grid-2 > .x-card > form > .x-card-foot { margin-top: auto; }
.x-review-meta a, .x-review-meta span { display: inline-flex; align-items: center; gap: 4px; }
p .x-icon, span .x-icon, a:not(.x-btn):not(.x-chip):not(.x-menu-item) .x-icon { display: inline-block; vertical-align: -.15em; }

/* ------------------------------------------------------------------ */
/* 15. Accent themes — html[data-accent]; layout and components never   */
/* change, only the brand hues. Picked in Settings › Appearance.        */
/* ------------------------------------------------------------------ */
/* tokens:start accents — generated from docs/design-tokens.json by docs/dev/build-tokens.mjs; do not edit by hand */
:root[data-accent="ocean"]  { --x-brand-500: #1D5FD1; --x-brand-600: #174CA7; --x-brand-400: #5B90ED; --x-brand-300: #9BBCF5; }
:root[data-accent="violet"] { --x-brand-500: #6D4FD6; --x-brand-600: #573FAB; --x-brand-400: #9A84E9; --x-brand-300: #C2B4F2; }
:root[data-accent="coral"]  { --x-brand-500: #C4432A; --x-brand-600: #9D3622; --x-brand-400: #F3866F; --x-brand-300: #F0ADA0; }
:root[data-accent="amber"]  { --x-brand-500: #A4600A; --x-brand-600: #834D08; --x-brand-400: #F59A28; --x-brand-300: #F9C27D; }
:root[data-accent="forest"] { --x-brand-500: #2F7A3E; --x-brand-600: #266232; --x-brand-400: #5FB56F; --x-brand-300: #92E1A2; }
:root[data-accent="rose"]   { --x-brand-500: #C9386E; --x-brand-600: #A12D58; --x-brand-400: #E2739C; --x-brand-300: #EEA9C3; }
/* Light: primary follows the 500/600 brand hues */
:root[data-accent]:not([data-accent="teal"]) { --x-primary: var(--x-brand-500); --x-primary-hover: var(--x-brand-600); --x-primary-soft: color-mix(in srgb, var(--x-brand-500) 12%, var(--x-surface)); --x-primary-text: color-mix(in srgb, var(--x-brand-600) 72%, #000); --x-primary-ring: color-mix(in srgb, var(--x-brand-500) 28%, transparent); --x-primary-strong: var(--x-primary-hover); --x-primary-pressed: color-mix(in srgb, var(--x-brand-600) 85%, #000); }
/* Dark: primary follows the 400/300 hues with translucent soft tints */
:root[data-theme="dark"][data-accent]:not([data-accent="teal"]) { --x-primary: var(--x-brand-400); --x-primary-hover: var(--x-brand-300); --x-primary-soft: color-mix(in srgb, var(--x-brand-400) 16%, transparent); --x-primary-text: var(--x-brand-300); --x-primary-ring: color-mix(in srgb, var(--x-brand-400) 35%, transparent); --x-primary-strong: var(--x-primary-hover); --x-primary-pressed: color-mix(in srgb, var(--x-brand-300) 85%, #fff); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"])[data-accent]:not([data-accent="teal"]) { --x-primary: var(--x-brand-400); --x-primary-hover: var(--x-brand-300); --x-primary-soft: color-mix(in srgb, var(--x-brand-400) 16%, transparent); --x-primary-text: var(--x-brand-300); --x-primary-ring: color-mix(in srgb, var(--x-brand-400) 35%, transparent); --x-primary-strong: var(--x-primary-hover); --x-primary-pressed: color-mix(in srgb, var(--x-brand-300) 85%, #fff); }
}
/* tokens:end accents */
/* Primary button text: light on every accent except amber (dark text reads better) */
:root[data-accent]:not([data-accent="teal"]) .x-btn-primary { color: #fff; }
.x-logo-mark, .x-celebrate-mark, .x-side-setup { background: linear-gradient(135deg, var(--x-brand-400), var(--x-brand-600)); }
:root[data-accent]:not([data-accent="teal"]) .x-logo-mark, :root[data-accent]:not([data-accent="teal"]) .x-celebrate-mark { color: #fff; }

/* Accent picker (Settings › Appearance) */
.x-accents { display: flex; gap: 10px; flex-wrap: wrap; }
.x-accent { position: relative; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; }
.x-accent input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.x-accent i { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); transition: transform var(--x-t-fast); }
.x-accent:hover i { transform: scale(1.08); }
.x-accent:has(input:checked) { box-shadow: 0 0 0 2px var(--x-surface), 0 0 0 4px var(--c); }
.x-accent:has(input:focus-visible) { outline: 2px solid var(--x-text); outline-offset: 3px; }
.x-accent:has(input:checked) i::after { content: ''; display: block; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(12px, 10px); }
.x-icon { display: inline-block; vertical-align: -3px; }
.x-seg > a, .x-seg > button, .x-seg > label { min-height: 34px; }
[data-tooltip]::after { display: none; opacity: 1; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { display: block; }
/* Dark mode, non-teal accents: solid buttons use the deeper hue for AA contrast with white text */
:root[data-theme="dark"][data-accent]:not([data-accent="teal"]) .x-btn-primary { background: var(--x-brand-500); border-color: var(--x-brand-500); color: #fff; }
:root[data-theme="dark"][data-accent]:not([data-accent="teal"]) .x-btn-primary:hover { background: var(--x-brand-400); border-color: var(--x-brand-400); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"])[data-accent]:not([data-accent="teal"]) .x-btn-primary { background: var(--x-brand-500); border-color: var(--x-brand-500); color: #fff; }
    :root:not([data-theme="light"])[data-accent]:not([data-accent="teal"]) .x-btn-primary:hover { background: var(--x-brand-400); border-color: var(--x-brand-400); }
}
/* Dark mode: the active nav chip uses the deeper hue so white stays readable */
:root[data-theme="dark"] .x-nav a.is-active .x-nav-chip { background: var(--x-brand-500); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .x-nav a.is-active .x-nav-chip { background: var(--x-brand-500); color: #fff; } }

/* ------------------------------------------------------------------ */
/* §16 help + settings groups                                          */
/* ------------------------------------------------------------------ */
/* Help link on a page band: muted, small, underlines on hover. Scoped to <a>
   so the field help text (div.x-help) keeps its own look. */
a.x-help { display: inline-flex; align-items: center; gap: 5px; color: var(--x-text-3); font-size: var(--x-fs-sm); font-weight: 600; line-height: 1; padding: 6px 2px; border-radius: var(--x-r-sm); text-decoration: none; white-space: nowrap; }
a.x-help .x-icon { width: 15px; height: 15px; color: inherit; }
a.x-help:hover, a.x-help:focus-visible { color: var(--x-text); text-decoration: underline; text-underline-offset: 3px; }
.x-page-actions > a.x-help { align-self: center; }
/* Settings sub-nav groups: a small heading above each run of items; the
   "Advanced" group is a <details> that is only open when its item is active. */
.x-subnav-group { display: flex; flex-direction: column; gap: 2px; }
.x-subnav-group + .x-subnav-group { margin-top: 14px; }
.x-subnav-heading, details.x-subnav-group > summary { font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--x-text-3); padding: 0 12px 6px; }
details.x-subnav-group > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; border-radius: var(--x-r-sm); user-select: none; }
details.x-subnav-group > summary::-webkit-details-marker { display: none; }
details.x-subnav-group > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--x-t-fast); }
details.x-subnav-group[open] > summary::after { transform: rotate(-135deg) translateY(1px); }
details.x-subnav-group > summary:hover { color: var(--x-text); }
details.x-subnav-group > summary:focus-visible { outline: 2px solid var(--x-primary); outline-offset: 2px; }
@media (max-width: 1023px) {
    .x-subnav-group { flex-direction: row; align-items: center; flex: none; }
    .x-subnav-group + .x-subnav-group { margin-top: 0; margin-left: 8px; padding-left: 10px; border-left: 1px solid var(--x-line); }
    .x-subnav-heading, details.x-subnav-group > summary { padding: 0 6px 0 0; white-space: nowrap; }
    details.x-subnav-group:not([open]) > summary { padding-right: 10px; }
}
/* Mobile top bar: the "Ask for reviews" quick action keeps its label (the
   audit flagged it as icon-only); the brand text goes instead, since the
   open drawer shows the logo. */
@media (max-width: 1023px) {
    .x-top .x-btn-primary .x-btn-text { display: inline; }
}
@media (max-width: 479px) {
    .x-top .x-top-brand { display: none; }
}

/* ---------------------------------------------------------------------- */
/* §17 Make it right — rescue block on low-rating cards (migration 045)    */
/* ---------------------------------------------------------------------- */
.x-rescue { width: 100%; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--x-line); }
.x-rescue-bar { gap: 10px; flex-wrap: wrap; }
.x-rescue-panel { margin-top: 10px; }
.x-rescue-form { padding: 14px 16px; border-radius: var(--x-r-md); background: var(--x-surface-2); border: 1px solid var(--x-line); display: flex; flex-direction: column; gap: 12px; }
.x-rescue-form .x-field { margin-bottom: 0; }
.x-rescue-head { display: flex; flex-direction: column; gap: 2px; }
.x-rescue-head strong { font-size: var(--x-fs-md); }
.x-rescue-actions { gap: 10px; flex-wrap: wrap; align-items: center; }
.x-rescue-sent-msg summary { cursor: pointer; color: var(--x-text-3); }
.x-rescue-sent-msg .x-pre { white-space: pre-line; margin: 8px 0 0; color: var(--x-text-2); }
.x-rescue .x-chip.is-active { border-color: var(--x-primary); color: var(--x-primary-text); background: var(--x-primary-soft); }
.x-review.is-negative .x-rescue { border-top-color: color-mix(in srgb, var(--x-danger) 35%, transparent); }

/* ---------------------------------------------------------------------- */
/* §19 reply check — "Check my reply" result panel on review cards           */
/* ---------------------------------------------------------------------- */
.x-reply-check { padding: 12px 14px; border-radius: var(--x-r-md); background: var(--x-surface-2); border: 1px solid var(--x-line); display: flex; flex-direction: column; gap: 10px; }
.x-reply-check-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x-reply-score { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--x-r-pill); font-size: var(--x-fs-sm); font-weight: 800; }
.x-reply-score .x-icon { width: 15px; height: 15px; }
.x-reply-score.is-good { background: var(--x-success-soft); color: var(--x-success-text); }
.x-reply-score.is-ok { background: var(--x-warning-soft); color: var(--x-warning-text); }
.x-reply-score.is-weak { background: var(--x-danger-soft); color: var(--x-danger-text); }
.x-reply-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.x-reply-checks li { display: flex; align-items: flex-start; gap: 8px; font-size: var(--x-fs-sm); line-height: 1.45; }
.x-reply-checks li > .x-icon { width: 16px; height: 16px; flex: none; margin-top: 2px; border-radius: 50%; padding: 2px; }
.x-reply-checks li.is-ok > .x-icon { color: var(--x-success-text); background: var(--x-success-soft); }
.x-reply-checks li.is-fail > .x-icon { color: var(--x-danger-text); background: var(--x-danger-soft); }
.x-reply-checks li > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.x-reply-check-label { font-weight: 700; color: var(--x-text); }
.x-reply-checks li.is-ok .x-reply-check-label { color: var(--x-text-2); font-weight: 600; }
.x-reply-check-tip { color: var(--x-text-2); }
.x-reply-better { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--x-line); }
.x-reply-better-head { display: flex; align-items: center; gap: 6px; font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--x-primary-text); }
.x-reply-better-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--x-text); font-size: var(--x-fs-sm); line-height: 1.55; }
.x-reply-better .x-row { gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------- */
/* §18 push prompt — "turn on notifications" card (assets/js/push-prompt.js) */
/* ---------------------------------------------------------------------- */
.x-push-card { position: fixed; right: 20px; bottom: 20px; z-index: 85; width: min(360px, calc(100vw - 32px)); padding: 16px 18px; border-radius: var(--x-r-lg); background: var(--x-surface); border: 1px solid var(--x-line); box-shadow: var(--x-shadow-lg); display: flex; gap: 12px; align-items: flex-start; opacity: 0; transform: translateY(12px); transition: opacity var(--x-t-med), transform var(--x-t-med) var(--x-ease); }
.x-push-card.is-show { opacity: 1; transform: none; }
.x-push-card-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--x-primary-soft); color: var(--x-primary); display: grid; place-items: center; }
.x-push-card-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.x-push-card-main p { margin: 0; font-size: var(--x-fs-md); line-height: 1.45; color: var(--x-text); }
.x-push-card-main p strong { display: block; font-weight: 800; margin-bottom: 2px; }
.x-push-card .x-row { gap: 8px; }
@media (max-width: 639px) {
    .x-push-card { left: 0; right: 0; bottom: 0; width: auto; border-radius: var(--x-r-lg) var(--x-r-lg) 0 0; border-bottom: 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateY(100%); }
    .x-push-card .x-row .x-btn { flex: 1; justify-content: center; }
}

/* ---------------------------------------------------------------------- */
/* §20 Phone polish (UX audit 2026-10-26)                                   */
/* ---------------------------------------------------------------------- */
/* Drawer close button: only on phones, where the panel slides in. */
.x-side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.x-side-close { display: none; }
@media (max-width: 1023px) {
    .x-side-close { display: inline-grid; }
    /* Settings sub-nav rides in one scrolling row: group headings and the
       scrollbar only add noise there. */
    .x-subnav { scrollbar-width: none; padding-bottom: 0; gap: 4px; }
    .x-subnav::-webkit-scrollbar { display: none; }
    .x-subnav-heading { display: none; }
    .x-subnav-group + .x-subnav-group { margin-left: 4px; padding-left: 6px; }
    .x-subnav a { padding: 8px 12px; }
}
@media (max-width: 639px) {
    /* KPI tiles: two per row instead of one tall column; an odd last tile spans the row. */
    .x-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .x-kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .x-kpi { padding: 14px 14px; gap: 4px; }
    .x-kpi-value { font-size: var(--x-fs-2xl); }
    .x-kpi-sub { font-size: var(--x-fs-xs); }
    /* Checklist rows: the action buttons drop under the text. */
    .x-checklist li { flex-wrap: wrap; gap: 10px 12px; }
    /* Review workflow row: controls take the full width so nothing is cramped. */
    .x-wf .x-select { flex: 1 1 120px; }
    /* Page header actions fill the width so a single primary button is easy to tap. */
    .x-content > .x-page:first-child .x-page-actions { width: 100%; }
    .x-content > .x-page:first-child .x-page-actions > .x-btn:only-child { flex: 1; justify-content: center; }
    /* …and every header picker is full width, so two selects never end up at different widths;
       quiet links (How this works, Text & WhatsApp settings) stay left-aligned on every page. */
    .x-content > .x-page:first-child .x-page-actions { justify-content: flex-start; }
    .x-content > .x-page:first-child .x-page-actions > form, .x-content > .x-page:first-child .x-page-actions .x-select, .x-content > .x-page:first-child .x-page-actions .x-field { width: 100%; }
    /* A status badge in a card head drops under the title instead of squeezing it into one-word lines. */
    .x-card-head:has(> .x-badge, > .x-btn, > a, > .x-row, > form) > div:first-child { flex: 1 1 100%; }
    /* Cards' head actions wrap under the title instead of squeezing it. */
    .x-card-head { flex-wrap: wrap; }
}
.x-checklist-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.x-checklist-skip { display: inline-flex; }
@media (max-width: 639px) {
    .x-checklist li > .x-checklist-actions { flex: 1 0 calc(100% - 40px); margin-left: 40px; min-width: 0; }
    .x-checklist li > .x-checklist-actions > .x-btn:first-child { flex: 1; justify-content: center; }
    /* A long translation: the button's words wrap inside it, and "Skip" drops under it before anything leaves the card. */
    .x-checklist li > .x-checklist-actions { flex-wrap: wrap; }
    .x-checklist li > .x-checklist-actions > .x-btn:first-child { flex: 1 1 auto; min-width: 0; max-width: 100%; height: auto; min-height: 36px; white-space: normal; text-align: center; }
}

/* ---------------------------------------------------------------------- */
/* §21 Device audit 2026-10-27 — phone/tablet/desktop pass                 */
/* ---------------------------------------------------------------------- */
/* Scrolling tab strips (.x-tabs, phone .x-subnav): pinpraise.js scrolls the active
   item into view and fades whichever edge still hides items. */
.x-tabs.is-overflow, .x-subnav.is-overflow { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.x-tabs.is-overflow.is-scrolled, .x-subnav.is-overflow.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.x-tabs.is-overflow.is-end, .x-subnav.is-overflow.is-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
/* Settings sub-nav on phones/tablets: one flat row — the "Advanced" fold and
   its heading only make sense in the desktop column (pinpraise.js opens the fold). */
@media (max-width: 1023px) {
    details.x-subnav-group > summary { display: none; }
    .x-subnav-group + .x-subnav-group { margin-left: 2px; padding-left: 4px; }
}
/* Tap targets: quiet text links reach 32px without looking bigger. */
a.x-help { min-height: 32px; }
.x-back { min-height: 32px; margin-bottom: 6px; }
.x-foot { padding: 12px var(--x-gutter); align-items: center; gap: 4px 16px; }
.x-foot a { display: inline-flex; align-items: center; min-height: 32px; }
.x-legend button { min-height: 32px; }
.x-legend:has(button) { row-gap: 0; }
/* Segmented radios wrap on phones instead of running off the card. */
@media (max-width: 639px) {
    .x-seg:not(.is-scroll) { flex-wrap: wrap; }
}
/* Google location picker rows: badges sit under the text on phones. */
@media (max-width: 639px) {
    .x-loc-pick .x-check { flex-wrap: wrap; row-gap: 6px; }
    .x-loc-pick .x-check > .x-flex-1 { flex: 1 1 200px; min-width: 0; }
    }

/* ---------------------------------------------------------------------- */
/* §22 Collapsed side panel (icon-only) — desktop only, remembered in      */
/* localStorage 'x-rail' by pinpraise.js ([data-x-collapse] on .x-side-collapse)  */
/* ---------------------------------------------------------------------- */
.x-side-collapse { display: none; }
@media (min-width: 1024px) {
    .x-app { transition: grid-template-columns var(--x-t-med) var(--x-ease); }
    .x-side-collapse { display: inline-grid; flex: none; color: var(--x-text-3); }
    .x-side-collapse .x-icon { transition: transform var(--x-t-med) var(--x-ease); }
    .x-app.is-collapsed { --x-side-w: 94px; }
    .x-app.is-collapsed .x-side-collapse .x-icon { transform: rotate(180deg); }
    .x-app.is-collapsed .x-side-head { flex-direction: column; align-items: center; padding: 14px 10px 4px; gap: 6px; }
    .x-app.is-collapsed .x-logo-text, .x-app.is-collapsed .x-logo-img { display: none; }
    /* Every rail item is a 44px square on one centre line (the card's middle) */
    .x-app.is-collapsed .x-logo { gap: 0; justify-content: center; width: 44px; height: 44px; }
    .x-app.is-collapsed .x-logo::before { content: none; }
    /* The setup wizard has no side menu: its header keeps the full logo whatever the saved menu state. */
    .x-app.is-collapsed .x-wizard-top .x-logo-text { display: block; }
    .x-app.is-collapsed .x-wizard-top .x-logo-img { display: inline; }
    .x-app.is-collapsed .x-wizard-top .x-logo { gap: 9px; justify-content: flex-start; width: auto; height: auto; }
    .x-app.is-collapsed .x-side-collapse { width: 32px; height: 32px; }
    .x-app.is-collapsed .x-workspace { width: 44px; height: 44px; margin: 8px auto 4px; padding: 0; justify-content: center; }
    .x-app.is-collapsed .x-workspace-meta, .x-app.is-collapsed .x-acting, .x-app.is-collapsed .x-side-setup { display: none; }
    .x-app.is-collapsed .x-side-scroll { padding: 6px 10px 10px; overflow-x: hidden; scrollbar-width: none; }
    .x-app.is-collapsed .x-side-scroll::-webkit-scrollbar { display: none; }
    .x-app.is-collapsed .x-nav-label { font-size: 0; padding: 0; height: 0; width: 32px; border-top: 1px solid var(--x-line); margin: 10px auto; }
    .x-app.is-collapsed .x-nav-label:first-child { border-top: 0; margin: 0 auto; }
    .x-app.is-collapsed .x-nav a { justify-content: center; width: 44px; height: 44px; padding: 0; margin: 2px auto; gap: 0; }
    .x-app.is-collapsed .x-nav a > span:not(.x-nav-chip):not(.x-nav-count) { display: none; }
    .x-app.is-collapsed .x-nav-count { position: absolute; top: 2px; right: 4px; margin: 0; font-size: 10px; padding: 0 5px; }
    /* Label tooltip beside the chip */
    .x-app.is-collapsed .x-nav a::after { content: attr(data-nav-label); position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--x-text); color: var(--x-bg); font-size: var(--x-fs-xs); font-weight: 700; padding: 5px 9px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--x-t-fast); z-index: 60; }
    .x-app.is-collapsed .x-nav a:hover::after, .x-app.is-collapsed .x-nav a:focus-visible::after { opacity: 1; }
    .x-app.is-collapsed .x-side-in { overflow: visible; }
    .x-app.is-collapsed .x-side-foot { padding: 10px 0; display: flex; justify-content: center; }
    .x-app.is-collapsed .x-side-foot .x-menu { display: flex; justify-content: center; }
    .x-app.is-collapsed .x-user-btn { justify-content: center; width: 44px; height: 44px; padding: 0; }
    .x-app.is-collapsed .x-user-meta, .x-app.is-collapsed .x-user-btn > .x-icon { display: none; }
}

/* Search palette (Ctrl-K), Q10 — first-party, reads #x-search-index */
dialog.x-search { width: min(600px, calc(100vw - 32px)); margin-top: min(12vh, 96px); overflow: hidden; }
.x-search-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--x-line); color: var(--x-text-3); }
.x-search-box .x-icon { flex: none; }
.x-search-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--x-text); font: inherit; font-size: var(--x-fs-lg); padding: 4px 0; }
.x-search-input::-webkit-search-cancel-button { display: none; }
.x-search kbd { font: inherit; font-size: 11px; font-weight: 700; color: var(--x-text-3); background: var(--x-surface-2); border: 1px solid var(--x-line); border-radius: 6px; padding: 1px 6px; line-height: 1.5; }
.x-search-list { max-height: min(420px, 55vh); overflow-y: auto; padding: 6px; }
.x-search-group { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--x-text-3); padding: 10px 10px 4px; }
.x-search-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--x-text); text-decoration: none; font-weight: 600; }
.x-search-item .x-icon { color: var(--x-text-3); flex: none; }
.x-search-item small { margin-left: auto; color: var(--x-text-3); font-weight: 500; font-size: var(--x-fs-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.x-search-item.is-sel { background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-search-item.is-sel .x-icon { color: var(--x-primary); }
.x-search-empty { padding: 28px 16px; text-align: center; color: var(--x-text-3); font-size: var(--x-fs-sm); }
.x-search-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--x-line); color: var(--x-text-3); font-size: var(--x-fs-xs); }
.x-search-foot span { display: inline-flex; align-items: center; gap: 4px; }
.x-search-foot kbd { margin-right: 2px; }
@media (max-width: 600px) { .x-search-foot { display: none; } dialog.x-search { margin-top: 8px; } }

/* Inline key cap (install steps, M8) */
.x-kbd { display: inline-block; padding: 0 6px; border: 1px solid var(--x-line); border-radius: 6px; background: var(--x-surface-2); font-size: var(--x-fs-xs); font-weight: 700; line-height: 1.6; }

/* ---------------------------------------------------------------------- */
/* §23 Inbox bulk actions (growth idea #3) — card checkbox + bottom bar     */
/* ---------------------------------------------------------------------- */
.x-review-pick { display: inline-grid; place-items: center; width: 32px; height: 48px; margin: 0 -4px 0 -8px; flex: none; cursor: pointer; }
.x-review-pick input { width: 18px; height: 18px; accent-color: var(--x-primary); cursor: pointer; }
.x-review.is-selected { border-color: var(--x-primary); box-shadow: 0 0 0 1px var(--x-primary); }
.x-bulk { position: sticky; bottom: 12px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 16px 0 0; padding: 10px 12px 10px 16px; background: var(--x-surface); border: 1px solid var(--x-line-strong); border-radius: var(--x-r-lg); box-shadow: var(--x-shadow-lg); }
.x-bulk[hidden] { display: none; }
.x-bulk-count { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; min-height: 32px; }
.x-bulk-count .x-check { margin: 0; }
.x-bulk-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (max-width: 639px) {
    .x-bulk { bottom: 8px; padding: 10px 12px; }
    .x-bulk-actions { width: 100%; }
    .x-bulk-actions > .x-menu, .x-bulk-actions > .x-btn { flex: 1 1 auto; }
    .x-bulk-actions > .x-menu > .x-btn { width: 100%; justify-content: center; }
}
/* Phone: a menu of the bar opens across the whole bar, so it never runs off either edge. */
@media (max-width: 767px) {
    .x-bulk-actions > .x-menu { position: static; }
    .x-bulk .x-menu-panel, .x-bulk .x-menu-panel.is-left { left: 12px; right: 12px; min-width: 0; }
}

/* ---------------------------------------------------------------------- */
/* §24 Team praise leaderboard (growth idea #2, Insights › Team praise)     */
/* ---------------------------------------------------------------------- */
.x-team-rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: var(--x-fs-sm); font-weight: 800; background: var(--x-surface-2); color: var(--x-text-2); }
.x-team-rank.is-top { background: color-mix(in srgb, var(--x-star) 24%, var(--x-surface)); color: color-mix(in srgb, var(--x-star) 45%, var(--x-text)); }
.x-team-board .x-list-sub { display: block; }
.x-team-quote { display: block; margin-top: 4px; }
.x-card-foot.is-start { justify-content: flex-start; }

/* ---------------------------------------------------------------------- */
/* §25 Map ranking grid (growth idea #10, Insights › Map ranking)           */
/* ---------------------------------------------------------------------- */
.x-rank { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.x-rank-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; width: 100%; max-width: 280px; flex: none; }
.x-rank-cell { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; font-weight: 800; font-size: var(--x-fs-sm); font-variant-numeric: tabular-nums; }
.x-rank-cell.is-top, .x-rank-legend .is-top i { background: var(--x-success); color: #fff; }
.x-rank-cell.is-mid, .x-rank-legend .is-mid i { background: var(--x-star); color: #3A2A05; }
.x-rank-cell.is-low, .x-rank-legend .is-low i { background: var(--x-danger); color: #fff; }
.x-rank-cell.is-none, .x-rank-legend .is-none i { background: var(--x-surface-3); color: var(--x-text-3); }
.x-rank-cell.is-you { box-shadow: 0 0 0 3px var(--x-surface), 0 0 0 5px var(--x-text); }
.x-rank > .x-stack { flex: 1 1 280px; min-width: 0; }
.x-rank-kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* ---------- §26 Inbox keyboard shortcuts + saved views ---------- */
.x-review.is-kb { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-review.is-kb:focus { outline: 2px solid var(--x-primary); }
.x-kbd-tip { margin: 12px 0 0; text-align: center; }
@media (hover: none) { .x-kbd-tip { display: none; } }
.x-kbd-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; align-items: center; }
.x-kbd-list dt { margin: 0; white-space: nowrap; }
.x-kbd-list dd { margin: 0; color: var(--x-text-2, inherit); }

/* ---------- §27 Batch 3: rating badge, snooze ---------- */
textarea.x-mono { font-size: var(--x-fs-xs); }
.x-badge-preview { display: inline-block; max-width: 100%; border-radius: 14px; }
.x-badge-preview img { display: block; max-width: 100%; height: auto; }

/* ------------------------------------------------------------------ */
/* §28 Visual refresh (2026-10-29): cool neutrals, softer depth,       */
/* brand glow instead of a tinted band, quieter nav, richer KPIs.      */
/* Layout and class names are unchanged — only how things look.       */
/* ------------------------------------------------------------------ */
h1, h2, h3 { letter-spacing: -.022em; }
.x-content > .x-page:first-child h1 { font-weight: 800; letter-spacing: -.035em; }

/* Page band → a soft brand glow painted on the page itself, from the very top
   and full width, so it has no edge under the top bar or beside the side panel */
.x-content > .x-page:first-child::before { display: none; }
body:has(.x-app) {
    background:
        radial-gradient(48% 340px at 30% 0, color-mix(in srgb, var(--x-primary) 13%, transparent), transparent),
        radial-gradient(36% 280px at 92% 0, color-mix(in srgb, var(--x-brand-300) 16%, transparent), transparent),
        var(--x-bg);
    background-repeat: no-repeat;
}
.x-content > .x-page:first-child { padding-bottom: 8px; }

/* Side panel: crisp card, transparent icon chips, a solid chip only when active */
.x-side-in { border-color: var(--x-line); box-shadow: var(--x-shadow-sm); }
.x-workspace { background: var(--x-surface-2); border: 1px solid var(--x-line); }
.x-nav a { padding: 5px 10px 5px 6px; color: var(--x-text-2); font-weight: 600; }
.x-nav-chip { width: 32px; height: 32px; background: transparent; color: var(--x-text-3); }
.x-nav a:hover { background: var(--x-surface-2); }
.x-nav a:hover .x-nav-chip { background: transparent; color: var(--x-text); }
.x-nav a.is-active { background: var(--x-primary-soft); color: var(--x-primary-text); font-weight: 700; }
.x-nav a.is-active .x-nav-chip { background: linear-gradient(135deg, var(--x-brand-400), var(--x-brand-600)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 10px -4px var(--x-primary-ring); }
.x-nav-label { font-size: 10.5px; letter-spacing: .12em; padding: 18px 12px 6px; }

/* Cards */
.x-card, .x-review { border-radius: 16px; box-shadow: var(--x-shadow-sm); }
.x-card-head { border-bottom-color: var(--x-line); }
.x-card-head h2, .x-card-head h3 { font-weight: 700; letter-spacing: -.015em; }
.x-card.is-interactive:hover, a.x-kpi:hover { box-shadow: var(--x-shadow-md); transform: translateY(-2px); border-color: var(--x-line-strong); }

/* KPI tiles: icon in a soft chip, bigger number, a hairline brand sheen on top */
.x-kpi { padding: 20px 22px 18px; gap: 8px; border-radius: 16px; overflow: hidden; transition: box-shadow var(--x-t-fast), transform var(--x-t-fast), border-color var(--x-t-fast); }
.x-kpi::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--x-primary) 45%, transparent), transparent); opacity: .7; }
.x-kpi-label { color: var(--x-text-2); font-weight: 600; gap: 10px; }
.x-kpi-label .x-icon { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-kpi-value { font-size: 2rem; letter-spacing: -.04em; margin-top: 4px; }
.x-kpi-sub { color: var(--x-text-3); font-size: var(--x-fs-xs); font-weight: 500; }

/* Buttons: a gentle top highlight and coloured lift on primary, hairline depth on the rest */
.x-btn { box-shadow: var(--x-shadow-xs); }
.x-btn-ghost, .x-btn-soft { box-shadow: none; }
.x-btn-primary { background-image: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(16,24,40,.12), 0 6px 14px -6px var(--x-primary-ring); }
.x-btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 1px 2px rgba(16,24,40,.12), 0 10px 20px -8px var(--x-primary-ring); }

/* Form controls */
.x-input, .x-select, .x-textarea { box-shadow: var(--x-shadow-xs); }
.x-input:focus, .x-select:focus, .x-textarea:focus { box-shadow: 0 0 0 4px var(--x-primary-ring); }

/* Tabs, chips and signals */
.x-tabs > a, .x-tabs > button { font-weight: 600; }
.x-tabs > .is-active, .x-tabs > [aria-selected="true"] { font-weight: 700; }
.x-chip { border-color: var(--x-line-strong); box-shadow: var(--x-shadow-xs); font-weight: 600; }
.x-chip.is-active, .x-chip[aria-pressed="true"] { box-shadow: 0 2px 6px -2px rgba(16,24,40,.25); }
.x-signal { box-shadow: var(--x-shadow-xs); }

/* Reviews: tinted reply panel instead of a beige box with a side bar */
.x-review { padding: 22px 24px; transition: border-color var(--x-t-fast), box-shadow var(--x-t-fast); }
.x-review:hover { border-color: var(--x-line-strong); }
.x-review-author { letter-spacing: -.01em; }
.x-reply { background: color-mix(in srgb, var(--x-primary) 4%, var(--x-surface)); border: 1px solid color-mix(in srgb, var(--x-primary) 14%, var(--x-line)); border-left-width: 1px; border-radius: 12px; }
.x-review .x-avatar:not(.is-ink) { background-image: linear-gradient(135deg, color-mix(in srgb, var(--x-brand-300) 45%, var(--x-surface)), var(--x-primary-soft)); }

/* AI summary: solid tinted card, no dashed border */
.x-ai { border: 1px solid color-mix(in srgb, var(--x-primary) 18%, var(--x-line)); background: linear-gradient(135deg, color-mix(in srgb, var(--x-primary) 7%, var(--x-surface)), var(--x-surface) 70%); border-radius: 14px; padding: 16px 18px; }

/* Badges: pill shape reads more current than square tags */
.x-badge { border-radius: var(--x-r-pill); padding: 0 9px; font-weight: 700; letter-spacing: 0; }

/* Charts: smooth line, gradient area (stops come from pinpraise.js) */
.x-chart .line { stroke-width: 2.25; }
.x-chart .area[style] { opacity: 1; }
.x-chart .area-stop-a { stop-color: var(--x-primary); stop-opacity: .22; }
.x-chart .area-stop-b { stop-color: var(--x-primary); stop-opacity: 0; }
.x-chart .dot { r: 3; stroke-width: 2; }
.x-chart .grid { stroke-dasharray: 3 4; }
.x-chart .bar { rx: 5; }
/* Chart notes (migration 148): a dashed line and a small flag per note */
.x-chart .mark line { stroke: var(--x-warning); stroke-width: 1.5; stroke-dasharray: 4 3; }
.x-chart .mark path { fill: var(--x-warning); }
.x-chart .mark { cursor: help; outline: none; }
.x-chart .mark:hover line, .x-chart .mark:focus line { stroke-width: 2.5; }
/* Day and time grid (migration 148): cells tinted by the average score */
.x-heat { table-layout: fixed; }
.x-heat thead th:first-child { width: 64px; }
.x-heat td { text-align: center; padding: 8px 4px; }
.x-heat td.is-g2 { background: color-mix(in srgb, var(--x-success) 26%, transparent); }
.x-heat td.is-g1 { background: color-mix(in srgb, var(--x-success) 12%, transparent); }
.x-heat td.is-a { background: color-mix(in srgb, var(--x-warning) 18%, transparent); }
.x-heat td.is-r1 { background: color-mix(in srgb, var(--x-danger) 16%, transparent); }
.x-heat td.is-r2 { background: color-mix(in srgb, var(--x-danger) 30%, transparent); }
.x-heat .x-heat-bad { color: var(--x-danger-text); font-weight: 700; }
.x-kpi-value.is-text { font-size: 1.25rem; letter-spacing: -.01em; line-height: 1.25; margin-top: 8px; }
.x-heat thead th { white-space: normal; line-height: 1.25; }
@media (max-width: 560px) { .x-heat { min-width: 0; width: 100%; } .x-heat th, .x-heat td { padding: 6px 2px; font-size: 12px; } .x-heat thead th { font-size: 11.5px; letter-spacing: 0; } .x-heat thead th:first-child { width: 40px; } }

/* Tables */
.x-table th { font-weight: 700; letter-spacing: .04em; }
/* Phones: two tiles per row are narrow, so the icon chip sits above its label */
@media (max-width: 639px) {
    .x-kpi { padding: 16px; }
    .x-kpi-label { flex-direction: column; align-items: flex-start; gap: 8px; }
    .x-kpi-value { font-size: 1.75rem; }
}

/* §29 Pixel audit (2026-10-29) */
/* Quiet links in a page header (ghost buttons beside the "How this works" help
   link) share its size and tone so the pair reads as one set. */
.x-page-actions > a.x-btn-ghost { height: 32px; padding: 0 8px; font-size: var(--x-fs-sm); font-weight: 600; color: var(--x-text-3); }
.x-page-actions > a.x-btn-ghost:hover { color: var(--x-text); background: var(--x-surface-2); }
.x-page-actions > a.x-btn-ghost .x-icon { width: 15px; height: 15px; }
/* Main + side columns end at their own height: a short card no longer
   stretches into a block of empty white to match a long neighbour. */
.x-grid-main { align-items: start; }
/* A segmented control never runs past its container: options wrap onto a
   second line instead (Ask customers › Send by has four in a 360px column). */
.x-seg:not(.is-scroll) { max-width: 100%; flex-wrap: wrap; }
/* Fields in a form row: the row owns the spacing (18px like any field), so a
   row that stacks on a narrow column keeps the same rhythm as single fields. */
.x-form-row { gap: 18px 16px; margin-bottom: 18px; }
/* A button that completes a form row (Create link, Make token, Send test) sits on the
   input line, not the label line, and stacks under the fields on phones like any field. */
.x-form-row > .x-field-btn { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; margin-bottom: 0; }
.x-form-row > .x-field-btn > .x-btn { height: 40px; }
.x-form-row:last-child { margin-bottom: 0; }
.x-form-row > .x-field { margin-bottom: 0; }
/* Section headers: the title column shrinks so its button stays on the right
   instead of dropping onto its own line under a long description. */
.x-section > div:first-child:not(:last-child) { flex: 1 1 320px; min-width: 0; }
.x-section { align-items: flex-end; }
/* No one-word last lines in descriptions and headings. */
h1, h2, h3, .x-page-sub, .x-section-sub, .x-card-sub, .x-empty p, .x-help, .x-kpi-sub { text-wrap: pretty; }
/* Fieldsets group radios/checkboxes without the browser's grey box; the
   legend reads like any field label. */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset > legend { padding: 0; margin-bottom: 6px; font-weight: 700; font-size: var(--x-fs-md); color: var(--x-text); }
fieldset.x-field.x-mb-0 + fieldset.x-field { margin-top: 18px; }
/* Cards side by side in any grid keep their footers on one line. */
.x-grid-3 > .x-card, .x-grid-4 > .x-card { display: flex; flex-direction: column; }
.x-grid-3 > .x-card > .x-card-foot, .x-grid-4 > .x-card > .x-card-foot { margin-top: auto; }
/* A full-width button inside a form in a card footer really is full width. */
.x-card-foot > form:has(> .x-btn-block) { flex: 1; }
/* Progress bars on a brand card: white fill on a translucent track. */
.x-card.is-brand .x-bar { background: rgba(255,255,255,.24); }
.x-card.is-brand .x-bar > span { background: #fff; }
/* Wizard header: logo and "Skip setup" share the first row, the stepper runs
   full width under them (it no longer wraps "Skip setup" onto a stray line). */
.x-wizard-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.x-wizard-top > .x-steps { grid-column: 1 / -1; grid-row: 2; }
.x-wizard-top > form { grid-column: 2; grid-row: 1; }
.x-wizard-top > form .x-btn-ghost { margin-right: -12px; }
/* Phones: slimmer segments so a four-option range (Insights) fits 343px. */
@media (max-width: 639px) { .x-seg > a, .x-seg > button, .x-seg > label { padding: 6px 9px; } }
/* A full-width control with four options in a narrow column goes 2 × 2
   instead of wrapping 3 + 1 (Ask customers › Send by). */
.x-field:has(> .x-seg.is-block) { container-type: inline-size; }
@container (max-width: 440px) { .x-seg.is-block:has(> :nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; } }
/* Soft cards and notes: surface-2 is close to the cool page background, so a
   hairline keeps their edge visible wherever they sit. */
.x-card.is-soft { border-color: var(--x-line); }
.x-note { border: 1px solid var(--x-line); }
/* Review meta on phones: no separator dots left dangling at line ends; the
   location gets its own line with the pin beside its first line. */
@media (max-width: 639px) {
    .x-review-meta { row-gap: 4px; }
    .x-review-meta .x-meta-dot { display: none; }
    .x-review-meta .x-review-loc { flex-basis: 100%; align-items: flex-start; }
    .x-review-meta .x-review-loc .x-icon { margin-top: 3px; }
}
/* Buttons inside a monospace copy field keep the UI font. */
.x-copy-field .x-btn, .x-input-group .x-btn { font-family: var(--x-font); }
/* Text beside a trailing button keeps at least 240px; below that the button
   drops under the text instead of squeezing it (Home › What customers say). */
.x-row-between > .x-flex-1 { flex: 1 1 240px; min-width: 0; }
/* Phones: a four-option range (Insights) is a 2 × 2 grid, so no option hides
   off-screen behind a sideways scroll. */
@media (max-width: 639px) {
    .x-seg.is-scroll:has(> :nth-child(4)) { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; width: 100%; }
    .x-seg.is-scroll:has(> :nth-child(4)) > * { justify-content: center; }
}
/* Inputs in a form row line up even when one label wraps to two lines:
   pinpraise.js pads the shorter labels of fields side by side from the top. */
/* A list inside a padded card body sits flush with the text around it. */
.x-card-body > .x-list > li { padding-left: 0; padding-right: 0; }
/* Side-by-side cards stretch to one height only when they have footers to
   line up; plain content cards end where their content ends. */
.x-grid-2:not(:has(> .x-card .x-card-foot)), .x-grid-3:not(:has(> .x-card .x-card-foot)) { align-items: start; }
/* Sign-in page: the brand name on the dark side panel is white. */
.x-auth-side .x-logo, .x-auth-side .x-logo:hover { color: #fff; }
/* 1024–1279px with the side panel open: panel + settings sub-nav left the
   content ~400px wide, so the sub-nav becomes the tablet tab row and the
   content takes the full width. A collapsed panel keeps the two columns. */
@media (min-width: 1024px) and (max-width: 1279px) {
    .x-app:not(.is-collapsed) .x-grid-side { grid-template-columns: minmax(0, 1fr); }
    .x-app:not(.is-collapsed) .x-subnav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; padding-bottom: 0; gap: 4px; }
    .x-app:not(.is-collapsed) .x-subnav::-webkit-scrollbar { display: none; }
    .x-app:not(.is-collapsed) .x-subnav a { white-space: nowrap; padding: 8px 12px; }
    .x-app:not(.is-collapsed) .x-subnav-group { flex-direction: row; align-items: center; flex: none; }
    .x-app:not(.is-collapsed) .x-subnav-group + .x-subnav-group { margin-top: 0; margin-left: 4px; padding-left: 6px; border-left: 1px solid var(--x-line); }
    .x-app:not(.is-collapsed) .x-subnav-heading, .x-app:not(.is-collapsed) details.x-subnav-group > summary { display: none; }
    .x-app:not(.is-collapsed) .x-grid-side .x-grid-2, .x-app:not(.is-collapsed) .x-grid-side .x-grid-3, .x-app:not(.is-collapsed) .x-grid-side .x-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Main + side columns stack when the content area (not the window) is under
   760px: at 1024px with the side panel open the main column was ~390px. */
@container (max-width: 760px) { .x-grid-main { grid-template-columns: minmax(0, 1fr); } }
/* Wide pages (tables) get a footer as wide as their content. */
.x-main:has(> .x-content.is-wide) > .x-foot { max-width: none; }
/* A label with an "Optional" note flows as text, so the note follows the last
   word when the label wraps instead of being pushed to the far edge. */
.x-label:has(> .x-opt) { display: block; }
.x-label:has(> .x-opt) > .x-opt { margin-left: 6px; }

/* -------------------------------------------------------------------------- */
/* §30 Modules (migration 106): Settings › Features rows and turn-on pages    */
/* -------------------------------------------------------------------------- */
.x-feat-list > li { align-items: flex-start; }
.x-feat-list > li > .x-switch-ctl, .x-feat-list > li > .x-btn { margin-top: 2px; }
.x-feat-list .x-list-title .x-badge { margin-left: 6px; vertical-align: 1px; }
.x-feat-list > li.is-highlight { background: var(--x-primary-soft); }
.x-feat-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.x-feat-links > a { display: inline-flex; align-items: center; gap: 4px; }
.x-feat-links > a[hidden] { display: none; }
.x-feat-more > summary { cursor: pointer; color: var(--x-text-2); width: fit-content; }
.x-feat-more > p { margin-bottom: 6px; color: var(--x-text-2); }
.x-feat-more > .x-help-list { color: var(--x-text-2); }
.x-feat-more .x-help-list li { margin: 3px 0; }
.x-turnon { max-width: 640px; margin: 0; } /* round 2 (X3): starts on the content edge like every page, in Settings and outside it (it was centred) */
.x-turnon ul.x-turnon-adds { margin: 8px 0 0; padding-left: 20px; color: var(--x-text-2); }
.x-turnon ul.x-turnon-adds li { margin: 4px 0; }
.x-pick { text-align: left; border-top: 1px solid var(--x-line); padding-top: 24px; }
.x-pick-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.x-pick .x-tile-sub { font-size: var(--x-fs-sm); color: var(--x-text-3); }

/* -------------------------------------------------------------------------- */
/* §31 Help centre (/help, controllers/Help.php)                              */
/* -------------------------------------------------------------------------- */
.x-help-article { max-width: 760px; margin-left: auto; margin-right: auto; } /* centred, like every narrow page */
/* Help hub: each category shows 8 guides, the rest fold behind a "Show N more"
   <details class="x-details x-help-more"> that reads as a quiet divider row in the card. */
.x-help-grid .x-card > .x-help-more { border: 0; border-top: 1px solid var(--x-line); border-radius: 0 0 var(--x-r-lg) var(--x-r-lg); background: transparent; }
.x-help-grid .x-card > .x-help-more > summary { padding: 12px 20px; font-size: var(--x-fs-sm); font-weight: 600; color: var(--x-primary); }
.x-help-grid .x-card > .x-help-more > summary::after { width: 7px; height: 7px; border-color: var(--x-primary); }
.x-help-grid .x-card > .x-help-more[open] > summary { border-bottom: 1px solid var(--x-line); }
.x-help-lead { font-size: 1.125rem; color: var(--x-text-2); margin: 4px 0 20px; }
.x-help-body h2 { font-size: 1.05rem; margin: 8px 0 0; }
.x-help-body p { margin: 0; }
.x-help-steps, .x-help-list { margin: 0; padding-left: 22px; }
.x-help-steps li, .x-help-list li { margin: 6px 0; line-height: 1.55; }
.x-help-steps li::marker { font-weight: 800; color: var(--x-primary-text); }
.x-help-grid { align-items: start; }
.x-help-public { background: var(--x-bg); }
.x-help-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px max(16px, calc((100vw - 1040px) / 2)); }
.x-help-main { max-width: 1040px; margin: 0 auto; padding: 8px 16px 48px; }
.x-help-foot { justify-content: center; gap: 16px; }
@media (max-width: 639px) { .x-help-lead { font-size: 1rem; } }
a.x-note.x-whats-new { text-decoration: none; color: inherit; align-items: center; }
a.x-note.x-whats-new:hover { border-color: var(--x-primary); }

/* §32 Reputation score on Home (migration 115) */
.x-rep .x-card-body { align-items: flex-start; }
.x-rep-score { flex: none; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; align-content: center; background: var(--x-primary-soft); color: var(--x-primary-text); }
.x-rep-score span { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.x-rep-score small { font-size: .75rem; font-weight: 700; opacity: .8; }
.x-rep-score.is-d, .x-rep-score.is-e { background: var(--x-danger-soft, #FBEDEA); color: var(--x-danger, #D3452F); }
.x-rep-score.is-c { background: var(--x-warning-soft, #FFF4DB); color: var(--x-warning-text, #8A5A00); }

/* §33 Visit scores and tasks (migration 118) */
.x-vs-success { background: var(--x-success-soft); }
.x-vs-warning { background: var(--x-warning-soft); }
.x-vs-danger { background: var(--x-danger-soft); }
.x-vs-face { font-size: 24px; line-height: 1; flex: none; }
.x-vs-weeks { display: flex; align-items: flex-end; gap: 4px; height: 120px; }
.x-vs-week { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--x-surface-2); border-radius: 4px; overflow: hidden; }
.x-vs-week span { display: block; width: 100%; background: var(--x-text-3); }
.x-vs-week span.is-success { background: var(--x-success); }
.x-vs-week span.is-warning { background: var(--x-warning); }
.x-vs-week span.is-danger { background: var(--x-danger); }
.x-task { align-items: flex-start; }
.x-task.is-overdue { box-shadow: inset 3px 0 0 var(--x-danger); }
.x-task.is-done .x-strong { text-decoration: line-through; color: var(--x-text-3); }
.x-task-note { margin-top: 2px; }
.x-task-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 639px) { .x-task { flex-direction: column; } .x-task-actions { justify-content: flex-start; } }
.x-table td.x-center, .x-table th.x-center { text-align: center; }
.x-border-top { border-top: 1px solid var(--x-line); }
/* §34 Single sign-on (migration 120) */
.x-auth-or { display: flex; align-items: center; gap: 12px; color: var(--x-text-3); font-size: var(--x-fs-sm); margin: 20px 0 12px; }
.x-auth-or::before, .x-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--x-line); }
.x-sso-meta { font-family: var(--x-font-mono, ui-monospace, monospace); font-size: var(--x-fs-xs); word-break: break-all; }
.x-group-cell { padding-left: calc(16px + var(--depth, 0) * 20px); }
.x-share-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--x-line); }
.x-quote { margin: 0; padding: 10px 14px; border-left: 3px solid var(--x-line); background: var(--x-surface-2); border-radius: 0 8px 8px 0; }
.x-empty h2.x-empty-title { font-size: var(--x-fs-xl); }
.x-empty.is-compact h2.x-empty-title { font-size: var(--x-fs-lg); }
/* §35 Accessibility pass (one-year plan §6.2): 24 px targets (WCAG 2.2 SC 2.5.8) */
a.x-badge, button.x-badge { min-height: 24px; height: auto; }
a.x-list-title { display: flex; align-items: center; min-height: 24px; }
a.x-cell-title, a.x-review-loc { display: inline-flex; align-items: center; min-height: 24px; }
/* Reviews and replies, next 50 group A (migration 136): labels, customer line, @mentions, practice */
.x-review-labels { margin-top: 8px; }
.x-cust-match { margin-top: 8px; gap: 6px; align-items: center; }
.x-wf-note-form { position: relative; }
.x-mention-list { position: absolute; z-index: 20; left: 0; min-width: 220px; margin: 4px 0 0; padding: 4px; list-style: none; box-shadow: var(--x-shadow-md); }
.x-mention-list li.is-active .x-menu-item { background: var(--x-surface-2); }
.x-later { margin: 8px 0 0; gap: 8px; align-items: center; }
.x-lock-warn { margin: 6px 0 0; color: var(--x-warning-text); }
.x-practice-result .x-card-body { align-items: flex-start; gap: 16px; }

/* ============================================================
   §36 UX pass for first-time owners (2026-10-31): wizard end, Home next-action card,
   Features groups and Upgrade pill, Profile account card, phone Settings dropdown,
   grouped sign-ins, Get reviews share sheet, turn-on preview, help fold, solo review cards.
   ============================================================ */
/* Wizard area (setup/*, dashboard/index) — UX review 2026-10-31 items 8, 15, 17. For the lead to merge into pinpraise.css. */

/* setup/business: "How many locations?" — the chosen pill is unmistakable (brand ring), with an is-on class as the :has() fallback. */

/* setup/done: review link / invite link block and the folded "Optional extras". */
.x-celebrate .x-setup-link { text-align: left; max-width: 560px; margin-left: auto; margin-right: auto; }
.x-celebrate .x-setup-link .x-copy-field { text-align: left; }
.x-celebrate .x-setup-extras { text-align: left; max-width: 760px; margin-left: auto; margin-right: auto; }
/* Without these two max-widths the copy field and the details row stretch to the card's edges (seen 31 Oct, 1440px). */
.x-next .x-copy-field { min-width: 0; }
.x-celebrate .x-setup-extras > summary { justify-content: center; color: var(--x-text-2); }
.x-celebrate .x-setup-extras > summary::after { margin-left: 6px; }

/* dashboard/index: the one next-best-action card. */
.x-next { border-color: var(--x-primary-ring); }
.x-next .x-card-body { align-items: center; }
.x-next-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--x-primary-soft); color: var(--x-primary); }
.x-next-icon .x-icon { width: 24px; height: 24px; }
.x-next h2 { font-size: var(--x-fs-lg); }
.x-next-link { max-width: 480px; }
.x-next-cta { flex: none; align-self: center; }
@media (max-width: 639px) {
    .x-next .x-card-body { flex-wrap: wrap; }
    .x-next-cta { width: 100%; justify-content: center; }
}
/* dashboard/index: the greyed "Add location" header button (span, not a link) keeps the button height. */
.x-page-actions .x-btn[aria-disabled="true"] { pointer-events: auto; }

/* settings1 — Settings › Features (views/settings/features.php): collapsed groups, "{n} of {m} on", Recommended cards, Upgrade pill. */
.x-feat-group > summary > .x-feat-count { margin-left: auto; font-weight: 500; white-space: nowrap; }
.x-feat-group > summary::after { margin-left: 0; }
.x-feat-group > .x-feat-list { border-top: 1px solid var(--x-line); }
.x-feat-group > .x-feat-list > li { padding-left: 18px; padding-right: 18px; }
.x-feat-rec > .x-card > .x-card-body { flex: 1; }
.x-feat-rec > .x-card > .x-card-foot.is-between { gap: 8px; }
.x-feat-rec > .x-card > .x-card-foot.is-between > [data-feat-open] { margin-right: auto; }
a.x-feat-upgrade { text-decoration: none; }
a.x-feat-upgrade:hover { filter: brightness(.95); }
@media (max-width: 639px) { .x-feat-rec { grid-template-columns: 1fr; } }

/* settings1 — Settings › Profile (views/settings/index.php): the Account card head carries the avatar. */
#password > .x-card-head > .x-row > .x-avatar { flex: none; }

/* settings/_nav.php (UX review item 25): under 1024px the Settings sub-nav is a "Section" dropdown
   (.x-subnav-select, a <select data-x-nav-select>) above the content instead of the clipped scroll strip.
   The inline script in _nav.php already swaps the two by media query and navigates on change; these
   rules make the swap hold before the script runs and without JavaScript. Desktop is unchanged. */
@media (max-width: 1023px) {
    .x-grid-side > nav.x-subnav { display: none; }
    .x-grid-side > .x-subnav-select[hidden] { display: block; }
    .x-grid-side > .x-subnav-select { margin-bottom: 4px; }
}

/* security/_sessions.php (item 22): grouped sign-ins — the "See each sign-in" details sits under the
   row text, and its inner list is flush with the card's text column. */
#sessions .x-list > li.is-wrap > details.x-details { margin-top: 6px; }
#sessions details.x-details > ul.x-list.x-details-body { padding-left: 0; padding-right: 0; }
#sessions details.x-details > ul.x-list.x-details-body > li { padding-left: 18px; padding-right: 18px; }

/* get_reviews/messaging.php (item 21): the provider forms live inside one Advanced details;
   cards inside it keep their own borders, so the details body has no extra top padding. */
#advanced > .x-details-body { padding-top: 4px; }

/* Builder "getreviews" — rules for the lead to merge into pinpraise.css (or assets/css/x-getreviews.css).
   Pages: get-reviews (views/get_reviews/index.php), the module turn-on page (views/modules/turn_on.php),
   the help centre hub (views/help/index.php). */

/* ---- Get reviews › Link & QR: the one friendly link + share sheet (UX review 14) ---- */
/* The link itself reads like a headline, wraps on phones and never widens the card. */
.x-gr-link { display: block; font-weight: 800; font-size: var(--x-fs-xl, 1.35rem); line-height: 1.3; color: var(--x-primary-text); text-decoration: none; overflow-wrap: anywhere; padding: 14px 16px; border: 1px solid var(--x-line-strong); border-radius: 12px; background: var(--x-primary-soft); }
.x-gr-link:hover { text-decoration: underline; }
/* Copy / WhatsApp / SMS / Email: equal, tappable, wrap to two rows on phones. */
.x-gr-share { gap: 10px; }
@media (max-width: 640px) {
    .x-gr-link { font-size: var(--x-fs-lg); padding: 12px 14px; }
}
/* "More ways to share": a quiet fold that holds whole cards, so no card-in-card border. */
details.x-details.x-gr-more { border: 0; background: transparent; }
details.x-details.x-gr-more > summary { padding: 12px 0; font-size: var(--x-fs-lg); color: var(--x-text); border-top: 1px solid var(--x-line); }
details.x-details.x-gr-more > summary .x-icon { color: var(--x-primary); }
details.x-details.x-gr-more > .x-details-body { padding: 0; }
details.x-details.x-gr-more .x-grid { align-items: start; }

/* ---- Module turn-on page: preview picture slot (UX review 20) ---- */
.x-turnon-preview { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--x-line); margin-bottom: 18px; background: var(--x-surface-2); }
/* No picture yet: a neutral illustration from the group's icon with the tab's name as a "window" label. */
.x-turnon-preview.is-art { display: grid; place-items: center; gap: 10px; background: linear-gradient(135deg, var(--x-primary-soft), var(--x-surface-2)); color: var(--x-primary-text); position: relative; }
.x-turnon-preview.is-art .x-icon { width: 56px; height: 56px; }
.x-turnon-preview.is-art .x-turnon-preview-tab { position: absolute; top: 12px; left: 12px; font-size: var(--x-fs-xs); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--x-r-pill); background: var(--x-surface); color: var(--x-text-2); box-shadow: var(--x-shadow-xs); }

/* ---- Help hub: the "Not turned on yet" fold (UX review 24) ---- */
#help-off > summary { color: var(--x-text-2); }
#help-off > summary .x-count-pill { margin-left: 4px; }
#help-off .x-card.is-flat { background: transparent; }

/* reviews area (UX review 2026-10-31, items 16 / 10 / 29) — merge into assets/css/pinpraise.css */

/* partials/review_card.php — solo accounts: the workflow row holds only the due / snoozed
   badges and the notes box; when it has nothing to show it takes no space (reviews.js clears
   data-quiet when Notes is opened from the ⋯ menu). */
.x-wf.is-solo[data-quiet] { display: none; }
.x-wf.is-solo .x-wf-notes { margin-top: 4px; }

/* review/list.php — a chip that explains itself ("Needs reply", "Overdue") keeps its tooltip
   readable on phones, where a long tooltip would otherwise run off the left edge. */
@media (max-width: 767px) {
    .x-chips .x-chip[data-tooltip]::after { white-space: normal; max-width: 220px; left: 0; transform: none; }
}

/* location/list.php — "Remove" is a labelled ghost button now (was a lone trash icon). */
.x-loc-actions .x-danger-text.x-btn-ghost:hover { background: var(--x-danger-soft, rgba(220, 38, 38, .08)); }


/* ============================================================
   §37 Dark mode, focus and motion pass (2026-11-01)
   Visible focus in both themes, autofill and skeleton colours in dark, motion contract (see §2).
   ============================================================ */
/* Keyboard focus: a 2px --x-primary ring, 2px outside the control, in both themes. Inputs keep
   their soft :focus halo for the mouse and add the solid ring only for :focus-visible, so the
   ring always reads at 3:1 against the surface. Hidden radios (segments, tiles, swatches) light
   up the label that wraps them. */
.x-input:focus-visible, .x-select:focus-visible, .x-textarea:focus-visible { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-seg > label:has(input:focus-visible) { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-seg > a:focus-visible, .x-seg > button:focus-visible { outline-offset: 0; }
.x-search-box:focus-within { box-shadow: inset 0 -2px 0 var(--x-primary); }
.x-chart .mark:focus-visible { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-review.is-kb:focus-visible { outline-offset: 2px; }
/* A solid brand surface (primary button, brand card, nav chip, side panel setup card) gets the
   ring in the text colour of that surface, so it never melts into the fill. */
.x-btn-primary:focus-visible, .x-btn-danger:focus-visible { outline-color: var(--x-text); }
.x-card.is-brand :focus-visible, .x-side-setup :focus-visible { outline-color: #fff; }
.x-lightbox :focus-visible { outline-color: #fff; }
/* Browser autofill: keep the app's surface and text colours (Chrome paints a pale yellow/blue otherwise). */
.x-input:-webkit-autofill, .x-select:-webkit-autofill, .x-textarea:-webkit-autofill,
.x-input:-webkit-autofill:hover, .x-input:-webkit-autofill:focus { -webkit-text-fill-color: var(--x-text); caret-color: var(--x-text); box-shadow: 0 0 0 1000px var(--x-surface) inset; transition: background-color 9999s ease-out; }
.x-input:-webkit-autofill:focus { box-shadow: 0 0 0 1000px var(--x-surface) inset, 0 0 0 4px var(--x-primary-ring); }
/* Dark: the skeleton shimmer is a faint light sweep, not a white flash. */
:root[data-theme="dark"] .x-skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .x-skel::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); } }
/* Dark: scrollbars follow the theme (color-scheme does the native ones); the side panel thumb is set in §3. */
:root[data-theme="dark"] { scrollbar-color: var(--x-line-strong) transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { scrollbar-color: var(--x-line-strong) transparent; } }

/* ------------------------------------------------------------------ */
/* §29b Layout utilities and small parts that replaced static inline   */
/* style= in views (views-scan pass, 2026-11-01). Per-row values stay  */
/* inline only as a custom property: style="--c:…", "--ar:…", "--heat:…". */
/* ------------------------------------------------------------------ */
.x-block, .x-list > li.x-block { display: block; } .x-inline { display: inline; } .x-inline-block { display: inline-block; } .x-inline-flex { display: inline-flex; }
.x-flex-wrap { flex-wrap: wrap; } .x-basis-full { flex-basis: 100%; }
.x-items-start, .x-list > li.x-items-start { align-items: flex-start; } .x-items-end { align-items: flex-end; } .x-self-start { align-self: flex-start; } .x-justify-end { justify-content: flex-end; }
.x-gap-6 { gap: 6px; } .x-gap-10 { gap: 10px; } .x-gap-14 { gap: 14px; }
.x-m-0 { margin: 0; } .x-ml-0 { margin-left: 0; } .x-ml-1 { margin-left: 8px; }
.x-p-10 { padding: 10px; } .x-p-12 { padding: 12px; } .x-list-indent { padding-left: 18px; } .x-card-inset { padding: 0 18px 16px; }
.x-pre-wrap { white-space: pre-wrap; } .x-pre-line { white-space: pre-line; } .x-wrap-normal { white-space: normal; }
.x-break-all { word-break: break-all; } .x-break-any { overflow-wrap: anywhere; }
.x-fw-400 { font-weight: 400; } .x-uppercase { text-transform: uppercase; }
.x-border-t { border-top: 1px solid var(--x-line); } .x-border-b { border-bottom: 1px solid var(--x-line); }
.x-minw-0 { min-width: 0; } .x-minw-140 { min-width: 140px; } .x-minw-240 { min-width: 240px; }
/* !important: stacked phone tables reset every cell child to min-width 0; these bars keep theirs. */
.x-minw-64 { min-width: 64px !important; } .x-minw-80 { min-width: 80px !important; } .x-minw-90 { min-width: 90px !important; }
.x-maxw-full { max-width: 100%; } .x-maxw-90 { max-width: 90px; } .x-maxw-110 { max-width: 110px; } .x-maxw-120 { max-width: 120px; } .x-maxw-130 { max-width: 130px; }  .x-maxw-220 { max-width: 220px; } .x-maxw-260 { max-width: 260px; } .x-maxw-320 { max-width: 320px; } .x-maxw-330 { max-width: 330px; } .x-maxw-360 { max-width: 360px; } .x-maxw-420 { max-width: 420px; }
.x-scroll-240 { max-height: 240px; overflow: auto; }
.x-plain-list, ul.x-stack.x-plain-list { list-style: none; padding: 0; } /* no row styling, unlike .x-list */
.x-link-plain, .x-link-plain:hover { text-decoration: none; color: inherit; }
.x-plain-btn { padding: 0; border: 0; background: none; }
.x-plain-btn.is-block { display: block; width: 100%; cursor: zoom-in; }
/* .x-seg-opt and .x-legend-btn have no rules of their own: .x-seg > button and .x-legend button style them; the class marks them as design-system buttons. */
.x-img-cover { object-fit: cover; } .x-round { border-radius: 50%; }
.x-thumb { object-fit: cover; border-radius: 8px; } .x-thumb.is-sm { border-radius: 6px; }
.x-logo-sm { max-height: 20px; max-width: 80px; vertical-align: middle; margin-right: 6px; } .x-logo-md { max-height: 36px; max-width: 96px; } .x-logo-lg { max-height: 48px; max-width: 160px; }
.x-app-icon { border-radius: 14px; border: 1px solid var(--x-line); }
.x-photo-framed { max-width: 100%; max-height: 360px; border-radius: 10px; border: 1px solid var(--x-line); }
.x-kpi-value.is-sm { font-size: 1.25rem; } .x-kpi-value.is-md { font-size: 1.6rem; }
.x-input.x-range { padding: 0; height: 32px; }
/* Heat cell: --heat is the tint strength for this count (insights/patterns). */
td.x-heat-cell { text-align: center; }
td.x-heat-cell[style] { background: color-mix(in srgb, var(--x-primary) var(--heat), transparent); }
td.x-heat-cell.is-strong { color: #fff; }
/* Map frame: --ar is the image's width / height (insights/more/map). */
.x-map-frame { position: relative; width: 100%; aspect-ratio: var(--ar); border-radius: var(--x-r-md); overflow: hidden; background: var(--x-surface-2); }
.x-map-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Review poster preview: --c is the account's poster colour (get-reviews/poster). */
.x-poster { border-radius: 12px; overflow: hidden; border: 1px solid var(--x-line); max-width: 520px; margin: 0 auto; }
.x-poster-head { background: var(--c); color: #fff; padding: 18px 20px; text-align: center; }
.x-poster-title { font-weight: 800; font-size: 1.25rem; } .x-poster-sub { opacity: .9; }
.x-grid.x-poster-grid { padding: 14px; gap: 10px; }
.x-poster-card { border: 1px solid var(--x-line); border-left: 4px solid var(--c); border-radius: 8px; padding: 10px; background: var(--x-surface); }
.x-poster-foot { background: var(--c); color: #fff; padding: 12px 20px; font-weight: 700; }

/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
/* §38 Product polish (2026-11-01): one level of emphasis per screen.   */
/* A flush side panel, solid buttons, 36px controls, 28px page titles,  */
/* lighter cards and sentence-case labels. Rules: docs/design-system.md */
/* "Product polish (2026-11-01)".                                       */
/* ------------------------------------------------------------------ */
:root { --x-side-w: 256px; --x-side-gap: 0px; }

/* The page: only a whisper of brand colour at the very top */
body:has(.x-app) {
    background:
        radial-gradient(60% 220px at 40% 0, color-mix(in srgb, var(--x-primary) 5%, transparent), transparent),
        var(--x-bg);
    background-repeat: no-repeat;
}

/* Side panel: full height, one hairline, no floating card */
.x-side { padding: 0; }
.x-side-in { border: 0; border-right: 1px solid var(--x-line); border-radius: 0; box-shadow: none; }
body.is-nav-open .x-side-in { box-shadow: var(--x-shadow-lg); }
.x-side-head { padding: 14px 10px 6px 16px; }
.x-logo { font-size: 16px; font-weight: 700; gap: 9px; }
.x-logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--x-brand-500); box-shadow: none; }
.x-logo-mark svg { width: 16px; height: 16px; }
.x-workspace { margin: 6px 10px 4px; padding: 6px 8px; border-radius: var(--x-r-md); background: transparent; border: 1px solid var(--x-line); }
.x-workspace .x-avatar { width: 24px; height: 24px; border-radius: 6px; font-size: 11px; }
.x-workspace-name, .x-user-name { font-size: var(--x-fs-sm); font-weight: 600; }
.x-side-scroll { padding: 4px 10px 12px; }
.x-acting { margin: 4px 0 6px; padding: 8px 10px; border-radius: var(--x-r-md); }
.x-nav-label { padding: 14px 8px 4px; font-size: var(--x-fs-xs); font-weight: 600; letter-spacing: 0; text-transform: none; }
.x-nav a { padding: 0 8px; min-height: 44px; margin: 1px 0; gap: 10px; border-radius: var(--x-r-md); font-weight: 500; }
.x-nav-chip, .x-nav a:hover .x-nav-chip { width: 20px; height: 20px; background: none; }
.x-nav a.is-active { font-weight: 600; }
.x-nav a.is-active .x-nav-chip, :root[data-theme="dark"] .x-nav a.is-active .x-nav-chip, :root:not([data-theme="light"]) .x-nav a.is-active .x-nav-chip { background: none; color: var(--x-primary); box-shadow: none; }
.x-side-foot { padding: 8px 10px; }
.x-user-btn { padding: 6px; border-radius: var(--x-r-md); }
.x-user-btn .x-avatar { width: 28px; height: 28px; font-size: 12px; }
.x-subnav a { padding: 7px 10px; border-radius: var(--x-r-md); font-weight: 500; }
.x-subnav a.is-active { font-weight: 600; }
.x-subnav-heading, details.x-subnav-group > summary { font-weight: 600; letter-spacing: 0; text-transform: none; }
@media (min-width: 1024px) {
    /* The panel's white and its hairline run the whole page, past the sticky panel's 100vh */
    .x-app:not(.is-bare) { background: linear-gradient(to right, var(--x-surface) calc(var(--x-side-w) - 1px), var(--x-line) calc(var(--x-side-w) - 1px), var(--x-line) var(--x-side-w), transparent var(--x-side-w)); }
    .x-nav a { min-height: 36px; }
    .x-app.is-collapsed { --x-side-w: 72px; }
    .x-app.is-collapsed .x-side-head { padding: 12px 10px 4px; }
    .x-app.is-collapsed .x-nav-label { min-height: 0; }
    .x-app.is-collapsed .x-nav a { min-height: 0; }
}
@media (min-width: 1280px) { .x-grid-side { grid-template-columns: 216px minmax(0, 1fr); gap: 24px; } }

/* Page header. The last top-bar icon's glyph lines up with the content's right edge */
.x-top { padding-top: 12px; }
.x-top-actions { margin-right: -8px; }
.x-content { padding-top: 8px; }
.x-page { align-items: center; margin: 12px 0 20px; }
h1, .x-content > .x-page:first-child h1 { font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
h2, h3 { letter-spacing: -.015em; }
.x-page-sub { margin-top: 4px; }
.x-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; margin-bottom: 4px; }
@media (max-width: 639px) { .x-content > .x-page:first-child h1 { font-size: 1.5rem; } }

/* Surfaces: one hairline and almost no shadow; the radius comes from the token */
.x-grid { gap: 16px; }
.x-card, .x-review, .x-kpi { border-radius: var(--x-r-lg); }
.x-card-head { padding-top: 14px; padding-bottom: 14px; }
.x-card-head h2, .x-card-head h3 { font-size: .9375rem; }
.x-card-body { padding-top: 20px; padding-bottom: 20px; }
.x-card-foot { padding-top: 12px; padding-bottom: 12px; }
.x-list > li { padding-top: 12px; padding-bottom: 12px; }
.x-list-title { font-weight: 600; }
.x-card.is-current { border-color: var(--x-primary); box-shadow: 0 0 0 1px var(--x-primary); }
.x-win, .x-next { border-color: var(--x-line); }
.x-win h2, .x-next h2, .x-today h2 { font-size: var(--x-fs-lg); }
.x-next-icon { width: 40px; height: 40px; border-radius: var(--x-r-md); }
@media (min-width: 640px) {
    .x-today .x-stack { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .x-today .x-today-item { width: auto; min-height: 36px; }
    .x-today .x-today-item > span { flex: none; }
}
.x-next-icon .x-icon { width: 20px; height: 20px; }
.x-rep-score { width: 56px; height: 56px; border-radius: var(--x-r-md); }
.x-rep-score span { font-size: 1.25rem; font-weight: 700; }
.x-rep-score small { font-weight: 600; }
.x-rep .x-card-body { flex-wrap: nowrap; }

/* Buttons: a solid fill, no glow. Controls share 36px from tablet up; phones keep their larger targets */
.x-btn, .x-btn-sm, .x-btn-lg { border-radius: var(--x-r-md); font-weight: 600; }
.x-btn-primary, .x-btn-primary:hover { background-image: none; box-shadow: var(--x-shadow-xs); }
.x-btn-group .x-btn:first-child { border-radius: var(--x-r-md) 0 0 var(--x-r-md); }
.x-btn-group .x-btn:last-child { border-radius: 0 var(--x-r-md) var(--x-r-md) 0; }
.x-input, .x-select, .x-textarea { border-radius: var(--x-r-md); box-shadow: none; }
.x-input:focus, .x-select:focus, .x-textarea:focus { box-shadow: 0 0 0 3px var(--x-primary-ring); }
.x-input-group > .x-input { border-radius: var(--x-r-md) 0 0 var(--x-r-md); }
.x-input-group > .x-btn { border-radius: 0 var(--x-r-md) var(--x-r-md) 0; }
.x-input-group > .x-addon { border-radius: var(--x-r-md) 0 0 var(--x-r-md); }
.x-input-group > .x-addon + .x-input, .x-input-group > .x-select:last-child { border-radius: 0 var(--x-r-md) var(--x-r-md) 0; }
.x-input-group > .x-addon.is-end { border-radius: 0 var(--x-r-md) var(--x-r-md) 0; }
.x-seg { padding: 2px; border-radius: var(--x-r-md); }
.x-seg > a, .x-seg > button, .x-seg > label { min-height: 32px; padding-top: 0; padding-bottom: 0; border-radius: var(--x-r-sm); font-weight: 600; }
.x-seg > .is-active, .x-seg > [aria-pressed="true"], .x-seg > label:has(input:checked) { box-shadow: var(--x-shadow-xs); }
@media (min-width: 640px) {
    .x-btn { height: 36px; padding: 0 14px; }
    .x-btn-sm { height: 32px; padding: 0 12px; }
    .x-btn-lg { height: 44px; padding: 0 20px; font-size: var(--x-fs-md); }
    .x-btn-icon { width: 36px; padding: 0; }
    .x-btn-icon.x-btn-sm { width: 32px; }
    .x-input, .x-select { height: 36px; padding-left: 12px; }
    .x-select { padding-right: 34px; }
    .x-input-sm { height: 32px; }
    .x-input.is-code { height: 56px; }
    .x-input[type="file"]{ height: auto; }
    .x-input-wrap > .x-icon ~ .x-input { padding-left: 38px; }
    .x-input-group > .x-btn { height: 36px; }
    .x-input-group > .x-btn-sm { height: 32px; }
    .x-page-actions .x-select:not(.x-input-sm), .x-toolbar .x-select:not(.x-input-sm), .x-row > .x-select:not(.x-input-sm) { height: 36px; }
    .x-form-row > .x-field-btn > .x-btn { height: 36px; }
    input[type="color"].x-color, .x-input[type="color"] { height: 36px; border-radius: var(--x-r-md); }
}

/* KPI tiles: the number leads, no sheen */
.x-kpis { gap: 12px; }
@media (min-width: 640px) and (max-width: 1239px) { .x-kpis:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.x-kpi { padding: 16px 20px; gap: 6px; }
.x-kpi::before { content: none; }
.x-kpi-label { font-weight: 500; gap: 8px; }
.x-kpi-label .x-icon { width: 24px; height: 24px; padding: 5px; border-radius: 6px; }
.x-kpi-value { margin-top: 2px; font-size: var(--x-fs-3xl); font-weight: 700; letter-spacing: -.025em; }
@media (max-width: 639px) { .x-kpi { padding: 14px 16px; } .x-kpi-value { font-size: 1.5rem; } }

/* Reviews: the customer's words lead; our reply is a quiet inset */
.x-review { padding: 18px 20px; }
.x-review-list { gap: 12px; }
.x-review-author { font-weight: 600; }
.x-reply { padding: 12px 14px; background: var(--x-surface-2); border: 0; border-radius: var(--x-r-md); }
.x-reply-head, .x-ai-head, .x-reply-better-head { font-size: var(--x-fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; }
.x-reply-head { color: var(--x-text-2); }
.x-reply-actions { margin-top: 2px; }
.x-ai { border-radius: var(--x-r-lg); }

/* The accent swatch's tick sits in the middle of its circle; a heading's text follows it closely */
.x-accent i { display: grid; place-items: center; }
.x-accent:has(input:checked) i::after { transform: translateY(-1px) rotate(-45deg); }
.x-turnon h2 + p { margin-top: 4px; }
/* A second-level heading that keeps the smaller look (heading order for screen readers, audit 18 Nov 2026) */
h2.x-h3 { font-size: var(--x-fs-xl); }
/* Location page: "N need a reply" is a link people tap */
.x-loc-reply-link { display: inline-block; min-height: 24px; line-height: 24px; }
.x-turnon-preview.is-art { height: 128px; aspect-ratio: auto; border-radius: var(--x-r-md); }
.x-turnon-preview.is-art .x-icon { width: 36px; height: 36px; }
.x-turnon-preview.is-art .x-turnon-preview-tab { font-weight: 600; letter-spacing: 0; text-transform: none; }

/* A table directly in a card is part of the card: one edge, and its text lines up with the card head */
.x-card > .x-table-wrap { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
@media (min-width: 640px) {
    .x-card > .x-table-wrap .x-table th:first-child, .x-card > .x-table-wrap .x-table td:first-child { padding-left: 24px; }
    .x-card > .x-table-wrap .x-table th:last-child, .x-card > .x-table-wrap .x-table td:last-child { padding-right: 24px; }
}
/* Phones, stacked rows: the label on the left, every value together on the right. A person or an input keeps one left edge */
@media (max-width: 720px) {
    .x-table.is-stack td { justify-content: flex-end; }
    .x-table.is-stack td::before { margin-right: auto; }
    .x-table.is-stack td:first-child:has(.x-avatar) { justify-content: flex-start; }
    .x-table.is-stack td:first-child:has(.x-avatar)::before { content: none; }
    .x-table.is-stack td:has(> .x-input, > .x-select)::before { flex: 0 0 96px; white-space: normal; }
    .x-table.is-stack td > * { text-align: right; }
    .x-table.is-stack td:first-child:has(.x-avatar) > * { text-align: left; }
    .x-table.is-stack td > .x-input, .x-table.is-stack td > .x-select { flex: 1 1 0; }
}
/* Native controls take the brand colour; a long value in a copy field ends in dots */
input[type="range"], input[type="checkbox"], input[type="radio"] { accent-color: var(--x-primary); }
.x-copy-field > span { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Labels and tables: sentence case, weight does the work */
.x-badge { font-weight: 600; }
.x-chip { font-weight: 500; }
.x-table th { background: transparent; border-bottom: 1px solid var(--x-line); font-size: var(--x-fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; }
.x-menu-head, .x-search-group { font-weight: 600; letter-spacing: 0; text-transform: none; }
@media (max-width: 720px) { .x-table.is-stack td::before { font-weight: 600; letter-spacing: 0; text-transform: none; } }

/* Get reviews: the link reads as a value, the share buttons as one set */
.x-gr-link { padding: 10px 14px; font-size: var(--x-fs-lg); font-weight: 600; color: var(--x-text); background: var(--x-surface-2); border-color: var(--x-line); border-radius: var(--x-r-md); }
.x-gr-share { gap: 8px; }
.x-gr-share .x-btn { flex: 1 1 110px; }
@media (max-width: 639px) { .x-gr-share .x-btn { flex-basis: calc(50% - 4px); } }

/* ------------------------------------------------------------------ */
/* §39 Real-screen audit (2026-11-01): every feature on, 237 page shapes   */
/* read at 1440 and 375, area by area. Rules: docs/design-system.md.        */
/* ------------------------------------------------------------------ */
/* Group A: admin pages (design review 2026-11-01). */

/* Stacked rows: a value made of several lines sits on the right as one block (Accounts, Costs, All locations, Request log). */
@media (max-width: 767px) {
    .x-table.is-stack td > .x-cell-end { text-align: right; }
    .x-table.is-stack td > .x-usage-lines .x-usage-line { justify-content: flex-end; }
}

/* Accounts: the status switch shares the row's centre line with Role and Manage. */
#admin-users .x-switch-ctl { vertical-align: middle; }

/* Costs: each cap and its alert share a line, so Monthly caps is about as tall as the two cards beside it. */
@media (min-width: 640px) {
    .x-cost-capset .x-form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
}

/* All locations: the search is wide enough for its placeholder; on phones it takes the full row at the page gutter. */
.x-toolbar .x-admin-loc-search .x-input-wrap { min-width: 320px; }
@media (max-width: 639px) {
    .x-toolbar .x-admin-loc-search { flex: 1 1 100%; margin-left: 0; flex-wrap: wrap; }
    .x-toolbar .x-admin-loc-search .x-input-wrap { flex: 1 1 100%; min-width: 0; max-width: none; }
    .x-toolbar .x-admin-loc-search .x-btn { flex: 1 1 100%; justify-content: center; }
}

/* Errors: a long message reads full width under its label on a stacked row. */
@media (max-width: 767px) {
    .x-table.is-stack td:has(> .x-err-where) { display: block; }
    .x-table.is-stack td:has(> .x-err-where)::before { display: block; margin: 0 0 4px; }
}

/* Request log: both pickers share one width on phones. */
@media (max-width: 639px) {
    .x-toolbar .x-admin-filters { flex: 1 1 100%; }
    .x-toolbar .x-admin-filters .x-select:not(.x-input-sm) { width: 100%; }
}

/* Group B: Get reviews, setup. Connectors fold on Ask automatically */
details.x-details.x-conn > summary { padding: 12px 14px; font-weight: 400; }
details.x-details.x-conn > .x-details-body { padding: 0 14px 14px; scroll-margin-top: 96px; }
.x-conn-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.x-conn .x-card-foot { margin: 0 -14px -14px; padding: 12px 14px; }
.x-conn .x-input { width: 100%; }

/* How-to steps: the number lines up with the labels and fields around it */
ol.x-gr-steps { padding-left: 16px; }

/* The hint inside a switch label is body weight, like every other hint */
.x-switch-ctl .x-help { font-weight: 400; }

/* A table inside a form inside a card lines up with the card head too */
@media (min-width: 640px) {
    .x-card > form > .x-table-wrap .x-table th:first-child, .x-card > form > .x-table-wrap .x-table td:first-child { padding-left: 24px; }
    .x-card > form > .x-table-wrap .x-table th:last-child, .x-card > form > .x-table-wrap .x-table td:last-child { padding-right: 24px; }
}

/* A long placeholder ends in dots, never mid-word */
.x-input:placeholder-shown { text-overflow: ellipsis; }

/* In a between foot the last item stays right when the row wraps */
.x-card-foot.is-between:not(.is-rev) > :last-child:not(:first-child) { margin-left: auto; }

/* Stacked rows: a multi-line value reads right-aligned as one block; a person keeps one left edge wherever the cell is */
@media (max-width: 767px) {
    .x-td-end { text-align: right; }
    .x-table.is-stack td:has(> .x-row > .x-avatar) { justify-content: flex-start; }
    .x-table.is-stack td:has(> .x-row > .x-avatar)::before { content: none; }
    .x-table.is-stack td:has(> .x-row > .x-avatar) > .x-row { flex: 1; min-width: 0; }
}

@media (max-width: 639px) {
    /* Wizard foot: primary first and full width, the quieter choices under it */
    .x-wizard-foot { flex-direction: column-reverse; align-items: stretch; }
    .x-wizard-foot > .x-row { flex-direction: column-reverse; align-items: stretch; }
    .x-wizard-foot > form, .x-wizard-foot .x-btn { width: 100%; justify-content: center; }

    /* Card heads and foots keep their actions on the right when they wrap */
    .x-card-head > .x-row:not(:first-child), .x-card-head > .x-btn:not(:first-child) { margin-left: auto; justify-content: flex-end; }
    .x-card-foot.is-between > .x-small { flex: 1 1 100%; }

    /* Search in a toolbar takes the whole row */
    .x-toolbar-end:has(> .x-input-wrap) { margin-left: 0; width: 100%; }
    .x-toolbar-end > .x-input-wrap { flex: 1; min-width: 0; }

    /* Customer bulk bar: two even columns */
    #cust-bulk > .x-card-foot > .x-btn { flex: 1 1 calc(50% - 4px); margin-left: 0; justify-content: center; }

    /* Link actions beside a QR code share the row instead of stacking at different widths */
    .x-gr-qr .x-row > .x-btn { flex: 1 1 auto; justify-content: center; }

    /* Follow-up template picker: full width, its button on the right below */
    .x-seq-templates > .x-select { flex: 1 1 100%; width: 100%; }
    .x-seq-templates > .x-btn { margin-left: auto; }

    /* App footer: a wrapped link does not sit alone at the far left */
    .x-foot { justify-content: center; column-gap: 12px; }
}

/* Group C: Reports design pass (2026-11-01) */

/* Cards in a row end level: add .is-even to the grid (Reports overview, More reports hub) */
.x-grid.x-grid-3.is-even, .x-grid.x-grid-main.is-even { align-items: stretch; }
.x-grid-main.is-even > aside > .x-card { height: 100%; }

/* Phones: filter pickers in a toolbar form run full width, so they never stop at different widths */
@media (max-width: 639px) {
    form.x-toolbar > .x-row { flex: 1 1 100%; }
    form.x-toolbar > .x-row > .x-select:not(.x-input-sm) { flex: 1 1 100%; width: 100%; }
}

/* Phones: exactly three KPI tiles stack, instead of two half tiles and one wide one (four stay 2x2) */
@media (max-width: 639px) {
    .x-kpis:has(> :last-child:nth-child(3)) { grid-template-columns: minmax(0, 1fr); }
}

/* Stacked phone tables: a value wrapped in a growing column still sits on the right (Goals & TV: New reviews + its bar) */
@media (max-width: 720px) {
    .x-table.is-stack td > .x-flex-1 { text-align: right; }
}

/* A row header in the last table row adds no line above the card foot */
.x-table tbody tr:last-child > th { border-bottom: 0; }

/* A top-level fold lines up with the card titles around it; a fold nested in a card body keeps its own inset */
details.x-details:not(.x-gr-more):not(.x-card-body *, .x-details-body *, .x-list *, .x-modal *) > summary,
details.x-details:not(.x-gr-more):not(.x-card-body *, .x-details-body *, .x-list *, .x-modal *) > .x-details-body { padding-left: 24px; padding-right: 24px; }
@media (max-width: 639px) {
    details.x-details:not(.x-gr-more):not(.x-card-body *, .x-details-body *, .x-list *, .x-modal *) > summary,
    details.x-details:not(.x-gr-more):not(.x-card-body *, .x-details-body *, .x-list *, .x-modal *) > .x-details-body { padding-left: 16px; padding-right: 16px; }
}

/* A range slider is not a text box: no outline around the track */
.x-input.x-range { border: 0; background: none; box-shadow: none; }

/* No single word left alone on a second line (sentence-style KPI values, switch labels) */
.x-kpi-value.is-text, .x-switch-ctl > span { text-wrap: balance; }

/* Map dots: the map scales to about half on phones, so labels swap to a larger, shorter one */
@media (max-width: 639px) {
    .x-map-label { display: none; }
    .x-map-label-sm { display: inline; }
}

/* Widget visits, Each day: 30 markers run into a chain on a phone; the line alone reads better */
@media (max-width: 639px) {
    #wa-chart .dot { display: none; }
}

/* Group D polish (Google listing and Posts pages), 2026-11-01 */

/* Locations table: at table widths the row's sync and remove buttons are icon + tooltip, so the actions column fits inside the card */
@media (min-width: 768px) {
    #loc-table .x-loc-btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    #loc-table .x-loc-sync { flex-direction: row; flex-wrap: wrap; align-items: center; }
    #loc-table .x-loc-sync .x-btn { margin-left: 0; }
    #loc-table .x-loc-sync-now, #loc-table .x-loc-actions .x-danger-text { position: relative; padding: 0 8px; }
    #loc-table .x-loc-actions { flex-wrap: nowrap; }
}

/* Profile health: scores line up whether or not a row has a button; no blank action column when no row has one */
@media (min-width: 641px) {
    #profile-health .x-health-action { min-width: 124px; }
    #profile-health .x-health-list:not(:has(.x-health-action > *)) .x-health-action { display: none; }
}

/* Listing health: a stacked comparison value (badge + what was found) stays together on the right */
@media (max-width: 720px) {
    .x-table.is-stack td > .x-listing-val { text-align: right; }
}

/* Listing sync: the settings form below the changes gets the card's divider */
.x-card-body + form > .x-card-body:first-of-type { border-top: 1px solid var(--x-line); }

/* Menu: "Remove section" sits level with the Section input */
.x-menu-section-head { align-items: flex-end; }

/* Tracked links preview: the "Now" column keeps enough room not to break a short address */
@media (min-width: 768px) {
    .x-links-preview td:nth-child(3) { width: 34%; }
}

/* Review link kit: the short link is the thing being read, so it wraps instead of being cut */
.x-copy-field.is-wrap > span { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
@media (max-width: 767px) {
    .x-table.is-stack td > .x-copy-field.is-wrap { flex: 1; }
}

/* Plan a series: the second row uses the first row's four columns, so the columns line up */
@media (min-width: 1200px) {
    .x-form-row.x-plan-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .x-form-row.x-plan-row > :last-child { grid-column: 2 / -1; }
}

/* New post, phones: "Write it for me" drops under the topic so the input keeps the full width */
@media (max-width: 639px) {
    .x-input-group:has(> #post-topic) { flex-wrap: wrap; gap: 8px; }
    .x-input-group > #post-topic { flex: 1 1 100%; border-radius: var(--x-r-md); }
    .x-input-group:has(> #post-topic) > .x-btn { flex: 1 1 100%; margin-left: 0; border-radius: var(--x-r-md); }
}

/* Location pickers, phones: full width like other phone header pickers, and "Read from Google again" with them */
@media (max-width: 639px) {
    .x-toolbar.x-pk > .x-field, form.x-toolbar > .x-field { flex: 1 1 100%; }
    .x-toolbar.x-pk .x-select.is-auto, form.x-toolbar .x-select.is-auto { width: 100%; }
    .x-toolbar.x-pk .x-toolbar-end .x-field { flex: 1 1 100%; }
    .x-toolbar.x-pk .x-toolbar-end .x-btn { flex: 1 1 100%; }
}

/* Group E */
/* Code keeps its lines and scrolls; Copy is how people take it */
pre.x-code { white-space: pre; overflow-x: auto; scrollbar-width: thin; }

/* Group F design fixes (settings area), 2026-11-01 */

/* Card foot: the Save stays first in the form (Enter still saves, not the secondary submit)
   but shows as the right-most control. */
.x-card-foot.is-rev { flex-direction: row-reverse; justify-content: flex-start; }
.x-card-foot.is-rev.is-between { justify-content: space-between; }

/* "Optional" beside a label: same line height as the label, so a row of fields keeps one baseline. */
.x-label > .x-opt { line-height: 1; }
/* ...and when it wraps to its own line on a phone it starts at the label's left edge. */
@media (max-width: 639px) { .x-label:has(> .x-opt) > .x-opt { margin-left: 0; } }

/* Four fields in a Settings form: two by two, never three and an orphan. */
@media (min-width: 640px) {
    .x-grid-side .x-form-row:has(> .x-field:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Settings > Profile: "Change password" sub-heading at card-title size. */
#password .x-card-body h3 { font-size: .9375rem; }

/* Settings > Email server: three providers on a phone, the long one on its own row. */
@media (max-width: 639px) {
    #own-mail .x-seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
    #own-mail .x-seg > label { justify-content: center; }
    #own-mail .x-seg > label:first-child { grid-column: 1 / -1; }
}

/* Settings > Brands: the Add brand foot shows only while the fold is open; a little air under its summary. */
#add-brand:has(details:not([open])) > .x-card-foot { display: none; }
#add-brand details.x-details > .x-details-body { padding-top: 6px; }

/* Settings > Other review sites: file input the same height as the select beside it. */
#csv .x-input[type="file"] { padding-top: 2px; padding-bottom: 2px; }

/* Which review sites matter: cards in a row end level. Repeated class to outrank the no-foot grid rule. */
.x-grid.x-grid-2.x-sites-grid.x-sites-grid { align-items: stretch; }
/* ...and on a phone both pickers are full width. */
@media (max-width: 639px) {
    .x-toolbar:has(#d-country) > .x-field { flex: 1 1 100%; }
}

/* Settings > Team, phone: name and email get the row, with the menu beside them and the badges below. */
@media (max-width: 639px) {
    #members .x-list > li.is-wrap > .x-list-main { flex: 1 1 calc(100% - 100px); }
    #members .x-list > li.is-wrap > .x-menu { order: 1; }
    #members .x-list > li.is-wrap > .x-badge { order: 2; }
    #members .x-list > li.is-wrap > form { order: 3; }
}

/* Settings > Team > Training, phone: the person picker fills the foot's first row. */
@media (max-width: 639px) {
    #progress > .x-card-foot > .x-select { flex: 1 1 100%; width: 100%; }
}

/* Settings > Alerts > Scheduled reports, phone: title and recipients get the full row, actions below. */
@media (max-width: 639px) {
    #schedules .x-list > li { flex-wrap: wrap; }
    #schedules .x-list > li > .x-flex-1 { flex: 1 1 100%; }
}

/* Head and foot with no body between them share one divider (insights_year Share it; Kudos TV; Integrations) */
.x-card-head + .x-card-foot { border-top: 0; }

/* A count beside a card title stays on the title's row at any width (settings_integrations 375) */
.x-card-head > .x-flex-1:has(+ span.x-small:last-child) { flex-basis: 0; min-width: 0; }

/* A status badge in a no-wrap row is never squeezed or clipped by a long title (insights_more_delivery 375) */
.x-row.is-nowrap > .x-badge { flex: none; }

/* Equal-height pairs in a main grid: the foot stays at the bottom of the taller side (settings_auditor-links, widgets_merchant-feed) */
.x-grid-main.is-even > .x-card { display: flex; flex-direction: column; }
.x-grid-main.is-even > .x-card > form:not(.x-card-foot):not([hidden]) { display: flex; flex-direction: column; flex: 1; }
.x-grid-main.is-even > .x-card > .x-card-foot, .x-grid-main.is-even > .x-card > form > .x-card-foot { margin-top: auto; }

/* A word value in a KPI tile takes the same box as a number, so captions share a line (widgets_merchant-feed) */
.x-kpi-value.is-text { margin-top: 2px; min-height: calc(var(--x-fs-3xl) * 1.05); align-items: flex-end; }

/* Review request note stays on one line in the table layout (get-reviews_customers 1440) */
@media (min-width: 1024px) { .x-cust-note { white-space: nowrap; } }

@media (max-width: 767px) {
    /* Accounts, stacked row: the user block starts on the same edge as the labels below (admin_users 375) */
    #admin-users .x-table td:first-child { padding-left: 12px; }
}

@media (max-width: 639px) {
    .x-kpi-value.is-text { min-height: calc(1.5rem * 1.05); }

    /* A quiet ghost link first in the page band: its icon starts on the page gutter (insights_feedback-routing);
       alone, it stays left and does not fill the row (reviews_messages) */
    .x-content > .x-page:first-child .x-page-actions > a.x-btn-ghost:first-child { margin-left: -8px; }
    .x-content > .x-page:first-child .x-page-actions > a.x-btn-ghost:only-child { flex: 0 1 auto; justify-content: flex-start; }

    /* Widget editor band: Save takes its own full row, like New widget's primary (widgets_edit 375) */
    .x-content > .x-page:first-child .x-page-actions > .js-save-btn:not(:only-child) { flex: 1 1 100%; justify-content: center; }

    /* Settings > Team: leave room for the kebab beside name and email, so it never drops to the badge row (settings_team 375) */
    #members .x-list > li.is-wrap > .x-list-main { flex: 1 1 calc(100% - 120px); }

    /* Review card: the status badge gets its own row under the name, so it does not squeeze the meta (reviews_rescues 375) */
    .x-review-head:has(> .x-review-who + .x-badge) { flex-wrap: wrap; }
    .x-review-head > .x-review-who:has(+ .x-badge) { flex: 1 1 calc(100% - 64px); }
    .x-review-who + .x-badge { margin-left: 60px; }

    /* Google menu: section name stacks above Remove section; Dish takes the row, Price sits beside the remove icon (location_menu 375) */
    .x-menu-section .x-row-between.x-menu-section-head { flex-wrap: wrap; }
    .x-menu-section-head > .x-field { flex: 1 1 100%; }
    .x-menu-section-head > .x-btn { margin-left: auto; }
    .x-form-row.x-menu-dish { grid-template-columns: minmax(0, 1fr) auto; }
    .x-form-row.x-menu-dish > .x-field:nth-child(1) { grid-column: 1 / -1; }
}

/* Last items */
@media (min-width: 640px) {
    .x-input[type="file"]{ height: 36px; padding-top: 2px; padding-bottom: 2px; }
    .x-input[type="file"]::file-selector-button{ height: 28px; }
    /* Every table starts its text on the same inset as the card head and the folds around it */
    .x-table-wrap .x-table th:first-child, .x-table-wrap .x-table td:first-child { padding-left: 24px; }
    .x-table-wrap .x-table th:last-child, .x-table-wrap .x-table td:last-child { padding-right: 24px; }
}
#own-mail .x-seg { width: fit-content; max-width: 100%; }
@media (max-width: 639px) {
    #loc-sort { width: 100%; }
    .x-card-head > .x-row > .x-select.is-auto, .x-card-head > .x-select.is-auto { flex: 1 1 100%; width: 100%; }
    .x-heat th:first-child, .x-heat td:first-child { padding-left: 16px; }
}
.x-switch-ctl { min-height: 24px; }
/* Locations on a tablet: each location is a block, its name across the top and its figures in three columns, with no sideways scroll */
@media (min-width: 721px) and (max-width: 1239px) { /* up to 1239: with the side panel open the table needs about 880px, or its buttons fall off the edge */
    #loc-table, #loc-table tbody { display: block; width: 100%; }
    #loc-table thead { display: none; }
    #loc-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding: 14px 16px; border-top: 1px solid var(--x-line); }
    #loc-table tbody tr:first-child { border-top: 0; }
    #loc-table td { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; border: 0; min-width: 0; white-space: normal; }
    #loc-table td::before { content: attr(data-label); color: var(--x-text-3); font-size: var(--x-fs-xs); font-weight: 600; }
    #loc-table td:first-child { grid-column: 1 / -1; }
    #loc-table td:first-child::before { content: none; }
    #loc-table td:last-child { grid-column: 1 / -1; align-items: flex-end; width: auto; }
    #loc-table td:last-child::before { content: none; }
}
@media (max-width: 639px) { .x-card-foot .x-seg > label, .x-card-foot .x-seg > a, .x-card-foot .x-seg > button { height: 36px; } }
.x-copy-field > .x-input { min-width: 0; flex: 1 1 auto; text-overflow: ellipsis; }
.x-table tbody th[scope="row"] { border-bottom: 0; }
@media (min-width: 768px) {
    .x-grid.x-help-grid { display: block; columns: 2; column-gap: 16px; }
    .x-grid.x-help-grid > * { break-inside: avoid; margin-bottom: 16px; }
}
@media (max-width: 639px) {
    .x-page > .x-page-actions { margin-left: 0; }
    .x-list > li.is-wrap > .x-list-main:first-child { flex: 1 1 100%; }
    .x-list > li.is-wrap > :is(.x-icon, .x-avatar, svg) + .x-list-main { flex: 1 1 calc(100% - 56px); }
    details.x-details > summary > :not(.x-icon) { min-width: 0; }
    .x-card-head > form.x-row { flex: 1 1 100%; }
    .x-card-head > form.x-row > .x-select { flex: 1 1 100%; width: 100%; }
}

/* §30 Print (quality plan §5.3). Replaces the one-line @media print   */
/* block in §13 (it still hides .x-rail, the side panel's old name;    */
/* the panel is .x-side now). Applies to every page that loads pinpraise.css: */
/* the shell (insights, reviews, get-reviews…), the shared monthly      */
/* report (.rp-*) and the standalone review pages. A4, 12pt, white      */
/* paper, dark text, no shadows; tables repeat their header on every    */
/* page; cards never split; external links print their address.        */
/* ------------------------------------------------------------------ */
@media print {
    @page { size: A4; margin: 14mm; }

    /* 1. Paper tokens: one set for light and dark, every accent. */
    html, :root[data-theme="light"], :root[data-theme="dark"], :root:not([data-theme="light"]) {
        color-scheme: light;
        --x-bg: #FFFFFF !important;
        --x-surface: #FFFFFF !important;
        --x-surface-2: #FFFFFF !important;
        --x-surface-3: #F2F2F2 !important;
        --x-line: #C8CCD2 !important;
        --x-line-strong: #A5ABB3 !important;
        --x-text: #111111 !important;
        --x-text-2: #2E3440 !important;
        --x-text-3: #4A515B !important;
        --x-shadow-xs: none !important;
        --x-shadow-sm: none !important;
        --x-shadow-md: none !important;
        --x-shadow-lg: none !important;
        --x-backdrop: transparent !important;
    }
    html { font-size: 12pt; }
    body, body:has(.x-app) { background: #FFFFFF !important; color: #111111 !important; min-height: 0; }
    * { box-shadow: none !important; text-shadow: none !important; transition: none !important; animation: none !important; }
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

    /* 2. Chrome that is not part of the document. */
    .x-skip, .x-side, .x-rail, .x-top, .x-foot, .x-overlay, .x-toasts, .x-toast, .x-flash,
    .x-page-actions, .x-menu-panel, .x-menu, .x-modal, dialog, .x-tabs, .x-tabs-more, .x-subnav,
    .x-toolbar, .x-chips, .x-seg, .x-pagination, .x-acting, .x-side-setup, .x-note.is-brand .x-btn,
    .x-btn, button, .x-card-foot:has(> .x-btn:only-child), .x-form-actions, .x-input-wrap, .x-copy-field, .x-lightbox, [data-tooltip]::after, .x-empty .x-row, .x-help-foot,
    [data-x-check-all], [data-x-check-item], .x-review input[type="checkbox"], .x-review .x-menu,
    .x-review form, .x-review textarea, .x-review select, .x-review .x-count, .x-reply-actions, .x-rescue-bar, .x-rescue-panel, .x-later,
    .x-review-foot .x-small.x-muted, .x-review-foot .x-row, .x-rescue, .x-reply-slot:empty, .x-reply-slot:not(:has(.x-reply)), .x-wf-notes, .x-update-suggest, .x-review-select, .x-review-pick, .x-history-open,
    .rp-bar, .bar, .toolbar,
    [aria-hidden="true"]:not(svg):not(.x-stars):not(.x-stars *):not(.x-avatar):not(.x-check-mark):not(.stars) { display: none !important; }
    /* Keep the one control a print page needs: nothing. Forms print as their values. */
    input, select, textarea { border: 1px solid #C8CCD2 !important; background: #fff !important; color: #111 !important; }

    /* 3. Layout: one column, full width, no sticky offsets. */
    .x-app, .x-app.is-collapsed { display: block !important; grid-template-columns: none !important; min-height: 0; }
    .x-main { display: block !important; width: 100% !important; overflow: visible !important; }
    .x-content, .x-content.is-wide, .x-content.is-narrow { max-width: none !important; width: 100% !important; margin: 0 !important; padding: 0 !important; container-type: normal; }
    .x-content > .x-page:first-child { padding: 0 0 8pt !important; margin: 0 0 14pt !important; border-bottom: 2px solid #111; }
    .x-content > .x-page:first-child::before { display: none !important; }
    .x-page { display: block !important; margin: 0 0 12pt; }
    .x-page h1, .x-content > .x-page:first-child h1 { font-size: 20pt !important; letter-spacing: -.02em; }
    .x-page-sub { font-size: 11pt; max-width: none; color: var(--x-text-2); }
    .x-section { margin-top: 14pt; }
    .x-grid, .x-grid-main, .x-grid-side { display: block !important; }
    .x-grid > * + * { margin-top: 10pt; }
    .x-kpis { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(38mm, 1fr)) !important; gap: 6pt !important; }
    [style*="position: sticky"], .is-sticky{ position: static !important; }

    /* 4. Blocks that must not split across pages; headings stay with their text. */
    .x-card, .x-review, .x-kpi, .x-alert, .x-note, .x-empty, .x-table-wrap tr, .x-chart, .x-legend,
    .rp-q, .rp-loc, .rp-head, figure, blockquote, li { break-inside: avoid; page-break-inside: avoid; }
    h1, h2, h3, h4, .x-card-head, .x-section { break-after: avoid; page-break-after: avoid; }
    .x-card, .x-review { border: 1px solid #C8CCD2 !important; border-radius: 6px; background: #fff !important; margin-bottom: 10pt; }
    .x-card.is-brand { background: #fff !important; color: #111 !important; border-color: #111 !important; }
    .x-card.is-brand h2, .x-card.is-brand h3, .x-card.is-brand p { color: #111 !important; }
    .x-card.is-soft { border-color: #C8CCD2 !important; }
    .x-alert, .x-note, .x-empty-art, .x-kpi-label .x-icon, .x-acting { background: #F2F2F2 !important; color: #111 !important; border: 1px solid #C8CCD2 !important; }
    .x-alert *, .x-note * { color: #111 !important; }
    .x-card-body { padding: 10pt 12pt; }
    .x-card-head { padding: 8pt 12pt; }

    /* 5. Tables: header on every page, never stacked, no scroll box. */
    .x-table-wrap { overflow: visible !important; border-radius: 0; border-color: #C8CCD2 !important; }
    .x-table { font-size: 10pt; }
    .x-table th, .x-table td { padding: 5pt 7pt; border-top: 1px solid #C8CCD2 !important; }
    .x-table th { background: #F2F2F2 !important; color: #111 !important; }
    .x-table tbody tr:hover { background: transparent !important; }
    table thead { display: table-header-group !important; }
    table tfoot { display: table-footer-group !important; }
    table tr { break-inside: avoid; page-break-inside: avoid; }
    .x-table.is-stack, .x-table.is-stack tbody { display: table !important; width: 100% !important; }
    .x-table.is-stack tbody { display: table-row-group !important; }
    .x-table.is-stack tr { display: table-row !important; padding: 0 !important; border: 0 !important; }
    .x-table.is-stack td, .x-table.is-stack tbody th[scope="row"] { display: table-cell !important; padding: 5pt 7pt !important; border-top: 1px solid #C8CCD2 !important; text-align: inherit; }
    .x-table.is-stack td::before { content: none !important; }
    .x-table.is-stack .is-num { text-align: right !important; }

    /* 6. Links: readable, external addresses printed once after the text. */
    a, a:visited { color: #111 !important; text-decoration: underline; text-decoration-color: #A5ABB3; }
    a[href^="http"]:not([href*="//pinpraise."]):not([href*="//localhost"]):not([href*=".local/"])::after { content: " (" attr(href) ")"; font-size: 9pt; color: #4A515B; word-break: break-all; }
    a[href^="mailto:"]::after, a[href^="tel:"]::after { content: none; }
    .x-btn::after, .x-card-head a::after, h1 a::after, h2 a::after, h3 a::after, .x-nav a::after { content: none !important; }

    /* 7. Charts print as drawn; their ink is already the paper tokens above. */
    .x-chart { overflow: visible !important; max-height: 70mm; }
    .x-chart .grid { stroke: #C8CCD2 !important; }
    .x-chart .axis { fill: #4A515B !important; }
    .x-bar, .x-bar > span, .x-ring, .x-spark i, .x-badge, .x-topic-bar, .x-stars, .stars { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .x-bar { background: #E6E8EB !important; }
    .x-badge { border: 1px solid currentColor; }
    .x-skel { display: none !important; }

    /* 8. Type: 12pt base everywhere, no clamped display sizes. */
    body, .x-content, p, li, td, th, .x-help, .x-kpi-sub, .x-card-sub, .x-section-sub { font-size: 12pt; line-height: 1.45; }
    .x-help, .x-kpi-sub, .x-card-sub, .x-section-sub, .x-small, .x-xs, .x-muted { font-size: 10pt; }
    h2 { font-size: 15pt; } h3 { font-size: 13pt; }
    .x-kpi-value { font-size: 18pt; }
    .x-hide-mobile { display: revert !important; }
    .x-show-mobile { display: none !important; }
    .x-truncate { overflow: visible !important; white-space: normal !important; text-overflow: clip !important; }
    img, svg, video { max-width: 100% !important; }
    video, audio, iframe { display: none !important; }
    details:not([open]) > summary::after { display: none; }

    /* 9. Shared monthly report (.rp-*): the sheet is the page. */
    .rp-page { box-shadow: none !important; border: 0 !important; margin: 0 !important; padding: 0 !important; max-width: none !important; background: #fff !important; }
    .rp-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .rp-quotes { grid-template-columns: 1fr 1fr !important; }
    .rp-foot { break-inside: avoid; }
}

/* Home: the Today card (review 1 Nov 2026) */
.x-today-item { justify-content: flex-start; width: 100%; min-height: 44px; }
.x-today-item > span { flex: 1; text-align: left; }

/* Phones: bottom bar and 44px touch targets (review 1 Nov 2026) */
.x-bottom-bar { display: none; }
@media (max-width: 767px) {
    .x-bottom-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--x-surface, #fff); border-top: 1px solid var(--x-line); padding-bottom: env(safe-area-inset-bottom); }
    .x-bottom-bar > a, .x-bottom-bar > button { flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: 0; color: var(--x-text-2); font: inherit; font-size: 12px; text-decoration: none; }
    .x-bottom-bar > .is-active { color: var(--x-accent); font-weight: 600; }
    .x-main { padding-bottom: 64px; }
    .x-btn-sm { height: 44px; }
    .x-btn-icon.x-btn-sm { width: 44px; }
    /* The bar holds these now, so the top row fits a narrow phone. */
    .x-top-menu, .x-top-actions > a.x-btn:not(.x-btn-icon), .x-top-actions > [data-x-theme-toggle] { display: none; }
}

/* ------------------------------------------------------------------ */
/* Share studio (reviews.js, migration 181): one dialog, three panes   */
/* ------------------------------------------------------------------ */
dialog.x-modal.x-share { width: min(1040px, calc(100vw - 32px)); }
.x-share .x-modal-head { align-items: flex-start; }
.x-share .x-modal-head h2 { margin-bottom: 2px; }
.x-share-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(300px, 4fr); gap: 24px; align-items: start; }
.x-share-preview { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.x-share-stage { display: grid; place-items: center; min-height: 240px; padding: 16px; border-radius: var(--x-r-lg); background: var(--x-surface-2); }
.x-share-stage canvas { display: block; max-width: 100%; max-height: min(56vh, 520px); width: auto; height: auto; border-radius: 12px; box-shadow: var(--x-shadow-md); }
/* Sizes: one chip each with a small outline of its shape (13 Nov design options). */
.x-share-sizes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.x-share-size { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px 6px; border: 1.5px solid var(--x-line); border-radius: var(--x-r-md); background: var(--x-surface); color: var(--x-text-2); font-size: var(--x-fs-xs); font-weight: 700; line-height: 1.2; cursor: pointer; transition: border-color var(--x-t-fast), background var(--x-t-fast); }
.x-share-size:hover { border-color: var(--x-line-strong); color: var(--x-text); }
.x-share-size input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.x-share-size:has(input:checked) { border-color: var(--x-primary); background: var(--x-primary-soft); color: var(--x-text); }
.x-share-size:has(input:focus-visible) { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-share-ratio { display: grid; place-items: center; width: 30px; height: 24px; }
.x-share-ratio i { display: block; border: 2px solid currentColor; border-radius: 3px; opacity: .75; }
.x-share-ratio i.is-custom { border-style: dashed; }
.x-share-custom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.x-share-custom[hidden] { display: none; }
.x-share-custom .x-input { width: 96px; }
.x-share-dims { text-align: center; }
.x-share-side { min-width: 0; }
.x-share-tabs { margin-bottom: 16px; }
.x-share-pane .x-field { margin-bottom: 14px; }
.x-share-pane .x-field[hidden] { display: none; }
.x-share-looks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.x-share-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.x-share-pane .x-seg.is-block > label { padding-left: 6px; padding-right: 6px; text-align: center; }
.x-share-fonts > label:nth-child(2) { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
.x-share-fonts > label:nth-child(3) { font-family: "Courier New", ui-monospace, monospace; }
.x-share-design-foot { margin-top: 4px; flex-wrap: wrap; }
.x-share-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; }
.x-share-label-row .x-label { margin-bottom: 0; }
.x-share-photo-pick { cursor: pointer; }
.x-share-photo-pick:focus-within { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-share-look.is-frame .x-share-swatch { background: #fff; box-shadow: inset 0 0 0 2px var(--x-brand-500); border-color: transparent; }
.x-share-look.is-frame .x-share-swatch i { background: #ECEAE4; box-shadow: none; }
.x-share-look.is-photo .x-share-swatch { background: linear-gradient(160deg, #6B7C8F 0%, #2C3642 55%, #0F141B 100%); border-color: transparent; }
.x-share-look.is-photo .x-share-swatch i { background: rgba(255,255,255,.4); box-shadow: none; }
.x-share-accent.is-custom.is-on .x-share-dot { box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), 0 0 0 2px var(--x-text); }
.x-share-count { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.x-share-fit { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; white-space: nowrap; }
.x-share-fit .x-icon { width: 14px; height: 14px; }
.x-share-fit.is-ok { color: var(--x-success-text, var(--x-success)); }
.x-share-fit.is-over { color: var(--x-danger-text); }
.x-share-foot-go { display: inline-flex; align-items: center; gap: 8px; }
.x-share-foot-go .x-select { width: auto; min-width: 84px; }
.x-share-looks .x-tile { padding: 10px; gap: 8px; align-items: center; text-align: center; }
.x-share-looks .x-tile-title { font-size: var(--x-fs-sm); }
.x-share-swatch { display: flex; gap: 3px; width: 100%; height: 36px; padding: 6px; border-radius: 8px; background: #F6F5F1; border: 1px solid var(--x-line); }
.x-share-swatch i { display: block; flex: 1; border-radius: 3px; background: #fff; box-shadow: 0 1px 2px rgba(21,25,30,.12); }
.x-share-swatch i:nth-child(2) { flex: 2; }
.x-share-look.is-bold .x-share-swatch { background: linear-gradient(135deg, var(--x-brand-500), var(--x-brand-600)); border-color: transparent; }
.x-share-look.is-bold .x-share-swatch i { background: rgba(255,255,255,.35); box-shadow: none; }
.x-share-look.is-dark .x-share-swatch { background: #0F141B; border-color: rgba(255,255,255,.18); }
.x-share-look.is-dark .x-share-swatch i { background: #2A3541; box-shadow: none; }
.x-share-look.is-minimal .x-share-swatch { background: #fff; }
.x-share-look.is-minimal .x-share-swatch i { background: #ECEAE4; box-shadow: none; }
.x-share-look.is-minimal .x-share-swatch i:first-child { background: var(--x-brand-500); flex: 0 0 4px; }
.x-share-accents { display: flex; flex-wrap: wrap; gap: 8px; }
.x-share-accent { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.x-share-accent input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.x-share-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--c, var(--x-brand-500)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.6), 0 0 0 1px var(--x-line-strong); transition: transform var(--x-t-fast); }
.x-share-dot.is-rainbow { background: conic-gradient(#E53935, #FB8C00, #FDD835, #43A047, #1E88E5, #8E24AA, #E53935); }
.x-share-accent:hover .x-share-dot { transform: scale(1.08); }
.x-share-accent:has(input:checked) .x-share-dot { box-shadow: inset 0 0 0 2px rgba(255,255,255,.9), 0 0 0 2px var(--x-text); }
.x-share-accent:has(input:focus-visible) { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-share-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 16px; margin-bottom: 16px; }
.x-share-opts .x-switch-ctl { font-size: var(--x-fs-sm); }
.x-share-opts .x-switch-ctl[hidden] { display: none; }
.x-share-opts .x-switch-ctl.is-wide { grid-column: 1 / -1; }
.x-share-pane .x-share-opts { margin-bottom: 0; }
.x-share-pane[data-pane=caption] .x-share-opts { margin-bottom: 16px; }
.x-share-caption-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.x-share-count { margin-top: 4px; }
.x-share-group { padding: 14px 0; border-top: 1px solid var(--x-line); }
.x-share-group:first-child { border-top: 0; padding-top: 0; }
.x-share-group > .x-label { margin-bottom: 10px; }
.x-share-dest { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.x-share-dest .x-btn { height: 38px; }
.x-share-embed { margin-top: 10px; }
.x-share-channels { display: grid; gap: 8px; margin-bottom: 12px; }
.x-share-channels .x-check.is-off { opacity: .6; }
.x-share-when { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.x-share-when .x-input { width: auto; }
.x-share-results { margin-top: 12px; }
.x-share-results .x-list-title .x-icon { color: var(--x-success); }
.x-share-results .x-list-title .x-icon.is-bad { color: var(--x-danger); }
.x-share-history { margin-top: 8px; }
.x-share-history summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; padding: 8px 0; }
.x-share-history-list { max-height: 220px; overflow: auto; }
.x-share-history-list li { padding: 6px 0; border-top: 1px solid var(--x-line); }
.x-shared-badge { cursor: pointer; border: 0; font: inherit; font-size: var(--x-fs-xs); font-weight: 800; }
@media (max-width: 859px) {
    .x-share-grid { grid-template-columns: 1fr; gap: 16px; }
    .x-share-preview { position: static; }
    .x-share-stage { padding: 10px; min-height: 0; }
    .x-share-stage canvas { max-height: 30vh; }
    /* Phones: the sizes are one row to swipe, so the choices below stay within a thumb's reach. */
    .x-share-sizes { display: flex; overflow-x: auto; scrollbar-width: none; padding: 2px; }
    .x-share-sizes::-webkit-scrollbar { display: none; }
    .x-share-size { flex: 0 0 70px; }
}
@media (max-width: 480px) {
    .x-share-two { grid-template-columns: 1fr; }
    .x-share-tabs > button { padding-left: 10px; padding-right: 10px; }
    .x-share-tabs > button .x-icon { display: none; }
    .x-share .x-modal-foot { flex-wrap: wrap; }
    .x-share-foot-go { flex: 1; }
    .x-share-foot-go .x-btn { flex: 1; }
}


/* §40 Inbox search, topic chip, watch-word escalation (2026-11-03 audit build) */
/* Inbox search box and topic chip (migration 186), Reviews > Watch words escalation row. */
.x-inbox-search { flex: 1 1 200px; min-width: 160px; max-width: 320px; }
.x-inbox-search .x-input-wrap > .x-icon { left: 10px; width: 16px; height: 16px; }
.x-inbox-search .x-input-wrap > .x-icon ~ .x-input { padding-left: 32px; }
.x-inbox-search .x-input { width: 100%; }
.x-inbox-search .x-input-wrap.has-clear > .x-input { padding-right: 36px; }
.x-inbox-search .x-input-wrap > .x-btn { right: 2px; }
@media (max-width: 639px) { .x-inbox-search { flex-basis: 100%; max-width: none; order: 1; } }
.x-chip-x { font-weight: 700; opacity: .7; margin-left: 2px; }
.x-chip:hover .x-chip-x { opacity: 1; }
/* Insights topic rows link to the inbox (?topic=). */
a.x-topic-name { color: inherit; text-decoration: none; }
a.x-topic-name:hover { color: var(--x-primary-text); text-decoration: underline; }
/* Watch words: "When it is also a low rating" row. */
.x-fieldset { border: 1px solid var(--x-line); border-radius: 10px; padding: 12px 14px; margin: 0; min-width: 0; }
.x-fieldset > legend { padding: 0 6px; }
.x-ww-escalate .x-form-row { margin-bottom: 10px; }


/* §41 Request composer template note, cohorts (2026-11-03 audit build) */
/* requests (185): template-channel note under the composers (views/get_reviews/_template_note.php).
   Hidden while a channel that carries the owner's text is picked (email, "My phone", Twilio texts);
   browsers without :has() simply always show it, which is still true. */
.x-template-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; }
.x-template-note .x-icon { flex: none; margin-top: 2px; }
form:has(input[name="channel"][value="email"]:checked) .x-template-note,
form:has(input[name="channel"][value="phone"]:checked) .x-template-note,
form:has(input[name="channel"][value="sms"]:checked) .x-template-note:not([data-gr-template-channels~="sms"]) { display: none; }

/* Week-by-week cohorts on Get reviews › Request results (views/get_reviews/_cohorts.php). */
.x-cohorts tr.x-muted td { color: var(--x-text-3); }
.x-cohorts td .x-xs { margin-left: 4px; }


/* §42 Maps search ranking v2, AI visibility (2026-11-03 audit build) */
/* Maps search ranking v2 (migration 190): 7×7 grid, who outranks you, trend — after the .x-rank rules (~line 1436) */
.x-rank-grid.is-7 { grid-template-columns: repeat(7, 1fr); max-width: 336px; gap: 3px; }
.x-rank-grid.is-7 .x-rank-cell { font-size: var(--x-fs-xs); border-radius: 6px; }
.x-rank-h { font-size: var(--x-fs-sm); font-weight: 700; margin: 0 0 4px; display: flex; align-items: center; gap: 6px; }
.x-rank-outranking-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: var(--x-fs-sm); }
.x-rank-trend .x-chart { height: 180px; }
.x-rank-trend .x-legend { margin-top: 4px; }
/* AI visibility v2 (190): engines that were live this month */
.x-vis-live { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }


/* §43 Split hours, listing sync checklist (2026-11-03 audit build) */
/* ---- Listings (audit 3 Nov 2026): split hours, Bing checklist ---------------------------
   Merge into assets/css/x-locations.css (hours grid) and x-listing-tools.css (bulk) or pinpraise.css. */

/* Listing editor hours grid: the optional second opening sits under the first, as a native disclosure. */
.x-health-break { grid-column: 2; min-width: 0; }
.x-health-break > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; }
.x-health-break > summary::-webkit-details-marker { display: none; }
.x-health-break > summary::before { content: '+'; font-weight: 700; color: var(--x-primary); }
.x-health-break[open] > summary::before { content: '\2212'; }
.x-health-break > .x-health-times { margin-top: 6px; }
.x-health-day.is-closed .x-health-break { display: none; }
@media (max-width: 640px) {
    .x-health-break { grid-column: 1; }
}

/* Bulk edit: the "Opens again" row keeps the three-column grid; the label cell spans the day column. */
.x-hours-grid .x-hours-again { padding-left: 24px; }
@media (max-width: 560px) {
    .x-hours-grid .x-hours-again { padding-left: 0; }
}

/* Listing sync: Bing checklist steps and the "Done, imported on" row. */
.x-sync-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.x-sync-steps li { padding-left: 4px; }
.x-sync-mark { align-items: center; flex-wrap: wrap; }
.x-sync-mark .x-label { margin: 0; }
@media (max-width: 640px) {
    .x-sync-mark .x-input, .x-sync-mark .x-btn { width: 100%; }
}


/* §44 Video requests (2026-11-03 audit build) */
/* css-growthnew.css — builder growthnew (migration 191). Website › Video requests: the card of the link just made. */
.x-testimonial.is-new { outline: 2px solid var(--x-primary); outline-offset: 2px; }


/* §45 Copy reply state (2026-11-03 audit build) */
/* Copy reply (audit 2026-11-03 §4.3): Yelp / Tripadvisor cards copy the draft instead of posting it.
   The button shows "Copied" for a moment (reviews.js adds is-copied). */
.x-btn.x-copy-reply.is-copied { background: var(--x-success-soft); border-color: transparent; color: var(--x-success-text); }


/* §46 Enterprise: OIDC settings, Clients toolbar, chain controls, trust page (2026-11-03 audit build) */
/* css-enterprise (migration 192): agency tab groups, the Clients toolbar, chain controls. Design tokens only. */

/* Second row under the four agency groups (views/agency/_tabs.php) */
.x-tabs.is-sub { margin-top: calc(-1 * var(--x-space-2, 8px)); }
.x-tabs.is-sub a { font-size: var(--x-text-sm, 14px); padding-top: 6px; padding-bottom: 6px; }

/* Clients list toolbar: search grows, sort + button stay on one line; stacks on phones */
.x-clients-tools { margin-bottom: var(--x-space-2, 8px); }
.x-clients-tools .x-input-wrap { flex: 1 1 240px; min-width: 0; }
.x-clients-tools .x-toolbar-end { gap: var(--x-space-2, 8px); }
@media (max-width: 640px) {
    .x-clients-tools .x-toolbar-end { width: 100%; }
    .x-clients-tools .x-toolbar-end .x-select { flex: 1 1 auto; }
}

/* Chain controls: lock tiles two per row, one on phones */
.x-chain-locks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--x-space-3, 12px); }


/* §47 Text messages inbox (2026-11-03 audit build) */
/* Text messages inbox (migration 194): the WhatsApp / Text messages switch under the Reviews tabs
   and the "looked after by" control in the thread head. Goes with the .x-wa rules in x-getreviews.css. */
.x-msg-channels { margin: 0 0 16px; }
.x-sms-assign { gap: 6px; flex-wrap: nowrap; align-items: center; }
.x-sms-assign .x-select { max-width: 180px; }
@media (max-width: 767px) {
    .x-wa-head { flex-wrap: wrap; }
    .x-sms-assign { flex-basis: 100%; }
}


/* §48 Score trend, exports format (2026-11-03 audit build) */
/* Reputation Score sparkline (views/insights/_score_trend.php, audit 2026-11-03 #15) */
.x-score-trend { display: flex; flex-direction: column; gap: var(--x-space-1, 4px); max-width: 100%; }
.x-score-trend-head { display: flex; justify-content: space-between; gap: var(--x-space-2, 8px); }
.x-score-trend-svg { display: block; width: 100%; height: 48px; }
.x-score-trend-line { stroke: var(--x-brand, #0f7b6c); }
.x-score-trend-dot { fill: var(--x-brand, #0f7b6c); }


/* §49 RTL layout rules (2026-11-03 audit build) */
/* ------------------------------------------------------------------ */
/* Right-to-left interface (audit 2026-11-03 §4 #35): <html dir="rtl">  */
/* when the language is Arabic, Hebrew or Urdu (x_dir()). Grid columns, */
/* flex rows and text direction mirror on their own; these flip the few  */
/* physical offsets the layout still uses.                               */
/* ------------------------------------------------------------------ */
/* Side panel: the hairline sits between panel and content on either side. */
[dir=rtl] .x-side-in { border-right: 0; border-left: 1px solid var(--x-line); }
[dir=rtl] .x-nav a { padding: 7px 8px 7px 10px; }
[dir=rtl] .x-nav-count, [dir=rtl] .x-ml-auto { margin-left: 0; margin-right: auto; }
[dir=rtl] .x-menu-item { text-align: right; }
[dir=rtl] .x-menu-panel { right: auto; left: 0; }
/* Page band: title block reads from the right, actions sit at the left edge. */
[dir=rtl] .x-page, [dir=rtl] .x-section { text-align: right; }
[dir=rtl] .x-back .x-icon { transform: scaleX(-1); }
/* Chips */
[dir=rtl] .x-chip-x { margin-left: 0; margin-right: 2px; }
[dir=rtl] .x-acting .x-icon { margin-right: 0; margin-left: 2px; }
/* Inputs with a leading icon or a trailing button */
[dir=rtl] .x-input-wrap > .x-icon { left: auto; right: 12px; }
[dir=rtl] .x-input-wrap > .x-icon ~ .x-input { padding-left: 13px; padding-right: 38px; }
[dir=rtl] .x-input-wrap > .x-btn { right: auto; left: 4px; }
[dir=rtl] .x-input-wrap.has-action > .x-input { padding-right: 13px; padding-left: 90px; }
[dir=rtl] .x-select { padding-right: 13px; padding-left: 36px; background-position: left 12px center; }
[dir=rtl] .x-input-group > .x-input, [dir=rtl] .x-input-group > .x-addon { border-radius: 0 10px 10px 0; }
[dir=rtl] .x-input-group > .x-input-sm { border-radius: 0 8px 8px 0; }
[dir=rtl] .x-input-group > .x-addon { border-right: 1px solid var(--x-line-strong); border-left: 0; }
[dir=rtl] .x-input-group > .x-btn { border-radius: 10px 0 0 10px; margin-left: 0; margin-right: -1px; }
[dir=rtl] .x-input-group > .x-btn-sm { border-radius: 8px 0 0 8px; }
/* Tables: text from the right, numbers still on their own side. */
[dir=rtl] .x-table th, [dir=rtl] .x-table td { text-align: right; }
[dir=rtl] .x-table .is-num { text-align: left; }
/* Review card: a review keeps its own direction (an English review inside an Arabic
   interface, or an Arabic one inside English), so the text follows its first letter;
   the meta row is a flex row and mirrors with the page. */
.x-review-text { unicode-bidi: plaintext; }


/* §50 Listings on 60+ directories (partner) (2026-11-03 audit build) */
/* distribution (batch 2, 3 Nov 2026): the listings-partner cards on listing_sync/location.php and listing_sync/distribution.php */
.x-dist-coverage { font-size: var(--x-fs-sm); color: var(--x-text-3); }
.x-dist-consent .x-check { align-items: flex-start; }
.x-dist-card .x-card-foot form { display: inline; }


/* §51 Business facts (2026-11-03 audit build) */
/* facts (business facts, migration 199): the Google listing › Business facts form (views/business_facts/*). */
.x-bf-row .x-card-body { padding: 12px 14px; }
.x-bf-remove { align-self: flex-end; margin-bottom: 2px; }


/* §52 Competitor watch (up to 3) (2026-11-03 audit build) */
/* Competitor watch (migration 200): the you-vs-them table, the pick list and the 4-week sparkline — after the .x-score-trend rules (~line 2848) */
.x-cw-candidates { display: grid; gap: var(--x-space-2, 8px); }
.x-cw-candidate { display: flex; align-items: center; gap: var(--x-space-3, 12px); padding: var(--x-space-2, 8px) var(--x-space-3, 12px); border: 1px solid var(--x-line); border-radius: var(--x-r-md, 10px); background: var(--x-surface); }
.x-cw-candidate form { margin: 0; flex: 0 0 auto; }
.x-cw-table td { vertical-align: top; }
.x-cw-you td { background: var(--x-primary-soft); }
.x-cw-trend { display: inline-flex; align-items: center; gap: var(--x-space-2, 8px); }
.x-cw-spark { display: inline-block; width: 96px; height: 28px; vertical-align: middle; }
.x-cw-spark-line { stroke: var(--x-brand, #0f7b6c); }
.x-cw-spark-dot { fill: var(--x-brand, #0f7b6c); }
.x-cw-praise { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.x-cw-paste { margin-top: var(--x-space-2, 8px); }
.x-cw-paste summary { cursor: pointer; color: var(--x-primary); }
.x-cw-paste .x-textarea { min-width: 240px; }
@media (max-width: 767px) {
    .x-cw-candidate { flex-wrap: wrap; }
    .x-cw-candidate form { flex-basis: 100%; }
    /* the name/address and praise cells stack under their label instead of fighting it for width */
    .x-table.is-stack td.x-cw-wide { display: block; }
    .x-table.is-stack td.x-cw-wide::before { display: block; margin-bottom: 4px; }
    .x-cw-table.is-stack td:empty { display: none; }
    .x-cw-paste .x-textarea { min-width: 0; width: 100%; }
}


/* §53 Booking page (2026-11-03 audit build) */
/* css-booking.css — Get reviews › Online booking (views/booking/settings.php, migration 208).
   The public /book page is standalone and carries its own small stylesheet; nothing here is for it. */

/* Opening-hours grid: four time inputs a row stay narrow on desktop, stack on phones via .is-stack. */
.bk-hours td { vertical-align: middle; }
.bk-hours .x-input { min-width: 0; width: 7.5em; }
@media (max-width: 767px) {
    .bk-hours .x-input { width: 100%; }
}


/* §54 Promotions to opted-in customers (2026-11-03 audit build) */
/* css-promos.css — Promotions (migration 206). The owner pages use only existing x- classes: nothing to merge
   into pinpraise.css. One rule for the review page's own <style> block (views/public/review_page.php,
   self-contained CSS, next to `.row2 .field`): the "Send me offers and news" tick box. */
.opt-in { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; font-size: 14px; color: var(--muted); cursor: pointer; }
.opt-in input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--brand); }


/* §55 Launch QA (2026-11-04) — shared fixes from the full device eye pass */
/* File pickers (pinpraise.js filePickers): our button + the file name; the real input lies on top, transparent,
   so a click or a dropped file anywhere on the control reaches it, and it keeps its label and keyboard focus. */
.x-file { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; width: fit-content; max-width: 100%; }
.x-file > input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; z-index: 1; }
.x-file > input[type="file"]::file-selector-button { cursor: pointer; }
.x-file-btn { flex: none; pointer-events: none; }
.x-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--x-text-3); font-size: var(--x-fs-sm); }
.x-file.has-file .x-file-name { color: var(--x-text); font-weight: 600; }
.x-file:hover .x-file-btn { background: var(--x-surface-2); }
.x-file:focus-within .x-file-btn { outline: 2px solid var(--x-primary); outline-offset: 2px; }
.x-file.is-disabled { opacity: .55; }
/* Wide tables fade at the clipped edge (pinpraise.js marks .is-overflow), like the tab strips. */
.x-table-wrap.is-overflow { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), rgba(0,0,0,.15)); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), rgba(0,0,0,.15)); }
.x-table-wrap.is-overflow.is-scrolled { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.15), #000 48px, #000 calc(100% - 48px), rgba(0,0,0,.15)); mask-image: linear-gradient(90deg, rgba(0,0,0,.15), #000 48px, #000 calc(100% - 48px), rgba(0,0,0,.15)); }
.x-table-wrap.is-overflow.is-end { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.15), #000 48px); mask-image: linear-gradient(90deg, rgba(0,0,0,.15), #000 48px); }
/* A disclosure's chevron never shrinks into a tick. */
details.x-details > summary::after { flex: none; }
@media (max-width: 639px) {
    /* Footer: the © line on its own row, the five links on one balanced row (no lone "Support"). */
    .x-foot > span:first-child { flex-basis: 100%; text-align: center; }
    /* Dark code blocks wrap on phones instead of running off the edge; Copy still copies the original. */
    pre.x-code { white-space: pre-wrap; overflow-wrap: anywhere; }
    /* A disclosure with a description: title and chevron on line one, the description under them. */
    details.x-details > summary { flex-wrap: wrap; row-gap: 2px; }
    details.x-details > summary > .x-list-text { order: 9; flex-basis: 100%; }
    details.x-details > summary::after { order: 5; }
}
/* The side panel fades where more items sit beyond its edge (pinpraise.js marks the cut edges). */
/* Round 2 (X17): the fade is 16px, less than half a menu row, so the last row in view is never greyed out as a whole (at 36px "Costs" or "Price review" read as switched off). */
.x-side-scroll.is-cut-bottom { -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); }
.x-side-scroll.is-cut-top { -webkit-mask-image: linear-gradient(180deg, transparent, #000 16px); mask-image: linear-gradient(180deg, transparent, #000 16px); }
.x-side-scroll.is-cut-top.is-cut-bottom { -webkit-mask-image: linear-gradient(180deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }


/* §56 Launch fix wave (2026-11-04) — page-scoped fixes from the area builders */

/* insights1 launch fix wave (4 Nov 2026) — scoped to the Reports pages that own each class. */

/* Reports › Day and time (views/insight_plus/patterns.php): on phones the day labels
   (Mon, Wed, Thu) touched the first cell; give the label column room and a gap. */
@media (max-width: 560px) {
    .x-heat.ip-heat thead th:first-child { width: 56px; }
    .x-heat.ip-heat tbody th[scope="row"] { padding-right: 8px; }
}

/* Reports › Overview (views/insights/index.php): on phones the location picker is full width,
   so the Refresh button under it matches instead of sitting small on its own line. */
@media (max-width: 639px) {
    #insights-refresh { width: 100%; }
    #insights-refresh > .x-btn { width: 100%; justify-content: center; }
}

/* insights2 launch fix wave (4 Nov 2026) — scoped to the pages named in each comment */

/* insights/patterns: heatmap headings put the hours on their own line; the day column is wide enough for "Mon"/"Thu" on a phone */
#heatmap .x-heat-hours { display: block; white-space: nowrap; font-weight: 400; }
@media (max-width: 560px) {
    #heatmap .x-heat thead th:first-child { width: 58px; }
    #heatmap .x-heat tbody th { padding-right: 4px; }
}

/* insights/scoreboard: the location name takes the spare width instead of wrapping to three lines (table, not the stacked phone view) */
@media (min-width: 768px) {
    .x-table td.sb-loc { min-width: 200px; }
}


/* settings1 launch fix wave (4 Nov 2026) — merge into pinpraise.css (or x-settings.css). All selectors scoped. */

/* Settings sub-nav: lock on a plan-locked item (Branding) */
.x-subnav a .x-subnav-lock { margin-left: auto; display: inline-flex; }
.x-subnav a .x-subnav-lock .x-icon { width: 14px; height: 14px; color: var(--x-text-3); }

/* Plan & billing: each meter (locations, texts) is a label with its own bar */
.x-plan-meter { gap: 8px; }
/* Plan & billing: text top-up buttons share one width */
#packs .x-pack-buy { min-width: 128px; justify-content: center; }
/* Plan & billing: three plan cards squeeze below ~900px — one column instead */
@media (max-width: 899px) { .x-grid.x-plan-grid.x-grid-3 { grid-template-columns: 1fr; } }

/* Profile: all 7 colour swatches in one row on a phone */
@media (max-width: 479px) {
    .x-accents { flex-wrap: nowrap; gap: 4px; justify-content: space-between; }
    .x-accent { width: 38px; height: 38px; flex: 0 0 38px; }
    .x-accent i { width: 30px; height: 30px; }
}

/* User sync: the two cards side by side end level */
.x-stack > .x-grid.x-grid-2.x-sync-pair { align-items: stretch; }

/* Your WhatsApp provider: 2 x 2 tiles below desktop, compact tiles on a phone */
/* Settings > Text & WhatsApp: "How do you want to send WhatsApp?" (18 Nov 2026) */
.x-tiles.x-wa-ways { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.x-wa-ways .x-wa-live { align-self: flex-start; margin-top: auto; }
.x-tiles.x-bsp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .x-tiles.x-bsp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 639px) { .x-tiles.x-bsp-tiles .x-tile { flex-direction: row; align-items: center; padding: 12px; } }

/* Launch fix wave 4 Nov 2026 — area "reviews". Every selector is scoped to a reviews/posts/plan page. */

/* Reviews inbox toolbar on phones: chips, then search full width, then the actions as one even row. */
@media (max-width: 639px) {
    #inbox-toolbar .x-inbox-search { order: 1; }
    #inbox-toolbar .x-toolbar-end { order: 2; margin-left: 0; width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
    #inbox-toolbar .x-toolbar-end > * { width: 100%; justify-content: center; }
    #inbox-toolbar .x-toolbar-end > :is(form, div) > .x-btn { width: 100%; justify-content: center; }
}

/* Review cards in the inbox: replied cards keep the same text edge as cards with a 3px coloured left border. */
.x-review-list .x-review:not(.is-negative):not(.is-needs-reply) > * { margin-left: 2px; }

/* Review card meta on phones: slightly smaller stars, so stars and date always share one line
   (the location keeps its full name on the next line — the branch name is what tells reviews apart). */
@media (max-width: 639px) {
    .x-review-list .x-review-meta .x-stars .x-icon { width: 12px; height: 12px; }
    /* "Reviewed you 5 times before": the chevron is pinned right, so the text and rating chip can wrap
       without squeezing against it (the chip drops under the text when both do not fit). */
    /* (pixel wave 18 Nov: now the shared "icon, text, badge" fold grid in the "pixel wave: shared" block.) */
}

/* Crisis plans › Who to call: on phones each role is the heading of its group, with full-width labelled 40px inputs under it. */
@media (max-width: 639px) {
    .x-table.is-stack.x-pb-who td { display: block; }
    .x-table.is-stack.x-pb-who td::before { display: block; margin: 0 0 4px; }
    .x-table.is-stack.x-pb-who td > .x-input { width: 100%; height: 40px; text-align: left; }
}

/* Posts › Plan a series: Location and "Also post to" sit on their own rows; How many / How often / First post on
   share one even row, and at 1200+ they line up with the four columns of the Post types / Theme row below. */
@media (min-width: 640px) { .x-form-row.x-series-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) {
    .x-form-row.x-series-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .x-form-row.x-series-row > :last-child { grid-column: 3 / -1; }
}

/* Admin › Plans on phones: the plan name, its Monthly/Yearly badge and its description read left-aligned as the card's heading. */
@media (max-width: 720px) {
    .x-plans-table td:first-child { display: block; }
    .x-plans-table td:first-child::before { content: none; }
    .x-plans-table td:first-child > * { text-align: left; }
}
.x-plans-table .x-cell-title + .x-badge { margin-left: 6px; vertical-align: 1px; }

/* Reply promises: three small counts stay in one row on phones instead of three full-width tiles. */
@media (max-width: 639px) {
    .x-kpis.x-kpis-tight:has(> :last-child:nth-child(3)) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .x-kpis.x-kpis-tight > :last-child:nth-child(odd) { grid-column: auto; }
    .x-kpis.x-kpis-tight > .x-kpi { padding: 12px; min-width: 0; }
    .x-kpis.x-kpis-tight .x-kpi-label { font-size: var(--x-fs-xs); }
    .x-kpis.x-kpis-tight .x-kpi-label .x-icon { display: none; }
    .x-kpis.x-kpis-tight .x-kpi-sub { font-size: var(--x-fs-xs); }
}

/* Admin › Request log: the Action ("review_tools › evidence") stays on one line; Parameters takes the wrapping. */
@media (min-width: 721px) { .x-logs-table td.x-log-action { white-space: nowrap; } }

/* Old reviews summary card: the bar and its "% done" share one row; on phones the age select is full width
   and the AI note sits above its link instead of leaving "AI settings" alone on the right. */
.x-backlog-card .x-bar.x-flex-1 { flex: 1 1 auto; min-width: 0; }
@media (max-width: 639px) {
    .x-backlog-card > .x-card-head { flex-wrap: wrap; }
    .x-backlog-card > .x-card-head > form { flex: 1 1 100%; }
    .x-backlog-card > .x-card-head > form .x-select { width: 100%; }
    .x-backlog-card > .x-card-foot.is-between { flex-direction: column; align-items: flex-start; gap: 8px; }
    .x-backlog-card > .x-card-foot.is-between:not(.is-rev) > :last-child:not(:first-child) { margin-left: 0; }
}

/* Reviews › Reply shortcuts: on phones the eight chips are one sideways-scrolling row instead of four rows. */
@media (max-width: 639px) {
    .x-chips.x-rd-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; scroll-padding: 0 16px; }
    .x-chips.x-rd-chips::-webkit-scrollbar { display: none; }
    .x-chips.x-rd-chips > .x-chip { flex: 0 0 auto; }
}

/* Social comments › YouTube card: the one Connect button fills its footer on phones. */
@media (max-width: 479px) { .x-yt-connect-foot > .x-btn { flex: 1 1 100%; justify-content: center; } }

/* Public pages (launch fix wave, 4 Nov 2026): auth screens only. Merge into pinpraise.css. */

/* One primary-button shape on public pages: the marketing pill. */
.x-auth-box .x-btn-primary, .x-auth-box .x-btn-lg { border-radius: 999px; }

/* Language row: all six on one line on desktop, an even 3 x 2 grid on phones, never an orphan. */
.x-auth-box [data-auth-langs] { gap: 2px; flex-wrap: nowrap; }
.x-auth-box [data-auth-langs] .x-btn { padding-left: 9px; padding-right: 9px; }
@media (max-width: 479.98px) {
    .x-auth-box [data-auth-langs] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
    .x-auth-box [data-auth-langs] .x-btn { width: 100%; }
}

/* Forgot password? on the far right of the Password label. */
.x-auth-box .x-label .x-ml-auto { font-weight: 600; }

/* The footer links under the form when the side panel is hidden (the element only shows below 900px). */
.x-auth-mfoot { flex-wrap: wrap; justify-content: center; gap: 0 16px; margin: 20px 0 0; }
.x-auth-mfoot a { display: inline-flex; align-items: center; min-height: 36px; color: inherit; font-weight: 600; }

/* Launch QA: a three-option segmented control on a phone is three even columns, never 2 + 1. */
@media (max-width: 479px) {
    .x-seg:not(.is-scroll):has(> :nth-child(3):last-child) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; }
    .x-seg:not(.is-scroll):has(> :nth-child(3):last-child) > * { justify-content: center; text-align: center; padding-left: 6px; padding-right: 6px; }
}
/* A totals row label (tfoot th) has no stray border stub under the first cell. */
.x-table tfoot th { border-bottom: 0; }

/* Launch QA pass 2. Wide tables that cannot fit a tablet stack there too: add .is-stack-tablet beside .is-stack. */
@media (min-width: 768px) and (max-width: 1279px) {
    .x-table.is-stack.is-stack-tablet, .x-table.is-stack.is-stack-tablet tbody, .x-table.is-stack.is-stack-tablet tfoot { display: block; width: 100%; }
    .x-table.is-stack.is-stack-tablet thead { display: none; }
    .x-table.is-stack.is-stack-tablet tr { display: block; padding: 10px 0; border-top: 1px solid var(--x-line); }
    .x-table.is-stack.is-stack-tablet td { display: flex; justify-content: flex-end; gap: 12px; border: 0; padding: 4px 16px; text-align: left; min-width: 0; overflow-wrap: anywhere; }
    .x-table.is-stack.is-stack-tablet td::before { content: attr(data-label); margin-right: auto; color: var(--x-text-3); font-size: var(--x-fs-xs); font-weight: 600; flex: 0 0 auto; }
    .x-table.is-stack.is-stack-tablet td > * { min-width: 0; text-align: right; }
    .x-table.is-stack.is-stack-tablet td.is-shrink { width: auto; white-space: normal; }
    .x-table.is-stack.is-stack-tablet td .x-btn { flex-shrink: 0; }
    .x-table.is-stack.is-stack-tablet td:first-child:has(.x-avatar) { justify-content: flex-start; }
    .x-table.is-stack.is-stack-tablet td:first-child:has(.x-avatar)::before { content: none; }
    .x-table.is-stack.is-stack-tablet td:first-child:has(.x-avatar) > * { text-align: left; }
    .x-table.is-stack.is-stack-tablet td:has(> .x-lt-actions)::before { content: none; }
    .x-table.is-stack.is-stack-tablet tbody th[scope="row"] { display: block; padding: 4px 16px 2px; text-align: left; font-weight: 800; border: 0; }
}
/* Every page has the same footer width, narrow content or not. */
.x-main:has(> .x-content.is-narrow) > .x-foot { max-width: var(--x-content-max); }
/* A folded strip: a long active tab shrinks with an ellipsis, so "More" always stays on screen. */
.x-tabs.has-more > a { flex: none; }
.x-tabs.has-more.is-fitted > a.is-active, .x-tabs.has-more.is-fitted > a[aria-current="page"] { flex: 0 1 auto; min-width: 0; }
@media (max-width: 767px) { .x-tabs.has-more.is-fitted > a.is-active, .x-tabs.has-more.is-fitted > a[aria-current="page"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; } .x-tabs.has-more.is-fitted > a > .x-icon { vertical-align: -3px; margin-right: 8px; } }
/* A copy field's button is a whole rounded button, also when the field is built as an input group. */
.x-input-group.x-copy-field > .x-btn { border-radius: 8px; margin-left: 0; }


/* §57 Launch fix wave 2 (2026-11-04) */

/* Wave 2, public area: sign-in, sign-up and forgot password (views/auth/_shell_*.php). These pages load only pinpraise.css, so merge this there, after the existing [data-auth-langs] rules. */

/* Left panel: break after the full stop, not mid-sentence. */
.x-auth-quote { text-wrap: balance; }
/* Bottom links on the dark panel: readable, not low-contrast grey. */
.x-auth-side .x-auth-fine, .x-auth-side .x-auth-fine a { color: rgba(255, 255, 255, .78); }
/* The wordmark beside the shared logo (mark.svg), as on the marketing pages. */
.x-auth .x-logo-text { font-weight: 800; letter-spacing: -.02em; }
.x-auth .x-logo img { flex: none; border-radius: 9px; }

/* One compact plain row of languages, the same as /status, /trust and the review page. */
.x-auth-box [data-auth-langs].x-auth-langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 14px; }
.x-auth-langs a { color: var(--x-text-2); padding: 6px 2px; text-decoration: none; }
.x-auth-langs a:hover { color: var(--x-text); }
.x-auth-langs a[aria-current] { color: var(--x-text); font-weight: 700; }

/* Launch fix wave 2 (4 Nov 2026), Reviews area. Scoped; for the lead to merge at the END of pinpraise.css. */

/* Review list on phones: the "…" menu floats at the top right, so the lines under the name get the card's full width.
   The location stays on one line whenever it fits and still wraps when it does not (the branch name tells reviews apart, so no ellipsis).
   Stars and date never split. */
@media (max-width: 639px) {
    .x-review-list .x-review-head { position: relative; }
    .x-review-list .x-review-head > .x-menu { position: absolute; top: 0; right: 0; }
    .x-review-list .x-review-author { padding-right: 40px; }
    .x-review-list .x-review-meta { column-gap: 6px; }
    .x-review-list .x-review-meta > .x-stars { flex: none; }
    .x-review-list .x-review-meta > span:not(.x-badge):not(.x-stars) { white-space: nowrap; }
}

/* "Hindi · Translate to English": the row starts at the review text's left edge, and the dot sits evenly between the words. */
.x-review .x-translate-btn { margin-left: -13px; column-gap: 4px; }
.x-review .x-translate-btn > .x-icon { margin-right: 4px; }

/* Reviews › Reply shortcuts: the chips stay one sideways-scrolling row up to where all seven fit (phones already do, in pinpraise.css). */
@media (min-width: 640px) and (max-width: 1199px) {
    .x-chips.x-rd-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding: 2px 16px 2px 2px; margin-left: -2px; }
    .x-chips.x-rd-chips::-webkit-scrollbar { display: none; }
    .x-chips.x-rd-chips > .x-chip { flex: 0 0 auto; }
}

/* Reviews › Sign-offs on phones: a long disclosure title wraps and its chevron stays in the row. */
@media (max-width: 639px) {
    details.x-details.x-so-details > summary { flex-wrap: nowrap; }
}

/* Reviews › Promises on phones: the three compact tiles keep their icons, like the Rating changes tiles. */
@media (max-width: 639px) {
    .x-kpis.x-kpis-tight.x-pr-kpis .x-kpi-label .x-icon { display: inline-block; flex: none; }
}

/* Reviews › Employer reviews: the forwarding address always shows in full, wrapping if it has to. */
.x-input.x-er-address { display: block; height: auto; min-height: 36px; padding-top: 8px; padding-bottom: 8px; line-height: 1.35; overflow-wrap: anywhere; background: var(--x-surface-2); user-select: all; }

/* What's new (no area stylesheet): below desktop the narrow column fills the page, so its gutter matches every other page (20px, not 24px at 768). */
@media (max-width: 1023px) { .x-whats-new.x-help-article { max-width: none; } }

/* A short link alone on its line: 24px to tap (WCAG 2.5.8). */
.x-tap { display: inline-block; min-height: 24px; line-height: 24px; }

/* First-time owner pass (5 Nov 2026): finished checklist steps are one quiet line, so what is left leads. */
#getting-started .x-checklist li.is-done { padding-top: 8px; padding-bottom: 8px; opacity: 1; }
#getting-started .x-checklist li.is-done .x-checklist-title { text-decoration: none; font-weight: 500; color: var(--x-text-2); }
#getting-started .x-checklist li.is-done .x-checklist-sub { display: none; }
@media (max-width: 639px) { .x-checklist-time { display: block; } .x-checklist-time::before { content: none; } }
/* .x-celebrate took the card's side padding away: the finish page touched the card edge. */
.x-wizard-card.x-celebrate { padding: 36px 40px; }
@media (max-width: 639px) { .x-wizard-card.x-celebrate { padding: 28px 20px; } }
/* Confirming the kind of business is one tap: on a phone the button stays on screen above nine tiles. */
@media (max-width: 639px) { .x-kind-form .x-wizard-foot { position: sticky; bottom: 0; z-index: 1; margin-top: 0; padding: 12px 0; background: var(--x-surface); } }

/* §58 First-time owner pass 2 (6 Nov 2026) */
/* Settings › Features: a rare, sweeping action is a quiet link at the foot of the page, not a button. */
.x-quiet-link { background: none; border: 0; padding: 8px 4px; font: inherit; font-size: var(--x-fs-sm); color: var(--x-text-2); text-decoration: underline; cursor: pointer; }
.x-quiet-link:hover { color: var(--x-text); }
/* Ask customers on a phone with nobody on the list: the form is the action, so the empty state beside it goes. */
@media (max-width: 767px) { .x-cust-first { display: none; } }
/* Locations: Remove stands apart from View, so a mis-tap is less likely. */
.x-loc-row .x-loc-actions form { margin-left: 16px; }
#loc-table th.x-th-wrap { white-space: normal; min-width: 84px; }

/* §59 Polish pass (6 Nov 2026): Help home, folded Alerts, message-box words, form control edges at 3:1 (WCAG 1.4.11) */
.x-help-start { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.x-help-start[hidden] { display: none; }
.x-help-tile { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 16px; border: 1px solid var(--x-line); border-radius: var(--x-r-md); background: var(--x-surface); color: var(--x-text); font-weight: 700; }
.x-help-tile:hover { border-color: var(--x-primary); color: var(--x-text); text-decoration: none; }
.x-help-tile .x-icon { flex: none; color: var(--x-primary-text); }
.x-help-topics-title { font-size: var(--x-fs-lg); margin: 0 0 12px; }
.x-help-topics { gap: 8px; }
.x-help-topics .x-count-pill { font-size: var(--x-fs-xs); font-weight: 800; padding: 1px 8px; border-radius: var(--x-r-pill); background: var(--x-surface-3); color: var(--x-text-2); }
.x-help-topics ul.x-details-body { padding: 0; border-top: 1px solid var(--x-line); }
/* Phone: a long topic name wraps, and its count and chevron stay on the title row. */
@media (max-width: 639px) { .x-help-topics details.x-details > summary { flex-wrap: nowrap; } .x-help-topics details.x-details > summary > .x-count-pill { flex: none; } }
@media (max-width: 899px) { .x-help-start { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .x-help-start { grid-template-columns: 1fr; } }
details.x-details.is-card > summary { padding: 16px 20px; font-size: var(--x-fs-lg); }
details.x-details.is-card[open] > summary { border-bottom: 1px solid var(--x-line); }
.x-summary-sub { display: block; margin-top: 2px; font-size: var(--x-fs-sm); font-weight: 400; color: var(--x-text-2); }
details.x-details.is-card .x-count-pill { font-size: var(--x-fs-xs); font-weight: 800; padding: 1px 8px; border-radius: var(--x-r-pill); background: var(--x-surface-3); color: var(--x-text-2); }
.x-fill { margin-top: 10px; }
.x-fill .x-chip { cursor: pointer; }
.x-fill-preview { margin-top: 10px; padding: 12px 14px; border-radius: var(--x-r-md); background: var(--x-surface-2); }
.x-fill-preview[hidden] { display: none; }
.x-fill-preview [data-x-fill-out] { margin-top: 6px; white-space: pre-line; overflow-wrap: anywhere; }

/* ============================================================
   UX audit 18 Nov 2026: fix wave (five areas, merged by the lead)
   ============================================================ */

/* --- firstrun --- */
/* UX wave 18 Nov 2026, area firstrun: Home's getting-started list. */
/* The "cannot sign in to Google right now?" line under the Connect Google step. */

/* --- reviews --- */
/* UX fix wave 18 Nov 2026, area "reviews" (review card, Reviews sub-pages, Alerts). */

/* A24: an unreplied card has an empty reply slot; as a flex child it added a second gap above Reply. */
.x-review > .x-reply-slot:empty { display: none; }

/* A20: what the coloured card edges mean, said once next to "Showing 1–20 of 30 reviews". */
.x-review-key { margin-left: 10px; white-space: nowrap; }
.x-review-key-dot { display: inline-block; width: 3px; height: 12px; border-radius: 2px; margin: 0 6px 0 10px; vertical-align: -2px; }
.x-review-key-dot.is-amber { background: var(--x-amber); }
.x-review-key-dot.is-red { background: var(--x-danger); }
@media (max-width: 767px) { .x-review-key { display: block; margin: 4px 0 0; white-space: normal; } .x-review-key-dot:first-child { margin-left: 0; } }

/* A19, A23: tooltips that start at the card's left edge open to the right and may wrap. */
.x-review-pick[data-tooltip]::after, .x-wf-due[data-tooltip]::after { left: 0; transform: none; }
.x-wf-due[data-tooltip]::after { white-space: normal; width: max-content; max-width: 260px; text-align: left; }
/* The reply-deadline badge explains itself on a tap or the Tab key, not only on hover (UX audit 18 Nov 2026). */
.x-wf-due[data-tooltip] { cursor: help; }
.x-wf-due[data-tooltip]:focus::after { display: block; opacity: 1; }

/* A12: Watch words on a phone: the word list first, then the alerts it caused. */
@media (max-width: 1023px) { .x-ww-grid > :last-child { order: -1; } }
@container (max-width: 760px) { .x-ww-grid > :last-child { order: -1; } }

/* A14, D11, E26: the three Alerts tabs fit a 375px phone: no icons, tighter tabs, nothing cut. */
@media (max-width: 479px) {
    .x-alert-tabs > a { padding-left: 9px; padding-right: 9px; }
    .x-tabs.x-alert-tabs > a:not(.x-btn):not(.x-chip):not(.x-menu-item) > .x-icon { display: none; } /* beats the general "icons inside links" rule */
}

/* --- getreviews --- */
/* UX fix wave, 18 Nov 2026 — area: getreviews (Get reviews, Posts, Website widgets).
   Lead: merge into pinpraise.css (or x-getreviews.css / x-showcase.css). Rules are scoped to
   classes that only these pages use. */

/* B24: Review link — WhatsApp, SMS and Email sit three across on phones instead of 2 + 1 full width. */
@media (max-width: 639px) {
    #review-link .x-gr-share { flex-wrap: nowrap; gap: 6px; }
    #review-link .x-gr-share .x-btn { flex: 1 1 auto; min-width: 0; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
}

/* B4/B5/B21: Posts — the two folds (weekly posting, series planner) and the New post footer. */
details.x-details.po-fold > summary > .x-icon { color: var(--x-primary); }
details.x-details.po-fold > summary > .x-badge { font-weight: 600; }
.po-fold-foot { align-items: center; gap: 12px; }
@media (max-width: 767px) {
    /* B27: on phones the card's main action is full width, with the "when" choice above it. */
    .x-card-foot.po-foot { flex-direction: column; align-items: stretch; gap: 10px; }
    .x-card-foot.po-foot > .x-seg { display: flex; }
    .x-card-foot.po-foot > .x-seg > label { flex: 1 1 0; justify-content: center; }
    .x-card-foot.po-foot > .x-btn { width: 100%; justify-content: center; margin-left: 0; }
    .po-fold-foot { flex-direction: column; align-items: stretch; }
    .po-fold-foot > .x-btn, .po-fold-foot > form > .x-btn { width: 100%; justify-content: center; }
    .po-fold-foot > span:empty { display: none; }
}

/* B6/B27: Better results and Follow-ups — a card footer's primary is full width on phones. */
@media (max-width: 767px) {
    #timing > .x-card-foot, #tests > .x-card-foot, #questions .x-card-foot, #referrals .x-card-foot, #winback .x-card-foot, #sequence .x-card-foot, #csat .x-card-foot { flex-direction: column; align-items: stretch; gap: 10px; }
    #timing > .x-card-foot > .x-btn, #tests > .x-card-foot > .x-btn, #questions .x-card-foot > .x-btn, #referrals .x-card-foot > .x-btn, #winback .x-card-foot > .x-btn, #sequence .x-card-foot > .x-btn, #csat .x-card-foot > .x-btn { width: 100%; justify-content: center; margin-left: 0; }
    #sequence .x-card-foot > span:empty, #csat .x-card-foot > span:empty { display: none; }
}

/* B2/B3/B26: widget builder — "More options" folds, the phone preview jump, the preview switches. */
.x-builder details.x-details.w-more { border-style: dashed; background: transparent; }
.x-builder details.x-details.w-more > summary { padding: 12px 14px; font-weight: 600; }
.x-builder details.x-details.w-more > .x-details-body { padding: 0 14px 14px; }
.x-builder details.x-details.w-more > .x-details-body > .x-field:first-child { margin-top: 4px; }
@media (max-width: 1023px) {
    .x-builder .w-preview-jump.x-show-mobile { margin-top: 0; }
}
@media (max-width: 767px) {
    /* B27: the builder's last button (Create widget / Save changes) is full width on phones. */
    .x-builder .x-card-foot.is-between > span:empty { display: none; }
    .x-builder .x-card-foot.is-between > .js-save-btn { width: 100%; justify-content: center; margin-left: 0; }
}
@media (max-width: 639px) {
    /* The two preview switches each take a full row with equal halves, instead of a ragged wrap. */
    .x-builder-preview .x-card-head { flex-direction: column; align-items: stretch; }
    .x-builder-preview .x-card-head > .x-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .x-builder-preview .x-card-head .x-seg { display: flex; }
    .x-builder-preview .x-card-head .x-seg > label { flex: 1 1 0; justify-content: center; }
}

/* --- listing --- */
/* UX fix wave 18 Nov 2026, area "listing" (Google listing + Reports pages).
   Rules for the listing tool pages already went into assets/css/x-location-pages.css (the area's own file).
   These are for pages that load only pinpraise.css / x-locations.css / x-insights.css. */

/* Locations list (location/list.php): on phones the green "Add from Google" comes first, the outline button after it (C29) */
@media (max-width: 639px) {
    .x-loc-head-actions > .x-btn-primary { order: -1; }
    .x-loc-head-actions > .x-btn { flex: 1 1 100%; justify-content: center; }
}

/* Location page, listing score card (location/_scorecard.php): the ring carries "out of 100" under it (C5) */
.x-sc-ring { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }

/* Listing score fixes: the text wraps, "Fix" stays on the row's first line at the right, on every width (C23) */
.x-sc-fixes > .x-row { flex-wrap: nowrap; align-items: flex-start; gap: 12px; }
.x-sc-fixes > .x-row > span { min-width: 0; }
.x-sc-fixes > .x-row > .x-btn { flex: none; }

/* Reports > Other reports > Items (insight_more/items.php): before the first one is added the form is the page (C8) */
@media (min-width: 1024px) { .x-im-first { max-width: 560px; } } /* full width on tablets and phones */

/* --- settings --- */
/* UX wave 18 Nov 2026: area "settings" (turn-on card, locked card, Settings pages). Merge after the existing rules. */

/* Turn-on card: the no-picture panel is a small icon tile, not a big pale band (A26). */
.x-turnon .x-turnon-preview.is-art { width: 56px; height: 56px; aspect-ratio: auto; border-radius: var(--x-r-md); margin-bottom: 14px; }
.x-turnon .x-turnon-preview.is-art .x-icon { width: 28px; height: 28px; }
/* Inside Settings the card sits in the right column, left-aligned like every other Settings card (D12). */
.x-turnon.is-in-settings { margin: 0; max-width: 720px; }
.x-turnon h2.x-turnon-title { font-size: var(--x-fs-2xl, 1.5rem); line-height: 1.25; }
.x-turnon .x-turnon-actions { flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) {
    /* The preview picture is unreadable at phone width (B23, D14): the title and promise carry the page. */
    .x-turnon img.x-turnon-preview { display: none; }
    /* One full-width main action, the quiet link centred under it, and room below (E34). */
    .x-turnon .x-turnon-actions { flex-direction: column; align-items: stretch; }
    .x-turnon .x-turnon-actions .x-btn { width: 100%; justify-content: center; }
    .x-turnon .x-card-body { padding-bottom: 20px; }
}

/* Refer and earn: the Wise address is only asked for while Payout is picked (D23). */
.x-partner-pay:has(input[name="reward"][value="credit"]:checked) .x-partner-wise { display: none; }
.x-partner-pay .x-tiles { margin-bottom: 0; }
.x-partner-pay .x-partner-wise { margin-top: 16px; }

/* Customer list (privacy): the badge drops under the heading on phones instead of squeezing it (D27). */
@media (max-width: 600px) {
    #retention > .x-card-head { flex-wrap: wrap; }
    #retention > .x-card-foot.is-between { flex-direction: column; align-items: stretch; gap: 10px; }
    #retention > .x-card-foot.is-between .x-btn { width: 100%; justify-content: center; }
}

/* What's new: older notes folded (D3). */
.x-whats-old > .x-details-body { padding-top: 4px; }

/* Platform admin › Plans: the cards do not touch, and long PayPal ids wrap inside their cell (D22, E35). */
#messages, #paypal { margin-top: 18px; }
#paypal td { overflow-wrap: anywhere; }
#paypal .x-card-head { flex-wrap: wrap; gap: 8px; }

/* --- lead --- */
.x-alert a.x-btn, .x-note a.x-btn { text-decoration: none; }
.x-alert a.x-btn-primary, .x-note a.x-btn-primary { color: var(--x-on-primary, #fff); }
/* Plan cards: the line that introduces what this plan adds (18 Nov 2026) */
.x-plan-features .x-plan-adds { margin-top: 6px; font-weight: 700; color: var(--x-text); }
/* Small text links beside a field label ("Forgot password?") are still a 24px tap target (a11y, 18 Nov 2026) */
a.x-small.x-ml-auto { display: inline-flex; align-items: center; min-height: 24px; }

/* --- pixel wave: shared --- */
/* C22, D1: a chip row that scrolls sideways fades at the clipped edge like the tab strips (pinpraise.js stripState). */
.x-chips.is-overflow { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.x-chips.is-overflow.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.x-chips.is-overflow.is-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px); mask-image: linear-gradient(90deg, transparent, #000 40px); }
/* A4, B2, C33: fold rows on phones. The leading icon never sits alone above its text and the chevron stays
   in the row, centred. A fold whose summary is only icon + words stops wrapping (the words wrap inside the
   row); a small description goes under the title like .x-list-text; "icon, title, badge" becomes a grid so
   the badge drops under the title, not under the icon. */
details.x-details > summary > .x-icon { flex: none; }
@media (max-width: 639px) {
    details.x-details > summary:not(:has(> :not(.x-icon))) { flex-wrap: nowrap; }
    details.x-details > summary > .x-small { order: 9; flex-basis: 100%; }
    details.x-details > summary:has(> .x-icon:first-child):has(> .x-badge:last-child) { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
    details.x-details > summary:has(> .x-icon:first-child):has(> .x-badge:last-child) > .x-icon:first-child { grid-area: 1 / 1; }
    details.x-details > summary:has(> .x-icon:first-child):has(> .x-badge:last-child) > .x-badge:last-child { grid-area: 2 / 2; justify-self: start; }
    details.x-details > summary:has(> .x-icon:first-child):has(> .x-badge:last-child)::after { grid-area: 1 / 3 / 3 / 4; align-self: center; margin-left: 0; }
}
/* C12, D36: one control height per context. A small button used as a page-header action or as an empty state's
   action is drawn at the standard control size (36px, 40px on phones), so two headers never differ by 4px.
   Quiet ghost links in the header keep their compact size. */
.x-page-actions > .x-btn-sm:not(.x-btn-ghost):not(.x-btn-icon), .x-page-actions > form > .x-btn-sm:not(.x-btn-ghost):not(.x-btn-icon), .x-empty .x-row > .x-btn-sm:not(.x-btn-icon) { height: 40px; padding: 0 16px; font-size: var(--x-fs-md); }
@media (min-width: 640px) { .x-page-actions > .x-btn-sm:not(.x-btn-ghost):not(.x-btn-icon), .x-page-actions > form > .x-btn-sm:not(.x-btn-ghost):not(.x-btn-icon), .x-empty .x-row > .x-btn-sm:not(.x-btn-icon) { height: 36px; padding: 0 14px; } }
/* Phones and small tablets: a small button is as tall as a normal one (40px), so buttons in one row share a
   height (it was 44px beside 40px). */
@media (max-width: 767px) { .x-btn-sm { height: 40px; } .x-btn-icon.x-btn-sm { width: 40px; } }
@media (min-width: 640px) and (max-width: 767px) { .x-btn-sm { height: 36px; } .x-btn-icon.x-btn-sm { width: 36px; } }
/* C43: in a page header the "How this works" link comes first and the action sits at the far right, whatever the order in the view. */
.x-page-actions > a.x-help { order: -1; }
/* A21, B25: the page subtitle may run a little wider and its lines are balanced, so no short tail is left. */
.x-page-sub { max-width: 68ch; text-wrap: balance; }
/* A16, B39, D20: page-header actions on phones. Quiet links stay at their own width on the left; every real button takes the full row. */
@media (max-width: 639px) {
    .x-content > .x-page:first-child .x-page-actions > .x-btn:not(.x-btn-ghost):not(.x-btn-icon) { flex: 1 1 100%; justify-content: center; }
    .x-content > .x-page:first-child .x-page-actions > form:has(> .x-btn) > .x-btn:not(.x-btn-icon):only-of-type { width: 100%; justify-content: center; }
}
/* A5, B7, C21, B28: card actions under 480px. A card footer's buttons fill the row (a lone Save is full width, two
   that fit share the row); "show more" footers (.is-start) keep their quiet link. In a card header, an action that
   has dropped under the title is full width too; a status pill stays beside the title while the title keeps 260px,
   else it drops under it at the left. */
@media (max-width: 639px) {
    .x-card-head:has(> .x-badge):not(:has(> .x-btn, > a, > .x-row, > form)) > :is(div, h2, h3):first-child { flex: 1 1 260px; }
}
@media (max-width: 479px) {
    .x-card-foot:not(.is-start) > .x-btn:not(.x-btn-icon) { flex: 1 1 auto; justify-content: center; margin-left: 0; }
    .x-card-foot:not(.is-start) > form:not(:has(> :not(input[type="hidden"], .x-btn))) { flex: 1 1 auto; display: flex; gap: 8px; }
    .x-card-foot:not(.is-start) > form:not(:has(> :not(input[type="hidden"], .x-btn))) > .x-btn:not(.x-btn-icon) { flex: 1 1 auto; justify-content: center; }
    .x-card-head > div:first-child ~ .x-btn:not(.x-btn-icon):last-child,
    .x-card-head > div:first-child ~ form:not(:has(> :not(input[type="hidden"], .x-btn))):last-child,
    .x-card-head > div:first-child ~ .x-row:has(> .x-btn:only-child):last-child { flex: 1 1 100%; margin-left: 0; justify-content: center; }
    .x-card-head > div:first-child ~ form:not(:has(> :not(input[type="hidden"], .x-btn))):last-child { display: flex; gap: 8px; }
    .x-card-head > div:first-child ~ form:not(:has(> :not(input[type="hidden"], .x-btn))):last-child > .x-btn:not(.x-btn-icon),
    .x-card-head > div:first-child ~ .x-row:has(> .x-btn:only-child):last-child > .x-btn:not(.x-btn-icon) { flex: 1 1 auto; justify-content: center; }
}
/* B6: one locked-feature card. modules/turn_on.php and my_plan/feature_gate.php draw the same .x-turnon card:
   one title size whether the title is the page's h1 or an h2 inside Settings. */
.x-turnon .x-turnon-title { font-size: var(--x-fs-2xl, 1.5rem); line-height: 1.25; letter-spacing: -.02em; }
/* B26: the plan sentence in the notice strip wraps into even lines. */
@media (min-width: 640px) { .x-turnon .x-note > div { text-wrap: balance; } } /* round 2 (X12): not on phones, where balancing left a third of the strip unused */
/* B5: inside Settings the card fills its column until the column is wider than the card's reading width. */
@media (max-width: 1023px) { .x-turnon.is-in-settings { max-width: none; } }
/* A2: the preview picture fades out at the bottom, so a screenshot that ends mid-line does not look cut. */
.x-turnon img.x-turnon-preview { -webkit-mask-image: linear-gradient(180deg, #000 66%, transparent); mask-image: linear-gradient(180deg, #000 66%, transparent); margin-bottom: 8px; }
/* B1: a bordered group's title sits inside the box as a heading; a native legend that wraps was cut in half by the box's top border. */
.x-fieldset:not(.x-field) > legend { float: left; width: 100%; padding: 0; margin: 0 0 10px; }
.x-fieldset:not(.x-field) > legend + * { clear: both; }
/* D15: an input's "$", "%" or "days" add-on has the border of the input it is joined to. */
.x-input-group > .x-addon { border-color: var(--x-control-line); }
/* C16: the select box on a review card is drawn like every other checkbox (the browser's own box was a solid grey square in dark mode). */
.x-review-pick input { appearance: none; -webkit-appearance: none; margin: 0; border-radius: 5px; border: 1.5px solid var(--x-control-line); background: var(--x-surface); display: grid; place-items: center; }
.x-review-pick input:checked { background: var(--x-primary); border-color: var(--x-primary); }
.x-review-pick input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid var(--x-on-primary, #fff); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.x-review-pick input:focus-visible { outline: 2px solid var(--x-primary); outline-offset: 2px; }
/* C17: in dark mode the "ink" avatars (reviewer initials, the account tile, the signed-in user) were near-white
   discs; they take the soft brand tint every other avatar has. */
:root[data-theme="dark"] .x-avatar.is-ink, :root[data-theme="dark"] .x-workspace .x-avatar, :root[data-theme="dark"] .x-user-btn .x-avatar { background: var(--x-primary-soft); color: var(--x-primary-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .x-avatar.is-ink, :root:not([data-theme="light"]) .x-workspace .x-avatar, :root:not([data-theme="light"]) .x-user-btn .x-avatar { background: var(--x-primary-soft); color: var(--x-primary-text); } }
/* C13: the review text has the same 14px above and below it (its paragraph margin added 16px underneath). */
.x-review > .x-review-text { margin-bottom: 0; }
/* C25, B27: a quiet button that starts a review's action row or a "show more" footer begins on the content edge
   (its own padding indented its icon by 12px). */
.x-review-foot > .x-btn-ghost.x-btn-sm:first-child, .x-card-foot.is-start > .x-btn-ghost.x-btn-sm:first-child, .x-card-foot.is-between > .x-row:first-child > .x-btn-ghost.x-btn-sm:first-child { margin-left: -12px; }
/* C26: the source mark follows the last word of the reviewer's name instead of wrapping alone under a long name. */
.x-review-head .x-review-author { display: block; }
.x-review-head .x-review-author .x-source { display: inline-flex; vertical-align: -1px; margin-left: 4px; } /* round 2 (X21): the mark now sits in a no-wrap span after a no-break space (partials/review_card.php), so it wraps with the name's last word */
/* B36: "Optional" keeps its distance from the label on phones too. */
@media (max-width: 639px) { .x-label:has(> .x-opt) > .x-opt { margin-left: 6px; white-space: nowrap; } }
/* C41: a select standing alone in a phone toolbar is as wide as the search box and buttons around it. */
@media (max-width: 639px) { .x-toolbar > .x-select:not(.x-input-sm) { flex: 1 1 100%; width: 100%; } }
/* B34: the selected card's ring is drawn inside the box, so it lines up with its neighbours. */
.x-card.is-current { box-shadow: inset 0 0 0 1px var(--x-primary); outline: 1px solid var(--x-primary); outline-offset: -2px; } /* round 2 (X11): the outline redraws the ring's inner line over a footer's divider, which crossed it at both ends */
/* A36: an empty state's sentence wraps into even lines. */
.x-empty p { text-wrap: balance; }
/* Page-header actions that wrap under the title start on the left edge; beside the title they still sit at the far
   right (the title column grows). */
.x-page > .x-page-actions:nth-child(2) { margin-left: 0; }
/* A11, B23, D22: a narrow page uses the shell gutter once the screen is no wider than its column. */
@media (max-width: 800px) { .x-content.is-narrow { max-width: none; } }
/* C10, B22: a fold card's title is the size of a card title. */
details.x-details.is-card > summary { font-size: .9375rem; letter-spacing: -.015em; }
/* D32: on phones a notice with a button stacks: the text takes the row, the button sits under it. */
@media (max-width: 479px) {
    .x-alert:has(> .x-btn) { flex-wrap: wrap; }
    .x-alert:has(> .x-btn) > .x-alert-main { flex: 1 1 calc(100% - 40px); }
    .x-alert > .x-icon:first-child ~ .x-btn { margin-left: 32px; }
}
/* A7, B4, C11, B35: number tiles in one row share their lines: when one label wraps, every value still sits on
   the same line, and the small text under it too. Only for a row of plain three-part tiles. */
@supports (grid-template-rows: subgrid) {
    .x-kpis:not(:has(> :not(.x-kpi))):not(:has(> .x-kpi > :nth-child(4))) > .x-kpi { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 6px; align-content: start; }
    .x-kpis:not(:has(> :not(.x-kpi))):not(:has(> .x-kpi > :nth-child(4))) { grid-auto-rows: auto; }
}
/* C20: a switch label with help text under it runs the full width like its help text (balancing the pair made the bold label wrap early). */
.x-switch-ctl > span:has(> .x-help) { text-wrap: wrap; }
/* A10: a turn-on or locked card that is the whole page (no page header above it) starts as far under the top bar as a page title does. */
.x-content > .x-turnon:first-child { margin-top: 32px; }
@media (max-width: 639px) { .x-content > .x-turnon:first-child { margin-top: 16px; } }
/* --- pixel wave: shared (end) --- */
/* ==================== Pixel wave 18 Nov 2026 (design-system: Pixel wave) ==================== */
/* --- pixel wave: getreviews-listing (start) --- */
/* Rules for pages of this area that load no stylesheet of their own (Reports, Help, Home, setup).
   Get reviews rules are in x-getreviews.css, Google listing rules in x-locations.css and x-location-pages.css. */
/* Reports > Your year: on phones the year picker is as wide as the period pickers of the other reports (A26) */
@media (max-width: 639px) { .x-page > .x-year-pick { flex: 1 1 100%; } .x-year-pick > .x-select { width: 100%; } }
/* Reports > Day and time: every row is as tall as a row that carries a complaint count, and the coloured cells stop
   on the card's gutter instead of running into its right border; the row lines still cross the whole card (A27) */
.x-heat.ip-heat { --ip-gut: 24px; }
.x-heat.ip-heat td { height: 56px; }
.x-heat.ip-heat thead th:last-child { width: calc((100% - 64px - var(--ip-gut)) / 6 + var(--ip-gut)); padding-right: calc(16px + var(--ip-gut)); }
.x-heat.ip-heat td:last-child { padding-right: calc(4px + var(--ip-gut)); }
.x-heat.ip-heat td.is-g2:last-child { background: linear-gradient(to left, transparent var(--ip-gut), color-mix(in srgb, var(--x-success) 26%, transparent) 0); }
.x-heat.ip-heat td.is-g1:last-child { background: linear-gradient(to left, transparent var(--ip-gut), color-mix(in srgb, var(--x-success) 12%, transparent) 0); }
.x-heat.ip-heat td.is-a:last-child { background: linear-gradient(to left, transparent var(--ip-gut), color-mix(in srgb, var(--x-warning) 18%, transparent) 0); }
.x-heat.ip-heat td.is-r1:last-child { background: linear-gradient(to left, transparent var(--ip-gut), color-mix(in srgb, var(--x-danger) 16%, transparent) 0); }
.x-heat.ip-heat td.is-r2:last-child { background: linear-gradient(to left, transparent var(--ip-gut), color-mix(in srgb, var(--x-danger) 30%, transparent) 0); }
@media (max-width: 560px) {
    .x-heat.ip-heat { --ip-gut: 12px; }
    .x-heat.ip-heat td { height: 50px; }
    .x-heat.ip-heat thead th:last-child { width: calc((100% - 56px - var(--ip-gut)) / 6 + var(--ip-gut)); padding-right: calc(2px + var(--ip-gut)); }
    .x-heat.ip-heat td:last-child { padding-right: calc(2px + var(--ip-gut)); }
}
/* Help: the six start tiles share the height of a two-line one (A14); a topic's count follows its last word (A33);
   the article lead-in has no lone last word (A34) */
.x-help-start > .x-help-tile { min-height: 72px; }
.x-help-topic { min-width: 0; text-wrap: balance; }
.x-help-topic > .x-count-pill { margin-left: 6px; white-space: nowrap; }
.x-help-lead { text-wrap: balance; }
/* Help article on a tablet: the 760px reading column would sit 4px inside the page, so the text started at 24px
   while the top bar and footer start at 20px; under 800px the column is the page (A11) */
@media (max-width: 800px) { .x-content.is-narrow:has(> .x-help-article) { max-width: none; } }
/* Home > Getting started on phones: the progress bar starts on the card's edge and runs up to "Hide list" (A35) */
@media (max-width: 639px) {
    #getting-started > .x-card-head > .x-row { flex: 1 1 100%; margin-left: 0; flex-wrap: nowrap; }
    #getting-started > .x-card-head .x-progress-line { flex: 1 1 auto; min-width: 0; }
    #getting-started > .x-card-head .x-progress-line > span { white-space: nowrap; }
}
/* --- pixel wave: getreviews-listing (end) --- */
/* --- pixel wave: reviews-settings (start) --- */
/* B1: a legend that wraps is cut by the fieldset border; float it so it sits inside the box as a normal title. */
.x-ww-escalate > legend { float: left; width: 100%; padding: 0; margin: 0 0 4px; }
.x-ww-escalate > legend + * { clear: both; }
/* B8/C8/D33: Text & WhatsApp status rows on a phone: the button sits under the text, the icon beside the title. */
@media (max-width: 639px) {
    #state > .x-list > li { flex-wrap: wrap; align-items: flex-start; }
    #state > .x-list > li > .x-icon { margin-top: 2px; }
    #state > .x-list > li > .x-list-main { flex: 1 1 calc(100% - 40px); }
    #state > .x-list > li > .x-btn { margin-left: 32px; }
}
/* D32: the notice above the Alerts tabs stacks on a phone (text full width, button under it). */
@media (max-width: 479px) {
    .x-alert-tabs + .x-alert { flex-wrap: wrap; }
    .x-alert-tabs + .x-alert > .x-alert-main { flex: 1 1 calc(100% - 40px); }
    .x-alert-tabs + .x-alert > .x-btn { margin-left: 32px; }
}
/* B10: Reviews filter row on tablets: chips on their own line, then the search box filling the line beside Export and Filters. */
@media (min-width: 640px) and (max-width: 1199px) {
    #inbox-toolbar:has(> .x-toolbar-end:not([hidden])) > .x-chips { flex: 1 1 100%; }
    #inbox-toolbar:has(> .x-toolbar-end:not([hidden])) > .x-inbox-search { max-width: none; }
    #inbox-toolbar:has(> .x-toolbar-end:not([hidden])) > .x-inbox-search .x-input-wrap { max-width: none; } /* round 2 (X10): the box itself was still held at 360px */
}
/* B11/C27: Missing reviews: the two cards share one height; "What happened?" fills the footer on a phone. */
.x-missing-section + .x-grid.x-grid-2:not(:has(.x-list)) { align-items: stretch; } /* round 2 (X15): only while both cards hold one sentence; beside a list of people the short card keeps its own height */
@media (max-width: 479px) {
    .x-card-foot > label.x-row:has(> .x-report-status) { flex: 1 1 100%; flex-wrap: nowrap; }
    .x-card-foot > label.x-row > .x-select.x-report-status { flex: 1 1 auto; width: auto; min-width: 0; }
}
/* C4/C5/C45: private feedback: an unread card carries a left edge like a review (the "New" badge stays), not a ring that reads as keyboard focus. */
.x-card.is-unread[data-feedback-id] { border-color: var(--x-line); border-left: 3px solid var(--x-primary); box-shadow: var(--x-shadow-sm); }
[data-feedback-id] audio { border: 1px solid var(--x-line); border-radius: var(--x-r-pill); vertical-align: middle; width: 320px; max-width: 100%; height: 36px; } /* round 2 (X27): the size was an inline style; here it also holds on phones */
@media (max-width: 479px) {
    [data-feedback-id] > .x-gr-top { flex-wrap: wrap; row-gap: 2px; }
    [data-feedback-id] > .x-gr-top > .x-flex-1 { flex: 1 1 calc(100% - 60px); }
    /* round 2 (X5): the quiet button's words start on the card's content edge, with the message close under it (it sat 48px in, 30px clear above and below) */
    [data-feedback-id] > .x-gr-top > [data-gr-fb-toggle] { margin-left: -12px; }
    [data-feedback-id] > .x-gr-top + p { margin-top: 0; }
}
/* round 2 (X20): "Customer link" starts on the content edge like the message above it (the quiet button's padding indented its icon). */
[data-feedback-id] > .x-row > form:first-child > .x-btn-ghost.x-btn-sm { margin-left: -12px; }
/* C9: stars and the name beside them in a linked row title keep a gap (a flex row drops the space between them). */
a.x-list-title:has(> .x-stars) { gap: 6px; }
/* C10/B22: fold cards on Alerts use the card-title size of the cards around them. */
.x-tabpanel > details.x-details.is-card > summary { font-size: .9375rem; letter-spacing: -.015em; }
/* B17: a page header whose only action is hidden on phones takes no room. */
@media (max-width: 639px) { .x-page-actions:has(> .x-hide-mobile:only-child) { display: none; } }
/* B18: widget builder "More options" fold has the solid border every other fold has. */
.x-builder details.x-details.w-more { border-style: solid; }
/* B21/D34: Features panel: search as tall as the chips; on a phone the three chips stay on one line. */
@media (min-width: 640px) { .x-feat-tools #feat-search { height: 32px; } }
@media (max-width: 479px) {
    .x-feat-tools > .x-chips { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
    .x-feat-tools > .x-chips::-webkit-scrollbar { display: none; }
    .x-feat-tools > .x-chips > .x-chip { flex: 0 0 auto; padding: 0 10px; }
}
/* C18: the one settings menu entry that wrapped to two lines fits on one. */
.x-subnav a[href$="settings/data"] { gap: 5px; letter-spacing: -.02em; } /* round 2 (X18): it was 0.9px too wide for the 216px menu and still wrapped; now 4px to spare */
/* B35: number tiles that wrap to a second row keep one row height. */
.x-kpis.x-kpis-even { grid-auto-rows: 1fr; }
/* B31: the Extra instructions box shows whole lines and grows with what is typed. */
#custom_instructions { field-sizing: content; min-height: 108px; max-height: 276px; }
@media (max-width: 639px) { #custom_instructions { max-height: 164px; } } /* round 2 (X7): six lines on phones, then it scrolls inside, so Save stays near */
/* B23: What's new on a tablet uses the page gutter every other page has. */
@media (max-width: 1023px) { .x-content.is-narrow:has(> .x-whats-new) { max-width: none; } }
/* C24: API keys on a phone: every key starts on its own line under its name, not only the long-named one. */
@media (max-width: 479px) { .x-list-title > .x-key-tag { display: block; } }
/* --- pixel wave: reviews-settings (end) --- */
/* --- pixel wave: round 2 --- */
/* X1, X2: a card footer that starts with a sentence or a status pill (.x-flex-1) on phones: the text keeps its own
   line and the buttons share the line under it. (The full-width footer buttons of the first wave grew over the
   text, which may shrink to nothing.) */
@media (max-width: 479px) { .x-card-foot:not(.is-start) > .x-flex-1:first-child:not(:empty) { flex: 1 1 100%; } }
/* X13, X14: on a tablet a table's name column (name with a small line under it) keeps a readable width; the
   table scrolls sideways inside its box instead of breaking the name over eight lines. Add .x-col-name to the cell. */
@media (min-width: 768px) { .x-table td.x-col-name { min-width: 200px; } }
/* X3: the locked / turn-on card fills the page column until the column is wider than its reading width (as in Settings). */
@media (max-width: 1023px) { .x-turnon { max-width: none; } }
/* X6: a form's lone Save in a right-aligned row is full width on phones, like the Save in a card footer. */
@media (max-width: 479px) { .x-card form > .x-row.x-justify-end > .x-btn:only-child:not(.x-btn-ghost):not(.x-btn-icon) { flex: 1 1 100%; justify-content: center; } }
/* X19: on phones a switch label fills its line before it wraps (balanced, "Work the service and" broke early). */
@media (max-width: 639px) { .x-switch-ctl > span { text-wrap: pretty; } }
/* X21: the colour key under the Reviews filters: each item stays whole; on phones they sit side by side or one per line. */
@media (max-width: 767px) {
    .x-review-key { display: flex; flex-wrap: wrap; gap: 2px 14px; }
    .x-review-key .x-review-key-dot { margin-left: 0; }
}/* X23: Get reviews, "More ways to share": closed, it is a bordered fold like the others on the page; open, it is the
   heading of the cards under it (they are cards already, so no box around them). */
details.x-details.x-gr-more:not([open]) { border: 1px solid var(--x-line); background: var(--x-surface); }
details.x-details.x-gr-more:not([open]) > summary { border-top: 0; padding: 14px 24px; }
@media (max-width: 639px) { details.x-details.x-gr-more:not([open]) > summary { padding: 14px 16px; } }
/* X26: a card header whose actions are one or two small forms in a row (Settings, "Hide it"): on phones the row drops
   under the title and its buttons fill it, like every other header action since the first wave. */
@media (max-width: 479px) {
    .x-card-head > div:first-child ~ .x-row:has(> form):not(:has(> :not(form))):last-child { flex: 1 1 100%; margin-left: 0; }
    .x-card-head > div:first-child ~ .x-row:has(> form):not(:has(> :not(form))):last-child > form { flex: 1 1 auto; display: flex; }
    .x-card-head > div:first-child ~ .x-row:has(> form):not(:has(> :not(form))):last-child > form > .x-btn:not(.x-btn-icon) { flex: 1 1 auto; justify-content: center; }
}
/* --- pixel wave: round 2 (end) --- */
/* --- pixel wave: admin (start) --- */
/* Admin > Help guides editor (admin/help/edit loads no x-admin.css): the fixed address reads as a locked field with its text on the centre line; the marker list starts at the card's text edge. */
.x-input.x-help-addr { display: flex; align-items: center; background: var(--x-surface-2); color: var(--x-text-2); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.x-help-tips { padding-left: 18px; }
.x-help-tips > li + li { margin-top: 4px; }
/* Admin pages on phones (Reply queue): two quiet links to neighbouring admin pages share one row at half width, instead of two full-width bars. */
@media (max-width: 639px) { .x-content > .x-page:first-child .x-page-actions.x-admin-links > .x-btn:not(.x-btn-ghost):not(.x-btn-icon) { flex: 1 1 calc(50% - 4px); min-width: 0; } }
/* --- pixel wave: admin (end) --- */
/* --- pixel wave: public (sign-in pages, signed-out help; from the public builder) --- */
/* Public pages, pixel wave 18 Nov 2026 (builder E). Rules for assets/css/pinpraise.css; append after the
   "Public pages (launch fix wave, 4 Nov 2026): auth screens only" block. */

/* E6 / E7: sign-in, sign-up and forgot-password fields are as tall as the button under them
   (.x-btn-lg: 48px on phones, 44px from 640px). */
.x-auth-box .x-input, .x-auth-box .x-select { height: 48px; }
@media (min-width: 640px) { .x-auth-box .x-input, .x-auth-box .x-select { height: 44px; } }

/* E26: the centred small print under "Continue with Google" never ends on one orphan word. */
.x-auth-box .x-center.x-small { text-wrap: balance; }

/* E27: the row under the form (shown below 900px) reads like the side panel's foot on desktop:
   the copyright first, then the links with a middle dot between them.
   Needs the <span class="x-auth-mfoot-copy"> now in views/auth/_shell_close.php. */
.x-auth-mfoot { gap: 0; }
.x-auth-mfoot-copy { flex: 0 0 100%; text-align: center; }
.x-auth-mfoot a + a::before { content: "\00B7"; margin: 0 8px; font-weight: 400; }

/* E28: the six start tiles on the help hub are one height in every row, also when one title wraps. */
.x-help-start { grid-auto-rows: 1fr; }

/* E29: help article foot on a phone: the sentence has its own line and the one button is full width.
   .x-help-main is the signed-out shell only; drop that prefix (or name the signed-in wrapper) to do the same in the app. */
@media (max-width: 479px) {
    .x-help-main .x-card-foot > .x-flex-1 { flex: 1 1 100%; }
    .x-help-main .x-card-foot > .x-flex-1 + .x-btn { flex: 1 1 100%; justify-content: center; }
}
/* 24 px targets found by the a11y scan after the wave: the sign-in link row and the matched-customer link on a review card. */
.x-auth-links a { display: inline-block; min-height: 24px; line-height: 24px; }
.x-cust-match a.x-strong { display: inline-flex; align-items: center; min-height: 24px; }
/* --- pixel wave: public (end) --- */

/* --- owner decisions, 19 Nov 2026 --- */
/* Widget builder: the preview sits under the form up to 1023px, so "See the preview" shows there too, not only on phones. */
@media (max-width: 1023px) { .x-builder .w-preview-jump.x-show-mobile { display: block !important; } }
/* Phone inbox: quick filters on one row that scrolls sideways, 40px tall; ticking several reviews is a desk job, so the tick box is hidden. */
@media (max-width: 639px) {
    #inbox-toolbar .x-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding: 2px 16px 2px 2px; }
    #inbox-toolbar .x-chips::-webkit-scrollbar { display: none; }
    #inbox-toolbar .x-chips > .x-chip { flex: 0 0 auto; min-height: 40px; }
    .x-review-pick { display: none; }
}
/* --- owner decisions, 19 Nov 2026 (end) --- */

/* ===== UX wave 29 Nov 2026: start ===== */

#getting-started .x-checklist li.is-wait { border: 0; background: none; padding: 6px 2px 0; gap: 6px; color: var(--x-text-2); font-size: var(--x-fs-sm); font-weight: 700; }

#getting-started .x-checklist li.is-locked { padding-top: 8px; padding-bottom: 8px; background: var(--x-surface-2); }
#getting-started .x-checklist li.is-locked .x-checklist-title { font-weight: 500; color: var(--x-text-2); }
#getting-started .x-checklist li.is-locked .x-check-mark { border-style: dashed; }

@media (min-width: 900px) { #help-start { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

#help-connect .x-row { gap: 10px 16px; }

/* ===== UX wave 29 Nov 2026: getreviews ===== */

.gr-compose-foot { flex-wrap: wrap; gap: 8px 12px; }
.gr-compose-foot > [data-gr-goes] { min-width: 0; }
@media (max-width: 639px) { .gr-compose-foot > [data-gr-goes] { flex: 1 1 100%; } }

.gr-ask-one { flex-wrap: wrap; gap: 8px; }

.gr-ask-all { flex-wrap: wrap; gap: 8px 12px; }

#state > .x-card-foot.is-between { flex-wrap: wrap; gap: 8px 12px; }
#state > .x-card-foot.is-between > span { flex: 1 1 260px; min-width: 0; }

/* ===== UX wave 29 Nov 2026: reviews ===== */

.x-inbox-export-m { padding-top: 12px; }
@media (min-width: 640px) { .x-inbox-export-m { display: none; } }
@media (max-width: 639px) {
    .x-page-sub.x-inbox-intro { display: none; }
    #inbox-toolbar.x-inbox-bar > .x-inbox-search { order: 1; flex: 1 1 0; min-width: 0; max-width: none; }
    #inbox-toolbar.x-inbox-bar > .x-toolbar-end { order: 2; width: auto; margin-left: 0; display: flex; gap: 8px; }
    #inbox-toolbar.x-inbox-bar > .x-toolbar-end > * { width: auto; }
    #inbox-toolbar.x-inbox-bar > .x-toolbar-end > .x-menu { display: none; }
    #inbox-toolbar.x-inbox-bar > .x-toolbar-end .x-btn { width: 40px; min-width: 40px; height: 40px; padding: 0; justify-content: center; position: relative; }
    #inbox-toolbar.x-inbox-bar > .x-toolbar-end .x-inbox-lbl { display: none; }
    #inbox-toolbar.x-inbox-bar > .x-toolbar-end .x-btn > .x-badge { position: absolute; top: -6px; right: -6px; height: 16px; padding: 0 5px; }
    #inbox-toolbar.x-inbox-bar > .x-inbox-search .x-input { height: 40px; }
}

.x-review details.x-details.x-trust-note > summary { font-weight: 500; color: var(--x-text-2); padding-top: 8px; padding-bottom: 8px; }
.x-review details.x-details.x-trust-note > summary > .x-icon { color: var(--x-amber); }

.x-review .x-reconnect-line > a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }

.x-reply-form > .x-review-foot > .x-reply-more-btn { display: none; }
@media (max-width: 639px) {
    .x-reply-form > .x-review-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
    .x-reply-form > .x-review-foot > * { grid-column: 1 / -1; order: 2; margin-left: 0; }
    .x-reply-form > .x-review-foot > .x-btn, .x-reply-form > .x-review-foot > .x-select { width: 100%; max-width: none; min-height: 44px; justify-content: center; }
    .x-reply-form > .x-review-foot > :is(.x-submit-reply, .x-copy-reply) { order: 1; }
    .x-reply-form > .x-review-foot > .x-reply-more-btn:not([hidden]) { display: inline-flex; grid-column: 1; order: 3; width: auto; justify-self: start; margin-left: -12px; }
    .x-reply-form > .x-review-foot > :is(.x-cancel-reply, .x-dismiss-draft) { grid-column: 2; order: 3; width: auto; min-height: 40px; padding: 0 6px; color: var(--x-text-2); text-decoration: underline; background: none; border-color: transparent; }
    .x-reply-form > .x-review-foot > .x-count { grid-column: 3; order: 3; }
    .x-reply-form > .x-review-foot:not(.has-more) > :is(.x-cancel-reply, .x-dismiss-draft) { grid-column: 1 / 3; justify-self: start; margin-left: -6px; }
    .x-reply-form > .x-review-foot > :is(.x-later-btn, .x-voice-reply, .x-check-reply-btn, .x-desk-preview, .x-template-select) { order: 4; }
    .x-reply-form > .x-review-foot.has-more:not(.is-more) > :is(.x-later-btn, .x-voice-reply, .x-check-reply-btn, .x-desk-preview, .x-template-select) { display: none; }
    .x-reply-form > .x-review-foot > .x-spacer, .x-reply-form > .x-review-foot > script { display: none; }
    .x-reply-form > .x-review-foot.is-more > :is(.x-later-btn, .x-voice-reply, .x-check-reply-btn, .x-desk-preview).x-btn-ghost { border-color: var(--x-line); }
    .x-reply-form > .x-review-foot { margin-top: 4px; }
    .x-reply-form > .x-review-foot > .x-btn-ghost.x-btn-sm:first-child { margin-left: 0; }
}

/* ===== UX wave 29 Nov 2026: settings ===== */

.x-feat-rec > .x-card > .x-card-body { display: flex; flex-direction: column; }
.x-feat-rec > .x-card > .x-card-body > a.x-xs { margin-top: auto; align-self: flex-start; padding-top: 6px; }

.x-feat-list .x-feat-links:not(:has(> a:not([hidden]))) { display: none; }

.x-feat-group > summary > .x-feat-count { margin-right: 8px; }

details.x-details.is-card#kit > .x-details-body { padding-top: 14px; }

#device-alerts { padding-top: 14px; padding-bottom: 14px; }

/* ===== UX wave 29 Nov 2026: listing ===== */

#listing .lp-more-head { margin-top: 8px; margin-bottom: 0; }
#listing details.lp-fold > summary { gap: 12px; flex-wrap: nowrap; align-items: center; min-height: 56px; }
#listing details.lp-fold > summary > .x-icon { color: var(--x-text-3); flex: none; }
#listing details.lp-fold[open] > summary > .x-icon { color: var(--x-primary); }
#listing .lp-fold-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
#listing .lp-fold-title { font-size: var(--x-fs-lg); font-weight: 700; color: var(--x-text); }
#listing .lp-fold-sub { font-size: var(--x-fs-sm); font-weight: 400; color: var(--x-text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#listing details.lp-fold[open] > summary .lp-fold-sub { white-space: normal; }
#listing details.lp-fold > .x-details-body { padding-top: 16px; }
#listing details.lp-fold > .x-details-body > .x-form-actions { margin-top: 16px; }

#listing details.lp-fold > .x-details-body.lp-fold-flush { padding: 0; }
@media (max-width: 639px) {
    #listing .lp-fold-sub { white-space: normal; }
}

#listing-score .x-sc-wait { align-items: center; gap: 12px; }
#listing-score .x-sc-wait > .x-btn { flex: none; }
#listing-score > .x-card-foot { gap: 8px; flex-wrap: wrap; }
@media (max-width: 639px) {
    #listing-score .x-sc-wait > .x-btn { width: 100%; justify-content: center; }
}

@media (max-width: 767px) {
    #loc-table .x-loc-sync { flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 6px; }
    #loc-table .x-loc-sync .x-btn { margin-left: 0; }
}

.x-lc-table tr.x-lc-google > td { background: var(--x-surface-2); }
.x-lc-table td:last-child { min-width: 150px; }
.x-lc-table td .x-btn-ghost { margin-left: 4px; }
details.x-details.x-lc-others > summary .x-count-pill { margin-left: 6px; font-size: var(--x-fs-xs); font-weight: 800; padding: 1px 8px; border-radius: var(--x-r-pill); background: var(--x-surface-3); color: var(--x-text-2); }
details.x-details.x-lc-others > .x-details-body { gap: 20px; }

.x-toolbar.x-pk.is-one { justify-content: flex-end; }
.x-toolbar.x-pk.is-one .x-toolbar-end .x-field { align-items: flex-end; }
.x-toolbar.x-pk.is-one .x-help { text-align: right; }
@media (max-width: 639px) {
    .x-toolbar.x-pk.is-one .x-toolbar-end .x-btn { flex: 0 0 auto; }
    .x-toolbar.x-pk.is-one .x-toolbar-end form { justify-content: flex-end; }
}

/* ===== UX wave 29 Nov 2026: turnon ===== */

.x-tabs.x-tabs-phone { display: none; }
@media (max-width: 767px) {
    .x-tabs.x-tabs-wide { display: none; }
    .x-tabs.x-tabs-phone { display: flex; }
}
.x-tabs-here { display: block; flex: 0 1 auto; min-width: 0; padding: 10px 14px; margin-bottom: -1px; border-bottom: 2px solid var(--x-primary); color: var(--x-text); font-weight: 700; font-size: var(--x-fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-tabs-here > .x-icon { vertical-align: -3px; margin-right: 8px; }
.x-tabs-here .x-count-pill { background: var(--x-primary-soft); color: var(--x-primary-text); }

.x-turnon .x-note > div { text-wrap: wrap; }

.x-turnon .x-turnon-plan strong { font-size: var(--x-fs-sm); margin-bottom: 2px; }

.x-turnon > .x-back { margin-bottom: 8px; }

/* ===== UX wave 29 Nov 2026: lead ===== */

.x-table td.x-small > a, #loc-table a.x-small, #loc-table .x-loc-nowidget a, .x-lc-table td div > a:not(.x-btn) { display: inline-block; min-height: 24px; line-height: 24px; }

/* ===== UX wave 29 Nov 2026, round 2: start ===== */

@media (min-width: 640px) { #help-connect { align-items: center; } #help-connect > .x-icon { margin-top: 0; } }

#getting-started .x-checklist-time { display: block; }
#getting-started .x-checklist-time::before { content: none; }

@media (min-width: 640px) { #setup-skip-form > .x-btn-ghost { margin-left: -17px; } }
@media (max-width: 639px) { #setup-skip-note { text-align: center; } }

/* ===== UX wave 29 Nov 2026, round 2: getreviews ===== */

@media (max-width: 1023px) {
    .x-grid-side > .x-stack:has(> #state):has(> #connect-whatsapp) { display: contents; }
    .x-grid-side:has(> .x-stack > #connect-whatsapp) { gap: 16px; }
    .x-grid-side > .x-stack:has(> #connect-whatsapp) > div:has(> .x-back),
    .x-grid-side > .x-stack:has(> #connect-whatsapp) > #state { order: -1; }
}

@media (min-width: 1280px) {
    .gr-cust-new #ask-card .x-form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(290px, 1.5fr); }
}

/* ===== UX wave 29 Nov 2026, round 2: reviews ===== */

@media (max-width: 639px) {
    .x-reply-form > .x-review-foot.is-more > :is(.x-later-btn, .x-voice-reply, .x-check-reply-btn, .x-desk-preview) { border: 1px solid var(--x-line-strong); background: var(--x-surface); color: var(--x-text); box-shadow: var(--x-shadow-xs); }
}

.x-page-sub.x-rd-sub { max-width: none; text-wrap: wrap; }

@media (max-width: 767px) {
    form.x-year-pick.x-show-mobile { display: block !important; margin-bottom: 14px; }
}

.x-table.x-heat.ip-heat-fill { width: 100%; }

@media (min-width: 768px) {
    .x-tabs.x-rv-tabs.has-extra > a > .x-icon, .x-tabs.x-rv-tabs.has-extra .x-menu-panel > a > .x-icon { display: none; }
}

/* ===== UX wave 29 Nov 2026, round 2: listing ===== */

.x-lc-table td:last-child { min-width: 0; }
.x-lc-table td:first-child a { white-space: nowrap; }
@media (max-width: 767px) {
    .x-lc-table.is-stack td:first-child > div { text-align: right; }
}

.x-loc-nowidget { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 767px) {
    .x-table.is-stack .x-loc-nowidget { align-items: flex-end; }
}

@media (max-width: 639px) {
    #listing .x-form-actions { display: flex; flex-direction: column; align-items: stretch; }
    #listing .x-form-actions > .x-btn,
    #listing .x-card-foot > .x-btn { width: 100%; justify-content: center; }
}
